Skip to content

op-node: improve derivation pipeline error handling#3212

Merged
mergify[bot] merged 1 commit intodevelopfrom
pipeline-errors
Aug 12, 2022
Merged

op-node: improve derivation pipeline error handling#3212
mergify[bot] merged 1 commit intodevelopfrom
pipeline-errors

Conversation

@protolambda
Copy link
Contributor

This PR aims to polish the error handling in the derivation pipeline more (after #3185 introduced initial error typing), and fixes minor issues in it.

Notable changes:

  • NewTemporaryError, NewResetError, NewCriticalError now only wrap an error. We add the description to the error before we wrap it. Previously there were many places where the error ended up in the description, but then was also wrapped. This duplicated the error description when stringified. Now this can't happen anymore.
  • Remove ReorgErr in favor of using just using NewResetError. They were indicating the same thing, but ReorgErr needed to be wrapped by NewResetError previously, complicating the error more than necessary.
  • When we fail to convert receipts into deposits, or fail to convert L1 header info into a info transaction, then we emit a critical error. This is not a temporary rpc error or a reorg thing, something would be critically wrong.
  • Update validExtension in the batch queue to propagate an error when necessary.
    • This is an important bugfix: when we check the epoch hash, we must be sure it's either correct or not. Ignoring the check when we hit an RPC error is bad. Now we emit a temporary error instead, to redo the check properly when we can.
  • Update AddBatch and IngestData functions to not emit errors: these errors would have halted the chain if the batch-submitter malforms data. Instead we should always keep going, and just log+ignore if the batch-submitter misbehaves.
  • One error in the batch queue is now a panic, since it only hits when a preparation step is missing, i.e. a code error that never hits if the code is right, but a useful sanity check.
  • Add typing where errors where previously being emitted by the pipeline without proper typing.
  • In the L1 retrieval stage, don't silence a possible data-fetching error, emit a temporary-level error instead
  • In the L1 traversal stage, don't silence a possible RPC error, emit a temporary-level error instead
  • Reduce log level of some common internal errors that are not so important

@changeset-bot
Copy link

changeset-bot bot commented Aug 12, 2022

⚠️ No Changeset found

Latest commit: 8f88038

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify
Copy link
Contributor

mergify bot commented Aug 12, 2022

This PR changes implementation code, but doesn't include a changeset. Did you forget to add one?

@mergify
Copy link
Contributor

mergify bot commented Aug 12, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify mergify bot merged commit e937a7c into develop Aug 12, 2022
@mergify mergify bot deleted the pipeline-errors branch August 12, 2022 20:37
@mergify
Copy link
Contributor

mergify bot commented Aug 12, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants