Skip to content

Commit 1c9fd88

Browse files
authored
Revert "Adopt latest changes to requests hash computation (#2862)"
This reverts commit 1721435.
1 parent 6142183 commit 1c9fd88

File tree

9 files changed

+7
-956
lines changed

9 files changed

+7
-956
lines changed

nimbus/common/chain_config_hash.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Nimbus
2-
# Copyright (c) 2024 Status Research & Development GmbH
2+
# Copyright (c) 2021-2024 Status Research & Development GmbH
33
# Licensed under either of
44
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
55
# * MIT license ([LICENSE-MIT](LICENSE-MIT))

nimbus/common/genesis.nim

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import
1616
eth/common/[hashes, accounts, headers, addresses],
1717
../db/[ledger, core_db],
1818
../constants,
19-
../utils/utils,
2019
./chain_config
2120

2221
# ------------------------------------------------------------------------------
@@ -79,10 +78,6 @@ proc toGenesisHeader*(
7978
result.excessBlobGas = Opt.some g.excessBlobGas.get(0'u64)
8079
result.parentBeaconBlockRoot = Opt.some g.parentBeaconBlockRoot.get(default(Hash32))
8180

82-
if fork >= Prague:
83-
const EmptyRequestsHash = calcRequestsHash()
84-
result.requestsHash = Opt.some(EmptyRequestsHash)
85-
8681
proc toGenesisHeader*(
8782
genesis: Genesis;
8883
fork: HardFork;

nimbus/utils/utils.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ func calcRequestsHash*(requests: varargs[seq[byte]]): Hash32 =
4040
var ctx: sha256
4141
ctx.init()
4242
for i, data in requests:
43-
if data.len > 0:
44-
ctx.update(calcHash(i.byte, data).data)
43+
ctx.update(calcHash(i.byte, data).data)
4544
ctx.finish(result.data)
4645
ctx.clear()
4746

0 commit comments

Comments
 (0)