Skip to content

op-node: split driver state/model into L1 state, L1 origin selector, L2 sequencer, L2 derivation#3647

Merged
mergify[bot] merged 3 commits intodevelopfrom
driver-refactor
Oct 5, 2022
Merged

op-node: split driver state/model into L1 state, L1 origin selector, L2 sequencer, L2 derivation#3647
mergify[bot] merged 3 commits intodevelopfrom
driver-refactor

Conversation

@protolambda
Copy link
Contributor

Description

TLDR of driver refactor design doc:

  • Driver should not mix state with event handling so much. Separate with interfaces for testing instead.
  • Sequencing needs to be separated as a model, if we want to test it separate from the event handling, like in action-testing
  • L1 origin selection can be tricky, separating it will enable us to unit test it

Changes:

  • No more Driver struct { state } that proxies all calls. We just define a Driver struct.
  • Separate L1 head/safe/finalized, with handling funcs, from driver state
  • Separate L1 origin finding from driver state
  • Separate sequencing from driver state, and deprecate the all-in-one-go sequencing in favor of a two-step process which we can adopt later, to enable the sequencer to build the best blocks and maybe even respond to reorgs before completing a block.
  • Cleaned up unused arg in Start function

Tests

No functionality changed, it's rewiring to make testing much more viable. In the L2 sequencer action-testing PR I plan to plug in all these state components (origin selection, l1 state, sequencing). We can wait with this PR if we're unsure.

Metadata

Fix ENG-2864

@changeset-bot
Copy link

changeset-bot bot commented Oct 4, 2022

⚠️ No Changeset found

Latest commit: a663b8c

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 Oct 4, 2022

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

Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

The biggest thing is that I don't think we're ready to migrate over to the start/complete block building process, but it is good that we're setting it up to go that way.

@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2022

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

@protolambda
Copy link
Contributor Author

Will rebase to fix merge conflicts, and include the deadlock fix

Copy link
Contributor

@trianglesphere trianglesphere left a comment

Choose a reason for hiding this comment

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

nice work, every looks great

@mergify
Copy link
Contributor

mergify bot commented Oct 5, 2022

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

@mergify
Copy link
Contributor

mergify bot commented Oct 5, 2022

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

@mergify mergify bot merged commit e81c5c9 into develop Oct 5, 2022
@mergify mergify bot deleted the driver-refactor branch October 5, 2022 17:35
@mergify mergify bot removed the on-merge-train label Oct 5, 2022
This was referenced Oct 13, 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.

3 participants