Block

The central element of every cryptocurrency is a public ledger called the blockchain, which links blocks together.

Since the blocks in the chain are ordered, the complete transaction history is held on the blockchain. Subsequent blocks have increasing heights that differ by one.

Blocks are stored in a database as permanent medium. Catapult calls the first block in the chain the nemesis block.

Catapult blocks complete every 15 seconds, making transactions confirm quickly enough for everyday use.

Block creation

Blocks are created by accounts. The process of creating new blocks is called harvesting. The harvesting account—called the harvester— gets the fees for the transactions in the block and inflation. This gives the harvester an incentive to add as many transactions to the block as possible.

Block header

Serialization of the block header.

Inlines:

Property Type Description
height Height Height of the blockchain. Each block has a unique height. Subsequent blocks differ in height by 1.
timestamp Timestamp Number of milliseconds elapsed since the creation of the nemesis block.
difficulty Difficulty Average difficulty divided by the average block creation time for the last 60 blocks. If the new difficulty is more than 5% greater or smaller than the difficulty of the last block, then the change is capped to 5%. Additionally, difficulties are kept within certain bounds. The new difficulty is clamped to the boundaries if it is greater than 1015 or smaller than 1013.
previousBlockHash Hash256 Hash of the previous block.
transactionsHash Hash256 Hash of the transactions in this block.
receiptsHash Hash256 Hash of the receipts generated by this block.
stateHash Hash256 Hash of the global chain state at this block.
beneficiaryPublicKey Key Public key of the optional beneficiary designated by harvester.
feeMultiplier BlockFeeMultiplier Fee multiplier applied to block transactions.
blockHeader_Reserved1 uint32 Reserved padding to align end of BlockHeader on 8-byte boundary.

Guides

Continue: Transaction.