-
Notifications
You must be signed in to change notification settings - Fork 110
feat(l2): add prover benchmarks from L1 RPC downloaded blocks #1705
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
|
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.
Ready to merge 🚀
I would add a block cache to test the bench quickly.
.PHONY: sp1 | ||
|
||
# Execution only | ||
ifdef BLOCK_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.
Where does block number come from?
))) | ||
} | ||
|
||
fn execute( |
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.
Is this working after updating Rust to 1.82?
**Motivation** We want to benchmark our block prover against other solutions, using Ethereum mainnet/testnet blocks. For this we need to fetch state from an Ethereum chain. **Description** - adds `l2/prover/bench` crate - adds state fetching functions from the JSON-RPC API (account, block, storage, proofs) - adds a `RpcDB` type to download and cache needed state during block execution - adds an `execute()` function to the `Prover` type Some bugs were discovered while testing execution of blocks: - fixes state verification (via state and storage MPTs), `verify_db()` - fixes withdrawals not being processed when using `ExecutionDB` - fixes beacon root call state changes not being comitted when using `ExecutionDB` - fixes serialization errors in SP1 caused by the `requests_hash` field of a block header --------- Co-authored-by: Mario Rugiero <[email protected]> Co-authored-by: fborello-lambda <[email protected]> Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: ilitteri <[email protected]>
**Motivation** We want to benchmark our block prover against other solutions, using Ethereum mainnet/testnet blocks. For this we need to fetch state from an Ethereum chain. **Description** - adds `l2/prover/bench` crate - adds state fetching functions from the JSON-RPC API (account, block, storage, proofs) - adds a `RpcDB` type to download and cache needed state during block execution - adds an `execute()` function to the `Prover` type Some bugs were discovered while testing execution of blocks: - fixes state verification (via state and storage MPTs), `verify_db()` - fixes withdrawals not being processed when using `ExecutionDB` - fixes beacon root call state changes not being comitted when using `ExecutionDB` - fixes serialization errors in SP1 caused by the `requests_hash` field of a block header --------- Co-authored-by: Mario Rugiero <[email protected]> Co-authored-by: fborello-lambda <[email protected]> Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: ilitteri <[email protected]>
**Motivation** We want to benchmark our block prover against other solutions, using Ethereum mainnet/testnet blocks. For this we need to fetch state from an Ethereum chain. **Description** - adds `l2/prover/bench` crate - adds state fetching functions from the JSON-RPC API (account, block, storage, proofs) - adds a `RpcDB` type to download and cache needed state during block execution - adds an `execute()` function to the `Prover` type Some bugs were discovered while testing execution of blocks: - fixes state verification (via state and storage MPTs), `verify_db()` - fixes withdrawals not being processed when using `ExecutionDB` - fixes beacon root call state changes not being comitted when using `ExecutionDB` - fixes serialization errors in SP1 caused by the `requests_hash` field of a block header --------- Co-authored-by: Mario Rugiero <[email protected]> Co-authored-by: fborello-lambda <[email protected]> Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: ilitteri <[email protected]>
…based approach (lambdaclass#1709) **Motivation** A `ExecutionDB` is created from a block's pre-execution but the current implementation is incorrect and not all needed data gets stored. The goal is to replace this with another approach, using an auxiliary "caching" database that will retrieve data from a `Store` or an RPC endpoint (like in lambdaclass#1705) during the pre-execution of a block, finally resulting in a db that contains all the needed execution data. **Description** - replace `ExecutionDB::from_exec()` to use the `CacheDB`, rename it to `from_store()` - some refactors
…class#1705) **Motivation** We want to benchmark our block prover against other solutions, using Ethereum mainnet/testnet blocks. For this we need to fetch state from an Ethereum chain. **Description** - adds `l2/prover/bench` crate - adds state fetching functions from the JSON-RPC API (account, block, storage, proofs) - adds a `RpcDB` type to download and cache needed state during block execution - adds an `execute()` function to the `Prover` type Some bugs were discovered while testing execution of blocks: - fixes state verification (via state and storage MPTs), `verify_db()` - fixes withdrawals not being processed when using `ExecutionDB` - fixes beacon root call state changes not being comitted when using `ExecutionDB` - fixes serialization errors in SP1 caused by the `requests_hash` field of a block header --------- Co-authored-by: Mario Rugiero <[email protected]> Co-authored-by: fborello-lambda <[email protected]> Co-authored-by: Javier Chatruc <[email protected]> Co-authored-by: ilitteri <[email protected]>
Motivation
We want to benchmark our block prover against other solutions, using Ethereum mainnet/testnet blocks. For this we need to fetch state from an Ethereum chain.
Description
l2/prover/bench
crateRpcDB
type to download and cache needed state during block executionexecute()
function to theProver
typeSome bugs were discovered while testing execution of blocks:
verify_db()
ExecutionDB
ExecutionDB
requests_hash
field of a block header