# 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 in the blockchain. Subsequent blocks in the blockchain have increasing heights that differ by one.

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

NEM 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.

## Schemas¶

Note

Configuration parameters are editable. Public network configuration may differ.

Serialization of the block header.

Inlines:

Property Type Description
height uint64 Height of the blockchain. Each block has a unique height. Subsequent blocks differ in height by 1.
timestamp Timestamp Number of seconds elapsed since the creation of the nemesis block.
difficulty uint64 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.
feeMultiplier uint32 Fee multiplier applied to transactions contained in block.
previousBlockHash Hash256 Hash of the previous block.
transactionHash Hash256 Transactions included in a block are hashed forming a merkle tree. The root of the tree summarizes them.
receiptsHash Hash256 Collection of receipts are hashed into a merkle tree and linked to a block. The block header stores the root hash.
stateHash Hash256 For each block, the state of the blockchain is stored in RocksDB, forming a patricia tree. The root of the tree summarizes the state of the blockchain for a given block.
beneficiaryPublicKey Key Public key of the optional beneficiary designated by harvester.

Version: The higher byte represents the network identifier.

Id Description
0x68 (MAIN_NET) Public main network
0x98 (TEST_NET) Public test network
0x60 (MIJIN) Private network
0x90 (MIJIN_TEST) Private test network

Type: The type of the block.

Id Description
0x8043 Nemesis block
0x8143 Block

### VerifiableEntity¶

Serialization of an entity that should be signed by an account.

Property Type Description
signature Signature Entity signature generated by the signer.

### EntityBody¶

Serialization of an entity. An entity could be a block or a transaction.

Property Type Description
signerPublicKey Key Public key of the signer of the entity.
version uint16 Version of the structure.
type uint16 Entity type.