Skip to content

op-node: fix invalid payload insertion error handling#3180

Merged
mslipper merged 3 commits intodevelopfrom
fix-invalid-block-handling
Aug 5, 2022
Merged

op-node: fix invalid payload insertion error handling#3180
mslipper merged 3 commits intodevelopfrom
fix-invalid-block-handling

Conversation

@protolambda
Copy link
Contributor

This PR relies on ethereum-optimism/reference-optimistic-geth#40 to return INVALID when the payload attributes cannot be processed.

When payload attributes cannot be processed due to a true payload-error (i.e. rpc errors, syncing state, etc. don't count) then we first re-attempt with only the deposits, and then return a critical error if we cannot even process a block with just the deposits.

I've chosen this approach, instead of looking for alternative batches, to keep the batch derivation simple (i.e. allow multiple batches to be queued up with the eager-batch-derivation logic, instead of having to check them 1 by 1 with the engine).

When the typed error handling lands we can handle the deposit processing error as critical, and stop the syncing entirely. Safety over liveness, deposits always have to work.

During goerli devnet testing there was a batch with invalid nonce usage, and so we have to drop the user transaction(s) from that batch to continue rollup processing, or we get stuck. This is attributable to the batch-submitter, who should not have included the invalid transaction. So we drop the batch transactions as a whole, instead of finding a single invalid transaction, to keep things simple.

@changeset-bot
Copy link

changeset-bot bot commented Aug 5, 2022

⚠️ No Changeset found

Latest commit: f2c9de3

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 5, 2022

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

Copy link
Contributor

@mslipper mslipper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just fix the lint error.

@mslipper mslipper merged commit faec7e0 into develop Aug 5, 2022
@mslipper mslipper deleted the fix-invalid-block-handling branch August 5, 2022 19:20
This was referenced Aug 8, 2022
roninjin10 pushed a commit that referenced this pull request Aug 26, 2022
* op-node: fix invalid payload insertion error handling

* fix goimports

Co-authored-by: Matthew Slipper <me@matthewslipper.com>
maurelian pushed a commit that referenced this pull request Sep 15, 2022
* op-node: fix invalid payload insertion error handling

* fix goimports

Co-authored-by: Matthew Slipper <me@matthewslipper.com>
sam-goldman pushed a commit that referenced this pull request Sep 15, 2022
* op-node: fix invalid payload insertion error handling

* fix goimports

Co-authored-by: Matthew Slipper <me@matthewslipper.com>
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.

2 participants