Skip to content

Commit

Permalink
Merge branch 'develop' into merge-engine-api
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoieh authored Dec 3, 2024
2 parents cbf0595 + c5d19da commit f3fe411
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions op-node/rollup/attributes/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io"
"strings"
"time"

"github.com/ethereum/go-ethereum"
Expand Down Expand Up @@ -153,6 +154,9 @@ func (eq *AttributesHandler) forceNextSafeAttributes(ctx context.Context, attrib
_ = eq.ec.CancelPayload(ctx, true)
return derive.NewResetError(fmt.Errorf("need reset to resolve pre-state problem: %w", err))
case derive.BlockInsertPayloadErr:
if strings.Contains(err.Error(), "INCONSISTENT") {
return derive.NewTemporaryError(fmt.Errorf("temporarily cannot insert new safe block: %w", err))
}
_ = eq.ec.CancelPayload(ctx, true)
eq.log.Warn("could not process payload derived from L1 data, dropping batch", "err", err)
// Count the number of deposits to see if the tx list is deposit only.
Expand Down
2 changes: 1 addition & 1 deletion op-node/rollup/derive/engine_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func confirmPayload(
if err != nil {
return nil, BlockInsertTemporaryErr, fmt.Errorf("failed to insert execution payload: %w", err)
}
if status.Status == eth.ExecutionInvalid || status.Status == eth.ExecutionInvalidBlockHash {
if status.Status == eth.ExecutionInvalid || status.Status == eth.ExecutionInvalidBlockHash || status.Status == eth.ExecutionInconsistent {
agossip.Clear()
return nil, BlockInsertPayloadErr, eth.NewPayloadErr(payload, status)
}
Expand Down
2 changes: 2 additions & 0 deletions op-service/eth/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func NewPayloadErr(payload *ExecutionPayload, payloadStatus *PayloadStatusV1) er
return fmt.Errorf("engine is misconfigured. Received invalid-terminal-block error while engine API should be active at genesis. err: %v", payloadStatus.ValidationError)
case ExecutionAccepted:
return fmt.Errorf("execution payload cannot be validated yet, latest valid hash is %s", payloadStatus.LatestValidHash)
case ExecutionInconsistent:
return fmt.Errorf("execution payload meets an INCONSISTENT status, latest valid hash is %s", payloadStatus.LatestValidHash)
default:
return fmt.Errorf("unknown execution status on %s: %q, ", payload.ID(), string(payloadStatus.Status))
}
Expand Down

0 comments on commit f3fe411

Please sign in to comment.