mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
Revert "remove HistoryServeWindow from protocol params"
This reverts commit a8edc64718.
This commit is contained in:
parent
82a6c3daaf
commit
f68e248438
2 changed files with 3 additions and 4 deletions
|
|
@ -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 = ¶ms.ChainConfig{
|
testVerkleChainConfig = ¶ms.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 {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue