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

Improvement: Contract should not automatically finalize pre-upgrade pending roots #157

Open
Thegaram opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Thegaram
Copy link

The docs says

⚠️ Warning: All proposed, non-finalized output roots on the L2OutputOracleProxy will be automatically finalized after the upgrade to op-succinct, as the finalizationPeriod is set to 0 by default. For security, we recommend ensuring that all old proposer output roots are correct before upgrading.

Since these non-finalized output roots that were submitted right before the contract upgrade were not zk-verified, it is not safe for the bridge to consider them finalized.

I can think of two safer approaches:

  1. Remove all unfinalized roots, and require op-succinct-proposer to re-submit them along with a proof.
  2. Keep the original finalizationPeriodSeconds until all non-zk-finalized roots are finalized, then update it (to 0).

If this change is needed, I'm happy to submit a PR.

@ratankaliani
Copy link
Member

2 is the right approach here - just requires a ramp-up period before the finalizationPeriod is set to 0. When upgrading an existing contract, we'll recommend that approach.

@ratankaliani ratankaliani added the documentation Improvements or additions to documentation label Oct 10, 2024
@ratankaliani ratankaliani self-assigned this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants