-
Notifications
You must be signed in to change notification settings - Fork 99
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
Feat: Decoupled OptimismPortal
#361
Comments
I would suggest the portal retains the same ABI but can forward to the authorised caller as needed (ie build in backwards compatibility). Breaking the withdrawal API is a big pain in the neck and something we should avoid if possible. Otherwise this will likely be delayed until something else needs to break the API and I'm not sure what that would be... |
Yeah, we should be able to manage this for the critical path ( As for the administrative functions ( If I could wave a magic wand here, what I'd like to do (roughly) is:
Usage Analysis
With this, breaking the API would not be so painful, it doesn't look like. It would also remove periphery codepaths from our most important contract, which is always good. However on the front of breaking the core withdrawal path API, we should not do that imo. Monitoring is another concern here though. What would definitely change my opinion here is if these changes complicated or added risk to our monitoring path, cc @ajsutton. |
Yeah agreed the key priority is maintaining compatibility with the withdrawal flow. Moving things like I'd expect that Same for The other question for me is what the point of entry should be for people trying to use the ABI. Do you need to make calls to both For the fall-through code, I'd say that people like succinct maintaining a fork of the OP Stack can easily remove it - they're already maintaining far more complex changes in the fork. The functions with permissioned access are fine to just move as we know they're only used in limited fashion. For monitoring, this shouldn't affect dispute-mon since it only monitors the dispute games. It will likely require updates to our other withdrawal monitoring though and I'm not familiar with how flexible that code is. I don't see anything in this that would hide information and cause monitoring problems - should just be a matter of updating the code to adjust where it gets the info from. |
The
OptimismPortal
currently enshrines the proof system in its implementation. You can observe this fact with the following links:We should move the proof system outside of the
OptimismPortal
and instead only enshrine the concept of an authorized caller that can pass through aTypes.WithdrawalTransaction
to execute. It would be assumed that this other caller did verify the proof.This will help to reduce the size of the
OptimismPortal
contract, as it is right at the codesize limits. We do not want to be in a position where we need to move quickly and cannot due to the code being too large. This problem was hit when porting custom gas token to theOptimismPortal2
.This will also help to make it easier to maintain things like op-succinct. This will unblock us from removing the
L2OutputOracle
from the codebase without breaking other integrations.The upgrade path can be straight forward for tooling like
viem
, if the semver is above a certain version thenviem
can grab the address of the authorized caller contract from the portal and then send its transaction to the authorized caller rather than the portal. The authorized caller can maintain the same ABI of the portal for simplicity.The name for the authorized caller could be "verifier" as its role would be to verify proofs.
The text was updated successfully, but these errors were encountered: