From 53affec35a332f7682089e3f2bfe0df7f02c4a05 Mon Sep 17 00:00:00 2001 From: milen <94537774+taratorio@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:13:37 +0000 Subject: [PATCH] core: fix genesis to block to use empty requests hash to fix Hive tests (#13436) `erigon init genesis.json` was causing a genesis block to be created with the wrong hash due to using inccorrect RequestsHash for blocks before Prague this caused the Hive tests to fail with: ``` parent's total difficulty not found with hash 6549118a1de2c28b204c671688e0aa4f6b522e72bf3a4a3f76cc8def0a7ecc8f and height 0: ``` when trying to insert blocks, causing a considerable amount of tests in rpc-compat to fail, hence making the CI red --- core/genesis_write.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/genesis_write.go b/core/genesis_write.go index ff34fc81614..11ec524f70c 100644 --- a/core/genesis_write.go +++ b/core/genesis_write.go @@ -486,11 +486,10 @@ func GenesisToBlock(g *types.Genesis, dirs datadir.Dirs, logger log.Logger) (*ty } if g.Config != nil && g.Config.IsPrague(g.Timestamp) { - // TODO @somnathb1 - if later iterations and/or tests don't need this from genesis.json, remove the following if g.RequestsHash != nil { head.RequestsHash = g.RequestsHash } else { - head.RequestsHash = &types.EmptyRootHash + head.RequestsHash = &types.EmptyRequestsHash } }