From f68e2484380427746162f67edf228d14340d8aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Garamv=C3=B6lgyi?= Date: Mon, 4 Aug 2025 14:56:18 +0200 Subject: [PATCH] Revert "remove HistoryServeWindow from protocol params" This reverts commit a8edc64718195d4c909baae52af9da3b17e5d39d. --- core/verkle_witness_test.go | 5 +---- params/protocol_params.go | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/verkle_witness_test.go b/core/verkle_witness_test.go index b26873ef0d..a89672e6e5 100644 --- a/core/verkle_witness_test.go +++ b/core/verkle_witness_test.go @@ -40,9 +40,6 @@ 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), @@ -268,7 +265,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 % historyServeWindow + ringIndex := number % params.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 d741ad8489..e8b044f450 100644 --- a/params/protocol_params.go +++ b/params/protocol_params.go @@ -180,6 +180,8 @@ const ( BlobTxMaxBlobs = 6 BlobBaseCost = 1 << 13 // Base execution gas cost for a blob. + HistoryServeWindow = 8191 // Number of blocks to serve historical block hashes for, EIP-2935. + MaxBlockSize = 8_388_608 // maximum size of an RLP-encoded block )