forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(vm): use internal types for log query (matter-labs#860)
## What ❔ Reducing the number of `glue_into` in the multivm crate. It should improve performance and general refactoring. **Notes** - The number of commits is large, since this PR used to be based on the 1.4.1 integration branch & it was squashed when merged to main. - There are some optimizations that can be done (for instance, ensure that zkevm_test_harness @1.4.0 and @1.4.1 accept iterator instead of slice: matter-labs/era-zkevm_test_harness#68 ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `zk spellcheck`. --------- Co-authored-by: AntonD3 <[email protected]> Co-authored-by: AntonD3 <[email protected]>
- Loading branch information
1 parent
731bc48
commit 1c1f131
Showing
76 changed files
with
964 additions
and
291 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,6 @@ | |
mod vm; | ||
mod zk_evm_1_3_1; | ||
mod zk_evm_1_3_3; | ||
mod zk_evm_1_4_0; | ||
mod zk_evm_1_4_1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
mod block_context_mode; | ||
mod storage_query; | ||
mod tx_execution_mode; | ||
mod tx_revert_reason; | ||
mod vm_block_result; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
use zksync_types::StorageLogQuery; | ||
|
||
use crate::glue::{GlueFrom, GlueInto}; | ||
|
||
impl GlueFrom<crate::vm_m5::utils::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_m5::utils::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} | ||
|
||
impl GlueFrom<crate::vm_m6::utils::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_m6::utils::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} | ||
|
||
impl GlueFrom<crate::vm_1_3_2::utils::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_1_3_2::utils::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} | ||
|
||
impl GlueFrom<crate::vm_virtual_blocks::utils::logs::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_virtual_blocks::utils::logs::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} | ||
|
||
impl GlueFrom<crate::vm_refunds_enhancement::utils::logs::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_refunds_enhancement::utils::logs::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} | ||
|
||
impl GlueFrom<crate::vm_boojum_integration::utils::logs::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_boojum_integration::utils::logs::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} | ||
|
||
impl GlueFrom<crate::vm_latest::utils::logs::StorageLogQuery> for StorageLogQuery { | ||
fn glue_from(value: crate::vm_latest::utils::logs::StorageLogQuery) -> Self { | ||
Self { | ||
log_query: value.log_query.glue_into(), | ||
log_type: value.log_type, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.