Skip to content

Commit

Permalink
fix(zk_toolbox): Set proper pubdata sending mode (#2507)
Browse files Browse the repository at this point in the history
## What ❔

Fix the bug, where we don't send correct pub data with validium

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] 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 <deniallugo@gmail.com>
  • Loading branch information
Deniallugo committed Jul 26, 2024
1 parent 245d719 commit 21fbd77
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 10 additions & 5 deletions etc/env/file_based/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
15 changes: 14 additions & 1 deletion zk_toolbox/crates/zk_inception/src/commands/chain/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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()?;
Expand Down

0 comments on commit 21fbd77

Please sign in to comment.