Any Dash minerminer - Mining is the act of creating valid Dash blocks, which requires demonstrating proof of work, and miners are devices that mine or people who own those devices. who successfully hashes a block headerblock header - An 80-byte header belonging to a single block which is hashed repeatedly to create proof of work. to a value below the target thresholdtarget threshold - The target is the threshold below which a block header hash must be in order for the block to be valid, and nBits is the encoded form of the target threshold as it appears in the block header. can add the entire blockblock - One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain. to the block chainblock chain - A chain of blocks with each block referencing the block that preceded it. The most-difficult-to-recreate chain is the best block chain. (assuming the block is otherwise valid). These blocks are commonly addressed by their block heightblock height - The number of blocks preceding a particular block on a block chain. For example, the genesis block has a height of zero because zero block preceded it.---the number of blocks between them and the first Dash block (block 0, most commonly known as the genesis blockgenesis block - The first block in the Dash block chain.).
Multiple blocks can all have the same block height, as is common when two or more miners each produce a block at roughly the same time. This creates an apparent forkfork - When two or more blocks have the same block height, forking the block chain. Typically occurs when two or more miners find blocks at nearly the same time. Can also happen as part of an attack. in the block chain, as shown in the illustration above.
When miners produce simultaneous blocks at the end of the block chain, each nodenode - A computer that connects to the Dash network. individually chooses which block to accept. In the absence of other considerations, discussed below, nodes usually use the first block they see.
Eventually a miner produces another block which attaches to only one of the competing simultaneously-mined blocks. This makes that side of the fork stronger than the other side. Assuming a fork only contains valid blocks, normal peerspeers - A computer that connects to the Dash network. always follow the most difficult chain to recreate and throw away any stale blockstale block - Blocks which were successfully mined but which aren't included on the current best block chain, likely because some other block at the same height had its chain extended first. belonging to shorter forks. (Stale blocks are also sometimes called orphans or orphan blocks, but those terms are also used for true orphan blocks without a known parent block.)
Long-term forks are possible if different miners work at cross-purposes, such as some miners diligently working to extend the block chain at the same time other miners are attempting a 51 percent attack51 percent attack - The ability of someone controlling a majority of network hash rate to revise transaction history and prevent new transactions from confirming. to revise transaction history.
Since multiple blocks can have the same height during a block chain fork, block height should not be used as a globally unique identifier. Instead, blocks are usually referenced by the hash of their header (often with the byte order reversed, and in hexadecimal).
Updated over 2 years ago