diff --git a/.dockerignore b/.dockerignore index 39efdabca19a..ff08c866dac0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,8 +20,8 @@ keys/setup !prover/ !yarn.lock !package.json -!Cargo.lock -!Cargo.toml +!core/Cargo.lock +!core/Cargo.toml !contracts/ !setup_2\^26.key !setup_2\^24.key @@ -46,4 +46,4 @@ contracts/.git !etc/env/dev.toml !etc/env/consensus_secrets.yaml !etc/env/consensus_config.yaml -!rust-toolchain +!core/rust-toolchain diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 849fccc2e22c..ed87b271b99a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,8 +60,6 @@ jobs: - '.github/workflows/new-build-contract-verifier-template.yml' - '.github/workflows/ci-core-reusable.yml' - '.github/workflows/ci-core-lint-reusable.yml' - - 'Cargo.toml' - - 'Cargo.lock' - 'zkstack_cli/**' - '!**/*.md' - '!**/*.MD' diff --git a/.github/workflows/release-please-cargo-lock.yml b/.github/workflows/release-please-cargo-lock.yml deleted file mode 100644 index 8c8036dfa47a..000000000000 --- a/.github/workflows/release-please-cargo-lock.yml +++ /dev/null @@ -1,55 +0,0 @@ -on: - push: - branches: - - release-please--branches--main--components--core - -name: release-please-update-cargo-lock -jobs: - update_cargo_lock: - # TODO: After migraton switch to CI - runs-on: [matterlabs-default-infra-runners] - - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 - with: - submodules: "recursive" - persist-credentials: false - - - name: Check last commit - id: condition - run: | - COMMIT=$(git log -1 --pretty=%B) - if [[ "$COMMIT" == "Update Cargo.lock" ]]; then - echo "Cargo.lock is already updated" - echo "::set-output name=skip_steps::true" - else - echo "Cargo.lock should be updated" - echo "::set-output name=skip_steps::false" - fi - - - name: Setup environment - if: steps.condition.outputs.skip_steps != 'true' - run: | - echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV - echo $(pwd)/bin >> $GITHUB_PATH - echo IN_DOCKER=1 >> .env - - - name: Start services - if: steps.condition.outputs.skip_steps != 'true' - run: docker compose up -d zk - - - name: Cargo check - if: steps.condition.outputs.skip_steps != 'true' - run: ci_run cargo check - - - name: Push changes - if: steps.condition.outputs.skip_steps != 'true' - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - run: | - git config --global user.email "zksync-era-bot@users.noreply.github.com" - git config --global user.name "zksync-era-bot" - git remote set-url origin 'https://${{ secrets.RELEASE_TOKEN }}@github.com/matter-labs/zksync-era.git' - git add ./Cargo.lock - git commit -m "Update Cargo.lock" - git push diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 4a8f527f45c6..c3de5a669393 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,29 +1,22 @@ +name: Release + on: push: branches: - main workflow_dispatch: -permissions: - contents: write - pull-requests: write - -name: release-please jobs: - release-please: - runs-on: ubuntu-latest - steps: - - name: Run release-please - id: release - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1 - with: - token: ${{ secrets.RELEASE_TOKEN }} - config-file: .github/release-please/config.json - manifest-file: .github/release-please/manifest.json - - name: Send Release Info - if: ${{ steps.release.outputs.releases_created == 'true' }} - uses: matter-labs/format-release-please-for-slack-action@69e6fe9e4ec531b7b5fb0d826f73c190db83cf42 # v2.1.0 - with: - release-please-output: ${{ toJSON(steps.release.outputs) }} - slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_RELEASES }} + release: + uses: matter-labs/zksync-ci-common/.github/workflows/release-please.yaml@aba-release-please-support + secrets: + gh_token: ${{ secrets.RELEASE_TOKEN }} + cargo_registry_token: ${{ secrets.CRATES_IO_TOKEN }} + slack_webhook: ${{ secrets.SLACK_WEBHOOK_RELEASES }} + with: + manifest: '.github/release-please/manifest.json' # Specify the path to the manifest file + config: '.github/release-please/config.json' # Specify the path to the configuration file + update-cargo-lock: true # Update Cargo.lock file in release PR + publish-to-crates-io: true # Enable publishing to crates.io + upgrade-dependencies: true # Upgrade dependencies across all workspaces diff --git a/.gitignore b/.gitignore index 471a601cc34b..bf74f1dcff4a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,8 +26,8 @@ zksync_pk.key dist todo -Cargo.lock -!/Cargo.lock +core/Cargo.lock +!/core/Cargo.lock !/infrastructure/zksync-crypto/Cargo.lock !/prover/Cargo.lock !/zkstack_cli/Cargo.lock diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 99f6abdf85e2..000000000000 --- a/Cargo.toml +++ /dev/null @@ -1,327 +0,0 @@ -[workspace] -members = [ - # Binaries - "core/bin/block_reverter", - "core/bin/contract-verifier", - "core/bin/custom_genesis_export", - "core/bin/external_node", - "core/bin/merkle_tree_consistency_checker", - "core/bin/snapshots_creator", - "core/bin/selector_generator", - "core/bin/system-constants-generator", - "core/bin/verified_sources_fetcher", - "core/bin/zksync_server", - "core/bin/genesis_generator", - "core/bin/zksync_tee_prover", - # Node services - "core/node/node_framework", - "core/node/proof_data_handler", - "core/node/block_reverter", - "core/node/commitment_generator", - "core/node/house_keeper", - "core/node/genesis", - "core/node/shared_metrics", - "core/node/db_pruner", - "core/node/fee_model", - "core/node/da_dispatcher", - "core/node/eth_sender", - "core/node/vm_runner", - "core/node/test_utils", - "core/node/state_keeper", - "core/node/reorg_detector", - "core/node/consistency_checker", - "core/node/metadata_calculator", - "core/node/node_sync", - "core/node/node_storage_init", - "core/node/consensus", - "core/node/contract_verification_server", - "core/node/api_server", - "core/node/base_token_adjuster", - "core/node/external_proof_integration_api", - "core/node/logs_bloom_backfill", - "core/node/da_clients", - # Libraries - "core/lib/db_connection", - "core/lib/zksync_core_leftovers", - "core/lib/basic_types", - "core/lib/config", - "core/lib/constants", - "core/lib/contract_verifier", - "core/lib/contracts", - "core/lib/circuit_breaker", - "core/lib/dal", - "core/lib/env_config", - "core/lib/da_client", - "core/lib/eth_client", - "core/lib/eth_signer", - "core/lib/l1_contract_interface", - "core/lib/mempool", - "core/lib/merkle_tree", - "core/lib/mini_merkle_tree", - "core/lib/node_framework_derive", - "core/lib/object_store", - "core/lib/prover_interface", - "core/lib/queued_job_processor", - "core/lib/state", - "core/lib/storage", - "core/lib/tee_verifier", - "core/lib/types", - "core/lib/protobuf_config", - "core/lib/utils", - "core/lib/vlog", - "core/lib/multivm", - "core/lib/vm_interface", - "core/lib/vm_executor", - "core/lib/web3_decl", - "core/lib/snapshots_applier", - "core/lib/crypto_primitives", - "core/lib/external_price_api", - "core/lib/test_contracts", - # Test infrastructure - "core/tests/loadnext", - "core/tests/vm-benchmark", -] -resolver = "2" - -exclude = [] - -# for `perf` profiling -[profile.perf] -inherits = "release" -debug = true - -[workspace.package] -version = "0.1.0" -edition = "2021" -authors = ["The Matter Labs Team "] -homepage = "https://zksync.io/" -repository = "https://github.com/matter-labs/zksync-era" -license = "MIT OR Apache-2.0" -keywords = ["blockchain", "zksync"] -categories = ["cryptography"] - -[workspace.dependencies] -# "External" dependencies -anyhow = "1" -assert_matches = "1.5" -async-trait = "0.1" -async-recursion = "1" -axum = "0.7.5" -backon = "0.4.4" -bigdecimal = "0.4.5" -bincode = "1" -blake2 = "0.10" -bytes = "1" -chrono = "0.4" -clap = "4.2.2" -codegen = "0.2.0" -const-decoder = "0.4.0" -criterion = "0.4.0" -ctrlc = "3.1" -dashmap = "5.5.3" -derive_more = "1.0.0" -envy = "0.4" -ethabi = "18.0.0" -flate2 = "1.0.28" -fraction = "0.15.3" -futures = "0.3" -futures-util = "0.3" -glob = "0.3" -google-cloud-auth = "0.16.0" -google-cloud-storage = "0.20.0" -governor = "0.4.2" -hex = "0.4" -http = "1.1" -http-body-util = "0.1.2" -httpmock = "0.7.0" -hyper = "1.3" -insta = "1.29.0" -itertools = "0.10" -jsonrpsee = { version = "0.23", default-features = false } -leb128 = "0.2.5" -lru = { version = "0.12.1", default-features = false } -mini-moka = "0.10.0" -num = "0.4.0" -num_cpus = "1.13" -num_enum = "0.7.2" -octocrab = "0.41" -once_cell = "1" -opentelemetry = "0.24.0" -opentelemetry_sdk = "0.24.0" -opentelemetry-otlp = "0.17.0" -opentelemetry-semantic-conventions = "0.16.0" -opentelemetry-appender-tracing = "0.5" -pin-project-lite = "0.2.13" -pretty_assertions = "1" -prost = "0.12.6" -rand = "0.8" -rayon = "1.3.1" -regex = "1" -reqwest = "0.12" -rlp = "0.5" -rocksdb = "0.21" -rustc_version = "0.4.0" -rustls = "0.23" -secp256k1 = { version = "0.27.0", features = ["recovery", "global-context"] } -secrecy = "0.8.0" -semver = "1" -sentry = "0.31" -serde = "1" -serde_json = "1" -serde_with = "1" -serde_yaml = "0.9" -sha2 = "0.10.8" -sha3 = "0.10.8" -sqlx = "0.8.1" -static_assertions = "1.1" -structopt = "0.3.20" -strum = "0.26" -tempfile = "3.0.2" -test-casing = "0.1.2" -test-log = "0.2.15" -thiserror = "1" -thread_local = "1.1" -tikv-jemallocator = "0.5" -tiny-keccak = "2" -tokio = "1" -tower = "0.4.13" -tower-http = "0.5.2" -tracing = "0.1" -tracing-subscriber = "0.3" -tracing-opentelemetry = "0.25.0" -time = "0.3.36" # Has to be same as used by `tracing-subscriber` -url = "2" -web3 = "0.19.0" -yab = "0.1.0" - -# Proc-macro -syn = "2.0" -quote = "1.0" -proc-macro2 = "1.0" -trybuild = "1.0" - -# "Internal" dependencies -vise = "0.2.0" -vise-exporter = "0.2.0" -foundry-compilers = { version = "0.11.6", git = "https://github.com/Moonsong-Labs/compilers.git", rev = "7c69695e5c75451f158dd2456bf8c94a7492ea0b" } - -# DA clients' dependencies -# Avail -base58 = "0.2.0" -scale-encode = "0.5.0" -blake2b_simd = "1.0.2" -subxt-metadata = "0.34.0" -parity-scale-codec = { version = "3.6.9", default-features = false } -subxt-signer = { version = "0.34", default-features = false } - -# Celestia -celestia-types = "0.6.1" -bech32 = "0.11.0" -ripemd = "0.1.3" -tonic = { version = "0.11.0", default-features = false } -pbjson-types = "0.6.0" - -# Eigen -tokio-stream = "0.1.16" - -# Here and below: -# We *always* pin the latest version of protocol to disallow accidental changes in the execution logic. -# However, for the historical version of protocol crates, we have lax requirements. Otherwise, -# Bumping a crypto dependency like `boojum` would require us to republish all the historical packages. -circuit_sequencer_api_1_3_3 = { package = "circuit_sequencer_api", version = "0.133" } -circuit_sequencer_api_1_4_0 = { package = "circuit_sequencer_api", version = "0.140" } -circuit_sequencer_api_1_4_1 = { package = "circuit_sequencer_api", version = "0.141" } -circuit_sequencer_api_1_4_2 = { package = "circuit_sequencer_api", version = "0.142" } -circuit_sequencer_api_1_5_0 = { package = "circuit_sequencer_api", version = "=0.150.7" } -crypto_codegen = { package = "zksync_solidity_vk_codegen", version = "=0.30.1" } -kzg = { package = "zksync_kzg", version = "=0.150.7" } -zk_evm = { version = "=0.133.0" } -zk_evm_1_3_1 = { package = "zk_evm", version = "0.131.0-rc.2" } -zk_evm_1_3_3 = { package = "zk_evm", version = "0.133" } -zk_evm_1_4_0 = { package = "zk_evm", version = "0.140" } -zk_evm_1_4_1 = { package = "zk_evm", version = "0.141" } -zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.7" } - -# New VM; pinned to a specific commit because of instability -zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "457d8a7eea9093af9440662e33e598c13ba41633" } - -# Consensus dependencies. -zksync_concurrency = "=0.7.0" -zksync_consensus_bft = "=0.7.0" -zksync_consensus_crypto = "=0.7.0" -zksync_consensus_executor = "=0.7.0" -zksync_consensus_network = "=0.7.0" -zksync_consensus_roles = "=0.7.0" -zksync_consensus_storage = "=0.7.0" -zksync_consensus_utils = "=0.7.0" -zksync_protobuf = "=0.7.0" -zksync_protobuf_build = "=0.7.0" - -# "Local" dependencies -zksync_multivm = { version = "0.1.0", path = "core/lib/multivm" } -zksync_vlog = { version = "0.1.0", path = "core/lib/vlog" } -zksync_vm_interface = { version = "0.1.0", path = "core/lib/vm_interface" } -zksync_vm_executor = { version = "0.1.0", path = "core/lib/vm_executor" } -zksync_basic_types = { version = "0.1.0", path = "core/lib/basic_types" } -zksync_circuit_breaker = { version = "0.1.0", path = "core/lib/circuit_breaker" } -zksync_config = { version = "0.1.0", path = "core/lib/config" } -zksync_contract_verifier_lib = { version = "0.1.0", path = "core/lib/contract_verifier" } -zksync_contracts = { version = "0.1.0", path = "core/lib/contracts" } -zksync_core_leftovers = { version = "0.1.0", path = "core/lib/zksync_core_leftovers" } -zksync_dal = { version = "0.1.0", path = "core/lib/dal" } -zksync_db_connection = { version = "0.1.0", path = "core/lib/db_connection" } -zksync_env_config = { version = "0.1.0", path = "core/lib/env_config" } -zksync_eth_client = { version = "0.1.0", path = "core/lib/eth_client" } -zksync_da_client = { version = "0.1.0", path = "core/lib/da_client" } -zksync_eth_signer = { version = "0.1.0", path = "core/lib/eth_signer" } -zksync_health_check = { version = "0.1.0", path = "core/lib/health_check" } -zksync_l1_contract_interface = { version = "0.1.0", path = "core/lib/l1_contract_interface" } -zksync_mempool = { version = "0.1.0", path = "core/lib/mempool" } -zksync_merkle_tree = { version = "0.1.0", path = "core/lib/merkle_tree" } -zksync_bin_metadata = { version = "0.1.0", path = "core/lib/bin_metadata" } -zksync_mini_merkle_tree = { version = "0.1.0", path = "core/lib/mini_merkle_tree" } -zksync_object_store = { version = "0.1.0", path = "core/lib/object_store" } -zksync_protobuf_config = { version = "0.1.0", path = "core/lib/protobuf_config" } -zksync_prover_interface = { version = "0.1.0", path = "core/lib/prover_interface" } -zksync_queued_job_processor = { version = "0.1.0", path = "core/lib/queued_job_processor" } -zksync_snapshots_applier = { version = "0.1.0", path = "core/lib/snapshots_applier" } -zksync_state = { version = "0.1.0", path = "core/lib/state" } -zksync_storage = { version = "0.1.0", path = "core/lib/storage" } -zksync_system_constants = { version = "0.1.0", path = "core/lib/constants" } -zksync_tee_verifier = { version = "0.1.0", path = "core/lib/tee_verifier" } -zksync_test_contracts = { version = "0.1.0", path = "core/lib/test_contracts" } -zksync_types = { version = "0.1.0", path = "core/lib/types" } -zksync_utils = { version = "0.1.0", path = "core/lib/utils" } -zksync_web3_decl = { version = "0.1.0", path = "core/lib/web3_decl" } -zksync_crypto_primitives = { version = "0.1.0", path = "core/lib/crypto_primitives" } -zksync_external_price_api = { version = "0.1.0", path = "core/lib/external_price_api" } - -# Framework and components -zksync_node_framework = { version = "0.1.0", path = "core/node/node_framework" } -zksync_node_framework_derive = { version = "0.1.0", path = "core/lib/node_framework_derive" } -zksync_eth_watch = { version = "0.1.0", path = "core/node/eth_watch" } -zksync_shared_metrics = { version = "0.1.0", path = "core/node/shared_metrics" } -zksync_proof_data_handler = { version = "0.1.0", path = "core/node/proof_data_handler" } -zksync_block_reverter = { version = "0.1.0", path = "core/node/block_reverter" } -zksync_commitment_generator = { version = "0.1.0", path = "core/node/commitment_generator" } -zksync_house_keeper = { version = "0.1.0", path = "core/node/house_keeper" } -zksync_node_genesis = { version = "0.1.0", path = "core/node/genesis" } -zksync_da_dispatcher = { version = "0.1.0", path = "core/node/da_dispatcher" } -zksync_da_clients = { version = "0.1.0", path = "core/node/da_clients" } -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" } -zksync_consistency_checker = { version = "0.1.0", path = "core/node/consistency_checker" } -zksync_metadata_calculator = { version = "0.1.0", path = "core/node/metadata_calculator" } -zksync_node_sync = { version = "0.1.0", path = "core/node/node_sync" } -zksync_node_storage_init = { version = "0.1.0", path = "core/node/node_storage_init" } -zksync_node_consensus = { version = "0.1.0", path = "core/node/consensus" } -zksync_contract_verification_server = { version = "0.1.0", path = "core/node/contract_verification_server" } -zksync_node_api_server = { version = "0.1.0", path = "core/node/api_server" } -zksync_base_token_adjuster = { version = "0.1.0", path = "core/node/base_token_adjuster" } -zksync_logs_bloom_backfill = { version = "0.1.0", path = "core/node/logs_bloom_backfill" } diff --git a/Cargo.lock b/core/Cargo.lock similarity index 99% rename from Cargo.lock rename to core/Cargo.lock index 71ca2e960995..cb4f073aaa87 100644 --- a/Cargo.lock +++ b/core/Cargo.lock @@ -1233,7 +1233,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "block_reverter" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "clap 4.5.23", @@ -2310,7 +2310,7 @@ dependencies = [ [[package]] name = "custom_genesis_export" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bincode", @@ -3545,7 +3545,7 @@ dependencies = [ [[package]] name = "genesis_generator" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "clap 4.5.23", @@ -5403,7 +5403,7 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "merkle_tree_consistency_checker" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "clap 4.5.23", @@ -8044,7 +8044,7 @@ dependencies = [ [[package]] name = "selector_generator" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "clap 4.5.23", @@ -8704,7 +8704,7 @@ dependencies = [ [[package]] name = "snapshots_creator" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "futures 0.3.31", @@ -9441,7 +9441,7 @@ dependencies = [ [[package]] name = "system-constants-generator" -version = "0.1.0" +version = "25.3.0" dependencies = [ "codegen", "once_cell", @@ -10421,7 +10421,7 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "verified_sources_fetcher" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "serde_json", @@ -11385,7 +11385,7 @@ dependencies = [ [[package]] name = "zksync_base_token_adjuster" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -11407,7 +11407,7 @@ dependencies = [ [[package]] name = "zksync_basic_types" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bincode", @@ -11452,7 +11452,7 @@ dependencies = [ [[package]] name = "zksync_block_reverter" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -11476,7 +11476,7 @@ dependencies = [ [[package]] name = "zksync_circuit_breaker" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -11490,7 +11490,7 @@ dependencies = [ [[package]] name = "zksync_commitment_generator" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "circuit_sequencer_api 0.140.3", @@ -11542,7 +11542,7 @@ dependencies = [ [[package]] name = "zksync_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "rand 0.8.5", @@ -11715,7 +11715,7 @@ dependencies = [ [[package]] name = "zksync_consistency_checker" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -11740,7 +11740,7 @@ dependencies = [ [[package]] name = "zksync_contract_verification_server" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "axum 0.7.9", @@ -11759,7 +11759,7 @@ dependencies = [ [[package]] name = "zksync_contract_verifier" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "clap 4.5.23", @@ -11776,7 +11776,7 @@ dependencies = [ [[package]] name = "zksync_contract_verifier_lib" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -11808,7 +11808,7 @@ dependencies = [ [[package]] name = "zksync_contracts" -version = "0.1.0" +version = "25.3.0" dependencies = [ "bincode", "envy", @@ -11822,7 +11822,7 @@ dependencies = [ [[package]] name = "zksync_core_leftovers" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "ctrlc", @@ -11836,7 +11836,7 @@ dependencies = [ [[package]] name = "zksync_crypto_primitives" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "blake2 0.10.6", @@ -11864,7 +11864,7 @@ dependencies = [ [[package]] name = "zksync_da_client" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -11873,7 +11873,7 @@ dependencies = [ [[package]] name = "zksync_da_clients" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -11916,7 +11916,7 @@ dependencies = [ [[package]] name = "zksync_da_dispatcher" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "chrono", @@ -11933,7 +11933,7 @@ dependencies = [ [[package]] name = "zksync_dal" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bigdecimal", @@ -11969,7 +11969,7 @@ dependencies = [ [[package]] name = "zksync_db_connection" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -11987,7 +11987,7 @@ dependencies = [ [[package]] name = "zksync_env_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "envy", @@ -11999,7 +11999,7 @@ dependencies = [ [[package]] name = "zksync_eth_client" -version = "0.1.0" +version = "25.3.0" dependencies = [ "assert_matches", "async-trait", @@ -12021,7 +12021,7 @@ dependencies = [ [[package]] name = "zksync_eth_sender" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12051,7 +12051,7 @@ dependencies = [ [[package]] name = "zksync_eth_signer" -version = "0.1.0" +version = "25.3.0" dependencies = [ "async-trait", "rlp", @@ -12062,7 +12062,7 @@ dependencies = [ [[package]] name = "zksync_eth_watch" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-recursion", @@ -12142,7 +12142,7 @@ dependencies = [ [[package]] name = "zksync_external_price_api" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12163,7 +12163,7 @@ dependencies = [ [[package]] name = "zksync_external_proof_integration_api" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12209,7 +12209,7 @@ dependencies = [ [[package]] name = "zksync_health_check" -version = "0.1.0" +version = "25.3.0" dependencies = [ "assert_matches", "async-trait", @@ -12224,7 +12224,7 @@ dependencies = [ [[package]] name = "zksync_house_keeper" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12256,7 +12256,7 @@ dependencies = [ [[package]] name = "zksync_l1_contract_interface" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "hex", @@ -12275,7 +12275,7 @@ dependencies = [ [[package]] name = "zksync_logs_bloom_backfill" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "tokio", @@ -12287,7 +12287,7 @@ dependencies = [ [[package]] name = "zksync_mempool" -version = "0.1.0" +version = "25.3.0" dependencies = [ "tracing", "zksync_types", @@ -12295,7 +12295,7 @@ dependencies = [ [[package]] name = "zksync_merkle_tree" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12324,7 +12324,7 @@ dependencies = [ [[package]] name = "zksync_metadata_calculator" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12358,7 +12358,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" -version = "0.1.0" +version = "25.3.0" dependencies = [ "criterion", "once_cell", @@ -12368,7 +12368,7 @@ dependencies = [ [[package]] name = "zksync_multivm" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12404,7 +12404,7 @@ dependencies = [ [[package]] name = "zksync_node_api_server" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12458,7 +12458,7 @@ dependencies = [ [[package]] name = "zksync_node_consensus" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12502,7 +12502,7 @@ dependencies = [ [[package]] name = "zksync_node_db_pruner" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12524,7 +12524,7 @@ dependencies = [ [[package]] name = "zksync_node_fee_model" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12541,7 +12541,7 @@ dependencies = [ [[package]] name = "zksync_node_framework" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12603,7 +12603,7 @@ dependencies = [ [[package]] name = "zksync_node_framework_derive" -version = "0.1.0" +version = "25.3.0" dependencies = [ "proc-macro2 1.0.92", "quote 1.0.37", @@ -12612,7 +12612,7 @@ dependencies = [ [[package]] name = "zksync_node_genesis" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bincode", @@ -12633,7 +12633,7 @@ dependencies = [ [[package]] name = "zksync_node_storage_init" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12655,7 +12655,7 @@ dependencies = [ [[package]] name = "zksync_node_sync" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12690,7 +12690,7 @@ dependencies = [ [[package]] name = "zksync_node_test_utils" -version = "0.1.0" +version = "25.3.0" dependencies = [ "zksync_contracts", "zksync_dal", @@ -12702,7 +12702,7 @@ dependencies = [ [[package]] name = "zksync_object_store" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12740,7 +12740,7 @@ dependencies = [ [[package]] name = "zksync_proof_data_handler" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "axum 0.7.9", @@ -12802,7 +12802,7 @@ dependencies = [ [[package]] name = "zksync_protobuf_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "hex", @@ -12822,7 +12822,7 @@ dependencies = [ [[package]] name = "zksync_prover_interface" -version = "0.1.0" +version = "25.3.0" dependencies = [ "bincode", "chrono", @@ -12839,7 +12839,7 @@ dependencies = [ [[package]] name = "zksync_queued_job_processor" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -12851,7 +12851,7 @@ dependencies = [ [[package]] name = "zksync_reorg_detector" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12872,7 +12872,7 @@ dependencies = [ [[package]] name = "zksync_server" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "clap 4.5.23", @@ -12902,7 +12902,7 @@ dependencies = [ [[package]] name = "zksync_shared_metrics" -version = "0.1.0" +version = "25.3.0" dependencies = [ "rustc_version 0.4.1", "serde", @@ -12914,7 +12914,7 @@ dependencies = [ [[package]] name = "zksync_snapshots_applier" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12953,7 +12953,7 @@ dependencies = [ [[package]] name = "zksync_state" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -12978,7 +12978,7 @@ dependencies = [ [[package]] name = "zksync_state_keeper" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -13018,7 +13018,7 @@ dependencies = [ [[package]] name = "zksync_storage" -version = "0.1.0" +version = "25.3.0" dependencies = [ "num_cpus", "once_cell", @@ -13031,7 +13031,7 @@ dependencies = [ [[package]] name = "zksync_system_constants" -version = "0.1.0" +version = "25.3.0" dependencies = [ "once_cell", "zksync_basic_types", @@ -13039,7 +13039,7 @@ dependencies = [ [[package]] name = "zksync_tee_prover" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -13064,7 +13064,7 @@ dependencies = [ [[package]] name = "zksync_tee_verifier" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bincode", @@ -13082,7 +13082,7 @@ dependencies = [ [[package]] name = "zksync_test_contracts" -version = "0.1.0" +version = "25.3.0" dependencies = [ "ethabi", "foundry-compilers", @@ -13098,7 +13098,7 @@ dependencies = [ [[package]] name = "zksync_types" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -13132,7 +13132,7 @@ dependencies = [ [[package]] name = "zksync_utils" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -13147,7 +13147,7 @@ dependencies = [ [[package]] name = "zksync_vlog" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "chrono", @@ -13192,7 +13192,7 @@ dependencies = [ [[package]] name = "zksync_vm_executor" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -13210,7 +13210,7 @@ dependencies = [ [[package]] name = "zksync_vm_interface" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -13228,7 +13228,7 @@ dependencies = [ [[package]] name = "zksync_vm_runner" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", @@ -13262,7 +13262,7 @@ dependencies = [ [[package]] name = "zksync_web3_decl" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "assert_matches", diff --git a/core/Cargo.toml b/core/Cargo.toml new file mode 100644 index 000000000000..768d6bb8c204 --- /dev/null +++ b/core/Cargo.toml @@ -0,0 +1,326 @@ +[workspace] +members = [ + # Binaries + "bin/block_reverter", + "bin/contract-verifier", + "bin/custom_genesis_export", + "bin/external_node", + "bin/merkle_tree_consistency_checker", + "bin/snapshots_creator", + "bin/selector_generator", + "bin/system-constants-generator", + "bin/verified_sources_fetcher", + "bin/zksync_server", + "bin/genesis_generator", + "bin/zksync_tee_prover", + # Node services + "node/node_framework", + "node/proof_data_handler", + "node/block_reverter", + "node/commitment_generator", + "node/house_keeper", + "node/genesis", + "node/shared_metrics", + "node/db_pruner", + "node/fee_model", + "node/da_dispatcher", + "node/eth_sender", + "node/vm_runner", + "node/test_utils", + "node/state_keeper", + "node/reorg_detector", + "node/consistency_checker", + "node/metadata_calculator", + "node/node_sync", + "node/node_storage_init", + "node/consensus", + "node/contract_verification_server", + "node/api_server", + "node/base_token_adjuster", + "node/external_proof_integration_api", + "node/logs_bloom_backfill", + "node/da_clients", + # Libraries + "lib/db_connection", + "lib/zksync_core_leftovers", + "lib/basic_types", + "lib/config", + "lib/constants", + "lib/contract_verifier", + "lib/contracts", + "lib/circuit_breaker", + "lib/dal", + "lib/env_config", + "lib/da_client", + "lib/eth_client", + "lib/eth_signer", + "lib/l1_contract_interface", + "lib/mempool", + "lib/merkle_tree", + "lib/mini_merkle_tree", + "lib/node_framework_derive", + "lib/object_store", + "lib/prover_interface", + "lib/queued_job_processor", + "lib/state", + "lib/storage", + "lib/tee_verifier", + "lib/types", + "lib/protobuf_config", + "lib/utils", + "lib/vlog", + "lib/multivm", + "lib/vm_interface", + "lib/vm_executor", + "lib/web3_decl", + "lib/snapshots_applier", + "lib/crypto_primitives", + "lib/external_price_api", + "lib/test_contracts", + # Test infrastructure + "tests/loadnext", + "tests/vm-benchmark", +] +resolver = "2" + +exclude = [] + +# for `perf` profiling +[profile.perf] +inherits = "release" +debug = true + +[workspace.package] +version = "25.3.0" # x-release-please-version +edition = "2021" +authors = ["The Matter Labs Team "] +homepage = "https://zksync.io/" +repository = "https://github.com/matter-labs/zksync-era" +license = "MIT OR Apache-2.0" +keywords = ["blockchain", "zksync"] +categories = ["cryptography"] + +[workspace.dependencies] +# "External" dependencies +anyhow = "1" +assert_matches = "1.5" +async-trait = "0.1" +async-recursion = "1" +axum = "0.7.5" +backon = "0.4.4" +bigdecimal = "0.4.5" +bincode = "1" +blake2 = "0.10" +bytes = "1" +chrono = "0.4" +clap = "4.2.2" +codegen = "0.2.0" +const-decoder = "0.4.0" +criterion = "0.4.0" +ctrlc = "3.1" +dashmap = "5.5.3" +derive_more = "1.0.0" +envy = "0.4" +ethabi = "18.0.0" +flate2 = "1.0.28" +fraction = "0.15.3" +futures = "0.3" +futures-util = "0.3" +glob = "0.3" +google-cloud-auth = "0.16.0" +google-cloud-storage = "0.20.0" +governor = "0.4.2" +hex = "0.4" +http = "1.1" +http-body-util = "0.1.2" +httpmock = "0.7.0" +hyper = "1.3" +insta = "1.29.0" +itertools = "0.10" +jsonrpsee = { version = "0.23", default-features = false } +leb128 = "0.2.5" +lru = { version = "0.12.1", default-features = false } +mini-moka = "0.10.0" +num = "0.4.0" +num_cpus = "1.13" +num_enum = "0.7.2" +octocrab = "0.41" +once_cell = "1" +opentelemetry = "0.24.0" +opentelemetry_sdk = "0.24.0" +opentelemetry-otlp = "0.17.0" +opentelemetry-semantic-conventions = "0.16.0" +opentelemetry-appender-tracing = "0.5" +pin-project-lite = "0.2.13" +pretty_assertions = "1" +prost = "0.12.6" +rand = "0.8" +rayon = "1.3.1" +regex = "1" +reqwest = "0.12" +rlp = "0.5" +rocksdb = "0.21" +rustc_version = "0.4.0" +rustls = "0.23" +secp256k1 = { version = "0.27.0", features = ["recovery", "global-context"] } +secrecy = "0.8.0" +semver = "1" +sentry = "0.31" +serde = "1" +serde_json = "1" +serde_with = "1" +serde_yaml = "0.9" +sha2 = "0.10.8" +sha3 = "0.10.8" +sqlx = "0.8.1" +static_assertions = "1.1" +structopt = "0.3.20" +strum = "0.26" +tempfile = "3.0.2" +test-casing = "0.1.2" +test-log = "0.2.15" +thiserror = "1" +thread_local = "1.1" +tikv-jemallocator = "0.5" +tiny-keccak = "2" +tokio = "1" +tower = "0.4.13" +tower-http = "0.5.2" +tracing = "0.1" +tracing-subscriber = "0.3" +tracing-opentelemetry = "0.25.0" +time = "0.3.36" # Has to be same as used by `tracing-subscriber` +url = "2" +web3 = "0.19.0" +yab = "0.1.0" + +# Proc-macro +syn = "2.0" +quote = "1.0" +proc-macro2 = "1.0" +trybuild = "1.0" + +# "Internal" dependencies +vise = "0.2.0" +vise-exporter = "0.2.0" +foundry-compilers = { version = "0.11.6", git = "https://github.com/Moonsong-Labs/compilers.git", rev = "7c69695e5c75451f158dd2456bf8c94a7492ea0b" } + +# DA clients' dependencies +# Avail +base58 = "0.2.0" +scale-encode = "0.5.0" +blake2b_simd = "1.0.2" +subxt-metadata = "0.34.0" +parity-scale-codec = { version = "3.6.9", default-features = false } +subxt-signer = { version = "0.34", default-features = false } + +# Celestia +celestia-types = "0.6.1" +bech32 = "0.11.0" +ripemd = "0.1.3" +tonic = { version = "0.11.0", default-features = false } +pbjson-types = "0.6.0" + +# Eigen +tokio-stream = "0.1.16" + +# Here and below: +# We *always* pin the latest version of protocol to disallow accidental changes in the execution logic. +# However, for the historical version of protocol crates, we have lax requirements. Otherwise, +# Bumping a crypto dependency like `boojum` would require us to republish all the historical packages. +circuit_sequencer_api_1_3_3 = { package = "circuit_sequencer_api", version = "0.133" } +circuit_sequencer_api_1_4_0 = { package = "circuit_sequencer_api", version = "0.140" } +circuit_sequencer_api_1_4_1 = { package = "circuit_sequencer_api", version = "0.141" } +circuit_sequencer_api_1_4_2 = { package = "circuit_sequencer_api", version = "0.142" } +circuit_sequencer_api_1_5_0 = { package = "circuit_sequencer_api", version = "=0.150.7" } +crypto_codegen = { package = "zksync_solidity_vk_codegen", version = "=0.30.1" } +kzg = { package = "zksync_kzg", version = "=0.150.7" } +zk_evm = { version = "=0.133.0" } +zk_evm_1_3_1 = { package = "zk_evm", version = "0.131.0-rc.2" } +zk_evm_1_3_3 = { package = "zk_evm", version = "0.133" } +zk_evm_1_4_0 = { package = "zk_evm", version = "0.140" } +zk_evm_1_4_1 = { package = "zk_evm", version = "0.141" } +zk_evm_1_5_0 = { package = "zk_evm", version = "=0.150.7" } + +# New VM; pinned to a specific commit because of instability +zksync_vm2 = { git = "https://github.com/matter-labs/vm2.git", rev = "457d8a7eea9093af9440662e33e598c13ba41633" } + +# Consensus dependencies. +zksync_concurrency = "=0.7.0" +zksync_consensus_bft = "=0.7.0" +zksync_consensus_crypto = "=0.7.0" +zksync_consensus_executor = "=0.7.0" +zksync_consensus_network = "=0.7.0" +zksync_consensus_roles = "=0.7.0" +zksync_consensus_storage = "=0.7.0" +zksync_consensus_utils = "=0.7.0" +zksync_protobuf = "=0.7.0" +zksync_protobuf_build = "=0.7.0" + +# "Local" dependencies +zksync_multivm = { version = "25.3.0", path = "lib/multivm" } +zksync_vlog = { version = "25.3.0", path = "lib/vlog" } +zksync_vm_interface = { version = "25.3.0", path = "lib/vm_interface" } +zksync_vm_executor = { version = "25.3.0", path = "lib/vm_executor" } +zksync_basic_types = { version = "25.3.0", path = "lib/basic_types" } +zksync_circuit_breaker = { version = "25.3.0", path = "lib/circuit_breaker" } +zksync_config = { version = "25.3.0", path = "lib/config" } +zksync_contract_verifier_lib = { version = "25.3.0", path = "lib/contract_verifier" } +zksync_contracts = { version = "25.3.0", path = "lib/contracts" } +zksync_core_leftovers = { version = "25.3.0", path = "lib/zksync_core_leftovers" } +zksync_dal = { version = "25.3.0", path = "lib/dal" } +zksync_db_connection = { version = "25.3.0", path = "lib/db_connection" } +zksync_env_config = { version = "25.3.0", path = "lib/env_config" } +zksync_eth_client = { version = "25.3.0", path = "lib/eth_client" } +zksync_da_client = { version = "25.3.0", path = "lib/da_client" } +zksync_eth_signer = { version = "25.3.0", path = "lib/eth_signer" } +zksync_health_check = { version = "25.3.0", path = "lib/health_check" } +zksync_l1_contract_interface = { version = "25.3.0", path = "lib/l1_contract_interface" } +zksync_mempool = { version = "25.3.0", path = "lib/mempool" } +zksync_merkle_tree = { version = "25.3.0", path = "lib/merkle_tree" } +zksync_mini_merkle_tree = { version = "25.3.0", path = "lib/mini_merkle_tree" } +zksync_object_store = { version = "25.3.0", path = "lib/object_store" } +zksync_protobuf_config = { version = "25.3.0", path = "lib/protobuf_config" } +zksync_prover_interface = { version = "25.3.0", path = "lib/prover_interface" } +zksync_queued_job_processor = { version = "25.3.0", path = "lib/queued_job_processor" } +zksync_snapshots_applier = { version = "25.3.0", path = "lib/snapshots_applier" } +zksync_state = { version = "25.3.0", path = "lib/state" } +zksync_storage = { version = "25.3.0", path = "lib/storage" } +zksync_system_constants = { version = "25.3.0", path = "lib/constants" } +zksync_tee_verifier = { version = "25.3.0", path = "lib/tee_verifier" } +zksync_test_contracts = { version = "25.3.0", path = "lib/test_contracts" } +zksync_types = { version = "25.3.0", path = "lib/types" } +zksync_utils = { version = "25.3.0", path = "lib/utils" } +zksync_web3_decl = { version = "25.3.0", path = "lib/web3_decl" } +zksync_crypto_primitives = { version = "25.3.0", path = "lib/crypto_primitives" } +zksync_external_price_api = { version = "25.3.0", path = "lib/external_price_api" } + +# Framework and components +zksync_node_framework = { version = "25.3.0", path = "node/node_framework" } +zksync_node_framework_derive = { version = "25.3.0", path = "lib/node_framework_derive" } +zksync_eth_watch = { version = "25.3.0", path = "node/eth_watch" } +zksync_shared_metrics = { version = "25.3.0", path = "node/shared_metrics" } +zksync_proof_data_handler = { version = "25.3.0", path = "node/proof_data_handler" } +zksync_block_reverter = { version = "25.3.0", path = "node/block_reverter" } +zksync_commitment_generator = { version = "25.3.0", path = "node/commitment_generator" } +zksync_house_keeper = { version = "25.3.0", path = "node/house_keeper" } +zksync_node_genesis = { version = "25.3.0", path = "node/genesis" } +zksync_da_dispatcher = { version = "25.3.0", path = "node/da_dispatcher" } +zksync_da_clients = { version = "25.3.0", path = "node/da_clients" } +zksync_eth_sender = { version = "25.3.0", path = "node/eth_sender" } +zksync_node_db_pruner = { version = "25.3.0", path = "node/db_pruner" } +zksync_node_fee_model = { version = "25.3.0", path = "node/fee_model" } +zksync_vm_runner = { version = "25.3.0", path = "node/vm_runner" } +zksync_external_proof_integration_api = { version = "25.3.0", path = "node/external_proof_integration_api" } +zksync_node_test_utils = { version = "25.3.0", path = "node/test_utils" } +zksync_state_keeper = { version = "25.3.0", path = "node/state_keeper" } +zksync_reorg_detector = { version = "25.3.0", path = "node/reorg_detector" } +zksync_consistency_checker = { version = "25.3.0", path = "node/consistency_checker" } +zksync_metadata_calculator = { version = "25.3.0", path = "node/metadata_calculator" } +zksync_node_sync = { version = "25.3.0", path = "node/node_sync" } +zksync_node_storage_init = { version = "25.3.0", path = "node/node_storage_init" } +zksync_node_consensus = { version = "25.3.0", path = "node/consensus" } +zksync_contract_verification_server = { version = "25.3.0", path = "node/contract_verification_server" } +zksync_node_api_server = { version = "25.3.0", path = "node/api_server" } +zksync_base_token_adjuster = { version = "25.3.0", path = "node/base_token_adjuster" } +zksync_logs_bloom_backfill = { version = "25.3.0", path = "node/logs_bloom_backfill" } diff --git a/core/bin/external_node/Cargo.toml b/core/bin/external_node/Cargo.toml index f56af827bc45..cb75a20c3ed7 100644 --- a/core/bin/external_node/Cargo.toml +++ b/core/bin/external_node/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zksync_external_node" description = "Non-validator ZKsync node" -version = "25.3.0" # x-release-please-version +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/merkle_tree_consistency_checker/Cargo.toml b/core/bin/merkle_tree_consistency_checker/Cargo.toml index eb7dcd81a0dc..f915f321f139 100644 --- a/core/bin/merkle_tree_consistency_checker/Cargo.toml +++ b/core/bin/merkle_tree_consistency_checker/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "merkle_tree_consistency_checker" description = "Tool to verify consistency of ZKsync Merkle Tree" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/selector_generator/Cargo.toml b/core/bin/selector_generator/Cargo.toml index b3425c11b4ec..28b3983605b3 100644 --- a/core/bin/selector_generator/Cargo.toml +++ b/core/bin/selector_generator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "selector_generator" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/snapshots_creator/Cargo.toml b/core/bin/snapshots_creator/Cargo.toml index 5a36c646e88e..aa2dde097240 100644 --- a/core/bin/snapshots_creator/Cargo.toml +++ b/core/bin/snapshots_creator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snapshots_creator" description = "Tool to create ZKsync state snapshots" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/system-constants-generator/Cargo.toml b/core/bin/system-constants-generator/Cargo.toml index 7177d29ca743..d3b600ba258f 100644 --- a/core/bin/system-constants-generator/Cargo.toml +++ b/core/bin/system-constants-generator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "system-constants-generator" description = "Tool for generating JSON files with the system constants for L1/L2 contracts" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/verified_sources_fetcher/Cargo.toml b/core/bin/verified_sources_fetcher/Cargo.toml index 5fa90590ed5f..b143cafdbaee 100644 --- a/core/bin/verified_sources_fetcher/Cargo.toml +++ b/core/bin/verified_sources_fetcher/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "verified_sources_fetcher" description = "Tool to fetch verified contract sources" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/zksync_server/Cargo.toml b/core/bin/zksync_server/Cargo.toml index 4cf028be8210..e5eeeb0c79a9 100644 --- a/core/bin/zksync_server/Cargo.toml +++ b/core/bin/zksync_server/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zksync_server" description = "ZKsync validator/sequencer node" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/core/bin/zksync_tee_prover/Cargo.toml b/core/bin/zksync_tee_prover/Cargo.toml index b853da348ee0..303ad30cf2ac 100644 --- a/core/bin/zksync_tee_prover/Cargo.toml +++ b/core/bin/zksync_tee_prover/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "zksync_tee_prover" description = "ZKsync TEE prover" -version = "0.1.0" +version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true diff --git a/deny.toml b/core/deny.toml similarity index 100% rename from deny.toml rename to core/deny.toml diff --git a/rust-toolchain b/core/rust-toolchain similarity index 100% rename from rust-toolchain rename to core/rust-toolchain diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 185f68367c6b..e9fe6d3e3982 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -4744,7 +4744,7 @@ dependencies = [ [[package]] name = "prover_cli" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "assert_cmd", @@ -4777,7 +4777,7 @@ dependencies = [ [[package]] name = "prover_version" -version = "0.1.0" +version = "17.1.1" dependencies = [ "zksync_prover_fri_types", ] @@ -8145,7 +8145,7 @@ dependencies = [ [[package]] name = "zksync_basic_types" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "chrono", @@ -8189,7 +8189,7 @@ dependencies = [ [[package]] name = "zksync_circuit_prover" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8219,7 +8219,7 @@ dependencies = [ [[package]] name = "zksync_circuit_prover_service" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8258,7 +8258,7 @@ dependencies = [ [[package]] name = "zksync_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "rand 0.8.5", @@ -8349,7 +8349,7 @@ dependencies = [ [[package]] name = "zksync_contracts" -version = "0.1.0" +version = "25.3.0" dependencies = [ "envy", "hex", @@ -8362,7 +8362,7 @@ dependencies = [ [[package]] name = "zksync_core_leftovers" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "ctrlc", @@ -8376,7 +8376,7 @@ dependencies = [ [[package]] name = "zksync_crypto_primitives" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "blake2 0.10.6", @@ -8404,7 +8404,7 @@ dependencies = [ [[package]] name = "zksync_dal" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bigdecimal", @@ -8439,7 +8439,7 @@ dependencies = [ [[package]] name = "zksync_db_connection" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "rand 0.8.5", @@ -8455,7 +8455,7 @@ dependencies = [ [[package]] name = "zksync_env_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "envy", @@ -8466,7 +8466,7 @@ dependencies = [ [[package]] name = "zksync_eth_client" -version = "0.1.0" +version = "25.3.0" dependencies = [ "async-trait", "jsonrpsee", @@ -8483,7 +8483,7 @@ dependencies = [ [[package]] name = "zksync_eth_signer" -version = "0.1.0" +version = "25.3.0" dependencies = [ "async-trait", "rlp", @@ -8539,7 +8539,7 @@ dependencies = [ [[package]] name = "zksync_l1_contract_interface" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "hex", @@ -8554,7 +8554,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" -version = "0.1.0" +version = "25.3.0" dependencies = [ "once_cell", "zksync_basic_types", @@ -8563,7 +8563,7 @@ dependencies = [ [[package]] name = "zksync_multivm" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "circuit_sequencer_api 0.133.1", @@ -8593,7 +8593,7 @@ dependencies = [ [[package]] name = "zksync_object_store" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -8629,7 +8629,7 @@ dependencies = [ [[package]] name = "zksync_proof_fri_compressor" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8701,7 +8701,7 @@ dependencies = [ [[package]] name = "zksync_protobuf_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "hex", @@ -8721,7 +8721,7 @@ dependencies = [ [[package]] name = "zksync_prover_autoscaler" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8758,7 +8758,7 @@ dependencies = [ [[package]] name = "zksync_prover_dal" -version = "0.1.0" +version = "17.1.1" dependencies = [ "sqlx", "strum", @@ -8768,7 +8768,7 @@ dependencies = [ [[package]] name = "zksync_prover_fri" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8802,7 +8802,7 @@ dependencies = [ [[package]] name = "zksync_prover_fri_gateway" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8828,7 +8828,7 @@ dependencies = [ [[package]] name = "zksync_prover_fri_types" -version = "0.1.0" +version = "17.1.1" dependencies = [ "circuit_definitions", "serde", @@ -8838,7 +8838,7 @@ dependencies = [ [[package]] name = "zksync_prover_fri_utils" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "regex", @@ -8856,7 +8856,7 @@ dependencies = [ [[package]] name = "zksync_prover_interface" -version = "0.1.0" +version = "25.3.0" dependencies = [ "chrono", "circuit_sequencer_api 0.150.7", @@ -8870,7 +8870,7 @@ dependencies = [ [[package]] name = "zksync_prover_job_monitor" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8892,7 +8892,7 @@ dependencies = [ [[package]] name = "zksync_prover_job_processor" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -8907,7 +8907,7 @@ dependencies = [ [[package]] name = "zksync_prover_keystore" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "bincode", @@ -8930,7 +8930,7 @@ dependencies = [ [[package]] name = "zksync_queued_job_processor" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -8959,7 +8959,7 @@ dependencies = [ [[package]] name = "zksync_system_constants" -version = "0.1.0" +version = "25.3.0" dependencies = [ "once_cell", "zksync_basic_types", @@ -8967,7 +8967,7 @@ dependencies = [ [[package]] name = "zksync_types" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bigdecimal", @@ -8998,7 +8998,7 @@ dependencies = [ [[package]] name = "zksync_utils" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "futures 0.3.31", @@ -9012,7 +9012,7 @@ dependencies = [ [[package]] name = "zksync_vk_setup_data_generator_server_fri" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "circuit_definitions", @@ -9032,7 +9032,7 @@ dependencies = [ [[package]] name = "zksync_vlog" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "chrono", @@ -9077,7 +9077,7 @@ dependencies = [ [[package]] name = "zksync_vm_interface" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -9093,7 +9093,7 @@ dependencies = [ [[package]] name = "zksync_web3_decl" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "async-trait", @@ -9114,7 +9114,7 @@ dependencies = [ [[package]] name = "zksync_witness_generator" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", @@ -9152,7 +9152,7 @@ dependencies = [ [[package]] name = "zksync_witness_vector_generator" -version = "0.1.0" +version = "17.1.1" dependencies = [ "anyhow", "async-trait", diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 15e819d77f7d..a88502abe036 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -4,7 +4,7 @@ members = ["crates/bin/*", "crates/lib/*"] resolver = "2" [workspace.package] -version = "0.1.0" +version = "17.1.1" # x-release-please-version edition = "2021" authors = ["The Matter Labs Team "] homepage = "https://zksync.io/" @@ -76,34 +76,34 @@ wrapper_prover = { package = "zksync-wrapper-prover", version = "=0.151.1" } shivini = "=0.151.1" # Core workspace dependencies -zksync_multivm = { path = "../core/lib/multivm", version = "0.1.0" } -zksync_vlog = { path = "../core/lib/vlog" } -zksync_basic_types = { path = "../core/lib/basic_types" } -zksync_config = { path = "../core/lib/config" } -zksync_dal = { path = "../core/lib/dal" } -zksync_db_connection = { path = "../core/lib/db_connection" } -zksync_env_config = { path = "../core/lib/env_config" } -zksync_object_store = { path = "../core/lib/object_store" } -zksync_prover_interface = { path = "../core/lib/prover_interface" } -zksync_queued_job_processor = { path = "../core/lib/queued_job_processor" } -zksync_system_constants = { path = "../core/lib/constants" } -zksync_types = { path = "../core/lib/types" } -zksync_utils = { path = "../core/lib/utils" } -zksync_eth_client = { path = "../core/lib/eth_client" } -zksync_contracts = { path = "../core/lib/contracts" } -zksync_core_leftovers = { path = "../core/lib/zksync_core_leftovers" } -zksync_periodic_job = { path = "../core/lib/periodic_job" } -zksync_protobuf_config = { path = "../core/lib/protobuf_config" } +zksync_multivm = { version = "25.3.0", path = "../core/lib/multivm"} +zksync_vlog = { version = "25.3.0", path = "../core/lib/vlog" } +zksync_basic_types = { version = "25.3.0", path = "../core/lib/basic_types" } +zksync_config = { version = "25.3.0", path = "../core/lib/config" } +zksync_dal = { version = "25.3.0", path = "../core/lib/dal" } +zksync_db_connection = { version = "25.3.0", path = "../core/lib/db_connection" } +zksync_env_config = { version = "25.3.0", path = "../core/lib/env_config" } +zksync_object_store = { version = "25.3.0", path = "../core/lib/object_store" } +zksync_prover_interface = { version = "25.3.0", path = "../core/lib/prover_interface" } +zksync_queued_job_processor = { version = "25.3.0", path = "../core/lib/queued_job_processor" } +zksync_system_constants = { version = "25.3.0", path = "../core/lib/constants" } +zksync_types = { version = "25.3.0", path = "../core/lib/types" } +zksync_utils = { version = "25.3.0", path = "../core/lib/utils" } +zksync_eth_client = { version = "25.3.0", path = "../core/lib/eth_client" } +zksync_contracts = { version = "25.3.0", path = "../core/lib/contracts" } +zksync_core_leftovers = { version = "25.3.0", path = "../core/lib/zksync_core_leftovers" } +zksync_periodic_job = { version = "25.3.0", path = "../core/lib/periodic_job" } +zksync_protobuf_config = { version = "25.3.0", path = "../core/lib/protobuf_config" } # Prover workspace dependencies -zksync_prover_dal = { path = "crates/lib/prover_dal" } -zksync_prover_fri_types = { path = "crates/lib/prover_fri_types" } -zksync_prover_fri_utils = { path = "crates/lib/prover_fri_utils" } -zksync_prover_keystore = { path = "crates/lib/keystore" } -zksync_vk_setup_data_generator_server_fri = { path = "crates/bin/vk_setup_data_generator_server_fri" } -zksync_prover_job_processor = { path = "crates/lib/prover_job_processor" } -zksync_circuit_prover_service = { path = "crates/lib/circuit_prover_service" } -zksync_prover_job_monitor = { path = "crates/bin/prover_job_monitor" } +zksync_prover_dal = { version = "17.1.1", path = "crates/lib/prover_dal" } +zksync_prover_fri_types = { version = "17.1.1", path = "crates/lib/prover_fri_types" } +zksync_prover_fri_utils = { version = "17.1.1", path = "crates/lib/prover_fri_utils" } +zksync_prover_keystore = { version = "17.1.1", path = "crates/lib/keystore" } +zksync_vk_setup_data_generator_server_fri = { version = "17.1.1", path = "crates/bin/vk_setup_data_generator_server_fri" } +zksync_prover_job_processor = { version = "17.1.1", path = "crates/lib/prover_job_processor" } +zksync_circuit_prover_service = { version = "17.1.1", path = "crates/lib/circuit_prover_service" } +zksync_prover_job_monitor = { version = "17.1.1", path = "crates/bin/prover_job_monitor" } # for `perf` profiling [profile.perf] diff --git a/prover/rust-toolchain b/prover/rust-toolchain index 03c040b91f1f..bc5d1d6bbd8e 100644 --- a/prover/rust-toolchain +++ b/prover/rust-toolchain @@ -1 +1,2 @@ -nightly-2024-08-01 +[toolchain] +channel = "nightly-2024-08-01" diff --git a/zkstack_cli/Cargo.lock b/zkstack_cli/Cargo.lock index 900ac677fd61..921075216f40 100644 --- a/zkstack_cli/Cargo.lock +++ b/zkstack_cli/Cargo.lock @@ -701,31 +701,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" -[[package]] -name = "common" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap", - "cliclack", - "console", - "ethers", - "futures", - "git_version_macro", - "once_cell", - "serde", - "serde_json", - "serde_yaml", - "sqlx", - "strum", - "thiserror", - "tokio", - "toml", - "types", - "url", - "xshell", -] - [[package]] name = "common-path" version = "1.0.0" @@ -747,29 +722,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "config" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap", - "common", - "ethers", - "rand", - "serde", - "serde_json", - "serde_yaml", - "strum", - "thiserror", - "types", - "url", - "xshell", - "zksync_basic_types", - "zksync_config", - "zksync_protobuf", - "zksync_protobuf_config", -] - [[package]] name = "configparser" version = "3.1.0" @@ -1987,13 +1939,6 @@ version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" -[[package]] -name = "git_version_macro" -version = "0.1.0" -dependencies = [ - "chrono", -] - [[package]] name = "glob" version = "0.3.1" @@ -5894,18 +5839,6 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "types" -version = "0.1.0" -dependencies = [ - "clap", - "ethers", - "serde", - "strum", - "thiserror", - "zksync_basic_types", -] - [[package]] name = "uint" version = "0.9.5" @@ -6707,7 +6640,7 @@ dependencies = [ [[package]] name = "zkstack" -version = "0.1.0" +version = "0.1.2" dependencies = [ "anyhow", "chrono", @@ -6715,8 +6648,6 @@ dependencies = [ "clap-markdown", "clap_complete", "cliclack", - "common", - "config", "dirs", "ethers", "futures", @@ -6735,9 +6666,11 @@ dependencies = [ "thiserror", "tokio", "toml", - "types", "url", "xshell", + "zkstack_common", + "zkstack_config", + "zkstack_types", "zksync_basic_types", "zksync_config", "zksync_consensus_crypto", @@ -6748,9 +6681,76 @@ dependencies = [ "zksync_protobuf_config", ] +[[package]] +name = "zkstack_common" +version = "0.1.2" +dependencies = [ + "anyhow", + "clap", + "cliclack", + "console", + "ethers", + "futures", + "once_cell", + "serde", + "serde_json", + "serde_yaml", + "sqlx", + "strum", + "thiserror", + "tokio", + "toml", + "url", + "xshell", + "zkstack_git_version_macro", + "zkstack_types", +] + +[[package]] +name = "zkstack_config" +version = "0.1.2" +dependencies = [ + "anyhow", + "clap", + "ethers", + "rand", + "serde", + "serde_json", + "serde_yaml", + "strum", + "thiserror", + "url", + "xshell", + "zkstack_common", + "zkstack_types", + "zksync_basic_types", + "zksync_config", + "zksync_protobuf", + "zksync_protobuf_config", +] + +[[package]] +name = "zkstack_git_version_macro" +version = "0.1.2" +dependencies = [ + "chrono", +] + +[[package]] +name = "zkstack_types" +version = "0.1.2" +dependencies = [ + "clap", + "ethers", + "serde", + "strum", + "thiserror", + "zksync_basic_types", +] + [[package]] name = "zksync_basic_types" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "chrono", @@ -6771,9 +6771,9 @@ dependencies = [ [[package]] name = "zksync_concurrency" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c24c9a056499823227503dd9e5fb3037d93bcc3ae9b06c1ac0a47334c6283af" +checksum = "e8312ab73d3caa55775bd531795b507fa8f76bd9dabfaeb0954fe43e8fc1323b" dependencies = [ "anyhow", "once_cell", @@ -6790,7 +6790,7 @@ dependencies = [ [[package]] name = "zksync_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "rand", @@ -6804,9 +6804,9 @@ dependencies = [ [[package]] name = "zksync_consensus_crypto" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da303b01f24283e93f80f361bf62c3df4a761d061c8b38b4faebeebf26362fc" +checksum = "86b539960de98df3c3bd27d2d9b97de862027686bbb3bdfc5aaad5b74bb929a1" dependencies = [ "anyhow", "blst", @@ -6825,9 +6825,9 @@ dependencies = [ [[package]] name = "zksync_consensus_roles" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f07db2a8ec2d2cda5cb4c5ac408101e81c8fa5d95c9f3302829dafae78d11c" +checksum = "c49949546895a10431b9daec6ec4208ef0917ace006446d304b51f5b234ba462" dependencies = [ "anyhow", "bit-vec", @@ -6847,9 +6847,9 @@ dependencies = [ [[package]] name = "zksync_consensus_utils" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3222410c67617a86edb192e0c4bb48afc254a17052200a0a839c90e8b0378842" +checksum = "723e2a4b056cc5af192a83163c89a6951ee75c098cc5c4a4cdc435f4232d88bd" dependencies = [ "anyhow", "rand", @@ -6859,7 +6859,7 @@ dependencies = [ [[package]] name = "zksync_contracts" -version = "0.1.0" +version = "25.3.0" dependencies = [ "envy", "hex", @@ -6872,7 +6872,7 @@ dependencies = [ [[package]] name = "zksync_crypto_primitives" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "blake2", @@ -6888,7 +6888,7 @@ dependencies = [ [[package]] name = "zksync_mini_merkle_tree" -version = "0.1.0" +version = "25.3.0" dependencies = [ "once_cell", "zksync_basic_types", @@ -6897,9 +6897,9 @@ dependencies = [ [[package]] name = "zksync_protobuf" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05755c38b134b409736008bfdfd0fdb42bfa061947be93be4c78069aa10c9b3" +checksum = "e8986ad796f8e00d8999fee72effba1a21bce40f5f877d681ac9cd89a94834d8" dependencies = [ "anyhow", "bit-vec", @@ -6918,9 +6918,9 @@ dependencies = [ [[package]] name = "zksync_protobuf_build" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c3930a73ca667780be6dcd94e469d40a93fa52f4654c9ab732991b62238cb5" +checksum = "8d870b31995e3acb8e47afeb68ebeeffcf6121e70020e65b3d5d31692115d236" dependencies = [ "anyhow", "heck", @@ -6935,7 +6935,7 @@ dependencies = [ [[package]] name = "zksync_protobuf_config" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "hex", @@ -6946,6 +6946,7 @@ dependencies = [ "serde_yaml", "tracing", "zksync_basic_types", + "zksync_concurrency", "zksync_config", "zksync_protobuf", "zksync_protobuf_build", @@ -6954,7 +6955,7 @@ dependencies = [ [[package]] name = "zksync_system_constants" -version = "0.1.0" +version = "25.3.0" dependencies = [ "once_cell", "zksync_basic_types", @@ -6962,7 +6963,7 @@ dependencies = [ [[package]] name = "zksync_types" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "bigdecimal", @@ -6993,7 +6994,7 @@ dependencies = [ [[package]] name = "zksync_utils" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "futures", @@ -7007,7 +7008,7 @@ dependencies = [ [[package]] name = "zksync_vlog" -version = "0.1.0" +version = "25.3.0" dependencies = [ "anyhow", "chrono", diff --git a/zkstack_cli/Cargo.toml b/zkstack_cli/Cargo.toml index 29a0e5bc43c6..b2d0e17d49b8 100644 --- a/zkstack_cli/Cargo.toml +++ b/zkstack_cli/Cargo.toml @@ -9,7 +9,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.1.0" +version = "0.1.2" # x-release-please-version edition = "2021" homepage = "https://zksync.io/" license = "MIT OR Apache-2.0" @@ -21,15 +21,15 @@ keywords = ["zk", "cryptography", "blockchain", "ZKStack", "ZKsync"] [workspace.dependencies] # Local dependencies -common = { path = "crates/common" } -config = { path = "crates/config" } -types = { path = "crates/types" } -git_version_macro = { path = "crates/git_version_macro" } +zkstack_common = { version = "0.1.2", path = "crates/common" } +zkstack_config = { version = "0.1.2", path = "crates/config" } +zkstack_types = { version = "0.1.2", path = "crates/types" } +zkstack_git_version_macro = { version = "0.1.2", path = "crates/git_version_macro" } # ZkSync deps -zksync_config = { path = "../core/lib/config" } -zksync_protobuf_config = { path = "../core/lib/protobuf_config" } -zksync_basic_types = { path = "../core/lib/basic_types" } +zksync_config = { version = "25.3.0", path = "../core/lib/config" } +zksync_protobuf_config = { version = "25.3.0", path = "../core/lib/protobuf_config" } +zksync_basic_types = { version = "25.3.0", path = "../core/lib/basic_types" } zksync_consensus_roles = "=0.7.0" zksync_consensus_crypto = "=0.7.0" zksync_consensus_utils = "=0.7.0" diff --git a/zkstack_cli/crates/common/Cargo.toml b/zkstack_cli/crates/common/Cargo.toml index 5fdf481bea6f..c24b00572226 100644 --- a/zkstack_cli/crates/common/Cargo.toml +++ b/zkstack_cli/crates/common/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "common" -version = "0.1.0" +name = "zkstack_common" +version.workspace = true edition.workspace = true homepage.workspace = true license.workspace = true @@ -24,9 +24,9 @@ serde_yaml.workspace = true sqlx.workspace = true tokio.workspace = true toml.workspace = true -types.workspace = true +zkstack_types.workspace = true url.workspace = true xshell.workspace = true thiserror.workspace = true strum.workspace = true -git_version_macro.workspace = true +zkstack_git_version_macro.workspace = true diff --git a/zkstack_cli/crates/common/src/ethereum.rs b/zkstack_cli/crates/common/src/ethereum.rs index 2100746fecff..8fb814b59222 100644 --- a/zkstack_cli/crates/common/src/ethereum.rs +++ b/zkstack_cli/crates/common/src/ethereum.rs @@ -8,7 +8,7 @@ use ethers::{ providers::Middleware, types::{Address, TransactionRequest}, }; -use types::TokenInfo; +use zkstack_types::TokenInfo; use crate::{logger, wallets::Wallet}; diff --git a/zkstack_cli/crates/common/src/version.rs b/zkstack_cli/crates/common/src/version.rs index 43be7a07b7ee..2b6649713b24 100644 --- a/zkstack_cli/crates/common/src/version.rs +++ b/zkstack_cli/crates/common/src/version.rs @@ -1,7 +1,7 @@ -const GIT_VERSION: &str = git_version_macro::build_git_revision!(); -const GIT_BRANCH: &str = git_version_macro::build_git_branch!(); -const GIT_SUBMODULES: &[(&str, &str)] = git_version_macro::build_git_submodules!(); -const BUILD_TIMESTAMP: &str = git_version_macro::build_timestamp!(); +const GIT_VERSION: &str = zkstack_git_version_macro::build_git_revision!(); +const GIT_BRANCH: &str = zkstack_git_version_macro::build_git_branch!(); +const GIT_SUBMODULES: &[(&str, &str)] = zkstack_git_version_macro::build_git_submodules!(); +const BUILD_TIMESTAMP: &str = zkstack_git_version_macro::build_timestamp!(); /// Returns a multi-line version message that includes: /// - provided crate version diff --git a/zkstack_cli/crates/common/src/wallets.rs b/zkstack_cli/crates/common/src/wallets.rs index 43a9864474cc..8f48957704ad 100644 --- a/zkstack_cli/crates/common/src/wallets.rs +++ b/zkstack_cli/crates/common/src/wallets.rs @@ -4,7 +4,7 @@ use ethers::{ types::{Address, H256}, }; use serde::{Deserialize, Serialize}; -use types::parse_h256; +use zkstack_types::parse_h256; #[derive(Serialize, Deserialize)] struct WalletSerde { diff --git a/zkstack_cli/crates/config/Cargo.toml b/zkstack_cli/crates/config/Cargo.toml index 9320beffef22..b0c18b150075 100644 --- a/zkstack_cli/crates/config/Cargo.toml +++ b/zkstack_cli/crates/config/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "config" -version = "0.1.0" +name = "zkstack_config" +version.workspace = true edition.workspace = true homepage.workspace = true license.workspace = true @@ -13,7 +13,7 @@ keywords.workspace = true [dependencies] anyhow.workspace = true clap.workspace = true -common.workspace = true +zkstack_common.workspace = true ethers.workspace = true rand.workspace = true serde.workspace = true @@ -21,7 +21,7 @@ serde_json.workspace = true serde_yaml.workspace = true strum.workspace = true thiserror.workspace = true -types.workspace = true +zkstack_types.workspace = true url.workspace = true xshell.workspace = true diff --git a/zkstack_cli/crates/config/src/chain.rs b/zkstack_cli/crates/config/src/chain.rs index c8fa0717dff5..e07954831dac 100644 --- a/zkstack_cli/crates/config/src/chain.rs +++ b/zkstack_cli/crates/config/src/chain.rs @@ -4,7 +4,7 @@ use std::{ }; use serde::{Deserialize, Serialize, Serializer}; -use types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; +use zkstack_types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; use xshell::Shell; use zksync_basic_types::L2ChainId; diff --git a/zkstack_cli/crates/config/src/ecosystem.rs b/zkstack_cli/crates/config/src/ecosystem.rs index c67aebf2a46c..e6b7977902a4 100644 --- a/zkstack_cli/crates/config/src/ecosystem.rs +++ b/zkstack_cli/crates/config/src/ecosystem.rs @@ -3,10 +3,10 @@ use std::{ path::{Path, PathBuf}, }; -use common::{config::global_config, logger}; +use zkstack_common::{config::global_config, logger}; use serde::{Deserialize, Serialize, Serializer}; use thiserror::Error; -use types::{L1Network, ProverMode, WalletCreation}; +use zkstack_types::{L1Network, ProverMode, WalletCreation}; use xshell::Shell; use zksync_basic_types::L2ChainId; diff --git a/zkstack_cli/crates/config/src/explorer_compose.rs b/zkstack_cli/crates/config/src/explorer_compose.rs index 13dd665d2e3d..f414505b946b 100644 --- a/zkstack_cli/crates/config/src/explorer_compose.rs +++ b/zkstack_cli/crates/config/src/explorer_compose.rs @@ -4,7 +4,7 @@ use std::{ }; use anyhow::Context; -use common::{db, docker::adjust_localhost_for_docker}; +use zkstack_common::{db, docker::adjust_localhost_for_docker}; use serde::{Deserialize, Serialize}; use url::Url; diff --git a/zkstack_cli/crates/config/src/forge_interface/register_chain/input.rs b/zkstack_cli/crates/config/src/forge_interface/register_chain/input.rs index fb7c606a4569..ddbbe4042131 100644 --- a/zkstack_cli/crates/config/src/forge_interface/register_chain/input.rs +++ b/zkstack_cli/crates/config/src/forge_interface/register_chain/input.rs @@ -1,7 +1,7 @@ use ethers::types::Address; use rand::Rng; use serde::{Deserialize, Serialize}; -use types::L1BatchCommitmentMode; +use zkstack_types::L1BatchCommitmentMode; use zksync_basic_types::L2ChainId; use crate::{traits::ZkStackConfig, ChainConfig, ContractsConfig}; diff --git a/zkstack_cli/crates/config/src/general.rs b/zkstack_cli/crates/config/src/general.rs index 0079105b66ca..21cb85bca16a 100644 --- a/zkstack_cli/crates/config/src/general.rs +++ b/zkstack_cli/crates/config/src/general.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use anyhow::Context; -use common::yaml::merge_yaml; +use zkstack_common::yaml::merge_yaml; use url::Url; use xshell::Shell; use zksync_config::configs::object_store::ObjectStoreMode; diff --git a/zkstack_cli/crates/config/src/portal.rs b/zkstack_cli/crates/config/src/portal.rs index 2b6f0ffd5156..ecce00bb3dd7 100644 --- a/zkstack_cli/crates/config/src/portal.rs +++ b/zkstack_cli/crates/config/src/portal.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use serde::{Deserialize, Serialize}; -use types::TokenInfo; +use zkstack_types::TokenInfo; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/config/src/secrets.rs b/zkstack_cli/crates/config/src/secrets.rs index cf0a9927c560..527f980dfabe 100644 --- a/zkstack_cli/crates/config/src/secrets.rs +++ b/zkstack_cli/crates/config/src/secrets.rs @@ -1,7 +1,7 @@ use std::{path::Path, str::FromStr}; use anyhow::Context; -use common::db::DatabaseConfig; +use zkstack_common::db::DatabaseConfig; use xshell::Shell; use zksync_basic_types::url::SensitiveUrl; pub use zksync_config::configs::Secrets as SecretsConfig; diff --git a/zkstack_cli/crates/config/src/traits.rs b/zkstack_cli/crates/config/src/traits.rs index a4a4ad22c613..e961c9292e01 100644 --- a/zkstack_cli/crates/config/src/traits.rs +++ b/zkstack_cli/crates/config/src/traits.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; use anyhow::{bail, Context}; -use common::files::{ +use zkstack_common::files::{ read_json_file, read_toml_file, read_yaml_file, save_json_file, save_toml_file, save_yaml_file, }; use serde::{de::DeserializeOwned, Serialize}; diff --git a/zkstack_cli/crates/config/src/wallet_creation.rs b/zkstack_cli/crates/config/src/wallet_creation.rs index 6cfdf08a36d3..c3dfa0f5ee28 100644 --- a/zkstack_cli/crates/config/src/wallet_creation.rs +++ b/zkstack_cli/crates/config/src/wallet_creation.rs @@ -1,8 +1,8 @@ use std::path::{Path, PathBuf}; -use common::wallets::Wallet; +use zkstack_common::wallets::Wallet; use rand::thread_rng; -use types::WalletCreation; +use zkstack_types::WalletCreation; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/config/src/wallets.rs b/zkstack_cli/crates/config/src/wallets.rs index 735848f6e34d..91ceb1f7006a 100644 --- a/zkstack_cli/crates/config/src/wallets.rs +++ b/zkstack_cli/crates/config/src/wallets.rs @@ -1,4 +1,4 @@ -use common::wallets::Wallet; +use zkstack_common::wallets::Wallet; use rand::{CryptoRng, Rng}; use serde::{Deserialize, Serialize}; diff --git a/zkstack_cli/crates/git_version_macro/Cargo.toml b/zkstack_cli/crates/git_version_macro/Cargo.toml index eb70b450a4cf..e1095147ded1 100644 --- a/zkstack_cli/crates/git_version_macro/Cargo.toml +++ b/zkstack_cli/crates/git_version_macro/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "git_version_macro" +name = "zkstack_git_version_macro" edition = "2021" description = "Procedural macro to generate metainformation about build in compile time" version.workspace = true diff --git a/zkstack_cli/crates/types/Cargo.toml b/zkstack_cli/crates/types/Cargo.toml index 97e00e1ba46b..fc1a67695fb3 100644 --- a/zkstack_cli/crates/types/Cargo.toml +++ b/zkstack_cli/crates/types/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "types" -version = "0.1.0" +name = "zkstack_types" +version.workspace = true edition.workspace = true homepage.workspace = true license.workspace = true diff --git a/zkstack_cli/crates/zkstack/Cargo.toml b/zkstack_cli/crates/zkstack/Cargo.toml index 85ab8081eaa4..5154eddf6771 100644 --- a/zkstack_cli/crates/zkstack/Cargo.toml +++ b/zkstack_cli/crates/zkstack/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zkstack" -version = "0.1.0" +version.workspace = true edition.workspace = true homepage.workspace = true license.workspace = true @@ -17,8 +17,8 @@ clap.workspace = true clap_complete.workspace = true clap-markdown.workspace = true cliclack.workspace = true -common.workspace = true -config.workspace = true +zkstack_common.workspace = true +zkstack_config.workspace = true dirs.workspace = true ethers.workspace = true futures.workspace = true @@ -34,7 +34,7 @@ sqruff-lib = "0.19.0" thiserror.workspace = true tokio.workspace = true toml.workspace = true -types.workspace = true +zkstack_types.workspace = true url.workspace = true xshell.workspace = true zksync_basic_types.workspace = true diff --git a/zkstack_cli/crates/zkstack/src/accept_ownership.rs b/zkstack_cli/crates/zkstack/src/accept_ownership.rs index 73dfd8082708..16ea97d628a4 100644 --- a/zkstack_cli/crates/zkstack/src/accept_ownership.rs +++ b/zkstack_cli/crates/zkstack/src/accept_ownership.rs @@ -1,9 +1,9 @@ -use common::{ +use zkstack_common::{ forge::{Forge, ForgeScript, ForgeScriptArgs}, spinner::Spinner, wallets::Wallet, }; -use config::{forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, EcosystemConfig}; +use zkstack_config::{forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, EcosystemConfig}; use ethers::{abi::parse_abi, contract::BaseContract, types::Address}; use lazy_static::lazy_static; use xshell::Shell; diff --git a/zkstack_cli/crates/zkstack/src/commands/args/containers.rs b/zkstack_cli/crates/zkstack/src/commands/args/containers.rs index c996d65598ff..c68be165a71c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/args/containers.rs +++ b/zkstack_cli/crates/zkstack/src/commands/args/containers.rs @@ -16,7 +16,7 @@ pub struct ContainersArgsFinal { impl ContainersArgs { pub fn fill_values_with_prompt(self) -> ContainersArgsFinal { let observability = self.observability.unwrap_or_else(|| { - common::PromptConfirm::new(MSG_OBSERVABILITY_RUN_PROMPT) + zkstack_common::PromptConfirm::new(MSG_OBSERVABILITY_RUN_PROMPT) .default(true) .ask() }); diff --git a/zkstack_cli/crates/zkstack/src/commands/args/wait.rs b/zkstack_cli/crates/zkstack/src/commands/args/wait.rs index a3a7e32ae8b4..f825865de1dd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/args/wait.rs +++ b/zkstack_cli/crates/zkstack/src/commands/args/wait.rs @@ -2,7 +2,7 @@ use std::{fmt, future::Future, time::Duration}; use anyhow::Context as _; use clap::Parser; -use common::logger; +use zkstack_common::logger; use reqwest::StatusCode; use serde::{Deserialize, Serialize}; use tokio::time::MissedTickBehavior; diff --git a/zkstack_cli/crates/zkstack/src/commands/autocomplete.rs b/zkstack_cli/crates/zkstack/src/commands/autocomplete.rs index 0f2105cd5efa..ca081ddcd457 100644 --- a/zkstack_cli/crates/zkstack/src/commands/autocomplete.rs +++ b/zkstack_cli/crates/zkstack/src/commands/autocomplete.rs @@ -6,7 +6,7 @@ use std::{ use anyhow::Context; use clap::CommandFactory; use clap_complete::{generate, Generator}; -use common::logger; +use zkstack_common::logger; use super::args::AutocompleteArgs; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs b/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs index cf3e2981b3c7..52c1f9b374cc 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/accept_chain_ownership.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{forge::ForgeScriptArgs, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{forge::ForgeScriptArgs, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/build_transactions.rs index 793bea487f7e..21f34dab1060 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/build_transactions.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use clap::Parser; -use common::{config::global_config, forge::ForgeScriptArgs, Prompt}; +use zkstack_common::{config::global_config, forge::ForgeScriptArgs, Prompt}; use serde::{Deserialize, Serialize}; use url::Url; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs index ec37f9ba0304..4327efb7d766 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/create.rs @@ -2,12 +2,12 @@ use std::{path::PathBuf, str::FromStr}; use anyhow::{bail, Context}; use clap::{Parser, ValueEnum, ValueHint}; -use common::{Prompt, PromptConfirm, PromptSelect}; -use config::forge_interface::deploy_ecosystem::output::Erc20Token; +use zkstack_common::{Prompt, PromptConfirm, PromptSelect}; +use zkstack_config::forge_interface::deploy_ecosystem::output::Erc20Token; use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use strum::{Display, EnumIter, IntoEnumIterator}; -use types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; +use zkstack_types::{BaseToken, L1BatchCommitmentMode, L1Network, ProverMode, WalletCreation}; use zksync_basic_types::H160; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/genesis.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/genesis.rs index f990cbfd77da..7181ce0c777f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/genesis.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/genesis.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Parser; -use common::{db::DatabaseConfig, Prompt}; -use config::ChainConfig; +use zkstack_common::{db::DatabaseConfig, Prompt}; +use zkstack_config::ChainConfig; use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use url::Url; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs index b34809643cf5..df8d72358b0e 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/configs.rs @@ -1,8 +1,8 @@ use clap::Parser; -use common::Prompt; -use config::ChainConfig; +use zkstack_common::Prompt; +use zkstack_config::ChainConfig; use serde::{Deserialize, Serialize}; -use types::L1Network; +use zkstack_types::L1Network; use url::Url; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs index a5c7a6890ca1..f4b9db350b19 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/args/init/mod.rs @@ -1,8 +1,8 @@ use clap::Parser; -use common::{forge::ForgeScriptArgs, Prompt}; -use config::ChainConfig; +use zkstack_common::{forge::ForgeScriptArgs, Prompt}; +use zkstack_config::ChainConfig; use serde::{Deserialize, Serialize}; -use types::L1Network; +use zkstack_types::L1Network; use url::Url; use crate::{ @@ -56,7 +56,7 @@ impl InitArgs { true } else { self.deploy_paymaster.unwrap_or_else(|| { - common::PromptConfirm::new(MSG_DEPLOY_PAYMASTER_PROMPT) + zkstack_common::PromptConfirm::new(MSG_DEPLOY_PAYMASTER_PROMPT) .default(true) .ask() }) diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs index d3953c656596..0d399be4a830 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/build_transactions.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{git, logger, spinner::Spinner}; -use config::{ +use zkstack_common::{git, logger, spinner::Spinner}; +use zkstack_config::{ copy_configs, traits::SaveConfigWithBasePath, update_from_chain_config, EcosystemConfig, }; use ethers::utils::hex::ToHex; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/common.rs b/zkstack_cli/crates/zkstack/src/commands/chain/common.rs index 0c35b3ee4fe0..6d6340364749 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/common.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/common.rs @@ -1,6 +1,6 @@ -use common::spinner::Spinner; -use config::{ChainConfig, EcosystemConfig}; -use types::{BaseToken, L1Network, WalletCreation}; +use zkstack_common::spinner::Spinner; +use zkstack_config::{ChainConfig, EcosystemConfig}; +use zkstack_types::{BaseToken, L1Network, WalletCreation}; use crate::{ consts::AMOUNT_FOR_DISTRIBUTION_TO_WALLETS, @@ -30,7 +30,7 @@ pub async fn distribute_eth( if let Some(setter) = chain_wallets.token_multiplier_setter { addresses.push(setter.address) } - common::ethereum::distribute_eth( + zkstack_common::ethereum::distribute_eth( wallets.operator, addresses, l1_rpc_url, @@ -59,7 +59,7 @@ pub async fn mint_base_token( let addresses = vec![wallets.governor.address, chain_wallets.governor.address]; let amount = AMOUNT_FOR_DISTRIBUTION_TO_WALLETS * base_token.nominator as u128 / base_token.denominator as u128; - common::ethereum::mint_token( + zkstack_common::ethereum::mint_token( wallets.governor, base_token.address, addresses, diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/create.rs b/zkstack_cli/crates/zkstack/src/commands/chain/create.rs index 730c1df8d3f2..a401d7c5896f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/create.rs @@ -1,8 +1,8 @@ use std::cell::OnceCell; use anyhow::Context; -use common::{logger, spinner::Spinner}; -use config::{ +use zkstack_common::{logger, spinner::Spinner}; +use zkstack_config::{ create_local_configs_dir, create_wallets, traits::{ReadConfigWithBasePath, SaveConfigWithBasePath}, ChainConfig, EcosystemConfig, GenesisConfig, diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs index 4164f9a05a2a..2f87117519e5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_l2_contracts.rs @@ -1,12 +1,12 @@ use std::path::Path; use anyhow::Context; -use common::{ +use zkstack_common::{ contracts::build_l2_contracts, forge::{Forge, ForgeScriptArgs}, spinner::Spinner, }; -use config::{ +use zkstack_config::{ forge_interface::{ deploy_l2_contracts::{ input::DeployL2ContractsInput, diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs index 4bcfd6c08099..5319fb4bd16c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/deploy_paymaster.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::forge::{Forge, ForgeScriptArgs}; -use config::{ +use zkstack_common::forge::{Forge, ForgeScriptArgs}; +use zkstack_config::{ forge_interface::{ paymaster::{DeployPaymasterInput, DeployPaymasterOutput}, script_params::DEPLOY_PAYMASTER_SCRIPT_PARAMS, diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs index edf480946be1..6831d2ec67ae 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/database.rs @@ -1,16 +1,16 @@ use std::path::PathBuf; use anyhow::Context; -use common::{ +use zkstack_common::{ config::global_config, db::{drop_db_if_exists, init_db, migrate_db, DatabaseConfig}, logger, }; -use config::{ +use zkstack_config::{ override_config, set_file_artifacts, set_rocks_db_config, set_server_database, traits::SaveConfigWithBasePath, ChainConfig, EcosystemConfig, FileArtifacts, }; -use types::ProverMode; +use zkstack_types::ProverMode; use xshell::Shell; use zksync_basic_types::commitment::L1BatchCommitmentMode; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs index c1cc03174aeb..de70bc09b153 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/mod.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::{command, Parser, Subcommand}; -use common::{logger, spinner::Spinner}; -use config::{ChainConfig, EcosystemConfig}; +use zkstack_common::{logger, spinner::Spinner}; +use zkstack_config::{ChainConfig, EcosystemConfig}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs index 50a74b7ea9e4..1bddcbf29c8c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/genesis/server.rs @@ -1,10 +1,10 @@ use anyhow::Context; -use common::{ +use zkstack_common::{ logger, server::{Server, ServerMode}, spinner::Spinner, }; -use config::{ +use zkstack_config::{ traits::FileConfigWithDefaultName, ChainConfig, ContractsConfig, EcosystemConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, }; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs index 31c5c681e7d3..144190efcd5a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/configs.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::logger; -use config::{ +use zkstack_common::logger; +use zkstack_config::{ copy_configs, set_l1_rpc_url, traits::SaveConfigWithBasePath, update_from_chain_config, ChainConfig, ContractsConfig, EcosystemConfig, }; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs index d92c56d2eb10..5aae2d012850 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/init/mod.rs @@ -1,8 +1,8 @@ use anyhow::Context; use clap::{command, Parser, Subcommand}; -use common::{git, logger, spinner::Spinner}; -use config::{traits::SaveConfigWithBasePath, ChainConfig, EcosystemConfig}; -use types::BaseToken; +use zkstack_common::{git, logger, spinner::Spinner}; +use zkstack_config::{traits::SaveConfigWithBasePath, ChainConfig, EcosystemConfig}; +use zkstack_types::BaseToken; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs index 82b8656154ab..8a5cccd3cdbf 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/mod.rs @@ -1,4 +1,4 @@ -use ::common::forge::ForgeScriptArgs; +use ::zkstack_common::forge::ForgeScriptArgs; use args::build_transactions::BuildTransactionsArgs; pub(crate) use args::create::ChainCreateArgsFinal; use clap::{command, Subcommand}; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs b/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs index 42b3bbd59c71..ef41670cf381 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/register_chain.rs @@ -1,10 +1,10 @@ use anyhow::Context; -use common::{ +use zkstack_common::{ forge::{Forge, ForgeScriptArgs}, logger, spinner::Spinner, }; -use config::{ +use zkstack_config::{ forge_interface::{ register_chain::{input::RegisterChainL1Config, output::RegisterChainOutput}, script_params::REGISTER_CHAIN_SCRIPT_PARAMS, diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs b/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs index 326aa393f8f2..8cef310fd4fc 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/set_token_multiplier_setter.rs @@ -1,11 +1,11 @@ use anyhow::Context; -use common::{ +use zkstack_common::{ forge::{Forge, ForgeScript, ForgeScriptArgs}, logger, spinner::Spinner, wallets::Wallet, }; -use config::{forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, EcosystemConfig}; +use zkstack_config::{forge_interface::script_params::ACCEPT_GOVERNANCE_SCRIPT_PARAMS, EcosystemConfig}; use ethers::{abi::parse_abi, contract::BaseContract, utils::hex}; use lazy_static::lazy_static; use xshell::Shell; diff --git a/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs b/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs index a05ef04eee3e..3bae10c6fdfe 100644 --- a/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs +++ b/zkstack_cli/crates/zkstack/src/commands/chain/setup_legacy_bridge.rs @@ -1,9 +1,9 @@ use anyhow::Context; -use common::{ +use zkstack_common::{ forge::{Forge, ForgeScriptArgs}, spinner::Spinner, }; -use config::{ +use zkstack_config::{ forge_interface::{ script_params::SETUP_LEGACY_BRIDGE, setup_legacy_bridge::SetupLegacyBridgeInput, }, diff --git a/zkstack_cli/crates/zkstack/src/commands/consensus/mod.rs b/zkstack_cli/crates/zkstack/src/commands/consensus/mod.rs index 7a998efedbf2..0eb1242122b4 100644 --- a/zkstack_cli/crates/zkstack/src/commands/consensus/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/consensus/mod.rs @@ -3,8 +3,8 @@ use std::{borrow::Borrow, collections::HashMap, path::PathBuf, sync::Arc}; /// Consensus registry contract operations. /// Includes code duplicated from `zksync_node_consensus::registry::abi`. use anyhow::Context as _; -use common::{config::global_config, logger, wallets::Wallet}; -use config::EcosystemConfig; +use zkstack_common::{config::global_config, logger, wallets::Wallet}; +use zkstack_config::EcosystemConfig; use conv::*; use ethers::{ abi::Detokenize, @@ -144,10 +144,10 @@ fn print_attesters(committee: &attester::Committee) { } struct Setup { - chain: config::ChainConfig, - contracts: config::ContractsConfig, - general: config::GeneralConfig, - genesis: config::GenesisConfig, + chain: zkstack_config::ChainConfig, + contracts: zkstack_config::ContractsConfig, + general: zkstack_config::GeneralConfig, + genesis: zkstack_config::GenesisConfig, } impl Setup { diff --git a/zkstack_cli/crates/zkstack/src/commands/containers.rs b/zkstack_cli/crates/zkstack/src/commands/containers.rs index 8367289bd67f..68897bd3e361 100644 --- a/zkstack_cli/crates/zkstack/src/commands/containers.rs +++ b/zkstack_cli/crates/zkstack/src/commands/containers.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use anyhow::{anyhow, Context}; -use common::{docker, logger, spinner::Spinner}; -use config::{EcosystemConfig, DOCKER_COMPOSE_FILE, ERA_OBSERVABILITY_COMPOSE_FILE}; +use zkstack_common::{docker, logger, spinner::Spinner}; +use zkstack_config::{EcosystemConfig, DOCKER_COMPOSE_FILE, ERA_OBSERVABILITY_COMPOSE_FILE}; use xshell::Shell; use super::args::ContainersArgs; @@ -46,7 +46,7 @@ pub fn initialize_docker(shell: &Shell, ecosystem: &EcosystemConfig) -> anyhow:: fn start_container(shell: &Shell, compose_file: &str, retry_msg: &str) -> anyhow::Result<()> { while let Err(err) = docker::up(shell, compose_file, true) { logger::error(err.to_string()); - if !common::PromptConfirm::new(retry_msg).default(true).ask() { + if !zkstack_common::PromptConfirm::new(retry_msg).default(true).ask() { return Err(err); } } diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/init.rs b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/init.rs index 7ba7d3cb40cf..5eb6d8560be3 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/init.rs @@ -1,6 +1,6 @@ use anyhow::Context; use clap::Parser; -use common::PromptSelect; +use zkstack_common::PromptSelect; use xshell::Shell; use super::releases::{get_releases_with_arch, Arch, Version}; diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/releases.rs b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/releases.rs index ab169220f299..16a92a6b2414 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/releases.rs +++ b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/args/releases.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use common::spinner::Spinner; +use zkstack_common::spinner::Spinner; use serde::Deserialize; use xshell::Shell; diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/build.rs b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/build.rs index 0ba72f6b2257..f03fc3e995d9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/build.rs +++ b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/build.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs index b173ad9bbb7f..b5297de5bc1c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/init.rs @@ -1,7 +1,7 @@ use std::path::{Path, PathBuf}; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::args::{init::InitContractVerifierArgs, releases::Version}; diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/run.rs b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/run.rs index ebc33840bdea..a0133946a9ae 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/run.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/wait.rs b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/wait.rs index 011c888d3041..fc997d3cd1d1 100644 --- a/zkstack_cli/crates/zkstack/src/commands/contract_verifier/wait.rs +++ b/zkstack_cli/crates/zkstack/src/commands/contract_verifier/wait.rs @@ -1,6 +1,6 @@ use anyhow::Context as _; -use common::{config::global_config, logger}; -use config::EcosystemConfig; +use zkstack_common::{config::global_config, logger}; +use zkstack_config::EcosystemConfig; use xshell::Shell; use crate::{commands::args::WaitArgs, messages::MSG_CHAIN_NOT_FOUND_ERR}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs index 0929f5e4623f..93fc0261de76 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/clean/mod.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Subcommand; -use common::{docker, logger}; -use config::{EcosystemConfig, DOCKER_COMPOSE_FILE}; +use zkstack_common::{docker, logger}; +use zkstack_config::{EcosystemConfig, DOCKER_COMPOSE_FILE}; use xshell::Shell; use crate::commands::dev::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs index 70238ed15f32..bd525a125a58 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/config_writer.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Parser; -use common::{logger, Prompt}; -use config::{override_config, EcosystemConfig}; +use zkstack_common::{logger, Prompt}; +use zkstack_config::{override_config, EcosystemConfig}; use xshell::Shell; use crate::commands::dev::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs index 8e0384cbca99..ed02206ab272 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/contracts.rs @@ -1,12 +1,12 @@ use std::path::PathBuf; use clap::Parser; -use common::{ +use zkstack_common::{ contracts::{build_l1_contracts, build_l2_contracts, build_system_contracts}, logger, spinner::Spinner, }; -use config::EcosystemConfig; +use zkstack_config::EcosystemConfig; use xshell::Shell; use crate::commands::dev::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/args/new_migration.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/args/new_migration.rs index b91b048be784..986cc3a99c1d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/args/new_migration.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/args/new_migration.rs @@ -1,5 +1,5 @@ use clap::{Parser, ValueEnum}; -use common::{Prompt, PromptSelect}; +use zkstack_common::{Prompt, PromptSelect}; use strum::{Display, EnumIter, IntoEnumIterator}; use crate::commands::dev::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs index 990fca78641f..d1633b7c5d21 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/check_sqlx_data.rs @@ -1,7 +1,7 @@ use std::path::Path; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/drop.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/drop.rs index a5578d41f77a..0fb7f2c45c0c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/drop.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/drop.rs @@ -1,4 +1,4 @@ -use common::{ +use zkstack_common::{ db::{drop_db_if_exists, DatabaseConfig}, logger, spinner::Spinner, diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs index fd22f769742e..0feb689aac34 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/migrate.rs @@ -1,7 +1,7 @@ use std::path::Path; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs index 2d9fa1030538..974f63344284 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/new_migration.rs @@ -1,7 +1,7 @@ use std::path::Path; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::args::new_migration::{DatabaseNewMigrationArgs, SelectedDatabase}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs index 288a68452fd5..b52490b03dee 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/prepare.rs @@ -1,7 +1,7 @@ use std::path::Path; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs index 55d5ab1cbfcb..d16606ec9307 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/reset.rs @@ -1,7 +1,7 @@ use std::path::Path; -use common::logger; -use config::EcosystemConfig; +use zkstack_common::logger; +use zkstack_config::EcosystemConfig; use xshell::Shell; use super::{args::DatabaseCommonArgs, drop::drop_database, setup::setup_database}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs index 74ade66ba481..46c851f8b2ec 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/database/setup.rs @@ -1,7 +1,7 @@ use std::path::Path; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::args::DatabaseCommonArgs; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs index ebaf27845e0a..c59c753d797c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/fmt.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use clap::Parser; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::sql_fmt::format_sql; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs index 683ffe199161..38a2d3be2255 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/genesis.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{cmd::Cmd, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs index 04955726706f..ba9bf4057316 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/lint.rs @@ -6,8 +6,8 @@ use std::{ use anyhow::{bail, Context}; use clap::Parser; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::commands::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_batch.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_batch.rs index e837bbe9eb86..ab006aedd481 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_batch.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_batch.rs @@ -19,7 +19,7 @@ pub struct InsertBatchArgsFinal { impl InsertBatchArgs { pub(crate) fn fill_values_with_prompts(self, era_version: String) -> InsertBatchArgsFinal { let number = self.number.unwrap_or_else(|| { - common::Prompt::new("Enter the number of the batch to insert").ask() + zkstack_common::Prompt::new("Enter the number of the batch to insert").ask() }); if self.default { @@ -30,7 +30,7 @@ impl InsertBatchArgs { } let version = self.version.unwrap_or_else(|| { - common::Prompt::new("Enter the version of the batch to insert") + zkstack_common::Prompt::new("Enter the version of the batch to insert") .default(&era_version) .ask() }); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_version.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_version.rs index 97e60fb38f8c..ade0cd3c3f4e 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_version.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/args/insert_version.rs @@ -30,13 +30,13 @@ impl InsertVersionArgs { } let version = self.version.unwrap_or_else(|| { - common::Prompt::new("Enter the version of the protocol to insert") + zkstack_common::Prompt::new("Enter the version of the protocol to insert") .default(&era_version) .ask() }); let snark_wrapper = self.snark_wrapper.unwrap_or_else(|| { - common::Prompt::new("Enter the snark wrapper of the protocol to insert") + zkstack_common::Prompt::new("Enter the snark wrapper of the protocol to insert") .default(&snark_wrapper) .ask() }); diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs index 84873e931b3e..e8356426f616 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/info.rs @@ -4,8 +4,8 @@ use std::{ }; use anyhow::Context as _; -use common::logger; -use config::{ChainConfig, EcosystemConfig}; +use zkstack_common::logger; +use zkstack_config::{ChainConfig, EcosystemConfig}; use xshell::{cmd, Shell}; use crate::commands::dev::messages::MSG_CHAIN_NOT_FOUND_ERR; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs index 0e0c0ba33af4..8c6b959827d7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_batch.rs @@ -1,5 +1,5 @@ -use common::{check_prerequisites, cmd::Cmd, logger, PROVER_CLI_PREREQUISITE}; -use config::{get_link_to_prover, EcosystemConfig}; +use zkstack_common::{check_prerequisites, cmd::Cmd, logger, PROVER_CLI_PREREQUISITE}; +use zkstack_config::{get_link_to_prover, EcosystemConfig}; use xshell::{cmd, Shell}; use crate::commands::dev::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs index f7bd175f577a..cc4dfd3274d5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/prover/insert_version.rs @@ -1,5 +1,5 @@ -use common::{check_prerequisites, cmd::Cmd, logger, PROVER_CLI_PREREQUISITE}; -use config::{get_link_to_prover, EcosystemConfig}; +use zkstack_common::{check_prerequisites, cmd::Cmd, logger, PROVER_CLI_PREREQUISITE}; +use zkstack_config::{get_link_to_prover, EcosystemConfig}; use xshell::{cmd, Shell}; use crate::commands::dev::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/args/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/args/mod.rs index 03d9ec9b7360..bcba3b43f45d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/args/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/args/mod.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use clap::Parser; -use common::Prompt; +use zkstack_common::Prompt; use url::Url; use crate::commands::dev::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs index 2f54579ade9e..f3a5c184f255 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/send_transactions/mod.rs @@ -9,8 +9,8 @@ use std::{ use anyhow::Context; use args::SendTransactionsArgs; use chrono::Local; -use common::{ethereum::create_ethers_client, logger}; -use config::EcosystemConfig; +use zkstack_common::{ethereum::create_ethers_client, logger}; +use zkstack_config::EcosystemConfig; use ethers::{abi::Bytes, providers::Middleware, types::TransactionRequest, utils::hex}; use serde::Deserialize; use tokio::time::sleep; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs index 8e4c7183cb55..8536c9d60f58 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/snapshot.rs @@ -1,7 +1,7 @@ use anyhow::Context; use clap::Subcommand; -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::commands::dev::messages::{MSG_CHAIN_NOT_FOUND_ERR, MSG_RUNNING_SNAPSHOT_CREATOR}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/sql_fmt.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/sql_fmt.rs index 0f7ce061ce18..4796a0378d70 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/sql_fmt.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/sql_fmt.rs @@ -1,7 +1,7 @@ use std::mem::take; use anyhow::{bail, Result}; -use common::spinner::Spinner; +use zkstack_common::spinner::Spinner; use sqruff_lib::{api::simple::get_simple_config, core::linter::core::Linter}; use xshell::Shell; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs index 5ac52bf854a6..50671f1d7e66 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/args.rs @@ -1,6 +1,6 @@ use anyhow::Context; use clap::Parser; -use config::EcosystemConfig; +use zkstack_config::EcosystemConfig; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/mod.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/mod.rs index 8687fcb04763..634e1804292a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/mod.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/status/mod.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use anyhow::Context; use args::{StatusArgs, StatusSubcommands}; -use common::logger; +use zkstack_common::logger; use draw::{bordered_boxes, format_port_info}; use serde::Deserialize; use serde_json::Value; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs index dea6a46bbef6..bceef2865b98 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/build.rs @@ -1,4 +1,4 @@ -use config::EcosystemConfig; +use zkstack_config::EcosystemConfig; use xshell::Shell; use super::utils::{build_contracts, install_and_build_dependencies}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/db.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/db.rs index 19f6307019b8..aaa7c7e181bd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/db.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/db.rs @@ -1,6 +1,6 @@ use std::path::Path; -use common::{cmd::Cmd, db::wait_for_db, logger}; +use zkstack_common::{cmd::Cmd, db::wait_for_db, logger}; use xshell::{cmd, Shell}; use crate::commands::dev::{commands::database, dals::Dal, messages::MSG_RESETTING_TEST_DATABASES}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs index e58a70e6b7cb..208426349745 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/fees.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use anyhow::Context; -use common::{cmd::Cmd, config::global_config, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, config::global_config, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs index 8e9e421c2f4e..959398698f29 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/integration.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use anyhow::Context; -use common::{cmd::Cmd, config::global_config, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, config::global_config, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs index 7d163daed671..a996493043c6 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/l1_contracts.rs @@ -1,5 +1,5 @@ -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::commands::dev::messages::MSG_L1_CONTRACTS_TEST_SUCCESS; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs index 72a8f97ff97d..344a6109a9c3 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/loadtest.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{cmd::Cmd, config::global_config, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, config::global_config, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::commands::dev::messages::MSG_CHAIN_NOT_FOUND_ERR; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs index 200baf57215c..eb5ad26cf42d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/prover.rs @@ -1,7 +1,7 @@ use std::str::FromStr; -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use url::Url; use xshell::{cmd, Shell}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs index ae889969fd2c..b8ce166c25af 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/recovery.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use anyhow::Context; -use common::{cmd::Cmd, logger, server::Server, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, server::Server, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs index dc95c88db205..c2447548581f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/revert.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use anyhow::Context; -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs index 8c0c707f6a2e..bd52ff67192c 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/rust.rs @@ -1,8 +1,8 @@ use std::str::FromStr; use anyhow::Context; -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use url::Url; use xshell::{cmd, Shell}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs index 707e0086ed15..4578e3ade186 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/upgrade.rs @@ -1,5 +1,5 @@ -use common::{cmd::Cmd, logger, spinner::Spinner}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger, spinner::Spinner}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use super::{args::upgrade::UpgradeArgs, utils::install_and_build_dependencies}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/utils.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/utils.rs index 8435b437169d..5e8cdf1c3f8d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/utils.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/utils.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; use anyhow::Context; -use common::{cmd::Cmd, spinner::Spinner, wallets::Wallet}; -use config::{ChainConfig, EcosystemConfig}; +use zkstack_common::{cmd::Cmd, spinner::Spinner, wallets::Wallet}; +use zkstack_config::{ChainConfig, EcosystemConfig}; use ethers::{ providers::{Http, Middleware, Provider}, utils::hex::ToHex, @@ -67,7 +67,7 @@ impl TestWallets { let balance = provider.get_balance(wallet.address, None).await?; if balance.is_zero() { - common::ethereum::distribute_eth( + zkstack_common::ethereum::distribute_eth( self.get_main_wallet()?, vec![wallet.address], l1_rpc, diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs index 6953014bf92b..a0ac3b328951 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/commands/test/wallet.rs @@ -1,8 +1,8 @@ use std::path::PathBuf; use anyhow::Context; -use common::logger; -use config::EcosystemConfig; +use zkstack_common::logger; +use zkstack_config::EcosystemConfig; use xshell::Shell; use super::utils::{TestWallets, TEST_WALLETS_PATH}; diff --git a/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs b/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs index 9626edfed732..370202f8ab77 100644 --- a/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs +++ b/zkstack_cli/crates/zkstack/src/commands/dev/dals.rs @@ -1,5 +1,5 @@ use anyhow::Context as _; -use config::{EcosystemConfig, SecretsConfig}; +use zkstack_config::{EcosystemConfig, SecretsConfig}; use url::Url; use xshell::Shell; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/build_transactions.rs index 697fa518b6e4..e4f4b23b766a 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/build_transactions.rs @@ -1,7 +1,7 @@ use std::{path::PathBuf, str::FromStr}; use clap::Parser; -use common::{forge::ForgeScriptArgs, Prompt}; +use zkstack_common::{forge::ForgeScriptArgs, Prompt}; use serde::{Deserialize, Serialize}; use url::Url; use zksync_basic_types::H160; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs index 53d9c27be60b..1eabe051a356 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/create.rs @@ -1,11 +1,11 @@ use std::path::PathBuf; use clap::{Parser, ValueHint}; -use common::{Prompt, PromptConfirm, PromptSelect}; +use zkstack_common::{Prompt, PromptConfirm, PromptSelect}; use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use strum::IntoEnumIterator; -use types::{L1Network, WalletCreation}; +use zkstack_types::{L1Network, WalletCreation}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/init.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/init.rs index 09115fd49ba7..88da0d2f5885 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/args/init.rs @@ -1,9 +1,9 @@ use std::path::PathBuf; use clap::Parser; -use common::{forge::ForgeScriptArgs, Prompt, PromptConfirm}; +use zkstack_common::{forge::ForgeScriptArgs, Prompt, PromptConfirm}; use serde::{Deserialize, Serialize}; -use types::L1Network; +use zkstack_types::L1Network; use url::Url; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs index ff7132360972..dac583c02175 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/build_transactions.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{git, logger, spinner::Spinner}; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; +use zkstack_common::{git, logger, spinner::Spinner}; +use zkstack_config::{traits::SaveConfigWithBasePath, EcosystemConfig}; use xshell::Shell; use super::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs index 3bd392c0558d..d12271017ac7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/change_default.rs @@ -1,5 +1,5 @@ -use common::PromptSelect; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; +use zkstack_common::PromptSelect; +use zkstack_config::{traits::SaveConfigWithBasePath, EcosystemConfig}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/common.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/common.rs index 074913d79fa2..37ff847737c9 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/common.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/common.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::forge::{Forge, ForgeScriptArgs}; -use config::{ +use zkstack_common::forge::{Forge, ForgeScriptArgs}; +use zkstack_config::{ forge_interface::{ deploy_ecosystem::{ input::{DeployL1Config, InitialDeploymentConfig}, @@ -11,7 +11,7 @@ use config::{ traits::{ReadConfig, ReadConfigWithBasePath, SaveConfig}, ContractsConfig, EcosystemConfig, GenesisConfig, }; -use types::{L1Network, ProverMode}; +use zkstack_types::{L1Network, ProverMode}; use xshell::Shell; use crate::utils::forge::{check_the_balance, fill_forge_private_key, WalletOwner}; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs index 203c667ade65..735d1c977c21 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Context}; -use common::{logger, spinner::Spinner}; -use config::{ +use zkstack_common::{logger, spinner::Spinner}; +use zkstack_config::{ create_local_configs_dir, create_wallets, get_default_era_chain_id, traits::SaveConfigWithBasePath, EcosystemConfig, EcosystemConfigFromFileError, }; diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create_configs.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create_configs.rs index 38358355ff97..30c5a0976909 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/create_configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/create_configs.rs @@ -1,6 +1,6 @@ use std::path::Path; -use config::{ +use zkstack_config::{ forge_interface::deploy_ecosystem::input::{Erc20DeploymentConfig, InitialDeploymentConfig}, traits::{SaveConfigWithBasePath, SaveConfigWithCommentAndBasePath}, AppsEcosystemConfig, diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs index 7b01abf03b9a..f3b6662318e6 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/init.rs @@ -1,7 +1,7 @@ use std::{path::PathBuf, str::FromStr}; use anyhow::Context; -use common::{ +use zkstack_common::{ config::global_config, contracts::build_system_contracts, forge::{Forge, ForgeScriptArgs}, @@ -9,7 +9,7 @@ use common::{ spinner::Spinner, Prompt, }; -use config::{ +use zkstack_config::{ forge_interface::{ deploy_ecosystem::{ input::{DeployErc20Config, Erc20DeploymentConfig, InitialDeploymentConfig}, @@ -20,7 +20,7 @@ use config::{ traits::{FileConfigWithDefaultName, ReadConfig, SaveConfig, SaveConfigWithBasePath}, ContractsConfig, EcosystemConfig, }; -use types::L1Network; +use zkstack_types::L1Network; use xshell::Shell; use super::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/setup_observability.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/setup_observability.rs index f20c3c24157e..217990122f0b 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/setup_observability.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/setup_observability.rs @@ -1,5 +1,5 @@ -use common::{git, logger, spinner::Spinner}; -use config::{ERA_OBSERBAVILITY_DIR, ERA_OBSERBAVILITY_GIT_REPO}; +use zkstack_common::{git, logger, spinner::Spinner}; +use zkstack_config::{ERA_OBSERBAVILITY_DIR, ERA_OBSERBAVILITY_GIT_REPO}; use xshell::Shell; use crate::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/ecosystem/utils.rs b/zkstack_cli/crates/zkstack/src/commands/ecosystem/utils.rs index a51adc75fb42..3f0b8e5c91b3 100644 --- a/zkstack_cli/crates/zkstack/src/commands/ecosystem/utils.rs +++ b/zkstack_cli/crates/zkstack/src/commands/ecosystem/utils.rs @@ -1,6 +1,6 @@ use std::path::Path; -use common::cmd::Cmd; +use zkstack_common::cmd::Cmd; use xshell::{cmd, Shell}; pub(super) fn install_yarn_dependencies(shell: &Shell, link_to_code: &Path) -> anyhow::Result<()> { diff --git a/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs b/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs index 29cc2ecfbff0..8d5d24bee53d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs +++ b/zkstack_cli/crates/zkstack/src/commands/explorer/backend.rs @@ -1,8 +1,8 @@ use std::path::Path; use anyhow::Context; -use common::docker; -use config::{explorer_compose::ExplorerBackendComposeConfig, EcosystemConfig}; +use zkstack_common::docker; +use zkstack_config::{explorer_compose::ExplorerBackendComposeConfig, EcosystemConfig}; use xshell::Shell; use crate::messages::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs b/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs index 096c45da5d8f..048684e2ce5d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/explorer/init.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{config::global_config, db, logger, Prompt}; -use config::{ +use zkstack_common::{config::global_config, db, logger, Prompt}; +use zkstack_config::{ explorer::{ExplorerChainConfig, ExplorerConfig}, explorer_compose::{ExplorerBackendComposeConfig, ExplorerBackendConfig, ExplorerBackendPorts}, traits::{ConfigWithL2RpcUrl, SaveConfig}, diff --git a/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs b/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs index a6519f62edba..85b87f8eed96 100644 --- a/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/explorer/run.rs @@ -1,8 +1,8 @@ use std::path::Path; use anyhow::Context; -use common::{config::global_config, docker, logger}; -use config::{explorer::*, traits::SaveConfig, AppsEcosystemConfig, EcosystemConfig}; +use zkstack_common::{config::global_config, docker, logger}; +use zkstack_config::{explorer::*, traits::SaveConfig, AppsEcosystemConfig, EcosystemConfig}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/args/prepare_configs.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/args/prepare_configs.rs index 3f91380b7bdf..6bd8e657dcf5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/args/prepare_configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/args/prepare_configs.rs @@ -1,6 +1,6 @@ use clap::Parser; -use common::{db::DatabaseConfig, Prompt}; -use config::ChainConfig; +use zkstack_common::{db::DatabaseConfig, Prompt}; +use zkstack_config::ChainConfig; use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use url::Url; diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/build.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/build.rs index ff15c0c77f30..e447b8792bcf 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/build.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/build.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{cmd::Cmd, logger}; -use config::EcosystemConfig; +use zkstack_common::{cmd::Cmd, logger}; +use zkstack_config::EcosystemConfig; use xshell::{cmd, Shell}; use crate::messages::{MSG_BUILDING_EN, MSG_CHAIN_NOT_FOUND_ERR, MSG_FAILED_TO_BUILD_EN_ERR}; diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs index 184151764961..e6bcc1b293eb 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/init.rs @@ -1,9 +1,9 @@ use anyhow::Context; -use common::{ +use zkstack_common::{ db::{drop_db_if_exists, init_db, migrate_db, DatabaseConfig}, spinner::Spinner, }; -use config::{traits::ReadConfigWithBasePath, ChainConfig, EcosystemConfig, SecretsConfig}; +use zkstack_config::{traits::ReadConfigWithBasePath, ChainConfig, EcosystemConfig, SecretsConfig}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs index 03a586a0652a..55317ca839e5 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/prepare_configs.rs @@ -1,8 +1,8 @@ use std::{collections::BTreeMap, path::Path, str::FromStr}; use anyhow::Context; -use common::logger; -use config::{ +use zkstack_common::logger; +use zkstack_config::{ external_node::ENConfig, set_rocks_db_config, traits::{FileConfigWithDefaultName, SaveConfigWithBasePath}, diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs index 46c98119f893..1e00bf29963e 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/run.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::logger; -use config::{ChainConfig, EcosystemConfig}; +use zkstack_common::logger; +use zkstack_config::{ChainConfig, EcosystemConfig}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/external_node/wait.rs b/zkstack_cli/crates/zkstack/src/commands/external_node/wait.rs index 72568c36f363..d86c84f88be1 100644 --- a/zkstack_cli/crates/zkstack/src/commands/external_node/wait.rs +++ b/zkstack_cli/crates/zkstack/src/commands/external_node/wait.rs @@ -1,6 +1,6 @@ use anyhow::Context as _; -use common::{config::global_config, logger}; -use config::{traits::ReadConfigWithBasePath, EcosystemConfig}; +use zkstack_common::{config::global_config, logger}; +use zkstack_config::{traits::ReadConfigWithBasePath, EcosystemConfig}; use xshell::Shell; use zksync_config::configs::GeneralConfig; diff --git a/zkstack_cli/crates/zkstack/src/commands/portal.rs b/zkstack_cli/crates/zkstack/src/commands/portal.rs index f9e7fe358609..9c52cd686f57 100644 --- a/zkstack_cli/crates/zkstack/src/commands/portal.rs +++ b/zkstack_cli/crates/zkstack/src/commands/portal.rs @@ -1,14 +1,14 @@ use std::path::Path; use anyhow::Context; -use common::{config::global_config, docker, ethereum, logger}; -use config::{ +use zkstack_common::{config::global_config, docker, ethereum, logger}; +use zkstack_config::{ portal::*, traits::{ConfigWithL2RpcUrl, SaveConfig}, AppsEcosystemConfig, ChainConfig, EcosystemConfig, }; use ethers::types::Address; -use types::{BaseToken, TokenInfo}; +use zkstack_types::{BaseToken, TokenInfo}; use xshell::Shell; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs index 095dccf00b38..3912497d52cd 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/compressor_keys.rs @@ -1,5 +1,5 @@ use clap::Parser; -use common::Prompt; +use zkstack_common::Prompt; use crate::messages::MSG_SETUP_COMPRESSOR_KEY_PATH_PROMPT; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs index fab798993025..2dce425a7f83 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/init.rs @@ -1,6 +1,6 @@ use clap::{Parser, ValueEnum}; -use common::{db::DatabaseConfig, logger, Prompt, PromptConfirm, PromptSelect}; -use config::ChainConfig; +use zkstack_common::{db::DatabaseConfig, logger, Prompt, PromptConfirm, PromptSelect}; +use zkstack_config::ChainConfig; use serde::{Deserialize, Serialize}; use slugify_rs::slugify; use strum::{EnumIter, IntoEnumIterator}; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/init_bellman_cuda.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/init_bellman_cuda.rs index 98a5c78be2a6..872839d2e498 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/init_bellman_cuda.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/init_bellman_cuda.rs @@ -1,5 +1,5 @@ use clap::Parser; -use common::{Prompt, PromptSelect}; +use zkstack_common::{Prompt, PromptSelect}; use serde::{Deserialize, Serialize}; use strum::{EnumIter, IntoEnumIterator}; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs index 4b3a16a38fca..f86906e2876f 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/run.rs @@ -2,8 +2,8 @@ use std::path::Path; use anyhow::anyhow; use clap::{Parser, ValueEnum}; -use common::{Prompt, PromptSelect}; -use config::ChainConfig; +use zkstack_common::{Prompt, PromptSelect}; +use zkstack_config::ChainConfig; use strum::{EnumIter, IntoEnumIterator}; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/args/setup_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/args/setup_keys.rs index 155977b8812a..881c033397af 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/args/setup_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/args/setup_keys.rs @@ -1,5 +1,5 @@ use clap::{Parser, ValueEnum}; -use common::PromptSelect; +use zkstack_common::PromptSelect; use strum::{EnumIter, IntoEnumIterator}; use crate::messages::{MSG_SETUP_KEYS_DOWNLOAD_SELECTION_PROMPT, MSG_SETUP_KEYS_REGION_PROMPT}; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs index a3d40c957281..1c780d12c4fa 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/compressor_keys.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::spinner::Spinner; -use config::{get_link_to_prover, EcosystemConfig, GeneralConfig}; +use zkstack_common::spinner::Spinner; +use zkstack_config::{get_link_to_prover, EcosystemConfig, GeneralConfig}; use xshell::Shell; use super::args::compressor_keys::CompressorKeysArgs; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/gcs.rs b/zkstack_cli/crates/zkstack/src/commands/prover/gcs.rs index f28c44504b56..acd8a8801d87 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/gcs.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/gcs.rs @@ -1,4 +1,4 @@ -use common::{check_prerequisites, cmd::Cmd, logger, spinner::Spinner, GCLOUD_PREREQUISITE}; +use zkstack_common::{check_prerequisites, cmd::Cmd, logger, spinner::Spinner, GCLOUD_PREREQUISITE}; use xshell::{cmd, Shell}; use zksync_config::{configs::object_store::ObjectStoreMode, ObjectStoreConfig}; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/init.rs b/zkstack_cli/crates/zkstack/src/commands/prover/init.rs index ad92180aea9b..6e86e8f107c3 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/init.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/init.rs @@ -1,14 +1,14 @@ use std::path::PathBuf; use anyhow::Context; -use common::{ +use zkstack_common::{ cmd::Cmd, config::global_config, db::{drop_db_if_exists, init_db, migrate_db, DatabaseConfig}, logger, spinner::Spinner, }; -use config::{ +use zkstack_config::{ copy_configs, get_link_to_prover, set_prover_database, traits::SaveConfigWithBasePath, EcosystemConfig, }; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs b/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs index 615ef841488b..7c40590f11a7 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/init_bellman_cuda.rs @@ -1,6 +1,6 @@ use anyhow::Context; -use common::{check_prerequisites, cmd::Cmd, git, logger, spinner::Spinner, GPU_PREREQUISITES}; -use config::{traits::SaveConfigWithBasePath, EcosystemConfig}; +use zkstack_common::{check_prerequisites, cmd::Cmd, git, logger, spinner::Spinner, GPU_PREREQUISITES}; +use zkstack_config::{traits::SaveConfigWithBasePath, EcosystemConfig}; use xshell::{cmd, Shell}; use super::args::init_bellman_cuda::InitBellmanCudaArgs; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/run.rs b/zkstack_cli/crates/zkstack/src/commands/prover/run.rs index 85495d124041..6190cd4a3cda 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/run.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/run.rs @@ -1,8 +1,8 @@ use std::path::{Path, PathBuf}; use anyhow::{anyhow, Context}; -use common::{check_prerequisites, cmd::Cmd, logger, GPU_PREREQUISITES}; -use config::{get_link_to_prover, ChainConfig, EcosystemConfig}; +use zkstack_common::{check_prerequisites, cmd::Cmd, logger, GPU_PREREQUISITES}; +use zkstack_config::{get_link_to_prover, ChainConfig, EcosystemConfig}; use xshell::{cmd, Shell}; use super::args::run::{ProverComponent, ProverRunArgs}; diff --git a/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs b/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs index ae0480e872dd..481b25f1bc3d 100644 --- a/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs +++ b/zkstack_cli/crates/zkstack/src/commands/prover/setup_keys.rs @@ -1,8 +1,8 @@ use anyhow::Ok; -use common::{ +use zkstack_common::{ check_prerequisites, cmd::Cmd, logger, spinner::Spinner, GCLOUD_PREREQUISITE, GPU_PREREQUISITES, }; -use config::{get_link_to_prover, EcosystemConfig}; +use zkstack_config::{get_link_to_prover, EcosystemConfig}; use xshell::{cmd, Shell}; use crate::{ diff --git a/zkstack_cli/crates/zkstack/src/commands/server.rs b/zkstack_cli/crates/zkstack/src/commands/server.rs index 10f267fb8526..785c1ed48914 100644 --- a/zkstack_cli/crates/zkstack/src/commands/server.rs +++ b/zkstack_cli/crates/zkstack/src/commands/server.rs @@ -1,11 +1,11 @@ use anyhow::Context; -use common::{ +use zkstack_common::{ cmd::Cmd, config::global_config, logger, server::{Server, ServerMode}, }; -use config::{ +use zkstack_config::{ traits::FileConfigWithDefaultName, ChainConfig, ContractsConfig, EcosystemConfig, GeneralConfig, GenesisConfig, SecretsConfig, WalletsConfig, }; diff --git a/zkstack_cli/crates/zkstack/src/commands/update.rs b/zkstack_cli/crates/zkstack/src/commands/update.rs index 534d490e6cae..901c825db015 100644 --- a/zkstack_cli/crates/zkstack/src/commands/update.rs +++ b/zkstack_cli/crates/zkstack/src/commands/update.rs @@ -1,13 +1,13 @@ use std::path::Path; use anyhow::{Context, Ok}; -use common::{ +use zkstack_common::{ db::migrate_db, git, logger, spinner::Spinner, yaml::{merge_yaml, ConfigDiff}, }; -use config::{ +use zkstack_config::{ ChainConfig, EcosystemConfig, CONTRACTS_FILE, EN_CONFIG_FILE, ERA_OBSERBAVILITY_DIR, GENERAL_FILE, GENESIS_FILE, SECRETS_FILE, }; diff --git a/zkstack_cli/crates/zkstack/src/defaults.rs b/zkstack_cli/crates/zkstack/src/defaults.rs index 2b43009f5594..2cd654c58a8a 100644 --- a/zkstack_cli/crates/zkstack/src/defaults.rs +++ b/zkstack_cli/crates/zkstack/src/defaults.rs @@ -1,4 +1,4 @@ -use config::ChainConfig; +use zkstack_config::ChainConfig; use lazy_static::lazy_static; use url::Url; diff --git a/zkstack_cli/crates/zkstack/src/external_node.rs b/zkstack_cli/crates/zkstack/src/external_node.rs index 5ff4ce070250..01c65793b25d 100644 --- a/zkstack_cli/crates/zkstack/src/external_node.rs +++ b/zkstack_cli/crates/zkstack/src/external_node.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use anyhow::Context; -use config::{ +use zkstack_config::{ external_node::ENConfig, traits::FileConfigWithDefaultName, ChainConfig, GeneralConfig, SecretsConfig, }; @@ -63,7 +63,7 @@ impl RunExternalNode { consensus_args.push(format!("--consensus-path={}", consensus_config)) } - common::external_node::run( + zkstack_common::external_node::run( shell, code_path, config_general_config, diff --git a/zkstack_cli/crates/zkstack/src/main.rs b/zkstack_cli/crates/zkstack/src/main.rs index 8a115201fc81..6794fbcdc8fe 100644 --- a/zkstack_cli/crates/zkstack/src/main.rs +++ b/zkstack_cli/crates/zkstack/src/main.rs @@ -4,14 +4,14 @@ use commands::{ contract_verifier::ContractVerifierCommands, dev::DevCommands, }; -use common::{ +use zkstack_common::{ check_general_prerequisites, config::{global_config, init_global_config, GlobalConfig}, error::log_error, init_prompt_theme, logger, version::version_message, }; -use config::EcosystemConfig; +use zkstack_config::EcosystemConfig; use xshell::Shell; use crate::commands::{ diff --git a/zkstack_cli/crates/zkstack/src/utils/consensus.rs b/zkstack_cli/crates/zkstack/src/utils/consensus.rs index 946d28a33fbd..7cd6acf4019f 100644 --- a/zkstack_cli/crates/zkstack/src/utils/consensus.rs +++ b/zkstack_cli/crates/zkstack/src/utils/consensus.rs @@ -1,5 +1,5 @@ use anyhow::Context as _; -use config::ChainConfig; +use zkstack_config::ChainConfig; use secrecy::{ExposeSecret, Secret}; use zksync_config::configs::consensus::{ AttesterPublicKey, AttesterSecretKey, ConsensusSecrets, GenesisSpec, NodePublicKey, diff --git a/zkstack_cli/crates/zkstack/src/utils/forge.rs b/zkstack_cli/crates/zkstack/src/utils/forge.rs index 76f045f82b9e..a67341a95195 100644 --- a/zkstack_cli/crates/zkstack/src/utils/forge.rs +++ b/zkstack_cli/crates/zkstack/src/utils/forge.rs @@ -1,5 +1,5 @@ use anyhow::Context as _; -use common::{forge::ForgeScript, wallets::Wallet}; +use zkstack_common::{forge::ForgeScript, wallets::Wallet}; use ethers::types::U256; use crate::{ @@ -37,7 +37,7 @@ pub async fn check_the_balance(forge: &ForgeScript) -> anyhow::Result<()> { if balance >= expected_balance { return Ok(()); } - if !common::PromptConfirm::new(msg_address_doesnt_have_enough_money_prompt( + if !zkstack_common::PromptConfirm::new(msg_address_doesnt_have_enough_money_prompt( &address, balance, expected_balance, diff --git a/zkstack_cli/crates/zkstack/src/utils/link_to_code.rs b/zkstack_cli/crates/zkstack/src/utils/link_to_code.rs index 1f2eb487849d..5201401ad6c3 100644 --- a/zkstack_cli/crates/zkstack/src/utils/link_to_code.rs +++ b/zkstack_cli/crates/zkstack/src/utils/link_to_code.rs @@ -4,8 +4,8 @@ use std::{ }; use anyhow::bail; -use common::{cmd::Cmd, git, logger, spinner::Spinner, Prompt, PromptConfirm, PromptSelect}; -use config::ZKSYNC_ERA_GIT_REPO; +use zkstack_common::{cmd::Cmd, git, logger, spinner::Spinner, Prompt, PromptConfirm, PromptSelect}; +use zkstack_config::ZKSYNC_ERA_GIT_REPO; use strum::{EnumIter, IntoEnumIterator}; use xshell::{cmd, Shell}; diff --git a/zkstack_cli/crates/zkstack/src/utils/ports.rs b/zkstack_cli/crates/zkstack/src/utils/ports.rs index 6c299b999136..74031afa03b3 100644 --- a/zkstack_cli/crates/zkstack/src/utils/ports.rs +++ b/zkstack_cli/crates/zkstack/src/utils/ports.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, fmt, net::SocketAddr, ops::Range, path::Path}; use anyhow::{bail, Context, Result}; -use config::{ +use zkstack_config::{ explorer_compose::ExplorerBackendPorts, EcosystemConfig, DEFAULT_EXPLORER_API_PORT, DEFAULT_EXPLORER_DATA_FETCHER_PORT, DEFAULT_EXPLORER_WORKER_PORT, }; diff --git a/zkstack_cli/crates/zkstack/src/utils/rocks_db.rs b/zkstack_cli/crates/zkstack/src/utils/rocks_db.rs index 1b7e29dd9722..4618817d02d6 100644 --- a/zkstack_cli/crates/zkstack/src/utils/rocks_db.rs +++ b/zkstack_cli/crates/zkstack/src/utils/rocks_db.rs @@ -1,6 +1,6 @@ use std::path::Path; -use config::RocksDbs; +use zkstack_config::RocksDbs; use xshell::Shell; use crate::defaults::{