Skip to content

Conversation

@willmeister
Copy link

@willmeister willmeister commented Jun 30, 2020

Description

Adds the ability to verify L1 state root data against L2 state root data, calling a stubbed out Fraud Prover when fraud is detected.

  • Adds monkey-patch ability for L2 Provider to add L1MessageSender on Transactions
  • Adds a Chain Data Persister for L1 and L2 in charge of fetching all data of possible interest from their respective chains and persisting them in a useful format for comparison and downstream processing
  • Adds Data Service, with CRUD operations for relevant data
  • Adds Verifier that polls L1/L2 data at a configurable frequency to verify that L1 batches match L2 batches

Metadata

Fixes

Contributing Agreement

Copy link
Contributor

@karlfloersch karlfloersch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright awesome! This LGTM!!!! Been a long road to get here but I definitely think this stuff has shaped up! I left a couple comments but nothing really to change. Everything seems pretty straightforward and I can't wait to integrate!

* @param receipt The TransactionReceipt object.
* @returns The combined TransactionAndRoot object.
*/
public static getTransactionAndRoot(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

/**
* Converts the provided Provider into a Provider capable of parsing L1MessageSender off of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that's very cool

l1MessageSender?: Address
gasLimit?: number
l1Timestamp: number
l1BlockNumber: number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Big fan of the L1 prefix here. Could also be latestL1Timestamp but I am also definitely happy with l1Timestamp

target: Address
calldata: string
sender?: Address
l1MessageSender?: Address
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I've mentioned to Ben but I'll say here as well -- technically we could use the sender field for this value, but we added l1MessageSender to be more explicit. That said, technically using queueOrigin + sender would be sufficient for any L1->L2 tx or even multi-chain txs

v: '0x25', // 37
r: '0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea',
s: '0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c',
l1MessageSender: senderAddress,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess eventually we'll need to also include the other fields like queueOrigin , etc. Or encode it in the calldata.

Oh actually something to note (that's not immediately related to this) is that we might want to have some kind of flag in L2Geth which either 1) excludes all these extra fields, or 2) encodes them in the calldata. The reason is because when running things like The Graph or block explorers, they might fail here for the same reason and therefore would require modified providers.

I guess a 3rd option is to modify them to actually parse this info, but that seems like a bit more work off the bat

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Definitely open to changing it. Am I reading this correctly to say that there is no action currently required, though?

class MockFraudProver implements FraudProver {
public readonly provenFraud: Fraud[] = []

public async proveFraud(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and we'll circle back with @kfichter for the final param requirements when the time comes

@willmeister willmeister merged commit 9aa71dc into master Jul 2, 2020
@willmeister willmeister deleted the YAS-458/AddVerifierFunctionality branch July 2, 2020 23:55
snario pushed a commit that referenced this pull request Apr 14, 2021
bap2pecs pushed a commit to babylonlabs-io/optimism that referenced this pull request Jul 31, 2024
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Dec 9, 2024
c9dbc5f58 Test fix & fmt
fcf735497 ExternalHeaderMode rebase
f09d4e5ff Add for wind/unwind support to tbc (ethereum-optimism#159)
5c764a0cd popm: exclude tx outputs that would be dust (ethereum-optimism#186)
1f168f225 popm/wasm: fix dispatch params for {add,remove}EventListener (ethereum-optimism#181)
383611feb popm/wasm: add 'minerStatus' method (ethereum-optimism#178)
6a94b4c0b popm/wasm: rename KeyResult fields and add bitcoinScriptHash (ethereum-optimism#177)
9c4cea583 popm/wasm: add events and clean up globals (ethereum-optimism#175)
a2372394d popm: improve UTXO selection when creating Bitcoin transaction (ethereum-optimism#173)
939813cac popm/wasm: fix ethereum address when generating and parsing keys (ethereum-optimism#174)
9245995ef Updated localnet to use more recent commits of optimism and op-geth (ethereum-optimism#139)
159fbc5f5 ci: improve runtime of high usage CI workflows (ethereum-optimism#163)
60a3489db popm/wasm: add 'bitcoinAddressToScriptHash' method (ethereum-optimism#169)
fe9752a5a popm/wasm: add 'parseKey' method (ethereum-optimism#168)
65aa0caef ci: add registry-url to setup-node in release (ethereum-optimism#167)
8922ce805 popm/wasm: add new @hemilabs/pop-miner NPM package (ethereum-optimism#162)
67166046b scripts: add release script (ethereum-optimism#164)
eea96059b ci: add labeler action (ethereum-optimism#165)

git-subtree-dir: heminetwork
git-subtree-split: c9dbc5f58a7f997fa4b3af0d765a2967ed3462d1
blockchaindevsh added a commit to blockchaindevsh/optimism that referenced this pull request Jan 25, 2025
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Apr 4, 2025
c9dbc5f58 Test fix & fmt
fcf735497 ExternalHeaderMode rebase
f09d4e5ff Add for wind/unwind support to tbc (ethereum-optimism#159)
5c764a0cd popm: exclude tx outputs that would be dust (ethereum-optimism#186)
1f168f225 popm/wasm: fix dispatch params for {add,remove}EventListener (ethereum-optimism#181)
383611feb popm/wasm: add 'minerStatus' method (ethereum-optimism#178)
6a94b4c0b popm/wasm: rename KeyResult fields and add bitcoinScriptHash (ethereum-optimism#177)
9c4cea583 popm/wasm: add events and clean up globals (ethereum-optimism#175)
a2372394d popm: improve UTXO selection when creating Bitcoin transaction (ethereum-optimism#173)
939813cac popm/wasm: fix ethereum address when generating and parsing keys (ethereum-optimism#174)
9245995ef Updated localnet to use more recent commits of optimism and op-geth (ethereum-optimism#139)
159fbc5f5 ci: improve runtime of high usage CI workflows (ethereum-optimism#163)
60a3489db popm/wasm: add 'bitcoinAddressToScriptHash' method (ethereum-optimism#169)
fe9752a5a popm/wasm: add 'parseKey' method (ethereum-optimism#168)
65aa0caef ci: add registry-url to setup-node in release (ethereum-optimism#167)
8922ce805 popm/wasm: add new @hemilabs/pop-miner NPM package (ethereum-optimism#162)
67166046b scripts: add release script (ethereum-optimism#164)
eea96059b ci: add labeler action (ethereum-optimism#165)

git-subtree-dir: heminetwork
git-subtree-split: c9dbc5f58a7f997fa4b3af0d765a2967ed3462d1
ClaytonNorthey92 added a commit to hemilabs/optimism that referenced this pull request Apr 7, 2025
c9dbc5f58 Test fix & fmt
fcf735497 ExternalHeaderMode rebase
f09d4e5ff Add for wind/unwind support to tbc (ethereum-optimism#159)
5c764a0cd popm: exclude tx outputs that would be dust (ethereum-optimism#186)
1f168f225 popm/wasm: fix dispatch params for {add,remove}EventListener (ethereum-optimism#181)
383611feb popm/wasm: add 'minerStatus' method (ethereum-optimism#178)
6a94b4c0b popm/wasm: rename KeyResult fields and add bitcoinScriptHash (ethereum-optimism#177)
9c4cea583 popm/wasm: add events and clean up globals (ethereum-optimism#175)
a2372394d popm: improve UTXO selection when creating Bitcoin transaction (ethereum-optimism#173)
939813cac popm/wasm: fix ethereum address when generating and parsing keys (ethereum-optimism#174)
9245995ef Updated localnet to use more recent commits of optimism and op-geth (ethereum-optimism#139)
159fbc5f5 ci: improve runtime of high usage CI workflows (ethereum-optimism#163)
60a3489db popm/wasm: add 'bitcoinAddressToScriptHash' method (ethereum-optimism#169)
fe9752a5a popm/wasm: add 'parseKey' method (ethereum-optimism#168)
65aa0caef ci: add registry-url to setup-node in release (ethereum-optimism#167)
8922ce805 popm/wasm: add new @hemilabs/pop-miner NPM package (ethereum-optimism#162)
67166046b scripts: add release script (ethereum-optimism#164)
eea96059b ci: add labeler action (ethereum-optimism#165)

git-subtree-dir: heminetwork
git-subtree-split: c9dbc5f58a7f997fa4b3af0d765a2967ed3462d1
theochap pushed a commit that referenced this pull request Dec 10, 2025
…/asterisc lint job (#168)

Optimizes the lint jobs by only including the crates with
architecture-specific code (`kona-common`) in the `lint-asterisc` and
`lint-cannon` recipes. All other crates will be linted entirely with the
native lint recipe.

We still include all `no_std` crates in the `build` recipes for `cannon`
/ `asterisc` targets, as these crates still need build coverage to
ensure that they always compile to our required targets.
Zena-park added a commit to tokamak-network/optimism that referenced this pull request Dec 30, 2025
theochap pushed a commit that referenced this pull request Jan 15, 2026
<!--
Thank you for your Pull Request. Please provide a description above and
review
the requirements below.

Bug fixes and new features should include tests.

Contributors guide:
https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md

The contributors guide includes instructions for running rustfmt and
building the
documentation.
-->

<!-- ** Please select "Allow edits from maintainers" in the PR Options
** -->

## Motivation

We use this pattern downstream (cc @kien-rise):  

https://github.com/risechain/pevm/blob/bed6f220c343d03e6bef0dc7540c531444450d57/src/chain/optimism.rs#L85-L88

Which doesn't work for `TxEip7702`.

<!--
Explain the context and why you're making that change. What is the
problem
you're trying to solve? In some cases there is not a problem and this
can be
thought of as being the motivation for your change.
-->

## Solution

Add the missing `From<Signed<TxEip7702>>` for completeness.

<!--
Summarize the solution and provide any necessary context needed to
understand
the code change.
-->

## PR Checklist

- [ ] Added Tests
- [ ] Added Documentation
- [ ] Breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants