Module Persistent_root.Instance

val potential_snarked_ledgers_to_yojson : 'a Core.Queue.t -> [> `List of [> `String of 'b ] list ]
val potential_snarked_ledgers_of_yojson : Yojson.Safe.t -> string list
val load_potential_snarked_ledgers_from_disk : Factory_type.t -> string list
val write_potential_snarked_ledgers_to_disk : Instance_type.t -> unit
val enqueue_snarked_ledger : location:string -> Instance_type.t -> unit
val dequeue_snarked_ledger : Instance_type.t -> unit
val destroy : Instance_type.t -> unit
val close : Instance_type.t -> unit
val load_from_disk : Factory_type.t -> snarked_ledger_hash:Mina_base.Frozen_ledger_hash.t -> logger:Logger.t -> ( Instance_type.t, [> `Snarked_ledger_mismatch ] ) Core._result

When we load from disk, 1. Check the potential_snarked_ledgers to see if any one of these matches the snarked_ledger_hash in persistent_frontier; 2. if none of those works, we load the old snarked_ledger and check if the old snarked_ledger matches with persistent_frontier; 3. if not, we just reset all the persisted data and start from genesis

val snarked_ledger : Instance_type.t -> Ledger.Db.t
val set_root_identifier : Instance_type.t -> Frontier_base.Root_identifier.t -> unit
val set_root_state_hash : Instance_type.t -> Mina_base.State_hash.t -> unit