Skip to content

Commit

Permalink
Merge branch 'main' into anastasiia-extract-block-reverter
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiiaVashchuk authored Apr 12, 2024
2 parents 755bf46 + 45164fa commit 3483419
Show file tree
Hide file tree
Showing 170 changed files with 4,422 additions and 2,029 deletions.
8 changes: 7 additions & 1 deletion .github/release-please/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
"packages": {
"core": {
"release-type": "simple",
"component": "core"
"component": "core",
"extra-files": [
{
"type": "generic",
"path": "bin/external_node/Cargo.toml"
}
]
},
"prover": {
"release-type": "simple",
Expand Down
96 changes: 82 additions & 14 deletions Cargo.lock

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

25 changes: 14 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"core/bin/system-constants-generator",
"core/bin/verified_sources_fetcher",
"core/bin/zksync_server",
"core/bin/genesis_generator",
# Node services
"core/node/node_framework",
"core/node/block_reverter",
Expand Down Expand Up @@ -121,7 +122,8 @@ regex = "1"
reqwest = "0.11"
rlp = "0.5"
rocksdb = "0.21.0"
secp256k1 = "0.27.0"
rustc_version = "0.4.0"
secp256k1 = { version = "0.27.0", features = ["recovery", "global-context"] }
semver = "1"
sentry = "0.31"
serde = "1"
Expand All @@ -138,6 +140,7 @@ strum = "0.24"
tempdir = "0.3.7"
tempfile = "3.0.2"
test-casing = "0.1.2"
test-log = "0.2.15"
thiserror = "1"
thread_local = "1.1"
tikv-jemallocator = "0.5"
Expand Down Expand Up @@ -168,16 +171,16 @@ zk_evm_1_3_3 = { package = "zk_evm", git = "https://github.com/matter-labs/era-z
zk_evm_1_4_0 = { package = "zk_evm", git = "https://github.com/matter-labs/era-zk_evm.git", branch = "v1.4.0" }
zk_evm_1_4_1 = { package = "zk_evm", git = "https://github.com/matter-labs/era-zk_evm.git", branch = "v1.4.1" }
zk_evm_1_5_0 = { package = "zk_evm", git = "https://github.com/matter-labs/era-zk_evm.git", branch = "v1.5.0" }
zksync_concurrency = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_bft = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_crypto = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_executor = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_network = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_roles = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_storage = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_consensus_utils = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_protobuf = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_protobuf_build = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "d17c018b94f8d186e7fe701e947af8ef1953fa3b" }
zksync_concurrency = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_bft = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_crypto = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_executor = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_network = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_roles = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_storage = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_consensus_utils = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_protobuf = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }
zksync_protobuf_build = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "36be3daba58703c5639892c2f3a6b037f0654837" }

# "Local" dependencies
multivm = { path = "core/lib/multivm" }
Expand Down
2 changes: 2 additions & 0 deletions checks-config/era.dic
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ SetChainId
setChainId
SetChainIdUpgrade
state_transition_manager_contract
prunable
bytea

// Names
Vyper
Expand Down
6 changes: 5 additions & 1 deletion core/bin/external_node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zksync_external_node"
version = "0.1.0"
version = "22.1.0" # x-release-please-version
edition.workspace = true
authors.workspace = true
homepage.workspace = true
Expand All @@ -15,6 +15,7 @@ zksync_core.workspace = true
zksync_dal.workspace = true
zksync_db_connection.workspace = true
zksync_config.workspace = true
zksync_protobuf_config.workspace = true
zksync_eth_client.workspace = true
zksync_storage.workspace = true
zksync_utils.workspace = true
Expand Down Expand Up @@ -45,3 +46,6 @@ clap = { workspace = true, features = ["derive"] }
serde_json.workspace = true
semver.workspace = true
tracing.workspace = true

[build-dependencies]
rustc_version.workspace = true
46 changes: 46 additions & 0 deletions core/bin/external_node/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//! Build script for the external node binary.
use std::{
env, fs,
io::{self, Write},
path::Path,
};

use rustc_version::{Channel, LlvmVersion};

fn print_rust_meta(out: &mut impl Write, meta: &rustc_version::VersionMeta) -> io::Result<()> {
writeln!(
out,
"pub(crate) const RUSTC_METADATA: RustcMetadata = RustcMetadata {{ \
version: {semver:?}, \
commit_hash: {commit_hash:?}, \
commit_date: {commit_date:?}, \
channel: {channel:?}, \
host: {host:?}, \
llvm: {llvm:?} \
}};",
semver = meta.semver.to_string(),
commit_hash = meta.commit_hash,
commit_date = meta.commit_date,
channel = match meta.channel {
Channel::Dev => "dev",
Channel::Beta => "beta",
Channel::Nightly => "nightly",
Channel::Stable => "stable",
},
host = meta.host,
llvm = meta.llvm_version.as_ref().map(LlvmVersion::to_string),
)
}

fn main() {
let out_dir = env::var("OUT_DIR").expect("`OUT_DIR` env var not set for build script");
let rustc_meta = rustc_version::version_meta().expect("Failed obtaining rustc metadata");

let metadata_module_path = Path::new(&out_dir).join("metadata_values.rs");
let metadata_module =
fs::File::create(metadata_module_path).expect("cannot create metadata module");
let mut metadata_module = io::BufWriter::new(metadata_module);

print_rust_meta(&mut metadata_module, &rustc_meta).expect("failed printing rustc metadata");
}
Loading

0 comments on commit 3483419

Please sign in to comment.