-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Closed
Labels
Description
Fixing misleading constant for EIP-2735 that's only used for testing in protocol_params.go
.
go-ethereum/params/protocol_params.go
Line 183 in a9a19c4
HistoryServeWindow = 8192 // Number of blocks to serve historical block hashes for, EIP-2935. |
This should be set to 8191
. This constant is used in for verkle testing.
go-ethereum/core/verkle_witness_test.go
Lines 270 to 279 in a9a19c4
// getContractStoredBlockHash is a utility method which reads the stored parent blockhash for block 'number' | |
func getContractStoredBlockHash(statedb *state.StateDB, number uint64, isVerkle bool) common.Hash { | |
ringIndex := number % params.HistoryServeWindow | |
var key common.Hash | |
binary.BigEndian.PutUint64(key[24:], ringIndex) | |
if isVerkle { | |
return statedb.GetState(params.HistoryStorageAddress, key) | |
} | |
return statedb.GetState(params.HistoryStorageAddress, key) | |
} |
This isn't used in the EIP-2735 implementation checks, because it uses the following bytecode, that indeed uses 0x1FFF
here (8191)
go-ethereum/params/protocol_params.go
Line 213 in a9a19c4
HistoryStorageCode = common.FromHex("3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500") |
It was misleading when I was double checking this implementation.