diff --git a/core/block_validator.go b/core/block_validator.go index 16f5b20301..1adc2b11af 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -111,7 +111,8 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error { log.Trace( "Validator write block row consumption", "id", v.circuitCapacityChecker.ID, - "sealHash", block.Hash().String(), + "number", block.NumberU64(), + "hash", block.Hash().String(), "rowConsumption", rowConsumption, ) rawdb.WriteBlockRowConsumption(v.db, block.Hash(), rowConsumption) @@ -272,7 +273,7 @@ func (v *BlockValidator) validateCircuitRowConsumption(block *types.Block) (*typ log.Trace( "Validator apply ccc for block", "id", v.circuitCapacityChecker.ID, - "number", block.Number(), + "number", block.NumberU64(), "hash", block.Hash().String(), "len(txs)", block.Transactions().Len(), ) @@ -291,13 +292,13 @@ func (v *BlockValidator) validateCircuitRowConsumption(block *types.Block) (*typ defer v.cMu.Unlock() v.circuitCapacityChecker.Reset() - log.Trace("Validator reset ccc") + log.Trace("Validator reset ccc", "id", v.circuitCapacityChecker.ID) rc, err := v.circuitCapacityChecker.ApplyBlock(traces) log.Trace( "Validator apply ccc for block result", "id", v.circuitCapacityChecker.ID, - "number", block.Number(), + "number", block.NumberU64(), "hash", block.Hash().String(), "len(txs)", block.Transactions().Len(), "rc", rc, diff --git a/miner/worker.go b/miner/worker.go index 42c2d4cbc0..10c0e33dcf 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -637,20 +637,6 @@ func (w *worker) taskLoop() { w.pendingMu.Lock() delete(w.pendingTasks, sealHash) w.pendingMu.Unlock() - } else { - // Store highest L1 queue index processed by this block. This includes both - // included and skipped messages. This way, if a block only skips messages, - // we won't reprocess the same messages from the next block. - rawdb.WriteFirstQueueIndexNotInL2Block(w.eth.ChainDb(), sealHash, task.maxL1Index+1) - - // Store circuit row consumption. - log.Trace( - "Worker write block row consumption", - "id", w.circuitCapacityChecker.ID, - "sealHash", sealHash.String(), - "accRows", task.accRows, - ) - rawdb.WriteBlockRowConsumption(w.eth.ChainDb(), sealHash, task.accRows) } case <-w.exitCh: interrupt() @@ -678,6 +664,7 @@ func (w *worker) resultLoop() { sealhash = w.engine.SealHash(block.Header()) hash = block.Hash() ) + w.pendingMu.RLock() task, exist := w.pendingTasks[sealhash] w.pendingMu.RUnlock() @@ -711,6 +698,19 @@ func (w *worker) resultLoop() { } logs = append(logs, receipt.Logs...) } + // Store highest L1 queue index processed by this block. This includes both + // included and skipped messages. This way, if a block only skips messages, + // we won't reprocess the same messages from the next block. + rawdb.WriteFirstQueueIndexNotInL2Block(w.eth.ChainDb(), hash, task.maxL1Index+1) + // Store circuit row consumption. + log.Trace( + "Worker write block row consumption", + "id", w.circuitCapacityChecker.ID, + "number", block.Number(), + "hash", hash.String(), + "accRows", task.accRows, + ) + rawdb.WriteBlockRowConsumption(w.eth.ChainDb(), hash, task.accRows) // Commit block and state to database. _, err := w.chain.WriteBlockWithState(block, receipts, logs, task.state, true) if err != nil { @@ -1079,7 +1079,7 @@ func (w *worker) commitNewWork(interrupt *int32, noempty bool, timestamp int64) tstart := time.Now() parent := w.chain.CurrentBlock() w.circuitCapacityChecker.Reset() - log.Trace("Worker reset ccc") + log.Trace("Worker reset ccc", "id", w.circuitCapacityChecker.ID) if parent.Time() >= uint64(timestamp) { timestamp = int64(parent.Time() + 1) diff --git a/params/version.go b/params/version.go index b8890c4af4..90cd13607f 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 = 17 // Patch version component of the current release + VersionPatch = 18 // Patch version component of the current release VersionMeta = "sepolia" // Version metadata to append to the version string )