Skip to content

Commit

Permalink
update geth pin
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Dec 10, 2024
1 parent c25a7c6 commit b2618c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
24 changes: 15 additions & 9 deletions arbos/block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,6 @@ func ProduceBlockAdvanced(
return nil, nil, err
}

if err = hooks.PreTxFilter(chainConfig, header, statedb, state, tx, options, sender, l1Info); err != nil {
return nil, nil, err
}

// Additional pre-transaction validity check
if err = extraPreTxFilter(chainConfig, header, statedb, state, tx, options, sender, l1Info); err != nil {
return nil, nil, err
}

if basefee.Sign() > 0 {
dataGas = math.MaxUint64
brotliCompressionLevel, err := state.BrotliCompressionLevel()
Expand Down Expand Up @@ -306,7 +297,22 @@ func ProduceBlockAdvanced(
return nil, nil, core.ErrGasLimitReached
}

if statedb.IsTxFiltered() {
return nil, nil, errors.New("cannot process a new transaction when the previous one was filtered and the statedb wasn't reverted to a snapshot")
}
snap := statedb.Snapshot()

if err = hooks.PreTxFilter(chainConfig, header, statedb, state, tx, options, sender, l1Info); err != nil {
statedb.RevertToSnapshot(snap)
return nil, nil, err
}

// Additional pre-transaction validity check
if err = extraPreTxFilter(chainConfig, header, statedb, state, tx, options, sender, l1Info); err != nil {
statedb.RevertToSnapshot(snap)
return nil, nil, err
}

statedb.SetTxContext(tx.Hash(), len(receipts)) // the number of successful state transitions

gasPool := gethGas
Expand Down
2 changes: 1 addition & 1 deletion go-ethereum
4 changes: 2 additions & 2 deletions system_tests/seq_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ func setupSequencerFilterTest(t *testing.T, withBlock bool) (*NodeBuilder, *arbo
}
return nil
}
postTxFilter := func(_ *types.Header, statedb *state.StateDB, _ *arbosState.ArbosState, _ *types.Transaction, _ common.Address, _ uint64, _ *core.ExecutionResult) error {
if statedb.IsTxInvalid() {
postTxFilter := func(_ *types.Header, statedb *state.StateDB, _ *arbosState.ArbosState, tx *types.Transaction, _ common.Address, _ uint64, _ *core.ExecutionResult) error {
if statedb.IsTxFiltered() {
return errors.New("internal error")
}
return nil
Expand Down

0 comments on commit b2618c9

Please sign in to comment.