From a8edc64718195d4c909baae52af9da3b17e5d39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Tue, 1 Jul 2025 15:44:27 +0200 Subject: [PATCH] remove HistoryServeWindow from protocol params --- core/verkle_witness_test.go | 5 ++++- params/protocol_params.go | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/verkle_witness_test.go b/core/verkle_witness_test.go index a89672e6e5..b26873ef0d 100644 --- a/core/verkle_witness_test.go +++ b/core/verkle_witness_test.go @@ -40,6 +40,9 @@ import ( "github.com/holiman/uint256" ) +// historyServeWindow is the number of blocks to serve historical block hashes for, as per EIP-2935. +const historyServeWindow = 8191 + var ( testVerkleChainConfig = ¶ms.ChainConfig{ ChainID: big.NewInt(1), @@ -265,7 +268,7 @@ func TestProcessParentBlockHash(t *testing.T) { // 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 + ringIndex := number % historyServeWindow var key common.Hash binary.BigEndian.PutUint64(key[24:], ringIndex) if isVerkle { diff --git a/params/protocol_params.go b/params/protocol_params.go index 4a001eeb97..0798a1f624 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -173,8 +173,6 @@ const ( BlobTxBlobGasPerBlob = 1 << 17 // Gas consumption of a single data blob (== blob byte size) BlobTxMinBlobGasprice = 1 // Minimum gas price for data blobs BlobTxPointEvaluationPrecompileGas = 50000 // Gas price for the point evaluation precompile. - - HistoryServeWindow = 8191 // Number of blocks to serve historical block hashes for, EIP-2935. ) // Bls12381G1MultiExpDiscountTable is the gas discount table for BLS12-381 G1 multi exponentiation operation