Revert "remove HistoryServeWindow from protocol params"

This reverts commit a8edc64718.
This commit is contained in:
Péter Garamvölgyi 2025-08-04 14:56:18 +02:00
parent 82a6c3daaf
commit f68e248438
No known key found for this signature in database
GPG key ID: 7FC8D069F7199070
2 changed files with 3 additions and 4 deletions

View file

@ -40,9 +40,6 @@ import (
"github.com/holiman/uint256" "github.com/holiman/uint256"
) )
// historyServeWindow is the number of blocks to serve historical block hashes for, as per EIP-2935.
const historyServeWindow = 8191
var ( var (
testVerkleChainConfig = &params.ChainConfig{ testVerkleChainConfig = &params.ChainConfig{
ChainID: big.NewInt(1), 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' // 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 { func getContractStoredBlockHash(statedb *state.StateDB, number uint64, isVerkle bool) common.Hash {
ringIndex := number % historyServeWindow ringIndex := number % params.HistoryServeWindow
var key common.Hash var key common.Hash
binary.BigEndian.PutUint64(key[24:], ringIndex) binary.BigEndian.PutUint64(key[24:], ringIndex)
if isVerkle { if isVerkle {

View file

@ -180,6 +180,8 @@ const (
BlobTxMaxBlobs = 6 BlobTxMaxBlobs = 6
BlobBaseCost = 1 << 13 // Base execution gas cost for a blob. 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 MaxBlockSize = 8_388_608 // maximum size of an RLP-encoded block
) )