Skip to content

WorldState needs to be committed after each transaction (sepolia sync) #509

@wurdum

Description

@wurdum

Faced at the block 173906023.
The node fork is based on 4c1a45b

Updating the ArbitrumBlockProcessor.ArbitrumBlockProductionTransactionsExecutor.ProcessTransaction the following way fixes the issue:

...
        if (result)
        {
            _transactionProcessedHandler?.OnTransactionProcessed(new TxProcessedEventArgs(index, currentTx, block.Header, receiptsTracer.TxReceipts[index]));
        }
        else
        {
            args.Set(TxAction.Skip, result.ErrorDescription);
        }
    }

    IReleaseSpec spec = specProvider.GetSpec(block.Header);   // <<<< These two lines are added
    stateProvider.Commit(spec, commitRoots: true);

    return args.Action;

    [MethodImpl(MethodImplOptions.NoInlining)]
    void DebugSkipReason(Transaction currentTx, AddingTxEventArgs args)
        => _logger.Debug($"Skipping transaction {currentTx.ToShortString()} because: {args.Reason}.");
}
...

Metadata

Metadata

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions