From 21fbd77b8c4379b180abcd296a6c74697967acd8 Mon Sep 17 00:00:00 2001 From: Danil Date: Fri, 26 Jul 2024 13:03:41 +0200 Subject: [PATCH] fix(zk_toolbox): Set proper pubdata sending mode (#2507) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Fix the bug, where we don't send correct pub data with validium ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. --------- Signed-off-by: Danil --- etc/env/file_based/general.yaml | 15 ++++++++++----- .../zk_inception/src/commands/chain/genesis.rs | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/etc/env/file_based/general.yaml b/etc/env/file_based/general.yaml index 34ca63e4a99c..2765f1a7319d 100644 --- a/etc/env/file_based/general.yaml +++ b/etc/env/file_based/general.yaml @@ -63,7 +63,7 @@ api: estimate_gas_scale_factor: 1.2 estimate_gas_acceptable_overestimation: 1000 max_tx_size: 1000000 - api_namespaces: [ eth,net,web3,zks,pubsub,debug ] + api_namespaces: [eth,net,web3,zks,pubsub,debug] max_response_body_size_overrides: - method: eth_getTransactionReceipt # no size specified, meaning no size limit - method: zks_getProof @@ -130,7 +130,7 @@ eth: aggregated_block_execute_deadline: 10 timestamp_criteria_max_allowed_lag: 30 max_eth_tx_data_size: 120000 - aggregated_proof_sizes: [ 1 ] + aggregated_proof_sizes: [1] max_aggregated_tx_gas: 4000000 max_acceptable_priority_fee_in_gwei: 100000000000 pubdata_sending_mode: BLOBS @@ -343,9 +343,9 @@ protective_reads_writer: first_processed_batch: 0 basic_witness_input_producer: - db_path: "./db/main/basic_witness_input_producer" - window_size: 3 - first_processed_batch: 0 + db_path: "./db/main/basic_witness_input_producer" + window_size: 3 + first_processed_batch: 0 snapshot_recovery: enabled: false @@ -369,3 +369,8 @@ core_object_store: file_backed: file_backed_base_path: artifacts max_retries: 10 + +da_dispatcher: + polling_interval_ms: 5000 + max_rows_to_dispatch: 100 + max_retries: 5 diff --git a/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs b/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs index 3cd5440ba83d..4adf1b3b7553 100644 --- a/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs +++ b/zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs @@ -16,7 +16,8 @@ use config::{ }; use types::ProverMode; use xshell::Shell; -use zksync_config::configs::eth_sender::ProofSendingMode; +use zksync_basic_types::commitment::L1BatchCommitmentMode; +use zksync_config::configs::eth_sender::{ProofSendingMode, PubdataSendingMode}; use super::args::genesis::GenesisArgsFinal; use crate::{ @@ -68,6 +69,18 @@ pub async fn genesis( .context("sender")? .proof_sending_mode = ProofSendingMode::OnlyRealProofs; } + + if config.l1_batch_commit_data_generator_mode == L1BatchCommitmentMode::Validium { + general + .eth + .as_mut() + .context("eth")? + .sender + .as_mut() + .context("sender")? + .pubdata_sending_mode = PubdataSendingMode::Custom + } + general.save_with_base_path(shell, &config.configs)?; let mut secrets = config.get_secrets_config()?;