Hot answers tagged

38

Basically, there is no such thing as a "correct" nonce, only a set of possible "correct" blocks which can use any nonce they wish to obtain an acceptable hash. So the nonce is just "some arbitrary number". But in order to understand how nonces work, you first have to understand the hashing process by which blocks are produced. Cryptographic hashes are a ...


37

The Mining Algorithm is as follows: Step 0 - Retrieve the hash of the previous block from the network. Step 1 - Gather a list of potential transactions known as a "block". This list of transactions comes from the peer-to-peer bitcoin network. Step 2 - Calculate a hash for a block of potential transactions along with a random number. Step 3 - If the hash is ...


23

Merkle roots do not verify transactions, they verify a set of transactions. Transaction ID's are hashes of the transaction, and the Merkle tree is constructed from these hashes. It means that if a single detail in any of the transactions changes, so does the Merkle root. It also means that if the exact same transactions are listed in a different order, ...


22

Very little of the time is spent downloading the blockchain data compared to how much time your computer is spending verifying each transaction. Bitcoin does a ton of disk i/o for this. As there are more transactions since April (thanks to SatoshiDICE, we now see 40K and more transactions a day) those blocks take longer to verify. If you are on an ...


22

The block is accepted, and the coins are lost. Poor miner. Here is a link to the part of the 0.6.3 source which checks this: https://github.com/bitcoin/bitcoin/blob/v0.6.3/src/main.cpp#L1362 Also, this has effectively happened before; block #124724 claimed one satoshi less it than could have.


21

What does the bits field represent? First of all, we need to understand what the 'bits' field means. Bits is in 'compact' format. This is kind of like a floating point format, but it represents big integers rather than arbitrary real numbers. The first byte indicates the number of bytes the represented number takes up, and the next one to three bytes ...


20

Answer shamelessly stolen from stackexchange: Difficulty encoding is thoroughly described here. Hexadecimal representation like 0x182815ee consists of two parts: 0x18 -- number of bytes in a target 0x2815ee -- target prefix This means that valid hash should be less than 0x2815ee000000000000000000000000000000000000000000 (it is ...


20

Please note, this answer was written in Februar 2015. The debate has significantly evolved since then, but I haven't gotten around to updating this answer, yet. I'm sorry, this kinda turned out less brief than it started. TL;DR: Very briefly, it is an issue of opposing ideologies: Proponents wish to provide a common good to everyone and believe the ...


18

Bitcoin amounts in the protocol and software are expressed as an integer number of "satoshis". 1 BTC is defined as 10^8 satoshis. So a block reward that is internally represented as 5*10^9 satoshis is displayed in the GUI as 50 BTC. Splitting bitcoins to even smaller fractions will require a change in the protocol and software, and may be done when their ...


18

Why is this limit present? 1. To Maintain Consensus There has to be clearly defined rules about which blocks are valid and which are not for the network to agree. Obviously no node will accept a block that is 10 million terabytes, it would be near impossible to download even if it were valid. So where do you set the limit? And what if one node sets their ...


17

Merkle roots are stored in Bitcoin block headers so as to enable efficient membership proofs for transactions in a block, which are necessary for Simple Verified Payment verification (SPV) nodes that only store block headers and not block contents. It is misleading to say that "Without the Merkle root in the block header, we would have no cryptographic ...


16

10 minutes. Assuming, as you say, that the current network hashrate matches the difficulty - otherwise it is proportionally higher or lower. Block finding is a Poisson process. The rate parameter λ is chosen so that 2016 blocks on average are found every 2 weeks, and since in such a process the expected number of events is proportional to the time span, it ...


16

Short answer: Yes, there's a limit but it depends on transaction size, not count. Basic summary of blocks Miners are incentivized to put as many transactions into a block as they can with fees. The more transactions, the more fees the miner collects, and that can mean an extra coin on top of block rewards. A block gets bigger as more transactions are added,...


15

Okay, combining answers and what more I've observed: The rate of blocks slows down because more recent blocks are larger. The number of blocks remaining is not actually a good measure for estimated time. You can make an estimate based on how much data is downloaded (in how much time) and how much data is left: At the moment of writing, my blk000x.dat files ...


15

Transactions are broadcasted by anyone in the system and at random intervals. Which transactions, of all the ones broadcasted, are included is very dependent on the miner, as he/she is the one who groups them up and includes them in the block. As Nate noted below, there is also a 1MB block size limit which limits how many transactions can be included in a ...


15

I don't know anything about Multichain so I'm not sure if this is the answer you're looking for, but here's one answer that might help you. The interesting thing about proof-of-work (Nakamoto) blockchains is that they enable a constantly-changing set of unknown nodes on the internet to achieve consensus under certain assumptions about the adversary (i.e., ...


14

The initial statement is correct. The blockchain is the list of all solved blocks, essentially the ledger of all transactions completed in the Bitcoin network. Each block contains (among a few other things) a list of transactions. When you do a transaction, it is not destined for a specific block. You merely publish your transaction to the network and it ...


14

As long as the block reward is much higher than the transaction fees, this is totally not an issue: mining isn't an incremental process, it's a bruteforce probabilistic one. I.e. in a single moment your chance of solving a block isn't higher if you have been mining that same block for some time: the chance is always the same. Hence, once a block is relayed ...


14

There is only one (Bitcoin) chain, and the Genesis Block is the first block in that chain. This block was created by Satoshi Nakamoto as the first link in the blockchain. It is hard-coded into the refernce Bitcoin client. To create it, it was "mined" like every other block, except it was at the minimum difficulty level, and contained arbitrary data. The ...


14

The incentive to mine on the currently longest chain is that there is a risk to the dishonest miner that honest, non-mining nodes may have already propagated the first block and hence reject and not propagate the second block found at an equal block height. As Proof of Work is not reusable this leads the dishonest miner to waste resources.


13

The absolute limit is the size of the block, which is currently hard-coded at 1,000,000 bytes. Each transaction takes up a variable amount of space, but ~250 bytes is about right for a simple (one-input one-output) transaction. However as soon as a block is solved it is not possible to extend the block by adding in more transactions, as the proof of work ...


13

I assume this question is about Bitcoin Core's internal operations. This description is valid for version 0.8 and later (up to 0.14 at least). One part of the system deals with the active chain, which is the longest valid chain of blocks (stored in $DATADIR/blocks) that we know of. This active chain gets blocks appended to - and occasionally removed when ...


13

Proof-of-stake mining is similar to Proof-of-work at a technical level. It involves a sort of lottery, similar to proof-of-work, but the difficult of this lottery is weighted depending on how many coins you are staking. The overall process for "attempting" to mine a PoS block is like so: Add a coinbase transaction, and a staking transaction (in most coins, ...


13

Generally speaking, a larger block leads to more computational resources (tx validation, bandwidth, storage, memory) required for each person who wishes to validate newly confirmed transactions. Higher validation cost lead end-users to rely on/trust centralised services to "validate" their transactions. Larger blocks require more time to propagate in the ...


12

While working on my master thesis I used the AACS encryption key (09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0), considered an illegal number, as a basis for creating a fake Bitcoin address - 1ujTAfEQh2obwdt72GrmXonakx2RxvYpX. A 1 Satoshi transaction was sent to that address from address 17TQLZvXjKTrUyRnV9DuQs4RVDgNjUPeXQ. The transaction was encoded in ...


12

Pieter's answer is good, the chainwork value is the expected work amount in the chain, expressed as a 32 bytes integer, for the double SHA-256 hashes calculation work. The chainwork is used to identify the correct chain, the biggest chainwork value means the strongest or the correct chain. By the way, Satoshi didn't initially realize that choosing the ...


11

The current maximum block size is 1MB (but it could be increased in the future with a protocol change), there is no minimum size per se, but the block needs to have all its components to be valid (check Protocol Specification). Each block needs to have at least one transaction - one paying the miner the reward for mining the block.


11

Blocks are identified by their hash. This means that in your story, in Jan 2017, when B gets broadcast, any node that it is advertized to will think "I already have this block", and ignore it. However, when we consider block hash collisions to be a realistic situation, there is another issue that may arise: If two blocks with the same hash and the same ...


10

See GetMinFee() in main.h for the code which determines the minimum transaction fee. The part you're describing is implemented as follows: // Raise the price as the block approaches full if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2) { if (nNewBlockSize >= MAX_BLOCK_SIZE_GEN) return MAX_MONEY; nMinFee *= ...


10

When miners try to compute a block, they pick all transactions that they want to be added in the block, plus one coinbase (generation) transaction to their address. They may include any transaction they want to form a tree of transactions later hashed into the merkle root and referenced into the block's header. It is to note that for a block to be accepted ...


Only top voted, non community-wiki answers of a minimum length are eligible