Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Feat/649/cached safety checking #253

Closed
wants to merge 45 commits into from

Conversation

maurelian
Copy link
Collaborator

Description

Increase gas efficiency on L2 by adding a new contract to cache known safe bytecode.

https://github.com/ethereum-optimism/roadmap/issues/649

@maurelian maurelian requested a review from ben-chain February 26, 2021 02:36
@maurelian maurelian marked this pull request as draft February 26, 2021 02:36
@maurelian maurelian marked this pull request as ready for review March 10, 2021 02:43
@ben-chain
Copy link
Collaborator

The main thing that needs to be sorted out around this PR are:

  • Choose between this approach and Cached safety checking alternative #310
  • Fix how this will work in the fraud proofs. Right now, the safety checking logic has the potential to bypass the INVALID_STATE_ACCESS logic in place with _handleExternalMessage.

@maurelian
Copy link
Collaborator Author

maurelian commented Mar 19, 2021

  • Fix how this will work in the fraud proofs. Right now, the safety checking logic has the potential to bypass the INVALID_STATE_ACCESS logic in place with _handleExternalMessage.

To clarify somewhat:
Unlike the safety checker, the safety cache is stateful, meaning an inclusion proof needs to be provided for it prior to fraud proving on L1.

One way to handle this would be a similar approach to how the OVM_DeployerWhitelist is called using ovmCall which includes all the logic necessary to require and check inclusion proofs.

@maurelian maurelian marked this pull request as draft March 22, 2021 16:30
@maurelian
Copy link
Collaborator Author

This PR builds on top of code that has been removed.
We should start from scratch on a new branch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants