-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add Verifier Functionality #168
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
Conversation
…s from getTransaction and getBlock requests and adding test
…s from getTransaction and getBlock requests and adding test
… other future scheduled tasks)
packages/rollup-core/src/app/data/consumers/batch-item-processor.ts
Outdated
Show resolved
Hide resolved
karlfloersch
left a comment
There was a problem hiding this 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( |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
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
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
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
…/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.
<!-- 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
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.
Metadata
Fixes
Contributing Agreement