Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-node: Add option to only use finalized blocks as l1origin #209

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

palango
Copy link

@palango palango commented Aug 1, 2024

Resolves #200

Adds the --sequencer.use-finalized option to op-node, no only use finalized blocks as l1 origin in the sequencer.

op-node/rollup/driver/config.go Show resolved Hide resolved
op-node/rollup/driver/finalized.go Outdated Show resolved Hide resolved
op-node/rollup/driver/finalized.go Outdated Show resolved Hide resolved
Copy link

@mcortesi mcortesi left a comment

Choose a reason for hiding this comment

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

looks much better :)

op-node/rollup/driver/finalized.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Sep 7, 2024

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 7, 2024
@github-actions github-actions bot closed this Sep 12, 2024
@palango palango reopened this Sep 13, 2024
@palango palango removed the Stale label Sep 13, 2024
@palango palango changed the base branch from celo7 to karlb/celo8-1 September 16, 2024 12:39
@palango palango force-pushed the palango/finalized branch 4 times, most recently from 977cd0f to e8aef1f Compare September 17, 2024 12:08
@palango palango changed the base branch from karlb/celo8-1 to celo8 September 17, 2024 12:08
Copy link

@gastonponti gastonponti left a comment

Choose a reason for hiding this comment

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

We should check the default value. Other than that, LGTM

op-node/flags/flags.go Outdated Show resolved Hide resolved
verifConfDepth := confdepth.NewConfDepth(driverCfg.VerifierConfDepth, statusTracker.L1Head, l1)

var verifL1 derive.L1Fetcher
if driverCfg.UseFinalized {

Choose a reason for hiding this comment

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

i believe we are mixing 2 differents things and that confuses me.

  1. Make sure when creating a new block, you don't depend on L1 blocks that are not final (l1 origin). This is an alternative to SequencerConfDepth

  2. Make sure that when deriving the 'safe' chain we don't derive information from L1 blocks that are not final. But, OP has already a chain pointer for that, right? There's unsafe (not on l1), safe (on eth, but not final), finalize (on eth and final there)

So i don't think we should be mixing those. If we do, the "safe" chain will be 15 (+25 from batcher) minutes delayed from the unsafe chain.

This comment was marked as outdated.

Copy link
Author

Choose a reason for hiding this comment

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

I discussed this with Karl a bit more and we agree with Mariano here.
This should only change the sequencer's l1 origin selection. The derivation should use the existing mechanism, l2 blocks get marked as "safe" or "final" when their origin changes its state. My initial idea to avoid reorgs there too will break expectations of users, who couldn't select to see and work on "unsafe" blocks if they trust the sequencer.

Copy link

@karlb karlb left a comment

Choose a reason for hiding this comment

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

The latest version looks like a nice small change.

op-node/rollup/finalized/finalized_test.go Outdated Show resolved Hide resolved
@palango palango dismissed mcortesi’s stale review September 23, 2024 11:45

comments have been addressed.

@palango palango merged commit ecc4700 into celo8 Sep 23, 2024
54 checks passed
@palango palango deleted the palango/finalized branch September 23, 2024 13:14
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.

Implement L1Fetcher that works on block finalization state
5 participants