ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.68k stars 3.32k forks source link

Add L1->L2 Message replayer script #705

Closed karlfloersch closed 3 years ago

karlfloersch commented 3 years ago

Is your feature request related to a problem? Please describe. It is possible for L1->L2 messages to fail on L2. This may sound bad, but it's totally fine! Why? Well because we can replay L1->L2 messages in our XDomainMessengers! The smart contract side of things has already been implemented! However, the one hiccup--we haven't actually implemented a "watcher" which will replay all enqueued XDomain messages.

Describe the solution you'd like Implement a xdomain message replayer which we can replay any failed deposits. This replayer should be able to reply deposits which you are watching, but also it should be able to detect all deposits within a block range & replay them. Allowing all deposits to be replayed lets some altruistic party replay all failed deposits that occur during L2 service outages like upgrades.

gigamesh commented 3 years ago

Kevin & I made this because it was needed for the missed mainnet deposit

https://github.com/ethereum-optimism/scripts/pull/15

smartcontracts commented 3 years ago

@karlfloersch @K-Ho I was hoping to have @elenadimitrova do this but it seems that ^^ might satisfy the ticket. WDYT? I feel bad about the miscommunication here.. :-(

karlfloersch commented 3 years ago

Dang 😞 - I think we also had @elenadimitrova on this as well. This became P0 today though because of a skipped deposit which we need to replay.

My intuition is that there is still work to be done here though in adding this script that was worked on as a utility to the watcher and/or add it to the deposit dapp frontend.

smartcontracts commented 3 years ago

Ok I think there's probably other tickets related to this topic (e.g., adding replaying to the front-end) but I don't think we need a "script" per se so IMO we can close this one out.

elenadimitrova commented 3 years ago

@smartcontracts so how is this going to work then? Is the practice going to be that we never relay failed txs and rely on users to self service via the Gateway?