-
Couldn't load subscription status.
- Fork 1
DONOTMERGE: zkevm-benchmark-workload repo #8
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
base: main
Are you sure you want to change the base?
Changes from all commits
a19019f
decb023
4e82527
e86c066
d2e0768
337ff5e
75bfb3a
177578a
568a441
d224ccd
e213cb0
3c4bf14
8147d38
81299a6
d026cee
8455748
f1540ee
74eb7cd
235e49e
089bdf6
e0e205d
2da36a8
d26d736
d441be8
8912fad
5117f87
ed524d0
927c90c
e461764
44292e2
e7410f9
1d79d9a
ac39dcc
11c2776
03364a8
75092d6
0771183
263361e
641a10f
3e468e4
e0a902c
5b46a08
3ff0dbe
acc318e
8cee4ee
ca2e722
39c7e54
4c51e81
65a6585
8d348c8
b4bde84
6eda062
cb47abf
e5eac83
8444a3e
f17c70c
0880801
0898f54
d0b39b2
ce02bb3
bda8644
e203403
dd3adc3
304d73a
0f3b7fd
fa3efe1
17aea38
63469e9
6de1d83
18237ad
307dd30
4d903ab
72ec056
9dc204b
54f77a1
cca0d60
bb7a98e
7bc2c4f
e855733
be392e6
5b4c3a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,13 +39,16 @@ mod recover_block; | |
| /// Sparse trie implementation for stateless validation | ||
| pub mod trie; | ||
|
|
||
| use alloy_genesis::ChainConfig; | ||
| #[doc(inline)] | ||
| pub use recover_block::UncompressedPublicKey; | ||
| #[doc(inline)] | ||
| pub use trie::StatelessTrie; | ||
| #[doc(inline)] | ||
| pub use validation::stateless_validation_with_trie; | ||
|
|
||
| pub use alloy_genesis::Genesis; | ||
|
|
||
| /// Implementation of stateless validation | ||
| pub mod validation; | ||
| pub(crate) mod witness_db; | ||
|
|
@@ -67,4 +70,25 @@ pub struct StatelessInput { | |
| pub block: Block, | ||
| /// `ExecutionWitness` for the stateless validation function | ||
| pub witness: ExecutionWitness, | ||
| /// Chain configuration for the stateless validation function | ||
| #[serde_as(as = "alloy_genesis::serde_bincode_compat::ChainConfig<'_>")] | ||
| pub chain_config: ChainConfig, | ||
| } | ||
|
|
||
| /// Tracks the amount of cycles a region of code takes up | ||
| /// in a zkvm environment and is no-op otherwise. | ||
| #[macro_export] | ||
| macro_rules! track_cycles { | ||
| ($name:expr, $body:expr) => {{ | ||
| #[cfg(target_os = "zkvm")] | ||
| { | ||
| tracing::info!("cycle-tracker-report-start: {}", $name); | ||
| let result = $body; | ||
| tracing::info!("cycle-tracker-report-end: {}", $name); | ||
| result | ||
| } | ||
|
|
||
| #[cfg(not(target_os = "zkvm"))] | ||
| $body | ||
| }}; | ||
|
Comment on lines
+80
to
+93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change, and the ones in the next file are mainly SP1 track cycle instrumentation. I usually find these cycles tracking for SP1 helpful to quickly see optimizations impact, etc. But from another angle, cycles for some kind of optimizations are quite brittle. They're only meaningful for non-crypto related opts. Prob these changes will never be upstreamed as they are. I guess we could think about creating a trait that can be provided for instrumentation, and the client can impl for different zkVMs -- but definitely is the last upstream effort I would leave pending (if ever happens). 😅 cc @kevaundray if you have any thought |
||
| } | ||
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.
Changes in this file are related to the opened issue https://github.com/ethereum/execution-spec-tests/issues/2031