Skip to content

Commit

Permalink
Merge branch 'main' into fix-ecosystem-create
Browse files Browse the repository at this point in the history
  • Loading branch information
toni-calvin authored Aug 9, 2024
2 parents 71395f4 + b752a54 commit 1196918
Show file tree
Hide file tree
Showing 263 changed files with 11,420 additions and 1,728 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.15.0",
"core": "24.16.0",
"prover": "16.3.0",
"zk_toolbox": "0.1.1"
}
13 changes: 10 additions & 3 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ jobs:

loadtest:
runs-on: [matterlabs-ci-runner]
strategy:
fail-fast: false
matrix:
vm_mode: ["old", "new"]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand All @@ -82,7 +86,8 @@ jobs:
- name: Loadtest configuration
run: |
echo EXPECTED_TX_COUNT="16000" >> .env
echo EXPECTED_TX_COUNT=${{ matrix.vm_mode == 'new' && 24000 || 18000 }} >> .env
echo ACCOUNTS_AMOUNT="150" >> .env
echo FAIL_FAST=true >> .env
echo IN_DOCKER=1 >> .env
echo DATABASE_MERKLE_TREE_MODE=lightweight >> .env
Expand All @@ -105,7 +110,9 @@ jobs:
# `sleep 60` because we need to wait until server added all the tokens
- name: Run server
run: |
ci_run zk server --uring --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log &
EXPERIMENTAL_VM_STATE_KEEPER_FAST_VM_MODE=${{ matrix.vm_mode }} \
PASSED_ENV_VARS="EXPERIMENTAL_VM_STATE_KEEPER_FAST_VM_MODE" \
ci_run zk server --uring --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log &
ci_run sleep 60
- name: Deploy legacy era contracts
Expand Down Expand Up @@ -135,7 +142,7 @@ jobs:
base_token: ["Eth", "Custom"]
deployment_mode: ["Rollup", "Validium"]
env:
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,da_dispatcher${{ matrix.consensus && ',consensus' || '' }}${{ matrix.base_token == 'Custom' && ',base_token_ratio_persister' || '' }}"
SERVER_COMPONENTS: "api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads,vm_runner_bwip,vm_playground,da_dispatcher${{ matrix.consensus && ',consensus' || '' }}${{ matrix.base_token == 'Custom' && ',base_token_ratio_persister' || '' }}"

runs-on: [matterlabs-ci-runner]
steps:
Expand Down
47 changes: 46 additions & 1 deletion Cargo.lock

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

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ members = [
"core/node/api_server",
"core/node/tee_verifier_input_producer",
"core/node/base_token_adjuster",
"core/node/external_proof_integration_api",
# Libraries
"core/lib/db_connection",
"core/lib/zksync_core_leftovers",
Expand Down Expand Up @@ -77,7 +78,6 @@ members = [
"core/tests/loadnext",
"core/tests/vm-benchmark",
"core/tests/vm-benchmark/harness",

# Parts of prover workspace that are needed for Core workspace
"prover/crates/lib/prover_dal",
]
Expand Down Expand Up @@ -215,6 +215,9 @@ zk_evm_1_4_0 = { package = "zk_evm", version = "0.140.0" }
zk_evm_1_4_1 = { package = "zk_evm", version = "0.141.0" }
zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.0" }

# New VM; pinned to a specific commit because of instability
vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "9a38900d7af9b1d72b47ce3be980e77c1239a61d" }

# Consensus dependencies.
zksync_concurrency = "=0.1.0-rc.9"
zksync_consensus_bft = "=0.1.0-rc.9"
Expand Down Expand Up @@ -282,6 +285,7 @@ zksync_eth_sender = { version = "0.1.0", path = "core/node/eth_sender" }
zksync_node_db_pruner = { version = "0.1.0", path = "core/node/db_pruner" }
zksync_node_fee_model = { version = "0.1.0", path = "core/node/fee_model" }
zksync_vm_runner = { version = "0.1.0", path = "core/node/vm_runner" }
zksync_external_proof_integration_api = { version = "0.1.0", path = "core/node/external_proof_integration_api" }
zksync_node_test_utils = { version = "0.1.0", path = "core/node/test_utils" }
zksync_state_keeper = { version = "0.1.0", path = "core/node/state_keeper" }
zksync_reorg_detector = { version = "0.1.0", path = "core/node/reorg_detector" }
Expand Down
17 changes: 17 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

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


### Features

* External prover API ([#2538](https://github.com/matter-labs/zksync-era/issues/2538)) ([129a181](https://github.com/matter-labs/zksync-era/commit/129a1819262d64a36d651af01fdab93c5ff91712))
* **node-framework:** Add API fee params resource ([#2621](https://github.com/matter-labs/zksync-era/issues/2621)) ([aff7b65](https://github.com/matter-labs/zksync-era/commit/aff7b6535ef92aaced0dd7fa1cc08d656cba027e))
* **vlog:** Expose more resource values via opentelemetry ([#2620](https://github.com/matter-labs/zksync-era/issues/2620)) ([7ae07e4](https://github.com/matter-labs/zksync-era/commit/7ae07e446c9732a896ca8246d324e82c6e6d5a46))
* **vlog:** Report observability config, flush, and shutdown ([#2622](https://github.com/matter-labs/zksync-era/issues/2622)) ([e23e661](https://github.com/matter-labs/zksync-era/commit/e23e6611731835ef3abd34f3f9867f9dc533eb21))


### Bug Fixes

* Bump prover dependencies & rust toolchain ([#2600](https://github.com/matter-labs/zksync-era/issues/2600)) ([849c6a5](https://github.com/matter-labs/zksync-era/commit/849c6a5dcd095e8fead0630a2a403f282c26a2aa))
* **en:** Initialize SyncState in OutputHandler ([#2618](https://github.com/matter-labs/zksync-era/issues/2618)) ([f0c8506](https://github.com/matter-labs/zksync-era/commit/f0c85062fac96180c2e0dec52086714ee3783fcf))
* restrictive genesis parsing ([#2605](https://github.com/matter-labs/zksync-era/issues/2605)) ([d5f8f38](https://github.com/matter-labs/zksync-era/commit/d5f8f3892a14180f590cabab921d3a68dec903e3))

## [24.15.0](https://github.com/matter-labs/zksync-era/compare/core-v24.14.0...core-v24.15.0) (2024-08-07)


Expand Down
4 changes: 2 additions & 2 deletions core/bin/block_reverter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tokio::{
};
use zksync_block_reverter::{
eth_client::{
clients::{Client, PKSigningClient},
clients::{Client, PKSigningClient, L1},
EthInterface,
},
BlockReverter, BlockReverterEthConfig, NodeRole,
Expand Down Expand Up @@ -251,7 +251,7 @@ async fn main() -> anyhow::Result<()> {
json,
operator_address,
} => {
let eth_client = Client::http(l1_secrets.l1_rpc_url.clone())
let eth_client = Client::<L1>::http(l1_secrets.l1_rpc_url.clone())
.context("Ethereum client")?
.build();

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.15.0" # x-release-please-version
version = "24.16.0" # x-release-please-version
edition.workspace = true
authors.workspace = true
homepage.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions core/bin/external_node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ async fn build_state_keeper(
stop_receiver_clone.changed().await?;
result
}));
let batch_executor_base: Box<dyn BatchExecutor> =
Box::new(MainBatchExecutor::new(save_call_traces, true));
let batch_executor = MainBatchExecutor::new(save_call_traces, true);
let batch_executor: Box<dyn BatchExecutor> = Box::new(batch_executor);

let io = ExternalIO::new(
connection_pool,
Expand All @@ -108,7 +108,7 @@ async fn build_state_keeper(
Ok(ZkSyncStateKeeper::new(
stop_receiver,
Box::new(io),
batch_executor_base,
batch_executor,
output_handler,
Arc::new(NoopSealer),
Arc::new(storage_factory),
Expand Down
2 changes: 2 additions & 0 deletions core/bin/external_node/src/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ impl ExternalNodeBuilder {
let query_eth_client_layer = QueryEthClientLayer::new(
self.config.required.settlement_layer_id(),
self.config.required.eth_client_url.clone(),
// TODO(EVM-676): add this config for external node
Default::default(),
);
self.node.add_layer(query_eth_client_layer);
Ok(self)
Expand Down
8 changes: 7 additions & 1 deletion core/bin/external_node/src/tests/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ impl WiringLayer for MockL1ClientLayer {

fn layer_name(&self) -> &'static str {
// We don't care about values, we just want to hijack the layer name.
QueryEthClientLayer::new(SLChainId(1), "https://example.com".parse().unwrap()).layer_name()
// TODO(EVM-676): configure the `settlement_mode` here
QueryEthClientLayer::new(
SLChainId(1),
"https://example.com".parse().unwrap(),
Default::default(),
)
.layer_name()
}

async fn wire(self, _: Self::Input) -> Result<Self::Output, WiringError> {
Expand Down
4 changes: 2 additions & 2 deletions core/bin/external_node/src/tests/utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use tempfile::TempDir;
use zksync_dal::CoreDal;
use zksync_db_connection::connection_pool::TestTemplate;
use zksync_eth_client::clients::MockEthereum;
use zksync_eth_client::clients::MockSettlementLayer;
use zksync_node_genesis::{insert_genesis_batch, GenesisBatchParams, GenesisParams};
use zksync_types::{
api, block::L2BlockHeader, ethabi, Address, L2BlockNumber, ProtocolVersionId, H256,
Expand Down Expand Up @@ -119,7 +119,7 @@ pub(super) fn expected_health_components(components: &ComponentsToRun) -> Vec<&'
}

pub(super) fn mock_eth_client(diamond_proxy_addr: Address) -> MockClient<L1> {
let mock = MockEthereum::builder().with_call_handler(move |call, _| {
let mock = MockSettlementLayer::builder().with_call_handler(move |call, _| {
tracing::info!("L1 call: {call:?}");
if call.to == Some(diamond_proxy_addr) {
let packed_semver = ProtocolVersionId::latest().into_packed_semver_with_patch(0);
Expand Down
5 changes: 2 additions & 3 deletions core/bin/system-constants-generator/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use zksync_contracts::{
use zksync_multivm::{
interface::{
dyn_tracers::vm_1_5_0::DynTracer, tracer::VmExecutionStopReason, L1BatchEnv, L2BlockEnv,
SystemEnv, TxExecutionMode, VmExecutionMode, VmInterface,
SystemEnv, TxExecutionMode, VmExecutionMode, VmFactory, VmInterface,
},
vm_latest::{
constants::{BATCH_COMPUTATIONAL_GAS_LIMIT, BOOTLOADER_HEAP_PAGE},
Expand Down Expand Up @@ -260,8 +260,7 @@ pub(super) fn execute_internal_transfer_test() -> u32 {
output: tracer_result.clone(),
}
.into_tracer_pointer();
let mut vm: Vm<_, HistoryEnabled> =
Vm::new(l1_batch, system_env, Rc::new(RefCell::new(storage_view)));
let mut vm: Vm<_, HistoryEnabled> = Vm::new(l1_batch, system_env, storage_view.to_rc_ptr());
let result = vm.inspect(tracer.into(), VmExecutionMode::Bootloader);

assert!(!result.result.is_failed(), "The internal call has reverted");
Expand Down
8 changes: 5 additions & 3 deletions core/bin/zksync_server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ use zksync_config::{
},
fri_prover_group::FriProverGroupConfig,
house_keeper::HouseKeeperConfig,
BasicWitnessInputProducerConfig, ContractsConfig, DatabaseSecrets,
BasicWitnessInputProducerConfig, ContractsConfig, DatabaseSecrets, ExperimentalVmConfig,
ExternalPriceApiClientConfig, FriProofCompressorConfig, FriProverConfig,
FriProverGatewayConfig, FriWitnessGeneratorConfig, FriWitnessVectorGeneratorConfig,
L1Secrets, ObservabilityConfig, PrometheusConfig, ProofDataHandlerConfig,
ProtectiveReadsWriterConfig, Secrets,
},
ApiConfig, BaseTokenAdjusterConfig, ContractVerifierConfig, DADispatcherConfig, DBConfig,
EthConfig, EthWatchConfig, GasAdjusterConfig, GenesisConfig, ObjectStoreConfig, PostgresConfig,
SnapshotsCreatorConfig,
EthConfig, EthWatchConfig, ExternalProofIntegrationApiConfig, GasAdjusterConfig, GenesisConfig,
ObjectStoreConfig, PostgresConfig, SnapshotsCreatorConfig,
};
use zksync_core_leftovers::{
temp_config_store::{decode_yaml_repr, TempConfigStore},
Expand Down Expand Up @@ -208,5 +208,7 @@ fn load_env_config() -> anyhow::Result<TempConfigStore> {
pruning: None,
snapshot_recovery: None,
external_price_api_client_config: ExternalPriceApiClientConfig::from_env().ok(),
external_proof_integration_api_config: ExternalProofIntegrationApiConfig::from_env().ok(),
experimental_vm_config: ExperimentalVmConfig::from_env().ok(),
})
}
Loading

0 comments on commit 1196918

Please sign in to comment.