Block chain

From Bitcoin Wiki
This is the approved revision of this page, as well as being the most recent.
Jump to: navigation, search

Block chain is a public database of every Bitcoin transactions that has ever occured in Bitcion network. By utilizing this base every user is able to find out what amount of Bitcoin has ever belonged to some particular address at a certain time period. The block chain is supported by decentralized efforts of many miners.

Principles of building

Block chain.jpg

Every mined block contains hash of the previous one. That way a chain of blocks is created which origins back from the so-called genesis block (the very first block in the Bitcoin system) up until the most recent block found by network. Editing data in a block that's been a part of chain for a long time isn't practical because you'd have to edit the data in all following blocks. Thanks to these properties the double-spending attack (repeated spending of already spent money) is almost impossible to perform in Bitcoin network.

Honest miners are always building their block upon the last mined, referencing to it. The "length" of the chain is calculated based on total complexity of the chain and not on the amount of blocks in it. A continuation of chain is only considered valid if it has information about all previous chain links and the chain itself starts with genesis block.

Forks in block chain

Every block in the chain has only one path back to genesis block. However the chain can split several ways from genesis block thus forming a "fork". Forks consisting of just one block are fairly common. They appear when several nods find a block with time difference of a couple of seconds. When this happens other nods start building the block chain further upon the block which they received first. The moment any of the two blocks gets its continuation its chain is considered main in the block chain because it becomes longer.

Blocks that aren't a part of the main block chain aren't used. There's also a lower reward issued for their discovery. These blocks are called "orphan blocks". Because a block can link back to just one previous block combining 2 different chains is impossible.

See also