Skip to content

Commit

Permalink
fixup! feat: tee_verifier_input_producer
Browse files Browse the repository at this point in the history
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
  • Loading branch information
haraldh committed May 14, 2024
1 parent 3504a00 commit fd0f4f3
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 390 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/lib/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ fn read_zbin_bytecode_from_path(bytecode_path: PathBuf) -> Vec<u8> {
.unwrap_or_else(|err| panic!("Can't read .zbin bytecode at {:?}: {}", bytecode_path, err))
}
/// Hash of code and code which consists of 32 bytes words
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SystemContractCode {
pub code: Vec<U256>,
pub hash: H256,
}

#[derive(Debug, Clone)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BaseSystemContracts {
pub bootloader: SystemContractCode,
pub default_aa: SystemContractCode,
Expand Down
1 change: 1 addition & 0 deletions core/lib/multivm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ anyhow.workspace = true
hex.workspace = true
itertools.workspace = true
once_cell.workspace = true
serde.workspace = true
thiserror.workspace = true
tracing.workspace = true
vise.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion core/lib/multivm/src/interface/types/inputs/l1_batch_env.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use serde::{Deserialize, Serialize};
use zksync_types::{fee_model::BatchFeeInput, Address, L1BatchNumber, H256};

use super::L2BlockEnv;
Expand All @@ -7,7 +8,7 @@ use super::L2BlockEnv;
/// Eventually, most of these parameters (`l1_gas_price`, `fair_l2_gas_price`, `fee_account`,
/// `enforced_base_fee`) will be moved to [`L2BlockEnv`]. For now, the VM doesn't support changing
/// them in the middle of execution; that's why these params are specified here.
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct L1BatchEnv {
// If previous batch hash is None, then this is the first batch
pub previous_batch_hash: Option<H256>,
Expand Down
3 changes: 2 additions & 1 deletion core/lib/multivm/src/interface/types/inputs/l2_block.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use serde::{Deserialize, Serialize};
use zksync_types::{block::L2BlockExecutionData, H256};

#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub struct L2BlockEnv {
pub number: u32,
pub timestamp: u64,
Expand Down
5 changes: 3 additions & 2 deletions core/lib/multivm/src/interface/types/inputs/system_env.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::fmt::Debug;

use serde::{Deserialize, Serialize};
use zksync_contracts::BaseSystemContracts;
use zksync_types::{L2ChainId, ProtocolVersionId};

/// Params related to the execution process, not batch it self
#[derive(Clone)]
#[derive(Clone, PartialEq, Serialize, Deserialize)]
pub struct SystemEnv {
// Always false for VM
pub zk_porter_available: bool,
Expand Down Expand Up @@ -44,7 +45,7 @@ impl Debug for SystemEnv {
/// With `VerifyExecute` mode, transaction will be executed normally.
/// With `EstimateFee`, the bootloader will be used that has the same behavior
/// as the full `VerifyExecute` block, but errors in the account validation will be ignored.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum TxExecutionMode {
VerifyExecute,
EstimateFee,
Expand Down
4 changes: 3 additions & 1 deletion core/lib/tee_verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ multivm.workspace = true
serde.workspace = true
tracing.workspace = true
vm_utils.workspace = true
zksync_basic_types.workspace = true
zksync_config.workspace = true
zksync_crypto.workspace = true
zksync_dal.workspace = true
Expand All @@ -29,4 +28,7 @@ zksync_queued_job_processor.workspace = true
zksync_state.workspace = true
zksync_types.workspace = true
zksync_utils.workspace = true

[dev-dependencies]
zksync_contracts.workspace = true
zksync_basic_types.workspace = true
Loading

0 comments on commit fd0f4f3

Please sign in to comment.