Skip to content

op-node: poll for L1 safe and finalized data changes, deduplicate L2 head data#3310

Merged
mslipper merged 1 commit intodevelopfrom
op-node-block-signals
Aug 26, 2022
Merged

op-node: poll for L1 safe and finalized data changes, deduplicate L2 head data#3310
mslipper merged 1 commit intodevelopfrom
op-node-block-signals

Conversation

@protolambda
Copy link
Contributor

  • Add polling of L1 safe and finalized block data (once every ~6 minutes by default, faster in tests, configurable)
  • Update op-e2e to mock L1 safe block and finalized block changes - clique doesn't do this naturally. Goerli does, and L1 will, post-merge.
  • De-duplicate the L2 head block references: the engine queue 100% needs them to function, whereas the driver was just using them for logging. We can just pull the data from where it's maintained, instead of maintaining copies.
  • Clean up sync progress logging: we now log sync progress when we change something in the engine, with the reason why it changed, instead of having to check every possible step for changes.
  • Add L1 safe/finalized event handling to driver
  • Misc minor style/logging/metrics changes to make naming / structure between labeled L1 blocks and L2 blocks more consistent
  • When L1 data has not been seen yet at startup, the batch-submitter should not use it.

Long-term I hope we get safe-head and finalized-head event subscriptions like we have for the chain head. But polling will have to do for now. Should be easy to swap out though, it follows the same subscription / event handling pattern as the L1 head changes.

Metadata

This PR is a prerequisite of #3232 to get the necessary L1 signals.

The polling util may also be useful if we want to use it as a backup mechanism when the L1 heads subscription doesn't work (i.e. when not using websockets). I'll add a note to the L1 head updates reliability issue.

@changeset-bot
Copy link

changeset-bot bot commented Aug 25, 2022

⚠️ No Changeset found

Latest commit: b1242b1

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

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

@mslipper mslipper merged commit 9eea16e into develop Aug 26, 2022
@mslipper mslipper deleted the op-node-block-signals branch August 26, 2022 23:23
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