diff --git a/core/blockchain.go b/core/blockchain.go index f6e1070788..faa212e513 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -280,6 +280,9 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par // initialize L1 message index for genesis block rawdb.WriteFirstQueueIndexNotInL2Block(db, bc.genesisBlock.Hash(), 0) + // initialize row consumption for genesis block + rawdb.WriteBlockRowConsumption(db, bc.genesisBlock.Hash(), &types.RowConsumption{}) + var nilBlock *types.Block bc.currentBlock.Store(nilBlock) bc.currentFastBlock.Store(nilBlock) @@ -699,6 +702,7 @@ func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) error { rawdb.WriteTd(batch, genesis.Hash(), genesis.NumberU64(), genesis.Difficulty()) rawdb.WriteBlock(batch, genesis) rawdb.WriteFirstQueueIndexNotInL2Block(batch, genesis.Hash(), 0) + rawdb.WriteBlockRowConsumption(batch, genesis.Hash(), &types.RowConsumption{}) if err := batch.Write(); err != nil { log.Crit("Failed to write genesis block", "err", err) } diff --git a/core/genesis.go b/core/genesis.go index 96d11c72dc..592978969d 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -353,6 +353,7 @@ func (g *Genesis) Commit(db ethdb.Database) (*types.Block, error) { rawdb.WriteHeadHeaderHash(db, block.Hash()) rawdb.WriteChainConfig(db, block.Hash(), config) rawdb.WriteFirstQueueIndexNotInL2Block(db, block.Hash(), 0) + rawdb.WriteBlockRowConsumption(db, block.Hash(), &types.RowConsumption{}) return block, nil } diff --git a/miner/worker.go b/miner/worker.go index 6a35b0f984..1f8f24b434 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -768,6 +768,9 @@ func (w *worker) makeCurrent(parent *types.Block, header *types.Header) error { env.l1TxCount = 0 env.maxL1Index = 0 + // make sure accRows is not nil, even for empty blocks + env.accRows = &types.RowConsumption{} + // Swap out the old work with the new one, terminating any leftover prefetcher // processes in the mean time and starting a new one. if w.current != nil && w.current.state != nil { diff --git a/params/version.go b/params/version.go index a65d5c9c02..d2405dd7ae 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 4 // Major version component of the current release VersionMinor = 3 // Minor version component of the current release - VersionPatch = 8 // Patch version component of the current release + VersionPatch = 9 // Patch version component of the current release VersionMeta = "sepolia" // Version metadata to append to the version string )