Skip to content

Commit

Permalink
Add basic first parallel model
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosNicolau committed Aug 28, 2024
1 parent 5312aad commit 52143c0
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 62 deletions.
1 change: 1 addition & 0 deletions core/lib/multivm/src/versions/era_vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ mod snapshot;
#[cfg(test)]
mod tests;
pub mod tracers;
pub mod transaction;
mod transaction_data;
pub mod vm;
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ use zksync_types::{H256, U256};
use zksync_utils::ceil_div_u256;

use super::traits::{Tracer, VmTracer};
pub use crate::vm_latest::Refunds;
use crate::{
era_vm::hook::Hook,
vm_latest::{
constants::{OPERATOR_REFUNDS_OFFSET, TX_GAS_LIMIT_OFFSET},
utils::fee::get_batch_base_fee,
L1BatchEnv, Refunds,
L1BatchEnv,
},
};

Expand Down
17 changes: 17 additions & 0 deletions core/lib/multivm/src/versions/era_vm/transaction.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use zksync_types::Transaction;

pub struct ParallelTransaction {
pub tx: Transaction,
pub refund: u64,
pub with_compression: bool,
}

impl ParallelTransaction {
pub fn new(tx: Transaction, refund: u64, with_compression: bool) -> Self {
Self {
tx,
refund,
with_compression,
}
}
}
Loading

0 comments on commit 52143c0

Please sign in to comment.