From cb55c48b5f04e6d9eb11135d4fd861daf5db764f Mon Sep 17 00:00:00 2001 From: Alexandros Filios Date: Tue, 28 Oct 2025 17:41:34 -0500 Subject: [PATCH] Added periodic log during FindLastAvailableState --- blocks_reexecutor/blocks_reexecutor.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/blocks_reexecutor/blocks_reexecutor.go b/blocks_reexecutor/blocks_reexecutor.go index 689553a757..8c53df4143 100644 --- a/blocks_reexecutor/blocks_reexecutor.go +++ b/blocks_reexecutor/blocks_reexecutor.go @@ -203,13 +203,19 @@ func New(c *Config, blockchain *core.BlockChain, ethDb ethdb.Database, fatalErrC return blocksReExecutor, nil } +func logState(header *types.Header, hasState bool) { + if height := header.Number.Uint64(); height%1_000_000 == 0 { + log.Info("Finding last available state.", "block", height, "hash", header.Hash(), "hasState", hasState) + } +} + // LaunchBlocksReExecution launches the thread to apply blocks of range [currentBlock-s.config.MinBlocksPerThread, currentBlock] to the last available valid state func (s *BlocksReExecutor) LaunchBlocksReExecution(ctx context.Context, startBlock, currentBlock, minBlocksPerThread uint64) uint64 { start := arbmath.SaturatingUSub(currentBlock, minBlocksPerThread) if start < startBlock { start = startBlock } - startState, startHeader, release, err := arbitrum.FindLastAvailableState(ctx, s.blockchain, s.stateFor, s.blockchain.GetHeaderByNumber(start), nil, -1) + startState, startHeader, release, err := arbitrum.FindLastAvailableState(ctx, s.blockchain, s.stateFor, s.blockchain.GetHeaderByNumber(start), logState, -1) if err != nil { s.fatalErrChan <- fmt.Errorf("blocksReExecutor failed to get last available state while searching for state at %d, err: %w", start, err) return startBlock