Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines EIP-7949.

The proposal standardizes the structure of the genesis.json file used to initialize Ethereum networks. Although Geth's implementation has served as a de facto standard, the absence of a formal specification has caused incompatibilities and confusion across clients.

What is genesis.json?

The Ethereum network initialization file

When initializing an Ethereum node, genesis.json defines the network's starting configuration. Mainnet nodes use predefined settings, whereas operators setting up their own testnets or private networks generally supply a genesis configuration.

The file contains information such as the following.

  • The chain ID identifying the network.
  • The block height or timestamp at which each hard fork activates.
  • The addresses to which ETH or code is allocated at genesis.
  • Initial parameters such as the block gas limit and difficulty.

Existing challenges

Although genesis configuration is essential to network initialization, historically there has been no formal specification for this file. The Geth (Go-Ethereum) implementation has served as the de facto standard, and other clients, including Besu and Nethermind, have followed its conventions.

Relying on Geth's implementation to infer the format introduces several problems.

  • Clients may interpret particular fields differently.
  • Configuration errors may arise when running a testnet with multiple clients.
  • EIPs introducing new forks or parameters lack a foundational specification to reference.

EIP-7949 was proposed to address this absence of a defined configuration format.

EIP-7949 overview

Purpose of the proposal

The goal of EIP-7949 is to define a canonical structure for genesis.json using JSON Schema.

It is an Informational EIP. Rather than introducing new protocol functionality or changing existing behavior, its primary purpose is to document and standardize the format already used by Geth.

Specifically, it seeks to achieve the following.

  • Clearly define the type, meaning, and format of each field.
  • Enable validation using JSON Schema.
  • Provide a foundation for subsequent EIPs that modify genesis configuration.

Relationship to other EIPs

There is a reason why this proposal is positioned as a foundational specification. Several recent EIPs have proposed changes to genesis configuration.

The following figure illustrates the relationship between EIP-7949 and related proposals.

Relationship between EIP-7949 and related proposals

EIP-7840, EIP-7892, and EIP-7910 all propose modifying or extending the structure of genesis.json. Defining EIP-7949 on the basis of Geth's de facto standard would allow these proposals to reference a common specification.

All three propose changing aspects of genesis configuration, but such changes are difficult to describe precisely when the underlying structure remains undefined. EIP-7949 provides a common reference for these proposals, contributing to a more consistent Ethereum specification.

Specification

Top-level fields

The genesis.json file is a JSON object with the following top-level fields.

Field Type Description Example
config Object Chain configuration object Described below
alloc Object Map of preallocated addresses, balances, and code Described below
nonce String Block nonce (hexadecimal string) 0x0
timestamp String Unix timestamp (hexadecimal string) 0x6720f180
extraData String Arbitrary additional data (hexadecimal string) 0x00
gasLimit String Block gas limit (hexadecimal string) 0x1c9c380
difficulty String Block difficulty (hexadecimal string) 0x1
mixhash String Mix hash (hexadecimal string) 0x000...000
coinbase String Coinbase address (hexadecimal string) 0x000...000

A notable characteristic is that many numeric values are represented as hexadecimal strings beginning with the 0x prefix. These values correspond to Ethereum block fields that are encoded using RLP (Recursive Length Prefix), although the JSON representation itself is separate from RLP encoding.

The following figure shows the overall field structure of genesis.json.

Structure of genesis.json

The two major top-level objects are config and alloc, each containing its respective fields. The orange fields in the figure represent configuration that changes in conjunction with hard forks.

The config object

The config field contains hard fork activation conditions and chain-specific settings.

Field Type Description Example
chainId Integer Unique chain identifier (decimal integer) 1 (mainnet)
<hardforkName>Block / <hardforkName>Time Integer Block height or timestamp at which a hard fork activates (decimal integer) shanghaiTime: 1681338455
terminalTotalDifficulty String Total difficulty threshold for the transition from PoW to PoS (hexadecimal string) 0xc70d815d562d3cfa955
depositContractAddress String Address of the deposit contract 0x00000000219ab540356cBB839Cbe05303d7705Fa
blobSchedule Object Blob configuration for each hard fork Described below

There are two ways to specify hard fork activation. Pre-Merge forks such as Homestead and Berlin use block heights (xxxBlock), while post-Merge forks such as Shanghai and Cancun use Unix timestamps (xxxTime). This reflects Ethereum's transition from proof of work (PoW) to proof of stake (PoS), with its time-based slot structure.

The blobSchedule object

This object configures the parameters of blob transactions introduced by EIP-4844 for individual hard forks.

EIP-4844 (Proto-Danksharding) introduced a special transaction type carrying blobs (Binary Large Objects). It substantially reduced the cost for Layer 2 rollups to publish data to Ethereum. It was activated in production as part of the Cancun upgrade in March 2024.

Field Type Description Example
target Integer Target number of blobs per block (decimal integer) 3
max Integer Maximum number of blobs per block (decimal integer) 6
baseFeeUpdateFraction Integer Coefficient used to adjust the blob base fee (decimal integer) 3338477

These values are specified in an object keyed by hard fork name, as in the following example.

json
"blobSchedule": {
  "cancun": {
    "target": 3,
    "max": 6,
    "baseFeeUpdateFraction": 3338477
  },
  "prague": {
    "target": 6,
    "max": 9,
    "baseFeeUpdateFraction": 5007716
  }
}

Because parameters can vary by hard fork, this structure accommodates the roadmap toward gradually increasing blob capacity (Danksharding).

The alloc object

The alloc field defines the network's initial state. It maps addresses represented as hexadecimal strings to the contents preallocated to each account.

Field Type Description Example
balance String Balance in wei (hexadecimal string) 0xde0b6b3a7640000 (1 ETH)
code String EVM bytecode (hexadecimal string) 0x6060604052...
nonce String Account nonce (hexadecimal string) 0x0
storage Object Key-value map of storage slots Pairs of 32-byte hexadecimal strings

The alloc field is particularly important for genesis account initialization, including accounts at precompile addresses where necessary and system contracts that need to exist at network launch. Operators can configure code and balances using alloc. Native precompiles such as ecrecover are implemented by the client rather than deployed as ordinary EVM bytecode.

JSON Schema

JSON Schema is at the core of this proposal. It allows programs to validate the structure of genesis.json automatically.

The following schema is reproduced from the original article's discussion of EIP-7949.

json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$defs": {
    "hexUint": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]+$"
    },
    "address": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "hash": {
      "type": "string",
      "pattern": "^0x[0-9a-f]{64}$"
    }
  },
  "title": "Ethereum Genesis File",
  "type": "object",
  "required": ["alloc", "gasLimit", "difficulty"],
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "chainId": { "type": "integer" },
        "homesteadBlock": { "type": "integer" },
        "daoForkBlock": { "type": "integer" },
        "eip150Block": { "type": "integer" },
        "tangerineWhistleBlock": { "type": "integer" },
        "eip155Block": { "type": "integer" },
        "spuriousDragonBlock": { "type": "integer" },
        "byzantiumBlock": { "type": "integer" },
        "constantinopleBlock": { "type": "integer" },
        "petersburgBlock": { "type": "integer" },
        "istanbulBlock": { "type": "integer" },
        "muirGlacierBlock": { "type": "integer" },
        "berlinBlock": { "type": "integer" },
        "londonBlock": { "type": "integer" },
        "arrowGlacierBlock": { "type": "integer" },
        "grayGlacierBlock": { "type": "integer" },
        "terminalTotalDifficulty": { "$ref": "#/$defs/hexUint" },
        "mergeNetsplitBlock": { "type": "integer" },
        "shanghaiTime": { "type": "integer" },
        "cancunTime": { "type": "integer" },
        "pragueTime": { "type": "integer" },
        "osakaTime": { "type": "integer" },
        "depositContractAddress": { "$ref": "#/$defs/address" },
        "blobSchedule": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "target": { "type": "integer" },
              "max": { "type": "integer" },
              "baseFeeUpdateFraction": { "type": "integer" }
            }
          }
        }
      },
      "additionalProperties": true
    },
    "nonce": { "$ref": "#/$defs/hexUint" },
    "timestamp": { "$ref": "#/$defs/hexUint" },
    "extraData": {
      "anyOf": [
        { "type": "string", "const": "" },
        { "type": "string", "pattern": "^0x([0-9a-fA-F]{2})*$" }
      ]
    },
    "gasLimit": { "$ref": "#/$defs/hexUint" },
    "difficulty": { "$ref": "#/$defs/hexUint" },
    "mixhash": { "$ref": "#/$defs/hash" },
    "coinbase": { "$ref": "#/$defs/address" },
    "alloc": {
      "type": "object",
      "patternProperties": {
        "^0x[0-9a-fA-F]{40}$": {
          "type": "object",
          "properties": {
            "balance": { "$ref": "#/$defs/hexUint" },
            "nonce": { "$ref": "#/$defs/hexUint" },
            "code": { "type": "string", "pattern": "^0x([0-9a-f])*$" },
            "storage": {
              "type": "object",
              "patternProperties": {
                "^0x[0-9a-f]{64}$": {
                  "$ref": "#/$defs/hash"
                }
              }
            }
          }
        },
        "additionalProperties": false
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": true
}

Several aspects of the schema design are worth noting.

First, $defs defines three reusable types. The hexUint type is a hexadecimal string beginning with 0x, address represents a 40-digit hexadecimal address, and hash represents a 64-digit hexadecimal hash. References using $ref allow these patterns to be reused throughout the schema.

Second, only three top-level fields are listed in required: alloc, gasLimit, and difficulty. Other fields are optional, and additionalProperties: true permits additional properties at the top level. This design accommodates fields added by future hard forks without necessarily requiring a schema update for validation to succeed.

The pattern definition for alloc is also noteworthy. Keys match an address-format regular expression, and the corresponding values can contain balance, code, nonce, and storage. Setting additionalProperties: false directly on the alloc object prohibits keys that do not match the address pattern.

Design rationale

Why use Geth's implementation as the basis?

The schema formalizes the format Geth has used for years. Instead of designing a new format and replacing existing implementations, the proposal documents a working format as a standard.

There are practical reasons for this approach. Geth is widely used, and testnet tooling such as Kurtosis and Assertoor already relies on Geth-compatible genesis configurations. Defining an entirely new format would impose substantial migration costs on the ecosystem, making the adoption of an existing format a pragmatic choice.

The proposal documents existing behavior rather than requiring every client to conform fully. Allowing client-specific extensions through additionalProperties: true reflects that approach.

A foundation for subsequent EIPs

Another important design goal is to provide a specification that other proposals can reference.

A growing number of proposals modify genesis configuration, including EIP-7840 (adding blob schedules to execution-layer configuration) and EIP-7892 (forks that change only blob parameters). These proposals previously had to describe changes to a configuration structure that lacked a formal definition.

If EIP-7949 is adopted, subsequent EIPs can specify their changes precisely by referring to extensions of the EIP-7949 schema or additions to its blobSchedule field.

Security considerations

EIP-7949 is an Informational proposal and does not introduce new protocol functionality. Modifying the genesis configuration requires the relevant administrative access to a node or its configuration files.

The proposal therefore identifies no new security considerations arising directly from the standardization.

In practice, operators should take care when configuring alloc on private networks and testnets because it defines the code and ETH present at genesis. JSON Schema validation can help detect type and format errors in advance, although it cannot guarantee that the genesis configuration is semantically correct or secure.

Conclusion

This article covered EIP-7949.

Standardizing genesis.json may seem modest, but it provides important infrastructure for running testnets and Layer 2 networks reliably with multiple clients. Giving proposals such as EIP-7840 and EIP-7892 a common reference makes their specifications more precise and helps maintain interoperability across clients.

I also publish articles and other resources on the following platforms.