-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Interop: Ban Deposits that Trigger Executing Messages for Devnet #10867
Comments
Based on conversations last week around the deposit-tx milestone: we can make the "is deposit" boolean visible to the inbox contract, to disable force-inclusion of interop messages, which could otherwise pass through invalid messages. Proposal to not modify the execution engine, and instead use system-deposits to add the behavior, and use statically pre-declared messages as mechanism to verify interop messages: Functionality to add now for first devnet:
Below this is still in a design phase and is not being prioritized for the first mainnet release Functionality to add next (later devnet iteration):
If there is an external reorg, or unavailable data, we can't immediately verify the message declared in a deposit. To mitigate this, we can enforce the statically declared message deposit to only pull in a message older than a sequence-window, and otherwise mark the deposit as invalid (change sender to X). |
We will want to spec this new behavior in the predeploys. The One major question is whether the |
We could avoid mutating deposits by adding another function on the This would mean we need to standardize the sequencing window between chains, since there is no way to know what the value is, unless we use the superchain registry config or assume that they are always the same. I don't love using the superchain registry approach as that is not scalable, perhaps we hardfork in a constant value and then make it configurable in the future (for quality of life for L3s) The function that registers the events in the |
I'd lean towards not expanding ABI use scope in principle. If there's demand for a valid use-case (non-censoring, etc) for a no-auth |
In my mind there are 2 ways to think about this problem, one is completely within the smart contracts and one is completely within the derivation pipeline. The smart contract based solution was partially described as well as the derivation pipeline based solution. We should explore the tradeoffs between these two, once we introduce mutating deposits then it may become tech debt eventually as its a new class of behavior |
Specs in progress: ethereum-optimism/specs#258 |
EDIT: There is no way to enforce a single entry point nor a single source of the txs on-chain. |
This is an interesting approach but not all deposits MUST go through the |
Needs a review and a few comments to be resolved. Smart contract wise, everything is done. Very close to being complete |
Problem Statement
It is possible to include a deposit that has an invalid executing message. Deposits are force include and invalid executing messages are reorg'd out, so this means an attacker would be able to force reorgs on the chain. There are a few solutions to this problem, but we need to research them and there are higher priority things in the short term.
Design
We want to ban deposit transactions completely from triggering executing messages to prevent this attack in the short term. We can reenable them in the future (after mainnet release via another hardfork). The design that we have come to consensus on is as follows:
isDeposit()(bool)
function toL1Block
L1Block.setL1BlockValuesInterop
that setsisDeposit = true
then callssetL1BlockValuesEcotone
depositsComplete()
which setsisDeposit = false
depositsComplete()
CrossL2Inbox
doesrequire(L1Block.isDeposit() == false)
It was determined in #10870 that there was a missing edge case with deposit handling in the context of interop without the "only EOA" invariant. The semantics are being defined in ethereum-optimism/design-docs#13 but it was decided that we should not implement this as part of the devnet release and instead just ban deposits that trigger executing messages completely.The only way to do this reliably is by hacking into the state transition function. Since we don't have an explicit goal of being multiclient and we want to run the devnet to see how stable our software is, we can modify the STF temporarily to ban deposits and then remove this hack when we have a proper solution implemented.An easy way to hack this solution is to hook into someplace around applyTransaction and revert deposit transactions that trigger an executing message event.While this code is temporary and not going to live forever, it will help us in the short term be able to reliably test the end to end flow of the system on a devnet.The text was updated successfully, but these errors were encountered: