matter-labs / matter-labs/zksync
`zkstack ecosystem init --dev` fails on a fresh installation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Moving through this guide: https://code.zksync.io/tutorials/custom-zk-chain
```bash
zkstack ecosystem init --dev
```
Getting this error no matter what:
`Base system contracts mismatched` -> `Unable to perform genesis on the database`
ERROR zksync_node_framework::service: Task oneshot_runner failed: Oneshot task node_storage_initializer failed
Caused by:
Base system contracts mismatched: From Config BaseSystemContractsHashes { bootloader: 0x01000911c4db4fe62c98e180cfa7e9b3a22fb15f505905d4bf36192f481551e6, default_aa: **0x010005f73e7c299ed73db937843643bdc276cbc2cc8596287e1e0cf3afc60252**, evm_emulator: Some(0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63) }, Calculated : BaseSystemContractsHashes { bootloader: 0x01000911c4db4fe62c98e180cfa7e9b3a22fb15f505905d4bf36192f481551e6, default_aa: **0x010005f7f5052fbdb6a0f6f70b12ad8865b1617a6a5698c20ef34132ea0ff0e2**, evm_emulator: Some(0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63) }
MORE LOGS
ERROR zksync_node_framework::service: Task oneshot_runner failed: Oneshot task node_storage_initializer failed
Caused by:
Base system contracts mismatched: From Config BaseSystemContractsHashes { bootloader: 0x01000911c4db4fe62c98e180cfa7e9b3a22fb15f505905d4bf36192f481551e6, default_aa: 0x010005f73e7c299ed73db937843643bdc276cbc2cc8596287e1e0cf3afc60252, evm_emulator: Some(0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63) }, Calculated : BaseSystemContractsHashes { bootloader: 0x01000911c4db4fe62c98e180cfa7e9b3a22fb15f505905d4bf36192f481551e6, default_aa: 0x010005f7f5052fbdb6a0f6f70b12ad8865b1617a6a5698c20ef34132ea0ff0e2, evm_emulator: Some(0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63) }
■ Unable to perform genesis on the database
│
▲ 0: Failed to start server
│ 1: Command failed to run: cargo run --manifest-path ./core/Cargo.toml --release --bin zksync_server -- --genesis-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/genesis.yaml --config-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/general.yaml --wallets-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/wallets.yaml --secrets-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/secrets.yaml --contracts-config-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/contracts.yaml --genesis
│ Finished `release` profile [optimized] target(s) in 1.03s
│ Running `core/target/release/zksync_server --genesis-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/genesis.yaml --config-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/general.yaml --wallets-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/wallets.yaml --secrets-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/secrets.yaml --contracts-config-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/contracts.yaml --genesis`
│ Error: One or more tasks failed: ["Task oneshot_runner failed: Oneshot task node_storage_initializer failed: Base system contracts mismatched: From Config BaseSystemContractsHashes { bootloader: 0x01000911c4db4fe62c98e180cfa7e9b3a22fb15f505905d4bf36192f481551e6, default_aa: 0x010005f73e7c299ed73db937843643bdc276cbc2cc8596287e1e0cf3afc60252, evm_emulator: Some(0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63) }, Calculated : BaseSystemContractsHashes { bootloader: 0x01000911c4db4fe62c98e180cfa7e9b3a22fb15f505905d4bf36192f481551e6, default_aa: 0x010005f7f5052fbdb6a0f6f70b12ad8865b1617a6a5698c20ef34132ea0ff0e2, evm_emulator: Some(0x01000d8bae37b82f311186426184866498b357f41d7a02ced11f3e3fbfbacd63) }"]
│
│ 2: Command failed to run: cargo run --manifest-path ./core/Cargo.toml --release --bin zksync_server -- --genesis-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/genesis.yaml --config-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/general.yaml --wallets-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/wallets.yaml --secrets-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/secrets.yaml --contracts-config-path /home/sasha/repositories/fadeevab/zksync_ecosystem/chains/zk_chain_root/configs/contracts.yaml --genesis
│
└ Failed to run command
If I set the `default_aa_hash` to be `0x....0ff0e2`, the subsequent `zkstack ecosystem init --dev` command fails as the `genesis.yaml` is always being rewritten.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with `zkstack ecosystem init --dev` while tracing the generated `genesis.yaml` and the `zksync_server` invocation from `core/Cargo.toml`. Compare the configured and calculated `default_aa` hashes and verify that a fresh installation completes genesis without the configuration being rewritten incorrectly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100