@@ -22,6 +22,8 @@ module type CONTEXT = sig
2222 val ledger_sync_config : Syncable_ledger .daemon_config
2323
2424 val proof_cache_db : Proof_cache_tag .cache_db
25+
26+ val signature_kind : Mina_signature_kind .t
2527end
2628
2729type Structured_log_events.t + = Bootstrap_complete
@@ -165,11 +167,15 @@ let on_transition ({ context = (module Context); _ } as t) ~sender
165167 let pcd =
166168 peer_root_with_proof.data
167169 |> Proof_carrying_data. map
168- ~f: (Mina_block. write_all_proofs_to_disk ~proof_cache_db )
170+ ~f:
171+ (Mina_block. write_all_proofs_to_disk ~signature_kind
172+ ~proof_cache_db )
169173 |> Proof_carrying_data. map_proof
170174 ~f:
171175 (Tuple2. map_snd
172- ~f: (Mina_block. write_all_proofs_to_disk ~proof_cache_db ) )
176+ ~f:
177+ (Mina_block. write_all_proofs_to_disk ~signature_kind
178+ ~proof_cache_db ) )
173179 in
174180 match % bind
175181 Mina_block. verify_on_header
@@ -276,7 +282,7 @@ let download_snarked_ledger ~trust_system ~preferred_peers ~transition_graph
276282let run_cycle ~context :(module Context : CONTEXT ) ~trust_system ~verifier
277283 ~network ~consensus_local_state ~network_transition_pipe ~preferred_peers
278284 ~persistent_root ~persistent_frontier ~initial_root_transition ~catchup_mode
279- ~ signature_kind previous_cycles =
285+ previous_cycles =
280286 let open Context in
281287 (* The short-lived pipe allocated here will be closed
282288 when a follow-up pipe is allocated: in the next cycle of bootstrap
@@ -378,7 +384,7 @@ let run_cycle ~context:(module Context : CONTEXT) ~trust_system ~verifier
378384 in
379385 let scan_state =
380386 Staged_ledger.Scan_state. write_all_proofs_to_disk
381- ~proof_cache_db scan_state_uncached
387+ ~signature_kind ~ proof_cache_db scan_state_uncached
382388 in
383389 let % bind protocol_states =
384390 Staged_ledger.Scan_state. check_required_protocol_states
@@ -666,15 +672,14 @@ let run_cycle ~context:(module Context : CONTEXT) ~trust_system ~verifier
666672let run ~context :(module Context : CONTEXT ) ~trust_system ~verifier ~network
667673 ~consensus_local_state ~network_transition_pipe ~preferred_peers
668674 ~persistent_root ~persistent_frontier ~initial_root_transition ~catchup_mode
669- ~ signature_kind =
675+ =
670676 let open Context in
671677 let run_cycle =
672678 run_cycle
673679 ~context: (module Context : CONTEXT )
674680 ~trust_system ~verifier ~network ~consensus_local_state
675681 ~network_transition_pipe ~preferred_peers ~persistent_root
676682 ~persistent_frontier ~initial_root_transition ~catchup_mode
677- ~signature_kind
678683 in
679684 O1trace. thread " bootstrap"
680685 @@ fun () ->
@@ -747,6 +752,8 @@ let%test_module "Bootstrap_controller tests" =
747752 ~max_subtree_depth: None ~default_subtree_depth: None ()
748753
749754 let proof_cache_db = Proof_cache_tag.For_tests. create_db ()
755+
756+ let signature_kind = Mina_signature_kind. Testnet
750757 end
751758
752759 let verifier =
@@ -893,7 +900,7 @@ let%test_module "Bootstrap_controller tests" =
893900 ~trust_system ~verifier ~network: my_net.network ~preferred_peers: []
894901 ~consensus_local_state: my_net.state.consensus_local_state
895902 ~network_transition_pipe ~persistent_root ~persistent_frontier
896- ~catchup_mode: `Super ~initial_root_transition ~signature_kind: Testnet )
903+ ~catchup_mode: `Super ~initial_root_transition )
897904
898905 let assert_transitions_increasingly_sorted ~root
899906 (incoming_transitions : Transition_cache.element list ) =
0 commit comments