remove HistoryServeWindow from protocol params

This commit is contained in:
Péter Garamvölgyi 2025-07-01 15:44:27 +02:00
parent 0f18f75ec4
commit a8edc64718
No known key found for this signature in database
GPG key ID: 7FC8D069F7199070
2 changed files with 4 additions and 3 deletions

View file

@ -40,6 +40,9 @@ 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),
@ -265,7 +268,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 % params.HistoryServeWindow ringIndex := number % 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

@ -173,8 +173,6 @@ const (
BlobTxBlobGasPerBlob = 1 << 17 // Gas consumption of a single data blob (== blob byte size) BlobTxBlobGasPerBlob = 1 << 17 // Gas consumption of a single data blob (== blob byte size)
BlobTxMinBlobGasprice = 1 // Minimum gas price for data blobs BlobTxMinBlobGasprice = 1 // Minimum gas price for data blobs
BlobTxPointEvaluationPrecompileGas = 50000 // Gas price for the point evaluation precompile. 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 // Bls12381G1MultiExpDiscountTable is the gas discount table for BLS12-381 G1 multi exponentiation operation