Skip to content

Commit 80b37b2

Browse files
authored
feat(zk_toolbox): Add zk_supervisor config-writer command (matter-labs#2866)
## What ❔ Add zk_supervisor override configs command ## Why ❔ In some cases we want to override some default configs. Right now it is done manually and we need proper automation for regular use/ci.
1 parent 133d694 commit 80b37b2

File tree

20 files changed

+602
-366
lines changed

20 files changed

+602
-366
lines changed

.github/workflows/ci-core-reusable.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,7 @@ jobs:
126126
# `sleep 60` because we need to wait until server added all the tokens
127127
- name: Run server
128128
run: |
129-
ci_run sed -i -e 's/mode: FULL/mode: LIGHTWEIGHT/' chains/legacy/configs/general.yaml
130-
ci_run sed -i -e 's/state_keeper_fast_vm_mode:.*/state_keeper_fast_vm_mode: ${{ matrix.vm_mode }}/' chains/legacy/configs/general.yaml
131-
ci_run sed -i -e 's/delay_interval:.*/delay_interval: 50/' chains/legacy/configs/general.yaml
129+
ci_run zk_supervisor config-writer --path ${{ matrix.vm_mode == 'NEW' && 'etc/env/file_based/overrides/tests/loadtest-new.yaml' || 'etc/env/file_based/overrides/tests/loadtest-old.yaml' }} --chain legacy
132130
ci_run zk_inception server --uring --chain=legacy --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log &
133131
ci_run sleep 60
134132

etc/env/file_based/overrides/mainnet/general.yaml renamed to etc/env/file_based/overrides/mainnet.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ eth:
1010
aggregated_block_prove_deadline: 300
1111
aggregated_block_execute_deadline: 300
1212
timestamp_criteria_max_allowed_lag: 104000 # 29h
13+
wait_confirmations: null
1314
gas_adjuster:
1415
pricing_formula_parameter_a: 1.06
1516
internal_l1_pricing_multiplier: 1
1617
internal_pubdata_pricing_multiplier: 1.50
1718
poll_period: 60
19+
watcher:
20+
confirmations_for_eth_event: null
1821
observability:
1922
log_directives: zksync=info,zksync_state_keeper=debug,zksync_core=debug,zksync_server=debug,zksync_contract_verifier=debug,zksync_dal=debug,zksync_state=debug,zksync_utils=debug,zksync_eth_sender=debug,loadnext=debug,dev_ticker=info,vm=info,block_sizes_test=info,setup_key_generator_and_server=info,zksync_queued_job_processor=debug,slot_index_consistency_checker=debug,zksync_health_check=debug,zksync_consensus_bft=debug,zksync_consensus_network=debug,zksync_consensus_storage=debug,zksync_consensus_executor=debug,
20-
21-
# remove eth_sender_wait_confirmations, eth_watcher_confirmations_for_eth_event variables
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eth:
2+
sender:
3+
proof_sending_mode: ONLY_REAL_PROOFS

etc/env/file_based/overrides/testnet/general.yaml renamed to etc/env/file_based/overrides/testnet.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ eth:
1010
aggregated_block_prove_deadline: 300
1111
aggregated_block_execute_deadline: 300
1212
timestamp_criteria_max_allowed_lag: 104000 # 29h
13+
wait_confirmations: null
1314
gas_adjuster:
1415
pricing_formula_parameter_a: 1.1
1516
internal_l1_pricing_multiplier: 1
@@ -18,5 +19,3 @@ eth:
1819
confirmations_for_eth_event: 10
1920
observability:
2021
log_directives: zksync=info,zksync_state_keeper=debug,zksync_core=debug,zksync_server=debug,zksync_contract_verifier=debug,zksync_dal=debug,zksync_state=debug,zksync_utils=debug,zksync_eth_sender=debug,loadnext=debug,dev_ticker=info,vm=info,block_sizes_test=info,setup_key_generator_and_server=info,zksync_queued_job_processor=debug,slot_index_consistency_checker=debug,zksync_health_check=debug,zksync_consensus_bft=debug,zksync_consensus_network=debug,zksync_consensus_storage=debug,zksync_consensus_executor=debug,
21-
22-
# remove eth_sender_wait_confirmations variable
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
db:
2+
merkle_tree:
3+
mode: LIGHTWEIGHT
4+
experimental_vm:
5+
state_keeper_fast_vm_mode: NEW
6+
mempool:
7+
delay_interval: 50
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
db:
2+
merkle_tree:
3+
mode: LIGHTWEIGHT
4+
experimental_vm:
5+
state_keeper_fast_vm_mode: OLD
6+
mempool:
7+
delay_interval: 50
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
eth:
2+
sender:
3+
pubdata_sending_mode: CUSTOM
4+
state_keeper:
5+
pubdata_overhead_part: 0
6+
compute_overhead_part: 1

zk_toolbox/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zk_toolbox/crates/common/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pub mod git;
1414
pub mod server;
1515
pub mod version;
1616
pub mod wallets;
17+
pub mod yaml;
1718

1819
pub use prerequisites::{
1920
check_general_prerequisites, check_prerequisites, GCLOUD_PREREQUISITE, GPU_PREREQUISITES,

0 commit comments

Comments
 (0)