Genesis

Genesis

// Genesis specifies the header fields, state of a genesis block. It also defines hard
// fork switch-over blocks through the chain configuration.
type Genesis struct {
    Config *params.ChainConfig `json:"config"`
    //Nonce      uint64              `json:"nonce"`
    Timestamp  uint64         `json:"timestamp"`
    ExtraData  []byte         `json:"extraData"`
    GasLimit   uint64         `json:"gasLimit"   gencodec:"required"`
    Difficulty *big.Int       `json:"difficulty" gencodec:"required"`
    Mixhash    common.Hash    `json:"mixHash"`
    Coinbase   common.Address `json:"coinbase"`
    Alloc      GenesisAlloc   `json:"alloc"      gencodec:"required"`

    // These fields are used for consensus tests. Please don't use them
    // in actual genesis blocks.
    Number     uint64      `json:"number"`
    GasUsed    uint64      `json:"gasUsed"`
    ParentHash common.Hash `json:"parentHash"`
}

GenesisAlloc

GenesisAccount

Last updated

Was this helpful?