text:
Why does getblocktemplate use priority for transaction selection?
I don't know how getblocktemplate works exactly, but it seems to include transactions based on priority.
Selecting transactions based on priority isn't the most profitable method for building a block (as opposed to fee/byte), so is getblocktemplate only going to be used by miners who haven't figured out how to construct their own blocks?
Why would anyone use getblocktemplate otherwise?

Bitcoin transaction priority calculation
https://github.com/bitcoin/bitcoin/blob/86b800c6a299455580fe76e5fb43218f0222e179/src/miner.cpp

Getblocktemplate builds a block based on configuration parameters. In recent versions, the default is to use fee per byte as criterion for the entire block.
History
In versions of Bitcoin up to 0.6, priority based selection was used for the entire block. It was a means to encourage the young Bitcoin economy to grow. However, it also had a minimum transaction fee that increased as the space in blocks grew closer to the limit.
In version 0.7 the -blockprioritysize setting was introduced, which divided blocks in a priority area and a fee area. The priority area was there to support a small number of low-fee transactions to continue, and was limited to 27 kB by default (50 kB since version 0.9). The fee area is sorted by fee per byte, and maximizes total fees for miners.
Recent versions
In Bitcoin Core 0.12 the default setting for the priority size was reduced to 0. It also introduced a more efficient algorithm for selecting transactions, which works suboptimally for the priority area.
In the upcoming Bitcoin Core 0.13 release the algorithm selection algorithm will be improved again and use Child-pays-for-parent (CPFP) logic. This logic uses fees from unconfirmed descendant transactions to determine whether to include parents. It increases the total fees that can be taken compared to the previous algorithm, and allows wallets to increase fees on a transaction by spending its change outputs with higher fee.

Thank you, Peter. Whilst I have you, does getblocktemplate return the list of transactions in any particular order?

Yes, in the order they were selected for inclusion. This means the highest priority/fee_per_byte first.


text:
How can I find my Bitcoin address on Airbitz?
I'm new to Bitcoin. I'm using Airbitz on my phone and I need to find my wallet address.

If you click in the top left that brings up the menu, select "Request". You will then be shown a screen with a QR code, your bitcoin address is below that QR.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Any Innovations in altcoin tech for Bitcoin’s Script language?
Bitcoin’s Script is the forth-like, non-Turing complete language used for transactions. However, in practice, a very limited number of kinds of scripts are allowed, a number of opcodes have been disabled, and even a number of bugs in script have to be replicated to maintain consensus.
Have there been any innovations by the altcoin community, in their forks of Bitcoin’s Script? Any with non-secp256k1 crypto? Any with more functional bignum / arbitrary integer functionality that can do cryptographic primitives? Any that add Turing complete functionality?

Not anything significant that I know of. Note that more and more operators in the Bitcoin script have been/are being re-enabled and other new operator and script features have been/are being implemented. Turing completeness in this context is merely a buzz word that doesn't make sense to begin with. Most use cases need their own P2P network and data storage system (blockchain or otherwise) and only need to anchor hashes in the Bitcoin blockchain (if at all).

Hi Christopher, have you looked into Ethereum at all? I don't know much about its scripting procedures, but I know it's touted as being Turing complete, and just generally more featureful. More complexity opens the door for more attack vectors, though. This seems like a good starting point: https://ethereum.gitbooks.io/frontier-guide/content/writing_contract.html

"Turing complete" is basically nonsense, the authors don't even call it that.

Bitcoin Cash is a code and blockhain fork (blocks 0 to 478558 are the same on both blockchains) which did the following upgrades to Bitcoin Script VM:

2017 Malleability fixes

Mandatory use of SCRIPT_VERIFY_STRICTENC
Enforcement of LOW_S signatures and NULLFAIL (BIP-0146)

2018

OP_CAT, OP_SPLIT, OP_AND, OP_OR, OP_XOR, OP_DIV, OP_MOD, OP_BIN2NUM, OP_NUM2BIN
OP_CHECKDATASIG, OP_CHECKDATASIGVERIFY, and more malleabiliy fixes ("push only" and "clean stack" rules). This made the precedent of allowing Script to "look" at other inputs & outputs in the same transaction, which enabled first covenants.

2019

Schnorr signatures
Schnorr multisig, and more malleability fixes (minimal push and minimal number encoding)

2020

OP_REVERSEBYTES

2021

Allow multiple OP_RETURNs

2022

SriptVM 64-byte integer support, enabled OP_MUL
Native introspection opcodes: OP_INPUTINDEX, OP_ACTIVEBYTECODE, OP_TXVERSION, OP_TXINPUTCOUNT, OP_TXOUTPUTCOUNT, OP_TXLOCKTIME, OP_UTXOVALUE, OP_UTXOBYTECODE, OP_OUTPOINTTXHASH, OP_OUTPOINTINDEX, OP_INPUTBYTECODE, OP_INPUTSEQUENCENUMBER, OP_OUTPUTVALUE, OP_OUTPUTBYTECODE

2023

CashTokens - native consensus-enforced UTXO token primitives and ScriptVM opcodes (OP_UTXOTOKENCATEGORY, OP_UTXOTOKENCOMMITMENT, OP_UTXOTOKENAMOUNT, OP_OUTPUTTOKENCATEGORY, OP_OUTPUTTOKENCOMMITMENT, OP_OUTPUTTOKENAMOUNT) to integrate them with contracts
Address the hash collision problem by enabling a 32-byte BIP-0016 output pattern - P2SH32

Turing completeness
Bitcoin Cash Script is not Turing-complete but OP_CHECKDATASIG (2018) and introspection opcodes (2022) made transaction chains Turing-complete. There's been some work discussing why this is so: Self-Reproducing Coins as Universal Turing Machine, A. Chepurnoy, Vasily Kharin, D. Meshkov
Note that nodes wouldn't be automatically evolving the multi-TX program. Some blockchain-external agent would have to construct the next transaction that satisfies the covenant and then broadcast it to the network. The program could code-in a reward for this and incentivize anyone to construct and post the next transaction, or external agents could do it for free. The program would halt when it runs out of money for the fees/incentives, but then again, other external agents could give it more money to continue evolving.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How often do miners recalculate the merkle root they're working on?
I think that I understood most of the things about Bitcoin but there is still a mystery.
We can see on https://blockchain.info/ that there are up to 4/5 new transactions every seconds.
My question are :
Do miners recalculate the Merkle root 4 to 5 times per second ?
What happens to transactions made exactly as the same time a block is released?
I have seen that miners can choose the transactions they want to accept, but if it was the case I would be a miner, then accept maybe 2 or 3 transactions, find the nonce and get the 25 bitcoins reward. Why is that not possible?
I thank you a lot for your answers and I hope you will be able to help me. Thank you.

There are indeed many new transactions every second. The way miners deal with it is two-fold:

If an appropriate proof-of-work is found on any merkle root, simply publish that block and any transactions that did not make it into the block go into the next block (assuming sufficient fees)
Otherwise, calculate a new merkle root every so often (varies per miner, but let's say for the sake of argument that it's 5 seconds) and try to calculate the proof-of-work with the transactions included.

The reason why miners don't accept just 2 or 3 transactions is that it's just as much work to find the nonce for the proof-of-work whether there's 1 transaction or 1000 transactions. The probabilities remain the same. The nice thing about including more transactions as a miner is that you get more mining fees out of them.

anything you change about the block changes the has,  i.e. if you use a new timestam, add a transaction, change the order of transactions... there is no guarantee to find a block for any nonce.

Looking at the fields in the block header, the nonce field is a 32 bit integer.  This means that the nonce is an integer in the range from 0 to 4,294,967,295.  As you point out, a miner with just an off-the-shelf GPU can easily calculate this number of hashes in less than a second.
In the early days of bitcoin, when the difficulty requirement was much lower than it is now, miners would scoop up a bunch of transactions, take the Merkle Root, use the current time as the timestamp, create the header, then iterate through the range of nonces - and they stood a decent chance of finding a nonce that (when combined with the rest of the info in the headers) produced a SHA256 hash that satisfied the difficulty requirement.
But nowadays, with the difficulty requirement much higher, miners stand a very small chance of finding a nonce that (when combined with the rest of the info in the headers) produces a SHA256 hash that satisfies the difficulty requirement after iterating through the range of nonce values.  Therefore, they have to try again, by changing something else in the headers (e.g. the timestamp, or the transactions in the block), then iterate through the range of nonce values again in hopes of finding one that satisfies the difficulty requirement.  This process repeats many times, until finally a miner finds the winning combination of header information and nonce that produces a hash that satisfies the difficulty requirement - which should happen approximately every 10 minutes by design.


text:
How should a node deal with a block that is not connected to the chain?
Suppose I am a node in the Bitcoin protocol and I receive a block that does not point to any  block in my current chain. Should I keep it on the side, waiting for missing intermediate ones? Should I propagate it? Should I just erase it?

The Bitcoin client used to download blocks without necessarily knowing if they could connect it to their current chain. If it couldn't connect a block to the genesis block, it would just keep it in memory. This was a waste of memory (up to 750 MB could be used up before it started dropping blocks) and bandwidth (if you drop a block that you need, that wastes bandwidth)
It does something smarter now, though. It builds a chain of block headers to the current tip of the chain, then downloads the block contents. Not only is this simpler, and more resource efficient, it also allows you to download multiple blocks in parallel. Blocks are written to disk as soon as they're downloaded.
Since there's no way that you will receive a block that you didn't ask for, the current Bitcoin client will drop the block and permanently disconnect from the peer that sent it.

thanks this is interesting - but my question (perhaps poorly phrased) is different: if i am one of the nodes that maintain the blockchain and I happen to receive a block which i cannot attach to my chain, what do I do with it?

@user123933 Assuming you're running a recent version of Bitcoin, you never asked for it in the first place, so throw it away. If you're running an older version, keep up to 750 of them in memory so that you can attach them later.

Recent versions will actually disconnect and ban peers that repeatedly give them block(header)s with unknown parent. If they follow the protocol, this will never happen, so there is no need to "deal" with it at all.

Blocks that are not yet confirmed look this way, so just wait a bit then try again.  Continue checking for x amount of time before declaring it an orphan.
There may even be other blocks that have not been assigned a place in the blockchain that are ahead of it.  Most blocks are confirmed pretty quickly, but others can take several minutes.
So far we haven't yet seen clearance times measured in hours.  And if the block size is increased simultaneously with the doubling of the work factor this summer (the first since 2012) we may well see ever longer clearance times.  So as  you encounter these blocks they may be in the pipeline for confirmation.
If you are operating as a full node you will notice them coming through.  If you can't confirm then your node won't answer at all.  If you are looking at the stream directly be sure to look at when your node chooses to confirm or not.
In other words, don't think you need to do anything manually.  Your node knows what to do.
Cheers

Is it possible that you're confusing "confirmed" with "validated"? Confirmation has a very specific meaning in the context of blocks and what you’re describing doesn't match it.


text:
Would miners have an advantage by proceeding randomly?
If most miners are looking for solving their proof of work in a prescribed order (perhaps preceded by a prescribed way to break down the search space, e.g. by dichotomy); is there not an advantage for a miner (especially a low hash power one) to proceed randomly and try to avoid common search space enumeration patterns where it will be more competitive?

Essentially, everyone is already proceeding randomly, and there is no common search space.

When miners are trying to find a block, everyone works on a different set of candidates: The block reward is paid out through the coinbase transaction. The coinbase transaction's output is specific to the miner because it includes the miner's address as recipient. The coinbase is part of the transaction set that is used to derive the Merkle root. The Merkle root is included in the blockheader. Ergo every mining entity works on different block candidates.
SHA-256 is a cryptographic hash function. One of their properties is that any change in the inputs will cause a completely different output. There is no predictable relation between the change in the input and the change in the output. Therefore, you cannot predict where you will find a block – any new candidate whatsoever could be a valid block. This means that there is no progress towards finding a block, there is no stack of work to power through – it's just random chance. The only way to predict whether a candidate will resolve to a valid block is by actually testing it.

Hence, the only thing that matters to every miner is to check as many unique candidate as possible, meaning that (beside faster hardware or quicker calculation of the hashing) it can only be sped up by making it as fast as possible to iterate through candidates. That's why miners prepare a blockheader and then for the most part only increment the nonce, extranonce, and the timestamp.

if i may ask another question: while mining, new transactions will arrive to you; when do you decide to continue looking for a solution and ignore the new transactions and when to give up on your current search, add the new transactions on top of your current list, and start again the search?

@user123933: It would be best if you created another question post when you have another new question. :) But have a look at How often do miners recalculate the merkle root they're working on?, or When does a miner decide to stop collecting transactions and start calculating hashes to try to win?: Once miners have tried all combinations for the block header they are currently working on, they'll have to create a new one anyway. They may as well calculate a new merkle root then.


text:
How to trigger port for Bitcoin client (e.g. 8333)
According to this it's possible to have incoming connections to Bitcoin client by forwarding port 8333 on the router. I was wondering if there is some specific port range Bitcoin Core uses for making outgoing connections which could be used as a triggering rule? This way when the client is not running, port would be closed, plus it could be used by different machines behind the router without configuration changes (I know I could forward different ports to different machines and then change the incoming port in client configs)
EDIT:
@NateEldredge is right.
My current setup is as follow:
Rule name: Bitcoin
Triggered range: 8333-8333
Forwarded range: 8333-8333
If Bitcoin Core is running the port is open (according to http://www.canyouseeme.org/). If it's closed the port is closed too.
The only catch is it won't work if all 8 outgoing connections will use non default port but it shouldn't happen too often if ever.

You could look for outgoing connections with destination port 8333, if your router supports that.

@NateEldredge My router doesn't specify if it expects source or destination port as triggering port but it seems it's the second case and you are right. Please convert your comment to an answer so I can accept it.

Bitcoin Core doesn't seem to have an option to specify the source port for outgoing connections, so you probably can't assume anything about the source port.
However, if possible, you could configure your router to look for outgoing connections with destination port 8333, which will probably be the port used by most peers.


text:
getnewaddress (RPC) on encrypted bitcoin wallet without wallet password?
Say for example an encrypted wallet has 5000 addresses already pre-generated in the keypool.
Can getnewaddress be called via RPC command without knowing the actual wallet password?
I envisage a shopping cart script which calls getnewaddress to provide a customer with an address to spend to. The shopping cart would know the RPC password, but not the wallet password. The shopping cart never needs to spend funds.
If the shopping cart was hacked, can bitcoin be stolen?

You could just try it (on testnet to be safe) and see what happens...

Check out Hierarchical Deterministic Wallets (BIP32) and eventually this blog-post to get a better understanding of the implications it brings.
There are many wallets today that have BIP32 implemented. Bitcoin Core is NOT one of them and should probably not be used for the wallet feature.
In the scenario you described, your webserver will provide new public addresses, but will also know the private keys to them. Therefore, if your webserver were hacked, the bitcoins could be spend from those addresses.
With BIP32 you can separate the information to create public keys from the information needed to create the corresponding private keys.
The information to generate the corresponding private keys can be kept in Cold Storage.

Yes.
This works. Wallet can stay locked and 5000 addresses will be generated. It is completely safe, even server is hacked.
After that you need to unlock the wallet so another 5000 addresses to be pre-generated. However, this step is not completely safe. Suppose server is hacked and someone got the password via key logger.
Another possibility is... when 5000 addresses are generated, you stop bitcoind and upload new wallet with new 5000 addresses.


text:
Will my wallet be extended or replaced when I recover another wallet in Breadwallet?
Will my current balance combine with the balance on the other wallet I want to recover?
Or do I need to empty the wallet on my phone before recovering the wallet that was on my old phone?

If you start or recover a wallet it is completely isolated from your old one, the balance will not be combined. You don't need to empty it first, but it will be awkward to keep swapping backwards and forwards between two wallets if you choose to do so (you'll need to re-sync each time).


text:
Can I retrieve my bitcoins from years ago that I never received?
How can I get hold of my bitcoins that never made it to my wallet years ago?
I purchased some bitcoins years ago (have got my receipt and all emails from who I purchased). I downloaded Bitcoin-Qt 7, synced it, got an address for the seller. It went through, but I could never sync it again as I was using prepaid internet credit. So, the bitcoins never got to my wallet! I gave up for a few years, but now I have unlimited download. Now Bitcoin-Qt 7 has a download issue. I switched to Bitcoin Core 11 now. I would like to know how I can get hold of my bitcoins?
Ther was no data transferred over to Bitcoin Core 11 sadly. Please can any one help me?

I purchased them through spendbitcoins and they state that if I haven't received them to contact my wallet provider but I can not find a way to contact my wallet provider (bitcoin qt). Does any one know how or more to say who I contact to prove my proof of purchase and my coins sent to my bitcoin core wallet???

If you still have the wallet.dat file and your password you can access your bitcoins. You do not have to use Bitcoin-Qt 7 and it does not matter if your wallet ever synced before. If the sender sent the bitcoins to an address you control and the transaction was confirmed, the bitcoin are yours.
https://blockchain.info/wallet/import-wallet
If you want to use a new version of Bitcoin-Qt you can do that too: See Import wallet.dat into a new Bitcoin-Qt client

Well I have looked all through my bitcoin qt 7 file and there is no wallet.dat file. For some reason there is nothing on my back ups on my hard drive. My wallet never synced for it to reach my wallet. what are my options now? I have block chain info and where it is. I have the address from my bitcoin qt wallet where it was ment to go but never did! So should i try and drag my bitcoin qt wallet to block chain and see if it works! I would think it wouldnt since wallet.dat is strangely not there!   @animal instinct

Is it possible that it all transferred over to my bitcoin core 11 when I downloaded the wallet? Some other bloke said that would happen! But i havent seen my bitcoins or the address they were sent to in my bitcoincore wallet!   @animal instinct

Go to the debug console in 0.11 and type validateaddress address (filling in your actual address). It will report ismine : true if that address is in your wallet.

@kym: Is your Bitcoin Core 11 fully synchronized now?


text:
Is there an API that supports different Bitcoin wallets?
Is there an API that has sending and receiving functionality of different Bitcoin wallets such as Coinbase, Bitcoin wallet, etc...
Or would I have to manually incorporate each wallet API myself?

I found out about Coinkite after I posted this. I send an email to their support team asking:
"With this platform, will I be able to have a user link their wallet and be able so send bitcoins to another users wallet, regardless of what wallet they use?"
I got a response of "Yes" and they sent me a link to their docs


text:
Why can't bitcoin miners modify transaction outputs?
I am learning the Bitcoin protocol by reading the bitcoin developer reference documentation.
As far as I know, a raw transaction consists of:

Version (which is always 1)
Inputs. Each input contains:

Hash of the transaction that contains the output that we are going to spend here
Index of the output in that transaction
Script that satisfies the conditions placed in the script of the referenced ouput.

Outputs. Each output contains:

8 bytes for the value in satoshis
Script with the conditions that must be satisfied in order for this output to be spent.

Locktime (which is usually 0)

I am not very sure what the script of the inputs contain, but I guess it should contain the public key, and a signed message.
My question is, why can't the miner modify the scripts in the outputs (replacing the address by their own), if those scripts are not part of the message that the real user had to sign?
Or maybe this question would be better asked like this: What is signed in the input scripts?

What is signed in the input scripts?

Depends.
The case of a P2PKH spending transaction, the scriptSig (input script) for each input will contain a ECDSA signature and a byte which donates what exactly was signed called the SIGHASH flag. In almost all cases this is SIGHASH_ALL, which means that the signature covers the entirety of the transaction outputs and inputs, less other signatures. If the transaction output script is modified and any input has signed it with SIGHASH_ALL, that signature would be invalidated and the transaction can not be included in a block.
Other flags can have the effect you describe, if I make a transaction which only signs a single input with SIGHASH_NONE (this signature only covers the input), then anybody in the network is free to modify the outputs as much as they want before it gets buried in a block. Nobody uses it like that for exactly this reason.
There's two other flags available today SIGHASH_SINGLE and SIGHASH_ANYONECANPAY. The former allows you to sign only one of the outputs and ignores the rest (eg vin:1 signs only vout:1), however this is buggy and not at all intuitive. The latter allows you to make transactions where the inputs are a wildcard, spend this output to this script, and make up the deficit using whatever other inputs you want.
In general nobody uses SIGHASH flags, the majority of all transactions are strictly SIGHASH_ALL.

I am not very sure what the script of the inputs contain, but I guess it should contain the public key, and a signed message.

This depends entirely on what type of output is being spent, but we'll assume it's a very typical Pay to Pubkey Hash (address) transaction. In this case the scriptSig is extremely simple.
304402204bc6ed9b0122fc145031d4d9f6a30fbb28b63d152e3848c785a65f1e0b97ea8d02205a99bc13ba9293526ed175947cb756c5e3fca0a98890b88551e3e6c4c0bb6f5601
04988b34239b2f1c2441db4d50911b0550350414ce00b88f8dd39964f1a8631824db8e78b61d0ea6f3d9fcffcf2cd20be7d88a1583854682db4d136acd08542c3d

We have two data items, the first is an ECDSA signature in DER format, and the public points of the P2PKH output we are spending. The last byte of the signature is the SIGHASH flag, which in this case is 0x01 or SIGHASH_ALL.
If you want to follow along with how these structures work, webbtc.com has a great script visualization tool which will allow you to see how these go together. In particular here is a reasonable example transaction with one input and output, and here is a play through the script execution which does a good job of explaining how and why it is valid.


text:
0/confirmation race attack double spend transactions
I am developing a point of sale bitcoin app, which should accept "fast" transactions (~30 sec for merchant to accept). I researched double spending questions here already, but it is still unclear to me, what happens within the time frame before a transaction is actually included into a block.
Considering the case of a double spend attempt, where an attacker needs to pay to a merchant. The attacker creates and propagates a respective transaction A into the the bitcoin network. Transaction A is added to the main memory of mining nodes and is "waiting" for inclusion into one of the next blocks. The merchant is informed of the propagation of transaction A by the nodes he is connected to. Before transaction A is actually included in a block, the attacker creates and propagates another transaction B, which has the same inputs as A (double spend).

What happens if a miner (which has transaction A in his main memory) gets the conflicting transaction B?
Can a merchant be sure, that transaction A will be confirmed, if it is propagated successfully to let's say all or most miners?
Would a miner throw away transaction A and include B, if B has higher transaction fees, a smaller size in bytes, or of other attribute?

Basically what you'd need is something like the Lightning Network. But that is by no means operational yet and will likely take more than a year before you can reasonably start testing. And longer before there's enough adoption by wallets and users.

The bottom line is that there is no way for you to safely accept zero confirmation transactions.

What happens if a miner (which has transaction A in his main memory) gets the conflicting transaction B?

Depends on what software the miner is running and how they have configured it.

Some nodes will reject it.
Some nodes will accept it.
Some nodes will accept it conditionally.

There's no knowing what people are running on mining nodes or what rules they have.

Would a miner throw away transaction A and include B, if B has higher transaction fees, a smaller size in bytes, or of other attribute?

Ditto.

Can a merchant be sure, that transaction A will be confirmed, if it is propagated successfully to let's say all or most miners?

Absolutely not.
An alternative can be mined at any time, invalidating the original. This attack has been used in the real world to defraud websites of their Bitcoin payments to the tune of millions of dollars. Successful double spends can even happen once the transaction has been included in a block, which is why a large number of confirmations is suggested for people accepting Bitcoin as payment for services.

Hmm, so if this is all true, reliable transactions cannot be done in a POS setting.  Either one is doing something like payment channels, or living with the risk. Nobody would wait for more than 10 minutes at the counter after a purchase.

however there is this company blockcypher, which calculates a confidence value for an unconfirmed transaction. What other approach could be used, if not how far a transaction is propagated into the network to calculate such a value?

It's easy to sell nonsense metrics if people don't understand what they mean. Miners can include whatever they want, irrespective of what people think is in peoples memory pools.

if a miner finds a double spend attempt, will he propagate the transaction further or not? Is there anything special he is doing?

That's up to the miner.

Relying on an unconfirmed transaction is much riskier than relying on 1-confirmed transaction.  And in turn, relying on a 1-confirmed transaction is risker than relying on a 2-confirmed transaction.
This will always be a choice best made on empirical data.  One of the more disappointing ideas is that, because 0-conf is less safe, all use of it should be eradicated.


text:
Relationship between concentration of bitcoin wealth and foreign exchange value?
Is there a relationship between the equality of wealth of bitcoin holders, and it's foreign exchange value?
E.g. if there is a large transfer of bitcoin to a single owner, should this influence its value as a currency?

Are you talking about a change in supply/demand or a change in total number of units? If you take into consideration how such an acquisition comes to pass,  I think your question might answer itself. Or I just don't get it. ;]  please clarify?

You're right, this is ambiguous. i mean if many people transfer their bitcoin to a single holder of bitcoin. Should this decresase demand to buy bitcoin with foreign currencies?


text:
Minerd not showing boo or yay
I ran
./minerd -a sha256d -o stratum+tcp://stratum.f2pool.com:3333 -u (my username).node1. Here is a sample of the output:
[2015-07-05 07:15:23] thread 1: 146649416 hashes, 2332 khash/s
[2015-07-05 07:15:24] thread 2: 146553656 hashes, 2336 khash/s
[2015-07-05 07:15:25] thread 0: 146977944 hashes, 2332 khash/s
[2015-07-05 07:16:34] thread 3: 140158460 hashes, 1976 khash/s
[2015-07-05 07:16:34] thread 2: 140169760 hashes, 1986 khash/s
[2015-07-05 07:16:34] thread 1: 139945520 hashes, 1968 khash/s
[2015-07-05 07:16:36] thread 0: 139935536 hashes, 1979 khash/s
[2015-07-05 07:17:27] thread 1: 118086220 hashes, 2251 khash/s
[2015-07-05 07:17:27] thread 2: 119150888 hashes, 2247 khash/s
[2015-07-05 07:17:27] thread 3: 118589808 hashes, 2228 khash/s
[2015-07-05 07:17:29] thread 0: 118715120 hashes, 2241 khash/s
[2015-07-05 07:18:25] thread 3: 133685248 hashes, 2320 khash/s
[2015-07-05 07:18:25] thread 2: 134829324 hashes, 2331 khash/s
[2015-07-05 07:18:25] thread 1: 135066588 hashes, 2305 khash/s
[2015-07-05 07:18:27] thread 0: 134440760 hashes, 2324 khash/s
[2015-07-05 07:19:26] thread 1: 138319856 hashes, 2290 khash/s
[2015-07-05 07:19:26] thread 3: 139194024 hashes, 2283 khash/s
[2015-07-05 07:19:26] thread 2: 139838276 hashes, 2284 khash/s
[2015-07-05 07:19:27] thread 0: 139453064 hashes, 2298 khash/s
It just stays like this, with no yays or boos... What am I doing wrong?
(OS X Yosemite)

F2Pool (along with most today) don't offer share difficulties low enough for CPU mining, in this case the default is 1024. It will take on average one week to mine a single share at this point in time, and it will pay out less than 100th of a Satoshi (0.0000000001 BTC, 0.00000002608 USD) for the CPU time expended. CPU mining has been unprofitable since 2010 as the power costs for doing it are many orders of magnitude higher than the income you can make doing it.


text:
How to best mine on a smartphone?
As you perhaps already know, mining started at the beginning with processors then graphic card.
I want to try to mining on a smartphone. Which electronic component will be the best to calculate hash? Processor or graphic component?
The purpose is only for testing on testnet and get the best performance.
Keywords such as mining and smartphone don't bring me any relevant results via Google.

Mining on a smartphone is unfavourable and might drain your battery very fast. For bitcoin-mainnet and bitcoin-testnet don't even try to mine on a smartphone (it won't be fun).
If you like to do this for testing or research purposes, you probably should use your smartphones GPU over openCL or renderScript.
Also have a look at bitcoin-cores mining code if you like to know more about how mining works (in detail).

Thanks you ! You give me a way to search much more accurately what I would like to try.
Like you said it's for research & test

according to you which electronic component will be the best to calcul
  hash ? Processor or graphic componement ?

Both of them are absolutely useless for generating cryptos. Do not waste energy and time.

You are right, of course generating crypto even the new one with a smartphone is useless, it's more for research purposes but I forget to include that. Anyway thanks for your comment


text:
Does cpuminer do its work?
I have a question about using cpuminer to mine bitcoins. I know that it's not efficient, but I'm not about making any money from it (obviously), I just want to mine some fractions of a bitcoin.
Now, I have downloaded and compiled it on Ubuntu and then started the program as seen in the output:
 ./minerd --url=stratum+tcp://<server>:3333 --userpass=<username.worker>:<password> --algo=sha256d

[2015-04-26 20:22:45] Starting Stratum on stratum+tcp://<server>:3333
[2015-04-26 20:22:45] Binding thread 2 to cpu 2
[2015-04-26 20:22:45] Binding thread 1 to cpu 1
[2015-04-26 20:22:45] 4 miner threads started, using 'sha256d' algorithm.
[2015-04-26 20:22:45] Binding thread 0 to cpu 0
[2015-04-26 20:22:45] Binding thread 3 to cpu 3
[2015-04-26 20:22:48] thread 3: 2097152 hashes, 1814 khash/s
[2015-04-26 20:22:48] thread 0: 2097152 hashes, 1774 khash/s
[2015-04-26 20:22:48] thread 1: 2097152 hashes, 1742 khash/s
[2015-04-26 20:22:48] thread 2: 2097152 hashes, 1355 khash/s
[2015-04-26 20:23:54] thread 2: 81299404 hashes, 1230 khash/s
[2015-04-26 20:24:05] thread 1: 104547880 hashes, 1354 khash/s
[2015-04-26 20:24:13] thread 3: 108821800 hashes, 1272 khash/s
[2015-04-26 20:24:25] thread 0: 106421736 hashes, 1095 khash/s
[2015-04-26 20:25:01] thread 2: 73787712 hashes, 1102 khash/s
[2015-04-26 20:25:07] thread 1: 81252652 hashes, 1312 khash/s
[2015-04-26 20:25:14] thread 3: 76317796 hashes, 1256 khash/s
[2015-04-26 20:25:27] thread 0: 65677172 hashes, 1051 khash/s
[2015-04-26 20:25:52] thread 2: 66108472 hashes, 1305 khash/s
[2015-04-26 20:26:12] thread 3: 75386708 hashes, 1307 khash/s
[2015-04-26 20:26:15] thread 1: 78701868 hashes, 1152 khash/s
[2015-04-26 20:26:28] thread 0: 63037412 hashes, 1031 khash/s

The problem I have now, is that I never get any output like this:
[<Date>, <Time>] accepted: x/y (x/y%), <bla>khash/s (yay!!!)

and in the mining pool, I dont see my worker online.
I wonder now, if my computer does any work at all, or if it is just too slow and all the work it puts into mining goes to waste.

What is the share difficulty for your pool? You can use that with your hash rate to compute approximately how long you should have to wait to have a good chance of mining a share. Given how much slower cpu mining is than ASICs, I would not be surprised if the answer is "a very long time".

Not directly related to your current issue, but you should also check on your pool's minimum payout.  In many pools you don't get paid unless you have earned at least BTC 0.001, about USD 0.25, or more (BTC 0.01 is another common value).  Based on the current network difficulty and your current hash rate of about 5 MH/s, you can compute that you will reach this amount in approximately 52 years.  (No, I am not joking, that is actually the number.)  So even if everything is working properly, it's a waste.

You are mining, but most pools today have a minimum share difficulty requirement, otherwise very fast miners bombard them with shares that they have to process and discard. For many pools this is at a minimum of 128 or higher, meaning it would take several days for a CPU miner to find a share on average. No pool has a payout of any less than 0.00001 BTC, so there is absolutely no chance of you ever being paid for your work if you are mining using a CPU or GPU at this point in time.

You're basically a guy with a teaspoon in a world full of steam shovels. It will take days for you to do what others do in seconds.

CPUMiner serves it's place in the arsenal of mining software options, but for Bitcoin, it would not be effective unless used on a very very large scale.
I can't remember the specifics, but a video game manufacturer 2 years back essentially coded in a CPUMiner as a trojan, which would essentially ramp up when the system was idle.
They were hit with huge fines... but yes, CGMiner could mine bitcoin, if you pointed the miners to a single or multiple stratum proxies (in between) the miner systems and the destination pool.
Get CPUMiner deployed on 100s of 1000s of consoles, systems, even iPhones (millions), and yes you would see BTC revenue.
As far as GPUs, there are always new currencies being developed. Just know it's high risk and very rigged by the developers of said currencies.


text:
Why is the wtxid considered malleable?
Why is the wtxid considered malleable since the transaction is unconfirmed?
How can a third-party modify it?

All transaction data is committed to the WTXID, unlike in the case of TXID's.
Malleability is found in the unlocking script/data of a transaction. It is malleable, because is not committed to the signature (circular dependency).
Sources of TX Malleability:

Signature Malleability
Input Script Malleability

See BIP62 for a great overview of TX malleability sources.
The unlocking script data is found in input scripts (non-witness tx's) and witnesses (witness tx's). For a witness transaction, if the witness is modified in a way that doesn't affect validity, this necessarily changes the resulting WTXID.
The TXID's of witness transactions are not malleable, because the input script is empty and witness data is stripped for its TXID derivation. Transactions are not referenced by WTXID, but by TXID's.

I should mention, even if only TXIDs are committed to block headers (merkle root), WTXIDs are committed to a coinbase output (witness root), so that once confirmed, none of the witness transaction data cannot be modified.

To add to James' answer, the "segregated" witness can be switched out for an alternative valid witness which changes the wtxid but not the txid. The txid stays the same if you change the witness as the witness is not hashed for the txid but is for wtxid.
Thanks to Gloria Zhao for providing this graphic from BIP144 during a Bitcoin Core PR review club in June 2021.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Could a malicious attacker subvert the Bitcoin network by failing to create a block?
I know its astronomically improbable, but say a malicious node "wins" the proof of work inherent to the Bitcoin protocol. If a malicious node simply waited indefinitely, or maliciously disconnected during the block creation process, what would the Bitcoin network do about it? If a block isn't created will the network just hang indefinitely, or is there some way of overcoming a halt like this?

Possible duplicate of https://bitcoin.stackexchange.com/q/22978/5406

The other miners will not be aware that this malicious miner has find the correct hash(win) since he has not propagate it, so they will still try to find the correct hash and some second later one of them will find it correct and propagate it, then cycle will repeat again without anyone knowing that this malicious miner has win second before the one that has officially win it.

Interesting. How about proof of stake?

There is no competition between miners in proof of stake, it depend on the implementation but for EOS for example which is Delegated proof of stake, if one of the 21 selected current "block producer" is unable or refuse to publish one of his block, the code force the next scheduled block producer to take his place.


text:
what's inside empty blocks? what purpose does it serve?
i understand that blocks are created if there's a transaction, i've also seen many similar questions asked before about this, but i still wonder many answers stating that miners will mine empty blocks, this lead me to another set of questions haven't answered before.

what's inside those empty blocks? (i mean, what is "computationally expensive" from an empty item)
how can a system creates blocks that are empty and have no use (not for transactions use)
what happen if there are transactions example like sending btc to other address but nobody mining it (verifying it through mining), will the transactions ever get through to the destined address?

hope to find answers for this question, since i'm building a blockchain and it struck my logic multiple times

what's inside those empty blocks? (i mean, what is "computationally expensive" from an empty item)

Empty blocks still contain data. They aren't devoid of data, they simply do not have transactions other than the coin generation transaction (known as the coinbase transaction) in them. Since an empty block does not contain any transactions from the Bitcoin network, it is considered to be empty. Empty blocks are still computationally expensive because miners still have to produce a Proof of Work. They still have block headers which are 80 bytes and have all of the fields that non-empty blocks do. They still have a list of transactions; but that list just contains one transaction, the coinbase transaction, which pays the miner the block subsidy.

how can a system creates blocks that are empty and have no use (not for transactions use)

Empty blocks still have a use. They aren't completely useless. Firstly, they extend the blockchain adding additional work to the blockchain. The transactions that a block contains does not effect how much work needs to be done to mine the block, so empty blocks strengthen the security of the blockchain by adding to the cumulative work gone into the blockchain.
Empty blocks also introduce new coins to the Bitcoin system. They still pay miners for the work that they did, so new coins are generated and paid to the miner of that block. This is part of the coin generation transaction included in the block itself as the only transaction.
Additionally, when there are no transactions, the network still needs to move on. There still needs to be blocks mined, so empty blocks must be allowed in order for the blockchain to continue.

what happen if there are transactions example like sending btc to other address but nobody mining it (verifying it through mining), will the transactions ever get through to the destined address?

If nobody ever includes a transaction in a block, then the transaction is never considered to be final. It will still appear in users' wallets as unconfirmed and they will see the coins. They can even spend the outputs of that transaction, but creating transactions from unconfirmed transactions is not advised. Such a transaction would also be unconfirmed so long as the first unconfirmed transaction remains unconfirmed.

what's inside those empty blocks?

An empty block is a block with only the transaction that reward the miner mining it. Otherwise known as the coinbase transaction.

how can a system creates blocks that are empty and have no use

The protocol is designed to incentivize the inclusion of as many transactions as possible into a block by rewarding the miner with the transaction fees in addition to the block reward. Although it is not forced on a miner to do so. There is some speculation that this is due to certain pools purposely mining "empty blocks" as an annoyance, but there are reasons why there may be an advantage to do so, as it can give a higher probability of solving the block by saving time/operations (12.5 BTC is alot better than 0 BTC).
This can be advantageous because an empty block doesn't have to calculate the merkle-tree more than once (because there is always only 1 transaction, the coinbase). A typical miner may have to calculate the merkle-tree several times especially if the block they have been mining is solved. The miner will have to do operations to add transactions, recalculate the merkle-root, etc.

what happen if there are transactions example like sending btc to other address but nobody mining it

Because miners are rewarded with the fees, eventually a miner will pull the transaction out of the mempool and include it in a block. The miner will favor transaction with higher fees so they will typically be included first.
For more information, please read this and this.

mining empty blocks although allowed, in my humble opinion, is a way of cheating the system, it allows you to working on solving  block N+1, when the outcome of block N is not determined yet.

Nobody can work on block N+1 before block N is found, because the blockhash of N is part of block N+1.

is all this downvoting justified?  my opinion was based on a bitcoin.com article   https://news.bitcoin.com/reason-bitcoin-miners-empty-blocks/

“However, a miner often can start mining a candidate for block N+1 even before he has seen what was included in block N. That’s because he only needs the hash of block N, and he often can get it very quickly by a certain trick.”
In that case, the miner must start with an empty block N+1, even if there are transactions waiting in his queue: because, without knowing the contents of block N, he cannot check whether those transactions are valid or not. If he is lucky, he may solve that empty block N+1, even before he finishes downloading the body of block N. That is why there are empty blocks."

In the example from the article, the empty block is the N+1 block, not the block N. The outcome of N is determined already, but the miner working on N+1 hasn't fully verified N yet, so instead of guessing which transactions remain in his mempool, he's starting to work on an empty block until he has updated his mempool. Also, this is not the only reason for empty blocks. There are plenty empty blocks, simply because no one had sent a transaction in the early days. Later there were some, simply because "miners were free to do so".


text:
Where is the magic number stated?
This has been bugging me. I’d have expected the magic number to be in the chainParams.cpp but I can’t find it.
Where is bitcoin's magic number stored in the source code?

You may not have been able to find them because they're encoded as separate bytes. You can find them in src/chainparams.cpp, currently on lines 102–105. I found the code section after noticing that the Bitcoin Developer Guide referred to the value as "Start String" and searching the code base for that term.
This is the relevant section of code.
    /**
     * The message start string is designed to be unlikely to occur in normal data.
     * The characters are rarely used upper ASCII, not valid as UTF-8, and produce
     * a large 32-bit integer with any alignment.
     */
    pchMessageStart[0] = 0xf9;
    pchMessageStart[1] = 0xbe;
    pchMessageStart[2] = 0xb4;
    pchMessageStart[3] = 0xd9;

OMG, I went code blind and was fixated on a single assignment.
It’s right bloody there!!!


text:
Problems recovering BCH accidentally sent to BTC address
I am one of those people who transferred BCH from bitcoinpurser.com into my electrum wallet that only takes BTC. I have read several articles and have installed and created an elctroncash wallet. I can see that the two have successfully synchronized but on both the transaction still shows as pending. I originally transferred the BCH on September 5. I created the electron cash wallet on the 19th. I would think that it should have come through by now.  Shouldn't it? How long does it usually take?  So, I am wondering if I sent it to the correct address. Is there a way for me to check that? I have a crypto address from bitcoinpurser when I sent them.

What the address you sent the coins to? Does it start with a 1 or a 3?

The crypto address I sent from starts with qqc. The receiving address from my electrum wallet I sent it to starts with a 1.

OK, if its a 1 then you're safe. copy the address you sent it tp and paste it here https://explorer.bitcoin.com. you should see the balance.

Should I create a wallet with this site?  Do I request the full amount or the amount minus the fees?

I entered the receiving address but it shows a 0 balance. It is possible I sent it to a different address. I am new to all of this. I know I generated an address from electrum but I am not sure I saved it correctly. I found the transaction on BTC.com by entering the crypto address I sent it from and it shows up there but I don't understand how to read the page to find out the address I sent it to.

I looked up the crypto address it was sent from on the link you gave me and it shows up there too. Again I don't know how to read the page but it says there are 4 inputs and 2 outputs on the 5th of September. 1 of the outputs is for fees the other is  the balance less the fees but I cant tell where they were output to.

Can you provide a transaction id, so we can be able to help you out

Where do I find a transaction id? Is it ok for me to post the receiving address here?

You can post the receiving address so we could check, there's no way we can help without it.

Receiving address I have is 19EsSXxaTParaHqQ7V8o9A9xbZ47fApe7f


text:
How can a third party spend BCH accidentally sent to a BTC address?
I transferred BCH to an Electrum wallet address and haven't ever received it because Electrum uses only BTC. As I have been trying to recover it, I looked up the transaction on explorer.bitcoin.com and it was input but has also been output 5 times and the  balance shows 0. So it would appear that someone has access. How is that possible? Shouldn't it be secure? Do I have any sort of recourse?

Hello, welcome to bitcoin.SE! It's hard to help without more info. Perhaps your computer or a wallet backup is compromised. Can you post the receiving address you sent the coins to?

What exactly is the address you sent the coins to?????
If it was a segwit then anyone have access to it.

Is your electrum wallet setup to use segwit?

I don't know if it is a segwit. I have never heard that term and I did not set it up that way, it is just a standard electrum wallet. All I know is that on September 5th I generated an address from electrum then went to bitcoinpurser.com and sent the bch. Then I found out that electrum only accepts btc. So I went about trying to retrieve my bch by creating a electroncash wallet and linking the two. That was on the 19th Meanwile the ledger shows both an input and several outputs and the balance is 0.

And I can only find it in the ledger from the crypto address on bitcoinpurser.com not from the electrum address.

This address you posted 19EsSXxaTParaHqQ7V8o9A9xbZ47fApe7f shows no transaction, so you probably sent to somewhere else. What was the address the coins was sent from, let us help you track it down.

crypyo address:qqn28cuav4tr8mwtkqgzmgn0njtetyh83qn52lsvt6

So it would appear that someone has access. How is that possible?

Excellent question
Segwit addresses
Segwit increases the capacity of the Bitcoin (BTC) network and enables the lightning network. Segwit addresses start with 3 or bc1.
On 21 November 2017 Kai Sedgwick reported on  Bitcoin.com

Someone Just Helped Themselves to $600k of Bitcoin Cash from Segwit Addresses
As anyone with a passing knowledge of bitcoin cash will tell you, BCH and segwit don’t mix. Send BCH to a segwit address and you’re gonna have a bad time. Unless you happen to be a miner with the hashpower and technical prowess to unscramble the mess, in which case you’re gonna have a very profitable time. 493 BCH worth $610k has just been retrieved in that manner by one enterprising individual.

A segwit address is just a particular kind of Bitcoin address being introduced as part of some Bitcoin improvements.
Non-segwit addresses
For a third-party to spend bitcoin-cash (BCH) sent to a non-segwit bitcoin (BTC) address, they would need access to the private-key from which that address was derived.
This might happen through the use of viruses, Trojans, fishing or social engineering etc.

Receiving address I have is 19EsSXxaTParaHqQ7V8o9A9xbZ47fApe7f

(from comment to Problems recovering BCH accidentally sent to BTC address)
Blockchain explorer websites show no transactions for that address
Example for BTC blockchain:
Summary
  Address   19EsSXxaTParaHqQ7V8o9A9xbZ47fApe7f
  Hash 160  5a6084e7e05b44c3805b8372462e876447b28d43
Transactions
  No. Transactions  0
  Total Received    0 BTC
  Final Balance     0 BTC

Example for BCH blockchain
Address
     bitcoincash:qpdxpp88upd5fsuqtwphy33wsajy0v5dgvkmjdckhh

Balance: 0.00000000 bch
Total Received: 0.00000000 bch

Example 2 for BCH blockchain
Address 0 BCH
Address bitcoincash:qpdxpp88upd5fsuqtwphy33wsajy0v5dgvkmjdckhh
Summary confirmed
Total Received  0 BCH
Total Sent  0 BCH
Final Balance   0 BCH
No. Transactions    0

Security

Shouldn't it be secure?

Only if you send Bitcoins to bitcoin addresses and bitcoin-cash to bitcoin-cash addresses.
Groups of people developing different cryptocurrencies don't always cooperate with other groups to prevent this kind of consequence. The split between Bitcoin and Bitcoin cash was a little acrimonious.

Recourse

Do I have any sort of recourse?

No.
Cryptocurrencies are essentially designed as peer-to-peer currencies with no regulatory oversight and with no third parties enabled to intervene in disputes.
You dropped some coins on the floor and someone picked them up.
You could ask the person who found your BCH if they will give them back to you for a 30% bounty. It may be hard or impossible to work out who has your BCH and how to contact them. You will be relying on the kindness of a stranger.
You could report the matter to your local police.

Third Party Oversight

This is me transferring my coins to my account but because they aren't dollar bills the bank teller steals them!

There are no bank-tellers in Bitcoin.
You accidentally sent your bitcoins to the wrong destination. Other people who are unscrupulous can often take advantage of any mistakes you make.

Prevention

Something needs to be done about this

You need to be more careful.
If you ask them, wallet developers might consider changes to their wallet software that might make this kind of error less likely.
I believe the Bitcoin-cash (BCH) developers plan a change in address formats to avoid them looking like Bitcoin's (BTC) Segwit addresses.

Risk.

There is a serious flaw in the cryptocurrency system if it simply allows thieves to pray on people who are new to it without any recourse

Bitcoin transactions are by design irreversible. Bitcoin is a very risky investment. Anyone getting involved needs to take the time to understand the risks before getting involved.
Thieves will always prey on those who make careless mistakes. The nature of cryptocurrencies is that they are conceptually unlike the currencies and financial systems that people were previously used to, this makes cryptocurrencies relatively dangerous for the unprepared. For example, the use of the term "wallet" is misleading because cryptocurrency wallets do not really contain any money. Thinking that Bitcoins exist in the blockchain or are entities that are stored somewhere electronically is an error. This makes it easy for the unprepared to make mistakes and lose money.
Caveat Emptor.

Other useful references

Bitcoin Cash Locked in SegWit Addresses: A Recovery Workaround Discovered

How can I tell if it was a segwith address and how can they call it an improvement? You are telling me that somebody just went ahead and stole $500 from me and there is nothing to be done about it?

@t1zzee, segwit addresses begin with either a 3 or with bc1. Segwit increases  the capacity of the network and enables the lightning network. But yes, if you send your money to the wrong place, it goes to the wrong place. Welcome to the world of cryptocurrency

The receiving address does not start with a 3 or a bc1. It does start with a 1.

So if it is not a segwit address how could they get access?

This is hardly the same as me dropping coins on the floor and someone else picking them up.  This is me transferring my coins to my account but because they aren't dollar bills the bank teller steals them!!

It is just plain wrong. Something needs to be done about this because I see many posts from others that have made similar mistakes. There is a serious flaw in the cryptocurrency system if it simply allows thieves to pray on people who are new to it without any recourse.

I have updated my answer @t1zzee.

This answer is now incorrect again,  Bcash turned all of Bitcoin's anti-malleability IsStandard rules into consensus rules and inadvertently made all segwit style scriptpubkeys unspendable by consensus.


text:
What should I do if I change my BitCoin wallet?
At present, I use Electrum as my wallet, and I create private key and transfer some bitcoin to the Electrum wallet.
If I choose a new  wallet such as  BitGo wallet listed on https://bitcoin.org/en/choose-your-wallet, how can I pass bitcoin from old wallet to new wallet?
Do I must to send bitcoin from old Electrum wallet to the new address created by new BitGo wallet?

When switching wallet providers/programs, the safest option is to usually just send the BTC to the addresses provided by the new system (after you have made a backup of the mnemonic phrase/keys for the new wallet).
Although standards compliant wallets should be able to accept each other's seed phrases, a wallet restoration process is an inherent weak point of the system, leaving you susceptible to attacks such as keyloggers and phishing. Thus, it is better to set up a new wallet.
Note that you should be aware of basic security practices regardless of which method you use, such as ensuring you are on the correct website, using a trusted/ clean device, and making sure that no one is looking over your shoulder.

Thanks! Do you mean that it's not a good way to restore private key from old wallet to new wallet?

@HelloCW yes that's what he means. just send to an address in your bitgo wallet using the electrum send tab. very simple.

Generate a new wallet. Do not reuse your old seed.
Make sure you keep a backup of your old wallet & seed. The seed is enough to make sure you can restore any money sent there in the future, but the wallet has your historical transaction history with metadata such as notes etc.
Make sure you keep a backup of your new wallet & seed.
Transfer all your coins from your old wallet to the new wallet. By transfer I mean send normally.
Use your new wallet from now on, but once in a while you can check your old wallet in case somebody has sent funds there for whatever reason.


text:
What is the status of smart contracts in bitcoin?
Are contracts described here already available for use? This source claims that "Ethereum style contracts" will be available in June. Is this correct? How are Ethereum style contracts different from contracts described in the first source?

Are contracts described here already available for use?

Yes.
Some of them are admittedly kind of arbitrary. For example, you can trustlessly sell someone a solution to a Sudoku. What does that mean? If you don't really have a solution, there is no chance that you will receive the money. If the other person doesn't give you the money, it's very unlikely that they will get the solution to the Sudoku. It's very interesting, but I can't think of a practical use for it.

How are Ethereum style contracts different from contracts described in the first source?

Well, first, Ethereum script is a superset of Bitcoin script, so anything you can implement in Bitcoin script can also be implemented in Ethereum script.
Let's think of an example problem: suppose that you want to multiply six by seven, and send Bob some money if the result is bigger than 40.
There are two different approaches here:
The oracle approach would be that the oracle has access to a wallet with Bitcoins in it. The oracle multiplies six by seven, sees that the result is bigger than 40, and sends Bob some money. Nobody else on the network needs to know what was computed. They only check that the oracle's signature is correct.
The Ethereum approach would be to make a smart contract that has some money in it. Then, everyone on the Ethereum network multiplies six by seven, and everyone sees that it's bigger than 40. The smart contract sends Bob some money.
The weakness of the oracle approach is that the oracle could lie or cheat. The oracle could change the six to a five, and not send Bob any money. Or, the oracle could send the money to Eve instead.
The weakness of the Ethereum approach is that everyone on the network checks that six times seven is bigger than 40.


text:
Cancel unconfirmed transaction
I sent 2.2 bitcoins using the old version of multibit application (0.5.18)

The commission is not calculated correctly. Therefore, the transaction can be confirmed forever.
What can I do to cancel a transaction?
I read about a "double-spend" and other solutions to the problem, but what should I do step by step (because I used a multibit).
Try to export keys and install bitcoin core?
Is the transaction self-canceled if I do nothing?

Does this answer your question? Why is my transaction not getting confirmed and what can I do about it?


text:
Any good reason to prevent duplicated address in send transaction for Pos coin?
The use of sendmany in a PoS coin is an obvious source for preparing stake inputs, however it historically has been prevented to send  to duplicate addresses in one transaction with such an error as "Invalid parameter, duplicated address:"
It seems like a reasonable issue in BTC, but are there any good reasons to prevent this?

This is a limitation on the interface used for send many. The address,amount list is a dictionary internally within Bitcoin Core, and cannot have duplicate keys. As many other projects are forks of Bitcoin Core, the limitation applies to them as well.
You can work around this by constructing a transaction manually or with a library that doesn't not use the RPC interface, nothing at the actual protocol level prevents this.


text:
Where can I find market volume data with greater resolution than 24hr periods?
I have scraper that pulls data from coinmarketcap for all coins for all historic periods (down to 15min intervals) however, the only volume info available is 24hr volume. Does anyone know if it's possible to get 15m/1hr volume data (historic) from coinmarketcap? Failing that, any reasonable approach for converting the 24hr data to 1hr/15m? It would only be a rough estimate, I know. I don't know why they don't provide hourly volume data as well.

Certainly it is available - just search around.  But anything more fine than close price will cost a little in order to use the API of the service to which you subscribe.

Thanks SDsolar but I don't quite follow. The scraper I use pulls all the data that is used to produce the Graphs for each coin. I don't see any reference to 1hr volume data anywhere on coinmarketcap.com which is why I'm questioning whether any background tables contain this info.

@SDsolar: Thank you for suggesting the edit, but please make sure that what you suggest provides a significant improvement.

You could do your own price comparison.
So if you scrape every 15 minutes. Store that 15 minute price data and create your own percentage based on the history of the data you collected.
If you have the data every 15 minutes you could even do the difference in 15 minutes intervals.
Example:
Price now is $1.00.
Our database says the price 1 hour ago was $1.15
Change of -13% over the past hour.
Again, store all the 15 minute scraping price data in your database and then use that data to make the percent based on whatever time frame you want.

Thanks Marc but it's only the volume data where I need more granularity. I have 24hr volume data updated each hour but I need hourly vokume data. I was see if the data was available or alternatively whether I could estimate it from 24hr data (updated hourly). Thanks


text:
How do I transfer from a watch-only wallet to my other wallets?
I have a watch-only wallet with BTC in there. How do I transfer to another wallet? I don't seem to have a key. Is that possible? I can find the transactions on the blockchain, but can't seem to do any transfers.

A watch-only wallet is exactly what the name says: a wallet that watches a set of addresses, but cannot spend those funds.
Watch-only wallets are for example used to track incoming payments without exposing the private key material to a server. A watch-only wallet is created by importing only the addresses or public keys from some other complete wallet that is kept on a more secure system or fully offline.
Anyone can create a wallet that watches specific addresses, because addresses and transactions are public information. Spending the funds requires the private keys. If you have a watch-only wallet, you can watch the activity of a wallet, but cannot control the funds.
If you created the wallet, you may have accidentally imported an address or extended public key (xpub) into the wallet instead of importing the private keys. If you imported this information from another wallet, the original wallet that you created the address with should be able to sign for the transactions.
If someone else created a wallet for you that turns out to be a watch-only wallet unexpectedly, they are likely trying to scam you. They are showing you funds that you do not control, likely to defraud you of money in some way.
If you don't have the private key, you cannot spend the coins. If nobody else has it either, the coins are lost.


text:
How can I recover the private key for my bitcoin address?
I want to make withdrawal from my Bitcoin address to which I just transferred some bitcoins. The address has changed after I made a transactions to the first address. But it was requesting the private key to create the payment. How can i get the private key to spend fund from the address?

What software are you using? Was the first address created in the same software? Where is the private key being requested?

I think you misunderstand something. A single wallet file can have many addresses. Your address didn't "change"; the wallet does not have a single address or anything.

I've downvoted this question, because the asker has not returned to provide the requested additional information and as it is, only a very basic answer can be given to the question which is unlikely to be interesting to anyone.

Private keys cannot be recovered. If you lose or forget the private key, the bitcoins become unspendable.

not true... I lost 15 bitcoin privates and I paid a service online to recover my private keys.
I did not have them in a virtual wallet. I had them on a usb. One Usb with public and one usb with private.
Service cost 20%. Rather have 80% of something!

@marlin "I paid a service online to recover my private keys" - You must be very delusional.


text:
Can't access Blockchain.info API using ASP.NET
I am using ASP.NET(VB) to call API
Try
            Dim strUrl As String = "https://blockchain.info/tobtc?currency=USD&value=500"
            Dim request As WebRequest = HttpWebRequest.Create(strUrl)
            Dim response As HttpWebResponse = DirectCast(request.GetResponse, HttpWebResponse)
            Dim s As Stream = DirectCast(response.GetResponseStream(), Stream)
            Dim readStream As New StreamReader(s)
            Dim dataString As String = readStream.ReadToEnd()
            response.Close()
            s.Close()
            readStream.Close()
            Return dataString
        Catch ex As Exception
            Return "N"
        End Try

It's working fine. But when I am using API for Getting Balance
Dim strUrl As String = "https://blockchain.info/merchant/<<GUID>>/address_balance?password=<<PASSWORD>>&address=<<BTC_ADDRESS>>

It's getting Error 404 Not Found. In the example on Blockchain website its showing "http://localhost:3000/" How can it same for everyone.


text:
Buy BTC without linking PAN card and aadhar card
How can we buy bitcoins in India without linking our pan card and aadhar card?

Try localbitcoins.com, there is a quick buy option which doesn't require ID

authors: Саша Чернышенко


text:
Bitcoin Full Node Stalled - 13.2
A full node that I've had running for months just began to stall on a certain block. It seems to be refusing to update blocks beyond a certain timeframe. There are no processes spinning, network connection seems fine. I'm not sure where to check next...

Are you storing your blockchain data on an external drive?

No, just using a little bitseed box. Everything worked fine for months, it just started stalling out, and attempts to force a blockchain rebuild don't seem to work. I may have to just reimage the drive.

Is it on an SD card? I used to have a RaspberryPi to run Bitcoin Core and stored on the SD card. The SD card got corrupted pretty quickly. They're just not made to have that much I/O.


text:
Can a Butterfly Labs Jalapeño be used to mine Zetacoin?
Can my Butterfly Labs Jalapeño be switched to mine Zetacoin?

Bitcoin ASICs like the old Butterfly Labs Jalapeno can do one thing and one thing only and that's SHA-256 hashing. Searches indicate Zetacoin uses SHA-256 hashing, so the answer is yes. Whether or not you will make any money is whole different story.


text:
How do you set the price of a new Coin at the beginning?
When starting a new coin, how do you know what to set the initial value of the coin?
Can you set it at something like 1.00 if not listed on a exchange?
The people of this coin will only be trading it for a year before they start to sell it at market value.
Just need to know how to put an initial value for the coin

If the coin relies on a decentralized proof of work based blockchain like Bitcoin the price is set by the free market (supply and demand).
If coin issuance is centrally controlled because of a premine by the issuer, then the controlling entity will have more control. There are many different ways to structure ICOs each with different economic, security and legal considerations. If you are the coin issuer referenced in this question you will need to answer these questions on your own or be more specific in describing your question(s).

Yes I am the coin owner.   There is a good deal of premine.   With that said, I can set my own price based on what people will pay for the coin correct?   Is this a common practice that has been done before?  and if so, at a later time can I take it and have it listed on a exchange?

You cannot control the price. It's set by the market. If nobody wants to buy, the price will be zero.


text:
How do you configure the Antminer S1 to mine Dash?
Does someone mine Dash with an Antminer S1? How do you configure it? What pools can I use?

The Antminer S1 produces SHA-256d hashes, but Dash uses the X11 hashing algorithm for its proof of work. The Antminer S1 cannot be used to mine Dash.


text:
How private is Strike by Zap?
I am asking myself how much information can Strike theoretically collect on its users? Does Lightning have any benefits in this case?
https://medium.com/@JimmyMow/announcing-strike-by-zap-4f578c7c8984


text:
How can I update a transaction from Electrum?
I have not got my bitcoins confirmed in my wallet and when I try to double spend I keep getting errors mainly:
An outpoint is already spent in [DBBitcoinTx{txIndex=224965012, ip=51.254.44.148, time=1487879550, size=192, distinctIn=null, distinctOut=null, note='null', blockIndexes=[], nTxInput=1, nTxOutput=1}] [OutpointImpl{txIndex=224909177, txOutputN=3}]
any advice would be appreciated

Possible duplicate of Why is my transaction not getting confirmed and what can I do about it?

@sr_gi: While that question is related, I'd disagree. The asker is already aware of the issue and trying to alleviate the problem, but is asking for help with a specific approach in a specific wallet.

@Murch I thoght that since the problem seems to be he is trying to double spend an UTXO from a transaction that is not getting confirmed, the problem was the same.


text:
How to avoid rebroadcasting a transaction that is pending?
I'm using MultiBit Classic, and one of my transactions is stuck due to too low fees.
The main problem is that I have my change amount blocked until this TX goes through.
I understand that I should wait for some time as it will expire (or be included in some block), but if I'm starting my wallet after this happens, wouldn't it rebroadcast the transaction?
Or even while waiting, should I keep my wallet open, or it will continue to push the TX?
Note that I tried to do a "Reset of chain and transactions" as suggested on their help page, but it seems that this does not remove the transaction from wallet (so I guess the wallet will rebrodcast it). Also, I've uploaded the wallet key into a fresh install of Multibit, but still without luck.


text:
Why must be the Merkle Tree a full binary?
Bitcoin uses a Merkle tree with hash functions. I mean I do not get it why there must be a full binary tree? A complete could also be possible?

Bitcoin messed up their merkle trees . I guess requiring a power-of-two as leaves is their workaround for this flaw.

Related: [Full Disclosure] CVE-2012-2459 (block merkle calculation exploit) on bitcointalk.

@CodesInChaos: The second link is interesting, but I don't see what the first link has to do with the question?

@Murch It's about how you to design a proper merkle tree that doesn't suffer from ambiguities between different length inputs. Such a merkle tree won't need silly restrictions like a power-of-two number of leaves. But bitcoin didn't use leaf-tagging (or one of the alternative safe constructions) which led to problems.

@CodesInChaos: Bitcoin doesn't require a full binary tree, it only requires a complete binary tree. I thought you were saying that you didn't understand why a binary tree was chosen over more children.

Bitcoin does work with full or complete binary trees. For complete trees, leaves without a partner are simply hashed with themselves instead. The attack that CodesInChaos links was solved by checking that every transaction is unique which is required for valid blocks anyway.

Image from Bitcoin Developer Guide


text:
A BSV transaction I sent to myself was replay attacked on BCH. How do I recover my BCH?
I wanted to empty out an old paper wallet that still had a small amount of Bitcoin Cash and Bitcoin Satoshi Vision. I set up a new Coinomi Wallet (because it has all the bitcoin forks) and sweeped the private key. After making the BSV transaction, the coins on the BCH moved too, without me initiating the transaction. The transactions on both chains have the same transaction hash. However the Bitcoin Cash account of the Coinomi wallet stayed empty. Is there a way to recover those coins?

The BCH are recoverable. They were moved to an BCH-address that is derived from the seed of the Coinomi wallet with the derivation path of the BSV-wallet. This address will not be displayed by default. In order to recover the coins do the following:
First look up the derivation path of Bitcoin SV. You can do this in Coinomi when you click on "add coin" and choose Bitcoin SV. When chosen the gears-icon appears next to the name of the coin. Click on the gears icon and a popup opens with a button "advanced settings". Click on that button and the derivation path will be shown. It should be M/44'/236'/0'
Now, it could be possible to add Bitcoin Cash to your Coinomi with that derivation path. But that was not working for me, maybe because I already had BitcoinSV added with that path.
So I used this BIP39 Tool instead. Warning: The following means to enter your seed into a tool that is potentialy untrustworthy. After doing this I consider this seed as compromised (even though I used an air-gapped computer to do it). You should probably too. I recommend you move all funds from the wallet before you do this and never use this wallet again afterwards.
Anyway. I downloaded the tool to my computer and opened it in my browser. I put in my seed and set the derivation path to the BSV-path (see above). The tool gives you a list of pub/private key pairs. I used the Coinomi wallet to import sweep the private keys (and set the coin to BCH). The second private key had access to the lost BCH and I had them in my Coinomi wallet again.


text:
Is it possible to reduce the block interval in the future?
Is it possible in future to reduce the confirmation time of the transactions? Can it somehow be reduced to less than 10 minutes? Can it be made faster?

Related: http://bitcoin.stackexchange.com/questions/43700/how-does-the-lightning-network-work-in-simple-terms http://bitcoin.stackexchange.com/questions/44416/lightning-network-scaling-alternatives http://bitcoin.stackexchange.com/questions/46618/lightning-network-and-lightweight-clients

You could browse the Bitcoin Improvement Proposals; that's the standard way to suggest innovations.

Yes and no. Any change to the protocol is possible if and only if > 50% of the active nodes "agree" to it by adopting that protocol change.
Getting everyone to agree is very hard though. For example, Bitcoin Cash (BHC) exists as a fork of Bitcoin because of a dispute over increasing the block size. It seems likely such a push to lower the block time would lead to a similar messy debate and ultimately a split.

That’s not true. Why would >50% of active nodes need to agree?

My understanding is that the difficulty level is adjusted every 2 weeks by consensus (I.e. > 50%). It’s adjusted up or down with the goal of keeping the block time at 10 minutes. So if only some nodes wanted to create blocks faster they would create blocks at a lower difficulty level, which would mean they would have a different notion of what a valid block hash is. Part of the network would see those hashes as valid and part would not. The majority rules. The others must fall in line or exist as a fork.

The difficulty is not set by consensus; it is protocol rule. If miners produce blocks that do not follow the protocol's difficulty rule, those blocks are invalid - period. You need a fork of the system to adjust this rule, meaning a separate currency if both the old and new rules remain popular to some.


text:
Is PAN or ID card verification necessary to buy Bitcoin in India?
There are many Bitcoin exchanges in India but all of them require PAN or others documents to validate identity. However, the Central Bank of India i.e. RBI has not given Bitcoin the status of a valid currency so the exchanges shouldn't ask for PAN Cards or other details but they do.
That's my other question, are these exchanges authorized to ask for PAN card or other documents to verify identity since I am paying through my debit card or bank cccount so additional verification should not be necessary.
Is PAN card or ID card verification mandatory for buying Bitcoin from exchanges in India, even through the RBI hasn't issued any such notification?
The is the only notification by the RBI related to Bitcoin I was able to find find:  https://www.rbi.org.in/scripts/BS_PressReleaseDisplay.aspx?prid=30247

No authority in India expressly authorizes other entities to use PAN or other unique ID cards for customer verification purposes. The entity itself takes such measures since Government issued identities carries trust and uniqueness.
No unique identity of any nature is required for transacting Bitcoins.
Now, as for the Bitcoin exchanges and other trading platforms requiring the use of PAN or other ID cards, these entities have valid reasons to ask for such details, such as:

to avoid legal hassle for the entity when a customer engages in illegal financial activities or anti-national activities  such as tax evasion, money laundering and terrorism. PAN is a must for surveillance, tracking and investigation;
to show itself as a responsible corporate entity engaging with legit customers only and maintaining transparency at their end.

You are most likely to reach this conclusion if you read T&C, Privacy Policy or KYC/AML policy of the entity concerned. For example, CoinSecure has it mentioned here:

No Legal Requirement
Although Coinsecure is not required by the law to follow any Know Your Customer (KYC) policies or implement any Anti Fraud mechanisms, however Coinsecure believes in total transparency and adherence to the law and discourages any of illegal activities while using Coinsecure’s services. In order to discourage and prevent any person from indulging in illegal activities using its services, Coinsecure has made the following KYC and Anti Fraud Policy purely as a measure of prudence and on an entirely voluntary basis.

You must know that there is no standalone data protection law in India and currently, misuse of unique identifiable information is a punishable offense under Section 66C, IT Act 2000 (Amendment 2008), but the punitive punishment has failed to deter many criminals from committing identity fraud, so you must weigh your risks carefully before divulging such critical details.
Side Note: Do read Privacy Policy before sharing any critical information.


text:
How can I recover BCH sent to a Trezor BTC address?
I accidentally sent my BCH from Breadwallet to a BTC address from my Trezor wallet. Is there any way to retrieve that back to my BCH wallet? The BTC wallet I sent the money to is mine, so I own the keys but the address starts with 3.

Possible duplicate of What would happen if you send Bitcoin (BTC) to a Bitcoin Cash (BCC) address?

@asterisk: I voted "leave open" because this question is in the other direction (BTC -> BCH vs BCH -> BTC). While related, there is a significant difference here, potentially the Bitcoin address is in the segwit format which is not supported on BCH.

Following the steps from "How to claim your Bitcoin Cash (Bcash)" by Trezor Blog should do the trick.
https://blog.trezor.io/claim-bcash-bitcoin-cash-bch-bcc-trezor-wallet-f0a810d5864a
Steps:
1) Make sure Trezor uses latest firmware
2) Connect your Trezor
3) Go to Coin splitting tool

Note that if you have upgraded your Trezor to use SegWit addresses for Bitcoin already, you'll probably have difficulties recovering your BCH.

Yeah the trezor is updated with SegWit addresses so the money we sent to a new wallet.
Trezor support said it's not possible to recover until BCH supports segwit.
is this valid?

@user14356 Yes, there's nothing you can try, unfortunately.

yeap the sucks. actually sucks that the guy who developed breadwallet didn't add that check there. easy to implement :)

@user14356 You can suggest a feature to breadwallet developers on https://github.com/voisine/breadwallet/issues/new (You need a GitHub account)

@user14356: Unfortunately, that's not correct. Segwit addresses look just like any other P2SH addresses, so it's not possible to check as a sender whether you're sending to P2SH-wrapped segwit address or other P2SH address.

Since the Bitcoin address was already in the segwit format, you're in trouble. BCH does not support segwit, so it is difficult to build a BCH transaction to spend them and such a transaction would not be safe to broadcast to the BCH network— as on the BCH network it would be non-standard and could be doublespend with an "anyone can spend".
As far as I can tell, your only option would be to find a trustworthy miner whom you give the transaction directly that will include this non-standard anyone-can-spend transaction that sends the money to you, and doesn't just take the money for themselves. Also, you have to hope that no other miner replaces the block with another where they steal the money for themselves.
Since I'm not involved in the BCH community, I don't know whether there is any miner providing such a service at this time.

yeah i'm stuck so far :)

I'm sorry to hear that. Unfortunately, I am no more involved in BCH than back when I wrote this answer and thus unable to provide further insight. Have you seen Muscaria's answer?

Ledger gives a guidance on how to recover BCH sent to SegWit BTC address:
If you sent BCH to a BTC Segwit address
Your BCH are stuck as Bitcoin Cash doesn't support Segwit. However you can use this tool to recover them.


text:
How could the Bitcoin protocol be modified so that pruned nodes could still participate in BIP 37 SPV?
According to Jameson Lopp (https://www.coindesk.com/spv-support-billion-bitcoin-users-sizing-scaling-claim/), allowing pruned nodes to advertise that they support BIP 37 would be impossible without "extensive protocol changes." What changes would make this possible?

Pruned peers do not have the full blockchain history and therefore have only limited value for SPV clients.
With Bitcoin Core 0.16, pruned peers will announce their service via NODE_NETWORK_LIMITED (see BIP159). BIP159 is not a consensus change.
This will allow SPV clients to connect to pruned peers. But, since they only signal for the last 288 blocks, SPV/BIP37 clients interested to load history older than 1 day of blocks would still require to connect to traditional peers.
In the future, pruned nodes may have a way to signal how many blocks they will keep on disk (without adding a fingerprinting vulnerability).
Note that BIP37 is a controversial concept. It has significant privacy downsides (see Jonas Nick's research).
A far better concept is "Client side filtering". See the upcoming BIP157 and BIP158.


text:
Block 620826 is 1 second before block 620825?
How does that happen?  Obviously the miner of 826 built his block on top of 825, but why is the time 1 second earlier?

possible duplicate of Why don't the timestamps in the block chain always increase?, How can an earlier block have a later timestamp?


text:
What are the most comprehensive APIs for cryptocurrency market data?
I'm looking for a well documented, easy to use API that provides data on the majority of cryptocurrencies. That data should include the 1 hr, 24hr, and 7 day price changes, as well as the entire history of the volume, and price for each crypto. I've looked into some APIs but none have provided this sort of comprehensive information. There are many great sites that have access to this sort of data, so it must be out there. Any help is appreciated! Thanks!

I'm interested too, did you find a good alternative? maybe something free for commercial use?

Lots of good info below.

Most exchanges offer API solutions for market data. Here are some examples:

GDAX
Bittrex
Kraken
WAVES DEX

CryptoCompare has an API that aggregates data from many exchanges, and they also offer many query parameters. Link: CryptoCompareAPI
Additionally, many block explorers provide APIs for blockchain account information.
This ZChain Playlist shows how to use PowerShell to query the ZChain ZCash block explorer API.

Also consider the HitBTC API supporting REST and WebSocket too.

Cofounder & developer here, you can check our site coinpaprika.com API

If you want something simple and fast with a huge amount of coins try https://chasing-coins.com/api/

Fabulous, just what I needed kind sir!

You can check out Coinograph cryptocurrency API. It provides raw trade data, candles, orderbook and ticker.
Disclaimer: I've built the product.

Take a look at the CoinAPI data provider, which have full coverage of the cryptocurrency markets and provide data via REST, WebSocket and FIX protocols.

CryptoCompare API is the most comprehensive free api that I can find of.
Links:

https://www.cryptocompare.com/api/
https://min-api.cryptocompare.com/

You can try CoinGecko api, they provide like comprehensive data. More than you will ever need. https://www.coingecko.com/api/docs/v3

My absolute favorite! Really nice API.

check out cryptoquote.io
this real-time data feed provides access to real-time streaming price data from the cash exchanges and liquidity providers for institutional order flow as well as historical database, market metrics, logo API and widgets.
Built by my team

You can check out the following API. Although it's mainly used to get standardized coin symbols across exchanges, you also get additional coin data in the response:

https://CryptoStandardizer.com

This answer could be improved by explaining why you're recommending this site and by answering in detail, whether all the features the asker is looking for are present.

I think this one is best, they don't have restrictions https://www.coinlore.com/cryptocurrency-data-api

Almost each crytpo exchange has its own API, you can integrate it for free and get the data. The first challenge that they are too many (more than 200 exchanges so far), that means 200+ API integrations which cost a lot of time. The second challenge is that these exchanges provide a lot of data and after start collecting you will need to take care of many TBs which is an additional servers cost.
That's why there are such services like Coinmarketcapi professional API, coinapi and CryptoAPIs.io
I made a compare and i picked https://cryptoapis.io/ because they have more exchanges, more options and cheaper.

Founder & developer of https://tardis.dev  here. It's an API I've built that provides high frequency cryptocurrency historical raw market data — tick-by-tick trades, full order book depth snapshots & delta updates, quotes, liquidations and more available via HTTP and WebSocket API. Based on that data you can build OHLC candles, volume bars, dolar bars etc.

at Kaiko (www.kaiko.com) we are able to provide you with this comprehensive datasets.
We are a market data infrastructure company since our creation in 2014 and provide trade data, order books and aggregated data (ohclv, vwap, count). We already work with funds, academics, and individual traders and are currently growing fast.
Happy to speak with any of you that have data requirements, just contact us via our website.
Full disclosure: I work at Kaiko :)

We use https://bitdataset.com/api/ It is free for our tasks.


text:
What does it mean for a transaction to be over spent?
IIRC, a transaction's inputs add up to its outputs plus the transaction fee. So how would a concept like "over spending" fit in? I saw this in a Bitcoin library I'm maintaning and didn't find this term in the reference literature (Antonopoulos).

As you mentioned, the sum of the value of spent coins (inputs) should be superior or equal to the sum of the value of the created coins (outputs) ; the difference being the miner fee.
This condition is checked by every peer of the P2P network when relaying transactions and blocks containing transactions not respecting that condition will be rejected as part of the consensus rules.
It is therefore not possible to "overspend" by creating more money than what you have ; but there's been one notorious bug where this was proven wrong: the value overflow incident.


text:
Why do I have more unconfirmed tx than getmempool info reports?
I presently have 39 unconfirmed tx that I've sent according to my local bitcoind:
$ bitcoin-cli listunspent 0 0  | grep account | wc -l
39

(note: the above command gives the correct answer because the tx were sent to the same bitcoind wallet.)
I made a script to watch the mempool size via getmempoolinfo and record the high and low amounts.  Here is output:
  size: 9359
  bytes: 9165998

  size_low: 16
  size_low_when: 2017-08-22T14:29:49-07:00

  size_hi: 71196
  size_hi_when: 2017-08-22T13:46:14-07:00

  bytes_low: 3063
  bytes_low_when: 2017-08-22T14:29:49-07:00

  bytes_hi: 53361196
  bytes_hi_when: 2017-08-22T13:46:14-07:00

  last_block_found: 2017-08-23T01:13:02-07:00

Notice that the smallest size that has been seen is 16.  This comes from the "size" output of getmempool info, which according to the help docs indicates the number of tx in the mempool.
Seemingly then, getmempoolinfo was (for a brief time at least) reporting fewer tx in the mempool than the number of my own sent tx that are still unconfirmed.
How is that possible?   Is this a bitcoind bug, or am I misunderstanding something?
$ bitcoin-cli help getmempoolinfo
getmempoolinfo

Returns details on the active state of the TX memory pool.

Result:
{
  "size": xxxxx                (numeric) Current tx count
  "bytes": xxxxx               (numeric) Sum of all tx sizes
}

Hello George, you seemed to have put in some effort to write your question. Could you please return he question to its original state and post your edit as an answer? Perhaps other people would be interested in reading about this in the future.

@Curious George, I agree with Murch.  This is an interesting question, and could be a problem that someone in the future may have.  By answering your own question, you make it easier for someone else to find this solution, and will likely be rewarded with upvotes.

You are misunderstanding how listunspent and getmempoolinfo works. listunspent is for your wallet only and is a wallet only RPC command. It will only show things that pertain to your wallet. However getmempoolinfo is a node RPC. It will show what your node sees, which is almost always going to be more than just the things in your wallet. These two commands are completely unrelated and work independent of each other. There is no relation between these two commands.


text:
How do exchange services distinguish who sent to them?
I know some altcoins have features that allow senders to attach messages to transactions and using those features, exchange services distinguish the sender.
However, I don't know if there's such a function in Bitcoin. How can exchanges tell who paid them without such a feature?

Exchanges generate a new address for each user when a user wants to deposit, so when they receive a deposit to a specific address, they know who to credit the deposit to.
Since Bitcoin does not use accounts, there is no need for the exchange to consolidate their received Bitcoin. They can simply spend from multiple addresses when they want to send Bitcoin to someone, e.g. for a withdraw.

But how would they keep the amounts of bitcoin? I mean they will be run out after their users withdraw in the end.

They periodically refill the hot wallet with coins from cold storage. However since coins people deposit go into the hot wallet, the hot wallet does not become empty because when someone withdraws, someone else is depositing.

I think unless concentrating the BTC to their address for withdrawals as a user deposits, it would be hard to know how much the user deposited, because if we use BTC from the user's address, we can't distinguish if the transaction is the user's or theirs for their users' withdrawals.

Exchanges have their own internal accounting system which they use for tracking user balances. There is no need to have to read the blockchain in order to figure out what the balances are.

I see, but isn't there a concern that the fees for withdrawals transactions become more expensive I mean the number of inputs can be more unless they make an address that has lots of BTC?

Fees generally are not a concern since the customer pays them and usually way overpays. Most exchanges will have some flat rate "miner fee" that they charge when you withdraw from them and that "miner fee" is more than enough to cover the actual transaction fee.

I see. By the way, how do they charge the fee of transferring the bitcoins that are not needed currently to their cold wallets in order to prevent being stolen?

Since exchanges make money, presumably they eat that cost themselves. User balances do not change, just the expenses of the company increase.

Understand, so what their processes for calculating their users deposits are like know users total received amount of bitcoins by using “getreceivedbyaddrrss” after that, calculate the users funds by using the total received bitcoins plus how much users get benefits/loss, right?

When you want to deposit to an exchange, you request a deposit address from the exchange.  This address is generated specifically for you.  So the exchange knows that any coins received by that address are coming from you (or someone who wants to pay you), and should be credited to your account.

But I think they soon have to send to their accounts to concentrate, and it's going to be unproductive because they have to pay for fees when their users deposit.