{"eip":7949,"title":"Genesis File Format","description":"Schema for `genesis.json` files","authors":["Justin Florentine (@jflo) \u003cjustin@florentine.us\u003e","Jochem Brouwer (@jochem-brouwer) \u003cjochem@ethereum.org\u003e","Barnabas Busa (@barnabasbusa) \u003cbbusa@ethereum.org\u003e"],"status":"Draft","type":"Informational","created":"2025-05-19","discussionsTo":"https://ethereum-magicians.org/t/eip-xxxx-genesis-json-standardization/24271","repo":"EIPs","label":"EIP-7949","officialUrl":"https://eips.ethereum.org/EIPS/eip-7949","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7949.md","url":"https://eips.huatuo.xyz/eip-7949/","tldr":{"en":"Writes down the de facto Geth-style genesis.json format as a JSON Schema, so every client and tool can bootstrap the same network from the same file without guesswork.","ja":"事実上の標準である Geth 形式の genesis.json フォーマットを JSON Schema として書き下す。これにより、すべてのクライアントとツールが、推測なしに同じファイルから同じネットワークを立ち上げられる。","ko":"사실상의 표준인 Geth 방식 genesis.json 형식을 JSON Schema로 기록한다. 모든 클라이언트와 도구가 추측 없이 같은 파일로 같은 네트워크를 부트스트랩할 수 있게 한다.","zh":"把事实标准的 Geth 风格 genesis.json 格式写成 JSON Schema，使每个客户端和工具都能从同一个文件启动同一个网络，无需猜测。"},"tags":["genesis","configuration","client","json-schema","informational"],"explainers":{"en":{"lang":"en","tldr":"Writes down the de facto Geth-style genesis.json format as a JSON Schema, so every client and tool can bootstrap the same network from the same file without guesswork.","tags":["genesis","configuration","client","json-schema","informational"],"related":[7840,7892,7910],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7949/","markdown":"## What problem does it solve?\n\nEvery Ethereum network starts from a genesis file that sets the chain ID, fork schedule and initial balances and contracts. In practice clients converged on the layout Geth uses, but nothing official described it. The spec notes this has caused incompatibilities, bugs and extra work for anyone running several clients together on a testnet or devnet.\n\nNewer proposals also keep adding fields to the genesis config, such as the blob schedule ([EIP-7840](/eip-7840/)) and Blob Parameter Only forks ([EIP-7892](/eip-7892/)). EIP-7949 defines the root structure those changes plug into, plus a JSON Schema tools can validate against.\n\n## How it works\n\n**Top level:** `config`, `alloc`, `nonce`, `timestamp`, `extraData`, `gasLimit`, `difficulty`, `mixhash`, `coinbase`. Numeric header values are hex strings. The schema requires `alloc`, `gasLimit` and `difficulty`.\n\n**`config`** (decimal integers unless noted):\n\n- `chainId`.\n- Fork activation keys: `\u003cfork\u003eBlock` for block-number forks (`londonBlock`, …) and `\u003cfork\u003eTime` for timestamp forks (`shanghaiTime`, `cancunTime`, `pragueTime`, `osakaTime`).\n- `terminalTotalDifficulty` (hex string) and `depositContractAddress`.\n- `blobSchedule`: per-fork `target`, `max` and `baseFeeUpdateFraction`.\n- Unknown keys are allowed, so client-specific extensions still validate.\n\n**`alloc`** maps addresses to `balance` (wei, hex), `nonce`, `code` and `storage` (32-byte hex keys and values).\n\n## Sample code\n\nA minimal devnet genesis that follows the schema (values are illustrative):\n\n```json\n{\n  \"config\": {\n    \"chainId\": 1337,\n    \"londonBlock\": 0,\n    \"terminalTotalDifficulty\": \"0x0\",\n    \"shanghaiTime\": 0,\n    \"cancunTime\": 0,\n    \"pragueTime\": 0,\n    \"blobSchedule\": {\n      \"cancun\": { \"target\": 3, \"max\": 6, \"baseFeeUpdateFraction\": 3338477 },\n      \"prague\": { \"target\": 6, \"max\": 9, \"baseFeeUpdateFraction\": 5007716 }\n    }\n  },\n  \"nonce\": \"0x0\",\n  \"timestamp\": \"0x0\",\n  \"extraData\": \"0x\",\n  \"gasLimit\": \"0x1c9c380\",\n  \"difficulty\": \"0x0\",\n  \"alloc\": {\n    \"0x1111111111111111111111111111111111111111\": { \"balance\": \"0xde0b6b3a7640000\" }\n  }\n}\n```\n\nValidating with the schema from the EIP (saved locally as `genesis.schema.json`):\n\n```bash\nnpx ajv-cli validate -s genesis.schema.json -d genesis.json\n```\n\n## Things to know\n\n- Status: **Draft** (Informational). It documents existing practice; it does not change consensus.\n- Mind the types: top-level header fields are hex strings, while `chainId`, fork activation values and `blobSchedule` numbers inside `config` are decimal integers.\n- Real devnets usually need more than this minimal file (system contracts, deposit contract and so on in `alloc`), depending on which forks are active at genesis.\n- A running node's effective configuration can be checked with `eth_config` ([EIP-7910](/eip-7910/)).\n"},"ja":{"lang":"ja","tldr":"事実上の標準である Geth 形式の genesis.json フォーマットを JSON Schema として書き下す。これにより、すべてのクライアントとツールが、推測なしに同じファイルから同じネットワークを立ち上げられる。","tags":["genesis","configuration","client","json-schema","informational"],"related":[7840,7892,7910],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7949/","markdown":"## 何を解決するのか\n\nすべての Ethereum ネットワークは、チェーン ID、フォークのスケジュール、初期残高とコントラクトを設定するジェネシスファイルから始まります。実際には、クライアントは Geth が使うレイアウトに収束しましたが、それを説明する公式なものはありませんでした。仕様は、これがテストネットや devnet で複数のクライアントを一緒に動かす人々にとって、非互換性、バグ、追加の作業を引き起こしてきたと述べています。\n\nまた、新しい提案は、ジェネシス設定にフィールドを追加し続けています。blob スケジュール（[EIP-7840](/eip-7840/)）や Blob Parameter Only フォーク（[EIP-7892](/eip-7892/)）などです。EIP-7949 は、それらの変更が差し込まれるルート構造と、ツールが検証に使える JSON Schema を定義します。\n\n## 仕組み\n\n**トップレベル:** `config`、`alloc`、`nonce`、`timestamp`、`extraData`、`gasLimit`、`difficulty`、`mixhash`、`coinbase`。数値のヘッダー値は 16 進文字列です。スキーマは `alloc`、`gasLimit`、`difficulty` を必須としています。\n\n**`config`**（特記のない限り 10 進整数）:\n\n- `chainId`。\n- フォーク有効化のキー: ブロック番号によるフォークには `\u003cfork\u003eBlock`（`londonBlock` など）、タイムスタンプによるフォークには `\u003cfork\u003eTime`（`shanghaiTime`、`cancunTime`、`pragueTime`、`osakaTime`）。\n- `terminalTotalDifficulty`（16 進文字列）と `depositContractAddress`。\n- `blobSchedule`: フォークごとの `target`、`max`、`baseFeeUpdateFraction`。\n- 未知のキーも許可されているため、クライアント固有の拡張も引き続き検証を通ります。\n\n**`alloc`** は、アドレスを `balance`（wei、16 進）、`nonce`、`code`、`storage`（32 バイトの 16 進のキーと値）に対応付けます。\n\n## サンプルコード\n\nスキーマに従う最小限の devnet ジェネシス（値は説明用）:\n\n```json\n{\n  \"config\": {\n    \"chainId\": 1337,\n    \"londonBlock\": 0,\n    \"terminalTotalDifficulty\": \"0x0\",\n    \"shanghaiTime\": 0,\n    \"cancunTime\": 0,\n    \"pragueTime\": 0,\n    \"blobSchedule\": {\n      \"cancun\": { \"target\": 3, \"max\": 6, \"baseFeeUpdateFraction\": 3338477 },\n      \"prague\": { \"target\": 6, \"max\": 9, \"baseFeeUpdateFraction\": 5007716 }\n    }\n  },\n  \"nonce\": \"0x0\",\n  \"timestamp\": \"0x0\",\n  \"extraData\": \"0x\",\n  \"gasLimit\": \"0x1c9c380\",\n  \"difficulty\": \"0x0\",\n  \"alloc\": {\n    \"0x1111111111111111111111111111111111111111\": { \"balance\": \"0xde0b6b3a7640000\" }\n  }\n}\n```\n\nEIP のスキーマ（ローカルに `genesis.schema.json` として保存）での検証:\n\n```bash\nnpx ajv-cli validate -s genesis.schema.json -d genesis.json\n```\n\n## 知っておくべきこと\n\n- ステータス: **Draft**（Informational）。既存の慣行を文書化したもので、コンセンサスは変更しません。\n- 型に注意してください。トップレベルのヘッダーフィールドは 16 進文字列ですが、`config` 内の `chainId`、フォーク有効化の値、`blobSchedule` の数値は 10 進整数です。\n- 実際の devnet には、ジェネシスでどのフォークが有効かによりますが、通常、この最小限のファイル以上のもの（`alloc` 内のシステムコントラクトや deposit コントラクトなど）が必要です。\n- 稼働中のノードの実効設定は `eth_config`（[EIP-7910](/eip-7910/)）で確認できます。\n"},"ko":{"lang":"ko","tldr":"사실상의 표준인 Geth 방식 genesis.json 형식을 JSON Schema로 기록한다. 모든 클라이언트와 도구가 추측 없이 같은 파일로 같은 네트워크를 부트스트랩할 수 있게 한다.","tags":["genesis","configuration","client","json-schema","informational"],"related":[7840,7892,7910],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7949/","markdown":"## 어떤 문제를 해결하나요?\n\n모든 이더리움 네트워크는 체인 ID, 포크 일정, 초기 잔액과 컨트랙트를 정하는 제네시스 파일에서 시작합니다. 실제로는 클라이언트들이 Geth가 쓰는 레이아웃으로 수렴했지만, 이를 설명하는 공식 문서는 없었습니다. 스펙은 이것이 테스트넷이나 데브넷에서 여러 클라이언트를 함께 운영하는 사람들에게 비호환, 버그, 추가 작업을 일으켜 왔다고 밝힙니다.\n\n더 새로운 제안들도 제네시스 설정에 필드를 계속 추가하고 있습니다. blob 스케줄([EIP-7840](/eip-7840/))이나 Blob Parameter Only 포크([EIP-7892](/eip-7892/)) 등입니다. EIP-7949는 그런 변경이 끼워지는 루트 구조와, 도구가 검증에 쓸 수 있는 JSON Schema를 정의합니다.\n\n## 어떻게 동작하나요?\n\n**최상위:** `config`, `alloc`, `nonce`, `timestamp`, `extraData`, `gasLimit`, `difficulty`, `mixhash`, `coinbase`. 숫자형 헤더 값은 16진수 문자열입니다. 스키마는 `alloc`, `gasLimit`, `difficulty`를 필수로 합니다.\n\n**`config`**(별도 언급이 없으면 10진 정수):\n\n- `chainId`.\n- 포크 활성화 키: 블록 번호 포크는 `\u003cfork\u003eBlock`(`londonBlock` 등), 타임스탬프 포크는 `\u003cfork\u003eTime`(`shanghaiTime`, `cancunTime`, `pragueTime`, `osakaTime`).\n- `terminalTotalDifficulty`(16진수 문자열)와 `depositContractAddress`.\n- `blobSchedule`: 포크별 `target`, `max`, `baseFeeUpdateFraction`.\n- 알 수 없는 키도 허용되므로 클라이언트별 확장도 계속 검증을 통과합니다.\n\n**`alloc`**은 주소를 `balance`(wei, 16진수), `nonce`, `code`, `storage`(32바이트 16진수 키와 값)에 대응시킵니다.\n\n## 샘플 코드\n\n스키마를 따르는 최소한의 데브넷 제네시스(값은 설명용):\n\n```json\n{\n  \"config\": {\n    \"chainId\": 1337,\n    \"londonBlock\": 0,\n    \"terminalTotalDifficulty\": \"0x0\",\n    \"shanghaiTime\": 0,\n    \"cancunTime\": 0,\n    \"pragueTime\": 0,\n    \"blobSchedule\": {\n      \"cancun\": { \"target\": 3, \"max\": 6, \"baseFeeUpdateFraction\": 3338477 },\n      \"prague\": { \"target\": 6, \"max\": 9, \"baseFeeUpdateFraction\": 5007716 }\n    }\n  },\n  \"nonce\": \"0x0\",\n  \"timestamp\": \"0x0\",\n  \"extraData\": \"0x\",\n  \"gasLimit\": \"0x1c9c380\",\n  \"difficulty\": \"0x0\",\n  \"alloc\": {\n    \"0x1111111111111111111111111111111111111111\": { \"balance\": \"0xde0b6b3a7640000\" }\n  }\n}\n```\n\nEIP의 스키마(로컬에 `genesis.schema.json`으로 저장)로 검증하기:\n\n```bash\nnpx ajv-cli validate -s genesis.schema.json -d genesis.json\n```\n\n## 알아둘 점\n\n- 상태: **Draft**(Informational). 기존 관행을 문서화한 것이며 합의를 바꾸지 않습니다.\n- 타입에 유의하세요. 최상위 헤더 필드는 16진수 문자열이지만, `config` 안의 `chainId`, 포크 활성화 값, `blobSchedule` 숫자는 10진 정수입니다.\n- 실제 데브넷은 제네시스에서 어떤 포크가 활성화되어 있느냐에 따라 보통 이 최소한의 파일보다 더 많은 것(`alloc`의 시스템 컨트랙트, 예치 컨트랙트 등)이 필요합니다.\n- 실행 중인 노드의 실제 적용 설정은 `eth_config`([EIP-7910](/eip-7910/))로 확인할 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"把事实标准的 Geth 风格 genesis.json 格式写成 JSON Schema，使每个客户端和工具都能从同一个文件启动同一个网络，无需猜测。","tags":["genesis","configuration","client","json-schema","informational"],"related":[7840,7892,7910],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7949/","markdown":"## 它解决什么问题？\n\n每个以太坊网络都从一个创世文件开始，它设定了链 ID、分叉计划以及初始余额和合约。实际上，客户端都趋同于 Geth 使用的布局，但没有任何官方文档描述它。规范指出，这给在测试网或开发网上同时运行多个客户端的人带来了不兼容、bug 和额外的工作。\n\n较新的提案也在不断向创世配置添加字段，例如 blob 调度（[EIP-7840](/eip-7840/)）和 Blob Parameter Only 分叉（[EIP-7892](/eip-7892/)）。EIP-7949 定义了这些变更所挂载的根结构，以及工具可用来校验的 JSON Schema。\n\n## 它如何运作\n\n**顶层：** `config`、`alloc`、`nonce`、`timestamp`、`extraData`、`gasLimit`、`difficulty`、`mixhash`、`coinbase`。数值型区块头的值是十六进制字符串。schema 要求必须有 `alloc`、`gasLimit` 和 `difficulty`。\n\n**`config`**（除特别说明外为十进制整数）：\n\n- `chainId`。\n- 分叉激活键：按区块号激活的分叉用 `\u003cfork\u003eBlock`（`londonBlock` 等），按时间戳激活的分叉用 `\u003cfork\u003eTime`（`shanghaiTime`、`cancunTime`、`pragueTime`、`osakaTime`）。\n- `terminalTotalDifficulty`（十六进制字符串）和 `depositContractAddress`。\n- `blobSchedule`：每个分叉的 `target`、`max` 和 `baseFeeUpdateFraction`。\n- 允许未知键，因此客户端特有的扩展仍可通过校验。\n\n**`alloc`** 把地址映射到 `balance`（wei，十六进制）、`nonce`、`code` 和 `storage`（32 字节十六进制的键和值）。\n\n## 示例代码\n\n遵循该 schema 的最小开发网创世文件（数值仅作示意）：\n\n```json\n{\n  \"config\": {\n    \"chainId\": 1337,\n    \"londonBlock\": 0,\n    \"terminalTotalDifficulty\": \"0x0\",\n    \"shanghaiTime\": 0,\n    \"cancunTime\": 0,\n    \"pragueTime\": 0,\n    \"blobSchedule\": {\n      \"cancun\": { \"target\": 3, \"max\": 6, \"baseFeeUpdateFraction\": 3338477 },\n      \"prague\": { \"target\": 6, \"max\": 9, \"baseFeeUpdateFraction\": 5007716 }\n    }\n  },\n  \"nonce\": \"0x0\",\n  \"timestamp\": \"0x0\",\n  \"extraData\": \"0x\",\n  \"gasLimit\": \"0x1c9c380\",\n  \"difficulty\": \"0x0\",\n  \"alloc\": {\n    \"0x1111111111111111111111111111111111111111\": { \"balance\": \"0xde0b6b3a7640000\" }\n  }\n}\n```\n\n使用 EIP 中的 schema 校验（本地保存为 `genesis.schema.json`）：\n\n```bash\nnpx ajv-cli validate -s genesis.schema.json -d genesis.json\n```\n\n## 需要注意\n\n- 状态：**Draft**（Informational）。它记录的是现有实践，不改变共识。\n- 注意类型：顶层区块头字段是十六进制字符串，而 `config` 内的 `chainId`、分叉激活值和 `blobSchedule` 数字则是十进制整数。\n- 真实的开发网通常需要比这个最小文件更多的内容（`alloc` 中的系统合约、存款合约等），具体取决于创世时激活了哪些分叉。\n- 运行中节点的实际生效配置可以用 `eth_config`（[EIP-7910](/eip-7910/)）检查。\n"}}}
