Skip to content

Commit

Permalink
feat(zk_toolbox): Add zk_supervisor config-writer command (matter-lab…
Browse files Browse the repository at this point in the history
…s#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.
  • Loading branch information
matias-gonz authored Sep 17, 2024
1 parent 133d694 commit 80b37b2
Show file tree
Hide file tree
Showing 20 changed files with 602 additions and 366 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ jobs:
# `sleep 60` because we need to wait until server added all the tokens
- name: Run server
run: |
ci_run sed -i -e 's/mode: FULL/mode: LIGHTWEIGHT/' chains/legacy/configs/general.yaml
ci_run sed -i -e 's/state_keeper_fast_vm_mode:.*/state_keeper_fast_vm_mode: ${{ matrix.vm_mode }}/' chains/legacy/configs/general.yaml
ci_run sed -i -e 's/delay_interval:.*/delay_interval: 50/' chains/legacy/configs/general.yaml
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
ci_run zk_inception server --uring --chain=legacy --components api,tree,eth,state_keeper,housekeeper,commitment_generator,vm_runner_protective_reads &>server.log &
ci_run sleep 60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ eth:
aggregated_block_prove_deadline: 300
aggregated_block_execute_deadline: 300
timestamp_criteria_max_allowed_lag: 104000 # 29h
wait_confirmations: null
gas_adjuster:
pricing_formula_parameter_a: 1.06
internal_l1_pricing_multiplier: 1
internal_pubdata_pricing_multiplier: 1.50
poll_period: 60
watcher:
confirmations_for_eth_event: null
observability:
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,

# remove eth_sender_wait_confirmations, eth_watcher_confirmations_for_eth_event variables
3 changes: 3 additions & 0 deletions etc/env/file_based/overrides/only_real_proofs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eth:
sender:
proof_sending_mode: ONLY_REAL_PROOFS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ eth:
aggregated_block_prove_deadline: 300
aggregated_block_execute_deadline: 300
timestamp_criteria_max_allowed_lag: 104000 # 29h
wait_confirmations: null
gas_adjuster:
pricing_formula_parameter_a: 1.1
internal_l1_pricing_multiplier: 1
Expand All @@ -18,5 +19,3 @@ eth:
confirmations_for_eth_event: 10
observability:
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,

# remove eth_sender_wait_confirmations variable
7 changes: 7 additions & 0 deletions etc/env/file_based/overrides/tests/loadtest-new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
db:
merkle_tree:
mode: LIGHTWEIGHT
experimental_vm:
state_keeper_fast_vm_mode: NEW
mempool:
delay_interval: 50
7 changes: 7 additions & 0 deletions etc/env/file_based/overrides/tests/loadtest-old.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
db:
merkle_tree:
mode: LIGHTWEIGHT
experimental_vm:
state_keeper_fast_vm_mode: OLD
mempool:
delay_interval: 50
6 changes: 6 additions & 0 deletions etc/env/file_based/overrides/validium.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eth:
sender:
pubdata_sending_mode: CUSTOM
state_keeper:
pubdata_overhead_part: 0
compute_overhead_part: 1
1 change: 1 addition & 0 deletions zk_toolbox/Cargo.lock

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

1 change: 1 addition & 0 deletions zk_toolbox/crates/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod git;
pub mod server;
pub mod version;
pub mod wallets;
pub mod yaml;

pub use prerequisites::{
check_general_prerequisites, check_prerequisites, GCLOUD_PREREQUISITE, GPU_PREREQUISITES,
Expand Down
Loading

0 comments on commit 80b37b2

Please sign in to comment.