Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: performing genesis failed #2032

Open
tennnessse opened this issue May 23, 2024 · 4 comments
Open

Error: performing genesis failed #2032

tennnessse opened this issue May 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@tennnessse
Copy link

tennnessse commented May 23, 2024

🐛 Bug Report

📝 Description

Hi! I'm trying to quickstart an external node following the instructions provided at https://docs.zksync.io/infra/quickstart.html#setup-instructions, but I'm encountering error "Error: performing genesis failed"

🔄 Reproduction Steps

git clone https://github.com/matter-labs/zksync-era.git
cd zksync-era/docs/guides/external-node
cd docker-compose-examples
docker compose --file mainnet-external-node-docker-compose.yml up

🤔 Expected Behavior

The node will recover from a snapshot on its first run

😯 Current Behavior

Error: performing genesis failed

📎 Log Output


Error: performing genesis failed

Caused by:
    0: ensure_genesis_state
    1: Root hash mismatched: From config: 0xbc59c242d551e3939b9b2939b8b686efa77ba3833183045d548aa5f53357ba95, Calculated 0x79b383138554ae78daa0cd096ca63d7e69dc7e1868daf3c9a86d01918df1ffe3

Stack backtrace:
   0: anyhow::context::<impl anyhow::Context<T,E> for core::result::Result<T,E>>::context
   1: zksync_core::sync_layer::genesis::perform_genesis_if_needed::{{closure}}
   2: zksync_external_node::init::ensure_storage_initialized::{{closure}}
   3: zksync_external_node::run_node::{{closure}}
   4: zksync_external_node::main::{{closure}}
   5: tokio::runtime::park::CachedParkThread::block_on
   6: tokio::runtime::runtime::Runtime::block_on
   7: zksync_external_node::main
   8: std::sys_common::backtrace::__rust_begin_short_backtrace
   9: std::rt::lang_start::{{closure}}
  10: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/core/src/ops/function.rs:284:13
  11: std::panicking::try::do_call
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/panicking.rs:524:40
  12: std::panicking::try
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/panicking.rs:488:19
  13: std::panic::catch_unwind
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/panic.rs:142:14
  14: std::rt::lang_start_internal::{{closure}}
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/rt.rs:148:48
  15: std::panicking::try::do_call
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/panicking.rs:524:40
  16: std::panicking::try
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/panicking.rs:488:19
  17: std::panic::catch_unwind
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/panic.rs:142:14
  18: std::rt::lang_start_internal
             at ./rustc/5c6a7e71cd66705c31c9af94077901a220f0870c/library/std/src/rt.rs:148:20
  19: main
  20: <unknown>
  21: __libc_start_main
  22: _start

@tennnessse tennnessse added the bug Something isn't working label May 23, 2024
@tennnessse
Copy link
Author

tennnessse commented May 23, 2024

logs before the error

2024-05-23T14:44:09.105538Z  WARN zksync_external_node: The external node is in the alpha phase, and should be used with caution.
2024-05-23T14:44:09.105546Z  INFO zksync_external_node: Started the external node
2024-05-23T14:44:09.105640Z DEBUG zksync_core::api_server::healthcheck: Starting healthcheck server with checks AppHealthCheck { components: Mutex { data: [CheckHealth { name: "main_node_http_rpc" }, CheckHealth { name: "connection_pool" }], poisoned: false, .. }, slow_time_limit: 500ms, hard_time_limit: 3s } on 0.0.0.0:3081
2024-05-23T14:44:09.107413Z  INFO zksync_external_node::version_sync_task: Starting syncing protocol version of blocks
2024-05-23T14:44:09.108752Z  INFO zksync_external_node::init: Node has neither genesis L1 batch, nor snapshot recovery info
2024-05-23T14:44:09.108759Z  INFO zksync_external_node::init: Chosen node initialization strategy: Genesis
2024-05-23T14:44:12.971022Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000000006 is absent at genesis state
2024-05-23T14:44:13.213303Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000000007 is absent at genesis state
2024-05-23T14:44:13.459612Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000000008 is absent at genesis state
2024-05-23T14:44:13.706616Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000000100 is absent at genesis state
2024-05-23T14:44:13.955174Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000008012 is absent at genesis state
2024-05-23T14:44:15.130389Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x000000000000000000000000000000000000800e is absent at genesis state
2024-05-23T14:44:15.374074Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x000000000000000000000000000000000000800f is absent at genesis state
2024-05-23T14:44:16.110704Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000008011 is absent at genesis state
2024-05-23T14:44:16.355317Z DEBUG zksync_core::sync_layer::genesis: System contract with address 0x0000000000000000000000000000000000010000 is absent at genesis state
2024-05-23T14:44:16.355703Z  INFO zksync_core::genesis: running regenesis
2024-05-23T14:44:16.497057Z  INFO zksync_core::genesis: chain_schema_genesis is complete
2024-05-23T14:44:16.497074Z DEBUG zksync_core::metadata_calculator::helpers: Loading storage logs data for L1 batch #0 for Lightweight tree
2024-05-23T14:44:16.497406Z DEBUG zksync_core::metadata_calculator::metrics: Metadata calculator stage `LoadL1BatchHeader` completed in 287.463µs
2024-05-23T14:44:16.498112Z DEBUG zksync_core::metadata_calculator::metrics: Metadata calculator stage `LoadTouchedSlots` with 35 records completed in 695.463µs
2024-05-23T14:44:16.498364Z DEBUG zksync_core::metadata_calculator::metrics: Metadata calculator stage `LoadLeafIndices` with 35 records completed in 240.023µs
2024-05-23T14:44:16.498368Z DEBUG zksync_core::metadata_calculator::helpers: Made touched slots disjoint with protective reads; remaining touched slots: 35
2024-05-23T14:44:16.498384Z DEBUG zksync_core::metadata_calculator::metrics: Metadata calculator stage `LoadChanges` completed in 1.273133ms
2024-05-23T14:44:16.501606Z  WARN zksync_core::api_server::healthcheck: Stop signal sender for healthcheck server was dropped without sending a signal
2024-05-23T14:44:16.501615Z  INFO zksync_core::api_server::healthcheck: Stop signal received, healthcheck server is shutting down
2024-05-23T14:44:16.501658Z  INFO zksync_core::api_server::healthcheck: Healthcheck server shut down
2024-05-23T14:44:16.501664Z  INFO zksync_external_node: Stop signal received, Postgres metrics scraping is shutting down

@SuccinctPaul
Copy link
Contributor

SuccinctPaul commented May 28, 2024

Hi, I've been met same error, just check and confirm the era-contract revision is right.

  • By the way, if you modified the era-contract, the config 0xbc59c242d551e3939b9b2939b8b686efa77ba3833183045d548aa5f53357ba95 should be updated.

Hope this can be help.

@lythesia
Copy link

same here, running external node from source code no changes to contract, but still root hash mismatch

@lythesia
Copy link

also got this error

docker-compose-examples-external-node-1  | 2024-06-21T03:02:59.826371Z  INFO zksync_snapshots_applier: Processing storage logs chunk 12
docker-compose-examples-external-node-1  | 2024-06-21T03:03:00.785993Z  INFO zksync_snapshots_applier: Loaded 938749 storage logs from GCS for chunk 10 in 62.291610539s
docker-compose-examples-external-node-1  | 2024-06-21T03:03:00.832784Z  INFO zksync_snapshots_applier: Loading 938749 storage logs into Postgres
docker-compose-examples-external-node-1  | 2024-06-21T03:03:08.431530Z  INFO zksync_snapshots_applier: Loaded 938207 storage logs from GCS for chunk 5 in 69.937459159s
docker-compose-examples-external-node-1  | 2024-06-21T03:03:08.600800Z  INFO zksync_snapshots_applier: Loading 938207 storage logs into Postgres
docker-compose-examples-postgres-1       | 2024-06-21 03:03:41.076 UTC [1921] LOG:  unexpected EOF on client connection with an open transaction
docker-compose-examples-external-node-1 exited with code 137

from external-node container, and it stops when switch to docker compose ways

can someone kindly tell me what is happening? how to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants