nearcore
nearcore copied to clipboard
[stateless_validation] Missing ChunkExtra on load memtrie on startup
Error message after restarting a stateless validation node. After restart it attempts to load memtrie on startup (shard shuffling enabled):
2024-04-22T21:15:58.252570Z INFO memtrie: Loading trie to memory for shard s0.v2...
2024-04-22T21:15:58.252573Z DEBUG memtrie: Loading base trie from flat state... shard_uid=s0.v2
thread 'main' panicked at chain/client/src/client_actor.rs:222:6:
called `Result::unwrap()` on an `Err` value: Chain(StorageError(StorageInconsistentState("No ChunkExtra for block FJR59St3DjDVR4xvdUa8Mhf5JSoBATAqr2gkYaTBdGHR in shard s0.v2")))
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: near_client::client_actor::start_client
4: nearcore::start_with_config_and_synchronization
5: neard::cli::RunCmd::run::{{closure}}
6: tokio::task::local::LocalSet::run_until::{{closure}}
7: neard::cli::NeardCmd::parse_and_run
8: neard::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I think the solution would be to modify load_memtries_on_startup()
so that it can take state_root
as load_mem_trie_on_catchup()
does:
https://github.com/near/nearcore/blob/16e23210eeb81804c9ecfbf9c6455f3f7601497f/core/store/src/trie/shard_tries.rs#L430
Example usage: https://github.com/near/nearcore/pull/10820/files#diff-ef9c6aaa80a330e446c5365f42be9bff37ba4f898cf519dadd7e17545783c77cR2787