I'm writing a tool to build a fork-off chain. But the new chain can not get finalized.
I've skipped the Babe/Grandpa/Session's storage.
I also check the chain state, that no historical storage under the Grandpa.
But when I call the RPC, round_state. It shows all the old validators didn't vote. Interesting, where did the old validator data come from?
And I found these things:
const VERSION_KEY: &[u8] = b"grandpa_schema_version"; const SET_STATE_KEY: &[u8] = b"grandpa_completed_round"; const CONCLUDED_ROUNDS: &[u8] = b"grandpa_concluded_rounds"; const AUTHORITY_SET_KEY: &[u8] = b"grandpa_voters"; const BEST_JUSTIFICATION: &[u8] = b"grandpa_best_justification";
Are these stored in runtime storage? If yes, what are the keys to them?
If I grab the storage base on the metadata pallet prefix. The finalization works. But if I grab all the keys and filter the Babe/Grandpa/Session prefixes, then it won't. So, I believe there are some 'well-known' keys storing the Grandpa cache.