Skip to content

Commit

Permalink
Merge branch 'master' into improve-blocksreexecutor-impl
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacolvin0 authored Nov 6, 2024
2 parents 860f54a + fb467b4 commit ad60c0d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions arbnode/dataposter/data_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/consensus/misc/eip4844"
"github.com/ethereum/go-ethereum/core/txpool"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto/kzg4844"
"github.com/ethereum/go-ethereum/ethclient"
Expand Down Expand Up @@ -1087,7 +1088,7 @@ func (p *DataPoster) updateBalance(ctx context.Context) error {
return nil
}

const maxConsecutiveIntermittentErrors = 10
const maxConsecutiveIntermittentErrors = 20

func (p *DataPoster) maybeLogError(err error, tx *storage.QueuedTransaction, msg string) {
nonce := tx.FullTx.Nonce()
Expand All @@ -1096,10 +1097,17 @@ func (p *DataPoster) maybeLogError(err error, tx *storage.QueuedTransaction, msg
return
}
logLevel := log.Error
if errors.Is(err, storage.ErrStorageRace) {
isStorageRace := errors.Is(err, storage.ErrStorageRace)
if isStorageRace || strings.Contains(err.Error(), txpool.ErrFutureReplacePending.Error()) {
p.errorCount[nonce]++
if p.errorCount[nonce] <= maxConsecutiveIntermittentErrors {
logLevel = log.Debug
if isStorageRace {
logLevel = log.Debug
} else {
logLevel = log.Info
}
} else if isStorageRace {
logLevel = log.Warn
}
} else {
delete(p.errorCount, nonce)
Expand Down

0 comments on commit ad60c0d

Please sign in to comment.