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

fix(contracts + proposer): checkpoint block hash #184

Merged
merged 14 commits into from
Oct 25, 2024

Conversation

ratankaliani
Copy link
Member

@ratankaliani ratankaliani commented Oct 23, 2024

Overview

  • Move back to the original L2OutputOracle initializer pattern to reduce the diff. Remove the owner role, which is covered by the owner of the proxy.
  • Remove the chainId from the initialization parameters, as the rollupConfigHash includes the chainId.
  • Fix checkpointBlockHash to handle non-zero block hashes only: This fix ensures that only non-zero block hashes are stored, preventing a potential attack. The attack allowed users to set the blockHash for blocks older than 256 blocks to bytes32(0), which could block proofs that took over one hour to generate from being submitted on-chain. Generating proofs typically takes much less than an hour, so in practice this would have been difficult to exploit.
  • Simplify checkpointBlockHash and proposeL2Output functions to accept only the l1BlockNumber, as passing l1BlockHash is redundant in this context.

Additional Context

Note: This PR has a breaking change to the binaries, so we'll need to re-compile them along with the contract changes.
Note: This PR also has a breaking change to the contract, so we'll need to re-deploy, rather than upgrading.

@ratankaliani ratankaliani changed the title fix: checkpoint block hash fix(contracts + proposer): checkpoint block hash Oct 23, 2024
ratankaliani and others added 13 commits October 23, 2024 11:13
* add revert messages

* add

* wip

* fix

* rm chain id

* fix

* wip

* cleanup

* update bindings

* feat: add changes

* fix

* fix: deployer, init

* simplify

* change to initializer

* add
@ratankaliani ratankaliani merged commit 04a32bc into main Oct 25, 2024
5 checks passed
@ratankaliani ratankaliani deleted the ratan/fix-checkpoint-block-hash branch October 25, 2024 06:04
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.

1 participant