{"id":20797846,"url":"https://github.com/cryptohazard/ethereum-genesis","last_synced_at":"2026-02-16T20:33:45.399Z","repository":{"id":73499927,"uuid":"290037558","full_name":"cryptohazard/ethereum-genesis","owner":"cryptohazard","description":"verifier for ethereum genesis","archived":false,"fork":false,"pushed_at":"2020-08-25T16:32:22.000Z","size":266,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T14:42:25.181Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cryptohazard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-24T20:53:58.000Z","updated_at":"2020-08-25T16:32:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"28a66810-39dc-40aa-9615-fd6f495ea22d","html_url":"https://github.com/cryptohazard/ethereum-genesis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cryptohazard/ethereum-genesis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptohazard%2Fethereum-genesis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptohazard%2Fethereum-genesis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptohazard%2Fethereum-genesis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptohazard%2Fethereum-genesis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cryptohazard","download_url":"https://codeload.github.com/cryptohazard/ethereum-genesis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cryptohazard%2Fethereum-genesis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29517613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T18:37:19.720Z","status":"ssl_error","status_checked_at":"2026-02-16T18:36:46.920Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T16:35:29.907Z","updated_at":"2026-02-16T20:33:45.360Z","avatar_url":"https://github.com/cryptohazard.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ethereum-genesis : verifier for ethereum genesis\n\nFirst we review the code to see why we cannot change the genesis block or just the allocation from the ICO in that block. We see that the genesis [allocation](https://github.com/ethereum/go-ethereum/blob/master/core/genesis.go#L58) is part of the Genesis structure. We expect it to count for the block hash computation.\nThe allocation change the state trie and we see it [here](https://github.com/ethereum/go-ethereum/blob/master/core/genesis.go#L255) and its [root](https://github.com/ethereum/go-ethereum/blob/master/core/genesis.go#L280) goes into the header of the genesis block. Now the missing part is where we compute the hash of the block. The interesting function is [SetupGenesisBlock](https://github.com/ethereum/go-ethereum/blob/fc20680b95da65f952012f3370e5d316f0ba237d/core/genesis.go#L155):\n```\n// SetupGenesisBlock writes or updates the genesis block in db.\n// The block that will be used is:\n//\n//                          genesis == nil       genesis != nil\n//                       +------------------------------------------\n//     db has no genesis |  main-net default  |  genesis\n//     db has genesis    |  from DB           |  genesis (if compatible)\n//\n// The stored chain configuration will be updated if it is compatible (i.e. does not\n// specify a fork block below the local head block). In case of a conflict, the\n// error is a *params.ConfigCompatError and the new, unwritten config is returned.\n//\n// The returned chain configuration is never nil.\n```\n\nWe compare the hash and it should give:\n```\nMainnetGenesisHash = common.HexToHash(\"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\")\n```\n\n## Geth RPC\n```\ncurl -X POST --header 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\": [\"0x0\", true],\"id\":1}' \"127.0.0.1:8545\"\n```\n\n```\n{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"difficulty\":\"0x400000000\",\"extraData\":\"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa\",\"gasLimit\":\"0x1388\",\"gasUsed\":\"0x0\",\"hash\":\"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3\",\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"miner\":\"0x0000000000000000000000000000000000000000\",\"mixHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000042\",\"number\":\"0x0\",\"parentHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"receiptsRoot\":\"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",\"sha3Uncles\":\"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347\",\"size\":\"0x21c\",\"stateRoot\":\"0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544\",\"timestamp\":\"0x0\",\"totalDifficulty\":\"0x400000000\",\"transactions\":[],\"transactionsRoot\":\"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421\",\"uncles\":[]}}\n```\n\n## Geth Dump\ngeth dumpgenesis \u003e ethgenesis.json\n\n## Etherscan\n\nhttps://etherscan.io/block/0\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptohazard%2Fethereum-genesis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptohazard%2Fethereum-genesis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptohazard%2Fethereum-genesis/lists"}