Skip to content

op-node: supprt block finalization [bedrock]#3232

Merged
mslipper merged 1 commit intodevelopfrom
finality-data
Aug 26, 2022
Merged

op-node: supprt block finalization [bedrock]#3232
mslipper merged 1 commit intodevelopfrom
finality-data

Conversation

@protolambda
Copy link
Contributor

@protolambda protolambda commented Aug 16, 2022

Description

Update the Engine Queue to maintain a small buffer of L1<>L2 relation data: when a L2 safe block is produced, remember the L1 block the progress was at, this is the L1 block the L2 block was fully derived from.

Once this L1 block is finalized, we can finalize the L2 blocks that were fully derived from up to and including this point.

We only maintain a buffer of 4*32 + 1 items, since finality can only change by reaching new finality over recent data of no more than 4 epochs old. Some obscure testnets have smaller epochs, but buffering a few blocks extra does not hurt.

Per L1 block we only track the latest L2 block that was fully derived from it.

If the buffer is outdated or incomplete then it'll just repair itself as we rotate into new L1 blocks. Finalization cannot cause divergence, at worst it's a lagging finalization signal for (4*32 + 1)*12/60 = 25.8 minutes (and it only really updates every 6.4 minutes anyway). The extended more complex version of backfilling old finalization data is not worth it: that would require us to reset the pipeline even further back, to reproduce the L2 inclusion-data of the last 65 L1 blocks.

This depends on #3291 to provide the L2BlockRefByLabel RPC method.

Metadata

Fix ENG-2312

@changeset-bot
Copy link

changeset-bot bot commented Aug 16, 2022

⚠️ No Changeset found

Latest commit: 93715b0

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

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

@protolambda protolambda marked this pull request as draft August 16, 2022 16:03
@mergify
Copy link
Contributor

mergify bot commented Aug 22, 2022

Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Aug 22, 2022
@github-actions github-actions bot added 2-reviewers A-pkg-contracts-bedrock Area: packages/contracts-bedrock labels Aug 23, 2022
@protolambda protolambda changed the base branch from l2-rpc-refactor to l2-engine-rpc August 23, 2022 01:29
@mergify mergify bot removed the conflict label Aug 23, 2022
Base automatically changed from l2-engine-rpc to develop August 23, 2022 22:26
@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2022

Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Aug 23, 2022
@github-actions github-actions bot removed 2-reviewers A-pkg-contracts-bedrock Area: packages/contracts-bedrock labels Aug 24, 2022
@mergify mergify bot removed the conflict label Aug 24, 2022
@protolambda protolambda force-pushed the finality-data branch 2 times, most recently from 4fd1913 to bffeb5b Compare August 26, 2022 03:07
@protolambda protolambda changed the base branch from develop to op-node-block-signals August 26, 2022 03:07
@protolambda protolambda marked this pull request as ready for review August 26, 2022 03:08
@protolambda
Copy link
Contributor Author

Ready for review, but blocked by #3310

Base automatically changed from op-node-block-signals to develop August 26, 2022 23:23
@mergify
Copy link
Contributor

mergify bot commented Aug 26, 2022

Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Aug 26, 2022
@mslipper mslipper merged commit c97312a into develop Aug 26, 2022
@mslipper mslipper deleted the finality-data branch August 26, 2022 23:47
maurelian pushed a commit that referenced this pull request Sep 15, 2022
sam-goldman pushed a commit that referenced this pull request Sep 15, 2022
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