-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
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:
- add an
isDeposit()(bool)
function toL1Block
- add a new function
L1Block.setL1BlockValuesInterop
that setsisDeposit = true
then callssetL1BlockValuesEcotone
- add a new function
depositsComplete()
which setsisDeposit = false
- add a new deposit tx to derivation pipeline that calls
depositsComplete()
- the
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.