Genesis Block

Genesis block configuration genesis is required in private networks.

SyntaxTypeDescriptionDefault
chainIdnumberused in transaction signature to prevent transactions reply eip155
coinbasestringbenefeciary (ethereum address) of mining rewardaddress(0)
difficultystringdifficulty (hexadecimal number) of the genesis block0x1
mixHashstringhash (hexadecimal) combined with nonce to prove effort spent to create block0x00..00
gasLimitstringtotal gas limit (hexadecimal number) for all transactions in a block0x47b760
noncestringrandom hexadecimal number used in block computation0x0
timestampstringgenesis block creation date (hexadecimal)0x0
accountsArrayarray of accounts to prefund and store code
forks objectsupported forks and corresponding block number
ethashobjectProof of Work consensus configuration
cliqueobjectProof of Authority consensus configuration
ibft2objectIBFT2 consensus configuration

chainId#

chainId is the chain id value used in transaction signature to prevent transactions reply eip155

chainId is required.

chainId can't reuse existing public network chain id to avoid transaction replay.

NetworkChain id
mainnet1
ropsten3
rinkeby4
goerli5
kotti6
ethereum classic61
Mordor63
development2018

coinbase#

coinbase is the beneficiary (ethereum address) of mining reward.

coinbase is optional.

difficulty#

difficulty is the difficulty of the genesis block.

difficulty is optional.

mixHash#

mixHash is combined with the nonce to prove the effort spent to create a block.

mixHash is optional.

gasLimit#

gasLimit is the total gas limit for all transactions in a block.

gasLimit is optional.

nonce#

nonce is a random number used in block computation.

nonce is optional.

timestamp#

timestamp is block creation date.

timestamp is optional.

forks#

forks is an object, where the key is fork name and the value is the block number at which to activate this fork.

forks is optional.

if forks is missing, all forks will be activated at block 0 (genesis block) except DAO.

Later forks like muirglacier can't be activated before earlier forks like homestead. They must be ordered as in the following table:

note

Note that homestead fork will be ignored in PoA Clique consensus network by Parity (OpenEthereum) client.

SyntaxTypeDescription
homesteadnumberHomestead fork activation block number
daonumberDAO fork activation block number
eip150numbereip150 fork activation block number
eip155numbereip155 fork activation block number
eip158numbereip158 fork activation block number
byzantiumnumberByzantium fork activation block number
constantinoplenumberConstantipole fork activation block number
petersburgnumberPetersburg fork activation block number
istanbulnumberIstanbul fork activation block number
muirglaciernumberMuir Glacier fork activation block number

accounts#

accounts is an array of accounts to fund or store code.

accounts is optional.

accounts is recommended for networks where signers or validators are not rewarded with eth.

a single account has no defaults.

SyntaxTypeDescription
addressstringethereum address
balancestringaccount balance in hexadecimal
codestringbytecode in hexadecimal
storagemapkey is the storage location in hexadecimal, and value in hexadecimal is the storage value

ethash#

ethash is Proof of Work consensus engine configuration.

ethash is optional.

ethash can be set only in proof of work private networks.

ethash.fixedDifficulty has no default value.

SyntaxTypeDescriptionDefault
fixedDifficultynumberfixed difficulty used in block computation

clique#

clique is Proof of Authority clique consensus engine configuration.

clique is optional.

clique can be set only in proof of authority clique private networks.

At least one signer in clique.signers is required.

SyntaxTypeDescriptionDefault
blockPeriodnumberblock time in seconds15
epochLengthnumbernumber of blocks after which to reset all votes1000
signersArrayarray of ethereum addresses

ibft2#

ibft2 is IBFT2 engine configuration.

ibft2 is optional.

ibft2 can be set only in IBFT2 private networks.

At least one validator in ibft2.validators is required.

SyntaxTypeDescriptionDefault
blockPeriodnumberblock time in seconds15
epochLengthnumbernumber of blocks after which to reset all votes1000
validatorsarrayarray of ethereum addresses
requestTimeoutnumbertimeout for each consensus round in seconds10
messageQueueLimitnumbermessage queue limit1000
duplicateMessageLimitnumberduplicate messages limit100
futureMessagesLimitnumberfuture messages buffer limit1000
futureMessagesMaxDistancenumbermaximum height from current chain height for buffering future messages10