-
Notifications
You must be signed in to change notification settings - Fork 3
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
Zk server compatibility #221
Conversation
Fixes decommit opcode, which was not account for if the code had already been decommitted
Adds mandated gass, handles decommit cost err, and fixes the params of mimic call
* Add vm statistics * Add tracking of precompiles cycles * Add storage and decommit cycles * Make opcode variant pub * Add cycles counter * Update zksync-era submodule * Address clippy warnings * Update era-compiler-tester submodule * Update zksync-era submodule * Fix initial value read in storage_changes * Expose opcode variants * Update zksync-era submodule * Address review comments
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.
LGTM!
Ergs comparison results:
|
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.
LGTM!
src/op_handlers/log.rs
Outdated
@@ -82,6 +84,10 @@ pub fn add_l2_to_l1_message( | |||
) -> Result<(), EraVmError> { | |||
let key = vm_state.get_register(opcode.src0_index).value; | |||
let value = vm_state.get_register(opcode.src1_index).value; | |||
println!( | |||
"L1 TO L2 regusters indexes {} {}", |
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.
typo here
src/execution.rs
Outdated
if addr >= self.heap.len() as u32 { | ||
continue; | ||
} |
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.
This can be done out of the loop, like this:
let start = pointer.start + offset;
let end = self.heap.len().min(start + 32);
for i in start..end {
result |= U256::from(self.heap[addr as usize]) << (1 * 8);
}
result
Or quite possibly as a slice copy, if the U256
provides a byte representation.
This PR makes the neccessary changes on era vm to be compatible with zksync-era
Related to:
lambdaclass/zksync-era#253
lambdaclass/era-compiler-tester#24