Skip to content

Commit

Permalink
Merge branch 'main' into prover_cli_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ColoCarletti committed Aug 15, 2024
2 parents a4fc66e + b40f3d1 commit a48efc9
Show file tree
Hide file tree
Showing 183 changed files with 2,501 additions and 1,184 deletions.
2 changes: 1 addition & 1 deletion .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "24.17.0",
"core": "24.18.0",
"prover": "16.3.0",
"zk_toolbox": "0.1.1"
}
6 changes: 5 additions & 1 deletion .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ jobs:
run: ci_run yarn l1-contracts test

- name: Rust unit tests
run: ci_run zk test rust
run: |
ci_run zk test rust
# Benchmarks are not tested by `cargo nextest` unless specified explicitly, and even then `criterion` harness is incompatible
# with how `cargo nextest` runs tests. Thus, we run criterion-based benchmark tests manually.
ci_run zk f cargo test --release -p vm-benchmark --bench criterion --bench fill_bootloader
loadtest:
runs-on: [matterlabs-ci-runner]
Expand Down
19 changes: 17 additions & 2 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ members = [
"core/node/tee_verifier_input_producer",
"core/node/base_token_adjuster",
"core/node/external_proof_integration_api",
"core/node/logs_bloom_backfill",
# Libraries
"core/lib/db_connection",
"core/lib/zksync_core_leftovers",
Expand Down Expand Up @@ -300,3 +301,4 @@ zksync_contract_verification_server = { version = "0.1.0", path = "core/node/con
zksync_node_api_server = { version = "0.1.0", path = "core/node/api_server" }
zksync_tee_verifier_input_producer = { version = "0.1.0", path = "core/node/tee_verifier_input_producer" }
zksync_base_token_adjuster = { version = "0.1.0", path = "core/node/base_token_adjuster" }
zksync_logs_bloom_backfill = { version = "0.1.0", path = "core/node/logs_bloom_backfill" }
8 changes: 8 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [24.18.0](https://github.com/matter-labs/zksync-era/compare/core-v24.17.0...core-v24.18.0) (2024-08-14)


### Features

* add logs bloom ([#2633](https://github.com/matter-labs/zksync-era/issues/2633)) ([1067462](https://github.com/matter-labs/zksync-era/commit/10674620d1a04333507ca17b9a34ab3cb58846cf))
* **zk_toolbox:** Minting base token ([#2571](https://github.com/matter-labs/zksync-era/issues/2571)) ([ae2dd3b](https://github.com/matter-labs/zksync-era/commit/ae2dd3bbccdffc25b040313b2c7983a936f36aac))

## [24.17.0](https://github.com/matter-labs/zksync-era/compare/core-v24.16.0...core-v24.17.0) (2024-08-13)


Expand Down
2 changes: 1 addition & 1 deletion core/bin/external_node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zksync_external_node"
description = "Non-validator ZKsync node"
version = "24.17.0" # x-release-please-version
version = "24.18.0" # x-release-please-version
edition.workspace = true
authors.workspace = true
homepage.workspace = true
Expand Down
9 changes: 8 additions & 1 deletion core/bin/external_node/src/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use zksync_node_framework::{
consistency_checker::ConsistencyCheckerLayer,
healtcheck_server::HealthCheckLayer,
l1_batch_commitment_mode_validation::L1BatchCommitmentModeValidationLayer,
logs_bloom_backfill::LogsBloomBackfillLayer,
main_node_client::MainNodeClientLayer,
main_node_fee_params_fetcher::MainNodeFeeParamsFetcherLayer,
metadata_calculator::MetadataCalculatorLayer,
Expand Down Expand Up @@ -412,6 +413,11 @@ impl ExternalNodeBuilder {
Ok(self)
}

fn add_logs_bloom_backfill_layer(mut self) -> anyhow::Result<Self> {
self.node.add_layer(LogsBloomBackfillLayer);
Ok(self)
}

fn web3_api_optional_config(&self) -> Web3ServerOptionalConfig {
// The refresh interval should be several times lower than the pruning removal delay, so that
// soft-pruning will timely propagate to the API server.
Expand Down Expand Up @@ -602,7 +608,8 @@ impl ExternalNodeBuilder {
.add_pruning_layer()?
.add_consistency_checker_layer()?
.add_commitment_generator_layer()?
.add_batch_status_updater_layer()?;
.add_batch_status_updater_layer()?
.add_logs_bloom_backfill_layer()?;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions core/bin/snapshots_creator/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async fn create_l2_block(
protocol_version: Some(Default::default()),
virtual_blocks: 0,
gas_limit: 0,
logs_bloom: Default::default(),
};

conn.blocks_dal()
Expand Down
10 changes: 9 additions & 1 deletion core/bin/zksync_server/src/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use zksync_node_framework::{
house_keeper::HouseKeeperLayer,
l1_batch_commitment_mode_validation::L1BatchCommitmentModeValidationLayer,
l1_gas::L1GasLayer,
logs_bloom_backfill::LogsBloomBackfillLayer,
metadata_calculator::MetadataCalculatorLayer,
node_storage_init::{
main_node_strategy::MainNodeInitStrategyLayer, NodeStorageInitializerLayer,
Expand Down Expand Up @@ -609,6 +610,12 @@ impl MainNodeBuilder {
Ok(self)
}

fn add_logs_bloom_backfill_layer(mut self) -> anyhow::Result<Self> {
self.node.add_layer(LogsBloomBackfillLayer);

Ok(self)
}

/// This layer will make sure that the database is initialized correctly,
/// e.g. genesis will be performed if it's required.
///
Expand Down Expand Up @@ -679,7 +686,8 @@ impl MainNodeBuilder {
self = self
.add_l1_gas_layer()?
.add_storage_initialization_layer(LayerKind::Task)?
.add_state_keeper_layer()?;
.add_state_keeper_layer()?
.add_logs_bloom_backfill_layer()?;
}
Component::HttpApi => {
self = self
Expand Down
4 changes: 3 additions & 1 deletion core/lib/basic_types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ use std::{

pub use ethabi::{
self,
ethereum_types::{Address, Bloom as H2048, H128, H160, H256, H512, H520, H64, U128, U256, U64},
ethereum_types::{
Address, Bloom, BloomInput, H128, H160, H256, H512, H520, H64, U128, U256, U64,
},
};
use serde::{de, Deserialize, Deserializer, Serialize};

Expand Down
8 changes: 4 additions & 4 deletions core/lib/basic_types/src/web3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use serde::{
};
use serde_json::Value;

use crate::{H160, H2048, H256, U256, U64};
use crate::{Bloom, H160, H256, U256, U64};

pub mod contract;
#[cfg(test)]
Expand Down Expand Up @@ -389,7 +389,7 @@ pub struct BlockHeader {
pub extra_data: Bytes,
/// Logs bloom
#[serde(rename = "logsBloom")]
pub logs_bloom: H2048,
pub logs_bloom: Bloom,
/// Timestamp
pub timestamp: U256,
/// Difficulty
Expand Down Expand Up @@ -441,7 +441,7 @@ pub struct Block<TX> {
pub extra_data: Bytes,
/// Logs bloom
#[serde(rename = "logsBloom")]
pub logs_bloom: Option<H2048>,
pub logs_bloom: Option<Bloom>,
/// Timestamp
pub timestamp: U256,
/// Difficulty
Expand Down Expand Up @@ -727,7 +727,7 @@ pub struct TransactionReceipt {
pub root: Option<H256>,
/// Logs bloom
#[serde(rename = "logsBloom")]
pub logs_bloom: H2048,
pub logs_bloom: Bloom,
/// Transaction type, Some(1) for AccessList transaction, None for Legacy
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub transaction_type: Option<U64>,
Expand Down

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

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

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

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

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

Loading

0 comments on commit a48efc9

Please sign in to comment.