Skip to content

Commit

Permalink
chore: Update zksync-era dependency to latest (#210)
Browse files Browse the repository at this point in the history
* chore: Update zksync-era dependency to latest

* add Version17 to list of supported version
  • Loading branch information
MexicanAce authored Nov 1, 2023
1 parent 96632f9 commit 57ddf94
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 41 deletions.
67 changes: 35 additions & 32 deletions Cargo.lock

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

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "era_test_node"
version = "0.1.0-alpha.9"
version = "0.1.0-alpha.10"
edition = "2018"
authors = ["The Matter Labs Team <hello@matterlabs.dev>"]
homepage = "https://zksync.io/"
Expand All @@ -11,14 +11,14 @@ categories = ["cryptography"]
publish = false # We don't want to publish our binaries.

[dependencies]
zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_core = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "73a1e8ff564025d06e02c2689da238ae47bb10c3" }
zksync_basic_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
zksync_core = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
multivm = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
zksync_contracts = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
zksync_types = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
zksync_utils = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
zksync_state = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
zksync_web3_decl = { git = "https://github.com/matter-labs/zksync-era.git", rev = "80273264a9512bc1e6f1d1f4372107f9167260b1" }
sha3 = "0.10.6"


Expand Down
13 changes: 13 additions & 0 deletions src/deps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ impl ReadStorage for &InMemoryStorage {
fn load_factory_dep(&mut self, hash: H256) -> Option<Vec<u8>> {
self.factory_deps.get(&hash).cloned()
}

fn get_enumeration_index(&mut self, _key: &StorageKey) -> Option<u64> {
// TODO: Update this file to use proper enumeration index value once it's exposed for forks via API
// This should happen as the migration of Boojum completes
Some(0_u64)
}
}

impl ReadStorage for InMemoryStorage {
Expand All @@ -82,6 +88,10 @@ impl ReadStorage for InMemoryStorage {
fn load_factory_dep(&mut self, hash: H256) -> Option<Vec<u8>> {
(&*self).load_factory_dep(hash)
}

fn get_enumeration_index(&mut self, key: &StorageKey) -> Option<u64> {
(&*self).get_enumeration_index(key)
}
}

/// Functionality to read from the VM storage.
Expand All @@ -103,6 +113,9 @@ pub trait ReadStorage: fmt::Debug {
let code_key = get_known_code_key(bytecode_hash);
self.read_value(&code_key) != H256::zero()
}

/// Retrieves the enumeration index for a given `key`.
fn get_enumeration_index(&mut self, key: &StorageKey) -> Option<u64>;
}

/// Functionality to write to the VM storage in a batch.
Expand Down
Loading

0 comments on commit 57ddf94

Please sign in to comment.