Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
52b83de
Persist witnesses and proofs on disk
georgeee Nov 18, 2025
06e226d
Introduce Tagged types for witness and ledger proof
georgeee Nov 18, 2025
b35745f
Add some comments
georgeee Nov 19, 2025
9b71088
Simplify One_or_two.group_list
georgeee Nov 19, 2025
0eb863a
Simplify all_work_pairs
georgeee Nov 19, 2025
2cf32d5
Remove transaction_of_applied
georgeee Nov 19, 2025
5ad7878
Remove `status_of_applied`
georgeee Nov 19, 2025
8067c8a
Don't source accounts created from scan state
georgeee Nov 19, 2025
fee63d2
CAUTION DON'T MERGE: simplify transaction witness
georgeee Nov 19, 2025
f46c604
Add previous_protocol_state_body_opt to witness
georgeee Nov 19, 2025
5d4fe90
Simplify type of init_stack in witness
georgeee Nov 19, 2025
823760d
Add comment about future modifications of scan state
georgeee Nov 19, 2025
6f5026c
Add map_result for the scan tree
georgeee Nov 19, 2025
aac6c7c
Remove unused functions
georgeee Nov 20, 2025
248d578
Rename latest_ledger_proof{ -> _and_txs}
georgeee Nov 20, 2025
6286ccd
Introduce latest_ledger_proof and use where applicable
georgeee Nov 20, 2025
6eb7c39
Simplify type of fill_work_and_enqueue_transactions
georgeee Nov 20, 2025
d25221c
Change function latest_ledger_proof_{and_ -> }txs
georgeee Nov 20, 2025
c2a05fa
Move Transaction_type to a standalone module
georgeee Nov 20, 2025
2b284f9
Refactor first_and_second_pass_transactions_per_tree
georgeee Nov 20, 2025
496b261
Rename Transactions_{ordered -> categorized}
georgeee Nov 20, 2025
d4e5065
Simplify latest_ledger_proof_and_txs'
georgeee Nov 20, 2025
ec9f001
Refactor incomplete_txns_from_recent_proof_tree
georgeee Nov 20, 2025
9083e6a
Simplify incomplete_txns_from_recent_proof_tree
georgeee Nov 20, 2025
1b0a539
Remove some unused functions and defs
georgeee Nov 20, 2025
1b61bc0
Change semantics of Transaction_categorized
georgeee Nov 20, 2025
8333ec7
Rename latest_ledger_proof_and_txs' -> latest_recent_proof_txs
georgeee Nov 20, 2025
fb7caa5
NIT: use Option.first_some
georgeee Nov 20, 2025
3fc34a0
Fix multi_key_file_storage.mli
georgeee Nov 20, 2025
fb1b96c
Remove unused base_jobs_on_latest_tree
georgeee Nov 21, 2025
3690c0a
Remove unused base_jobs_on_earlier_tree
georgeee Nov 21, 2025
be91d5a
Change contents of scan state
georgeee Nov 20, 2025
c70a1d9
Use stable types in work partitioner
georgeee Nov 22, 2025
3c4fa15
Remove unused iter function
georgeee Nov 23, 2025
58623d1
Return all breadcrumbs in Transition_frontier.For_tests.gen
georgeee Nov 24, 2025
4d59903
Remove unused test function
georgeee Nov 24, 2025
5cf700a
Introduce all_state_hashes and size funs to frontier
georgeee Nov 24, 2025
e9a229e
Extract Application_state out of staged_ledger.ml
georgeee Nov 24, 2025
3160e24
Store command hashes in the diff
georgeee Nov 24, 2025
8464d9e
Use transaction hashes from breadcrumb
georgeee Nov 24, 2025
8be945e
Use transaction hashes in inclusion status
georgeee Nov 24, 2025
bafccae
Tx pool: don't recompute hashes in best tip handling
georgeee Nov 24, 2025
8f5bf7e
Don't recompute hashes in block verification
georgeee Nov 24, 2025
7ef7738
Reduce requirements for root data in validation
georgeee Nov 24, 2025
2121f0a
Best_tip_prover: return breadcrumb instead of block
georgeee Nov 24, 2025
094b60f
Simplify merkle list prover implementations
georgeee Nov 24, 2025
d6542f3
Extract apply_to_scan_state out of apply_diff
georgeee Nov 25, 2025
b2e744b
Move scan state application one layer up
georgeee Nov 25, 2025
a15a46f
Rename apply_diff{ -> _impl}
georgeee Nov 25, 2025
f8de7a1
Rename apply{ -> _diff}
georgeee Nov 25, 2025
811d961
Split staged ledger metrics reporting
georgeee Nov 25, 2025
ff89065
Separate diff and scan state application
georgeee Nov 25, 2025
1572437
Split persist_witnesses_and_works
georgeee Nov 25, 2025
1db1f13
Move persist_works to scan state module
georgeee Nov 25, 2025
f0ced76
Move persist_witnesses to scan state module
georgeee Nov 25, 2025
d697486
Move work/witness persistence up
georgeee Nov 25, 2025
9d2a8de
Don't use parent state hash for persistance
georgeee Nov 25, 2025
34e5ab9
Preserve serialized block
georgeee Nov 25, 2025
d1fd9fe
Store block tag in breadcrumb
georgeee Nov 25, 2025
72b5d19
Move a function to transition frontier
georgeee Nov 25, 2025
6a4b0a7
Enhance multi-key-file tests: detect a bug
georgeee Nov 25, 2025
87546ec
Fix a bug in multi-key file storage
georgeee Nov 25, 2025
2d7571d
Add append_values_exn and enhance tests
georgeee Nov 25, 2025
8dc8775
Cache staged_ledger_aux_and_.._at_hash result
georgeee Nov 26, 2025
b871c24
Move bootstrap's query impl to Root_history
georgeee Nov 26, 2025
f2a3787
Refactor protocol_states_for_scan_state
georgeee Nov 26, 2025
5f144a7
Replace Root_data.Historical.{of_breadcrumb -> create}
georgeee Nov 26, 2025
00bee22
Don't store scan state in historical root data
georgeee Nov 26, 2025
50b1ff6
Small refactoring of boostrap controller
georgeee Nov 26, 2025
ec3efd5
Change type of RPC
georgeee Nov 26, 2025
226a451
Rename some types and funs
georgeee Nov 26, 2025
6eb3a15
Introduce Root_data.Historical.protocol_state_with_hashes
georgeee Nov 26, 2025
41f47ad
Remove redundant check of protocol versions
georgeee Nov 26, 2025
2950886
Add materializing tag type for block
georgeee Nov 26, 2025
510f584
Don't store transitions in Root_data.Historical.t
georgeee Nov 26, 2025
453c37a
Remove redundant checks of protocol versions
georgeee Nov 26, 2025
49e4219
Use block tags in all RPCs
georgeee Nov 26, 2025
d001696
Implement passthru serialization for tags in RPCs
georgeee Nov 26, 2025
e0b478d
Reduce usage of validated_transition
georgeee Nov 26, 2025
b0149ff
Simplify garbage representation in diff.ml
georgeee Nov 26, 2025
e760f2d
Limit usage of Breadcrumb.block
georgeee Nov 26, 2025
4508165
Don't use Breadcrumb_block in uptime_service
georgeee Nov 26, 2025
ae924b7
Reduce usages of Breadcrumb.block_with_hash
georgeee Nov 26, 2025
9b19151
Retrieve command hashes before adding to frontier
georgeee Nov 26, 2025
da9a952
Store transaction hash set in breadcrumb
georgeee Nov 27, 2025
b34f379
Update Breadcrumb.to_yojson (used in logging only)
georgeee Nov 27, 2025
8a258bf
Use block tags in all root-related types
georgeee Nov 27, 2025
a47fc77
Remove redundant stable types
georgeee Nov 27, 2025
a9f0bc3
Extend Root_data.Minimal.t
georgeee Nov 27, 2025
63e5af9
Remove staged ledger from Root_data.t
georgeee Nov 27, 2025
c3ed1cf
Include block data into Root_data.Common
georgeee Nov 27, 2025
1d01cbd
Don't rely on Transition entry for root
georgeee Nov 27, 2025
69c5684
Use new format for transition storage
georgeee Nov 27, 2025
5d57556
Store breadcrumb in lightweight way
georgeee Nov 27, 2025
573130b
Don't read block bytes when loading frontier
georgeee Nov 27, 2025
919c0dd
Add --migrate-frontier flag to fix-persistent-frontier
georgeee Nov 27, 2025
cd72221
Print RAM used after frontier loading
georgeee Nov 27, 2025
54c090b
Fix compatibility of database
georgeee Nov 27, 2025
adc6945
Remove problematic fold_result usages, fix a bug
georgeee Nov 28, 2025
e334c4b
Skip checking arcs in fix-persistent-frontier
georgeee Nov 28, 2025
6f6a183
Revert faulty change introduced in 3e9d36f15
georgeee Nov 29, 2025
5e04b4f
Small refactoring of transaction_snark_scan_state.ml
georgeee Nov 29, 2025
7cd7c30
Fix inconsistency between new and old implementations
georgeee Nov 29, 2025
eaf70a5
Fix another inconsistency between new and old implementations
georgeee Nov 30, 2025
b4916a8
Update logging messages
georgeee Nov 30, 2025
8bb6282
Skip command verification when loading from disk
georgeee Nov 30, 2025
3ff71cc
TMP: disable extension updates, to see if it's the leak of RAM
georgeee Dec 1, 2025
141a70e
Print RAM usage after explicit GC.compact
georgeee Dec 2, 2025
6b4036c
Print additional heap stats
georgeee Dec 2, 2025
414c396
Experimental
georgeee Dec 3, 2025
79bf6f5
Revert "TMP: disable extension updates, to see if it's the leak of RAM"
georgeee Dec 3, 2025
8bbaf87
Revert "Experimental"
georgeee Dec 3, 2025
d3f3797
Remove temporary hack
georgeee Dec 4, 2025
d27da3d
Remove unused derivings
georgeee Dec 4, 2025
01cee96
Remove internal methods from interface of Transaction_with_witness
georgeee Dec 4, 2025
6ba04be
Store transaction_applied_tag in latest stable tx witness
georgeee Dec 4, 2025
021e1ee
Implement scan state hash in backwards-compatible way
georgeee Dec 4, 2025
995d607
fixup! Fix compatibility of database
georgeee Dec 4, 2025
34e0505
Fix bootstrap's RPC: use old scan state representation
georgeee Dec 4, 2025
66aec9b
Introduce root_history_capacity parameter to database.ml
georgeee Dec 4, 2025
ca126bb
Keep root history in DB, garbage-collect disk data
georgeee Dec 4, 2025
a0dbef4
Fix Database.check
georgeee Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/app/archive/lib/diff.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
open Mina_block
open Core_kernel
open Mina_base
module Breadcrumb = Transition_frontier.Breadcrumb
Expand Down Expand Up @@ -27,9 +26,6 @@ module Transition_frontier = struct
(Account_id.Stable.Latest.t * Receipt.Chain_hash.Stable.Latest.t)
list
}
| Root_transitioned of
Transition_frontier.Diff.Root_transition.Lite.Stable.Latest.t
| Bootstrap of { lost_blocks : State_hash.Stable.Latest.t list }
[@@deriving bin_io_unversioned]
end

Expand Down Expand Up @@ -101,13 +97,7 @@ module Builder = struct
let account_creation_fee =
precomputed_values.constraint_constants.account_creation_fee
in
let previous_block_state_hash =
Mina_block.header block |> Header.protocol_state
|> Mina_state.Protocol_state.previous_state_hash
in
List.map
(Staged_ledger.latest_block_accounts_created staged_ledger
~previous_block_state_hash ) ~f:(fun acct_id ->
List.map (Breadcrumb.accounts_created breadcrumb) ~f:(fun acct_id ->
(acct_id, account_creation_fee) )
in
let tokens_used =
Expand Down
68 changes: 34 additions & 34 deletions src/app/archive/lib/processor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4590,39 +4590,38 @@ let add_block_aux_extensional ~proof_cache_db ~logger ~signature_kind ?retries
let run pool reader ~proof_cache_db ~genesis_constants ~constraint_constants
~logger ~delete_older_than : unit Deferred.t =
Strict_pipe.Reader.iter reader ~f:(function
| Diff.Transition_frontier
(Breadcrumb_added
{ block; accounts_accessed; accounts_created; tokens_used; _ } ) -> (
let add_block =
Block.add_if_doesn't_exist ~logger ~constraint_constants
~accounts_accessed ~accounts_created
in
let hash = State_hash.With_state_hashes.state_hash in
let signature_kind = Mina_signature_kind.t_DEPRECATED in
let block =
With_hash.map
~f:
(Mina_block.write_all_proofs_to_disk ~signature_kind
~proof_cache_db )
block
in
match%bind
add_block_aux ~logger ~genesis_constants ~pool ~delete_older_than
~hash ~add_block ~tokens_used block
with
| Error e ->
let state_hash = hash block in
[%log warn]
~metadata:
[ ("state_hash", State_hash.to_yojson state_hash)
; ("error", `String (Caqti_error.show e))
]
"Failed to archive block with state hash $state_hash, see $error" ;
Deferred.unit
| Ok () ->
Deferred.unit )
| Transition_frontier _ ->
Deferred.unit )
| Diff.Transition_frontier
(Breadcrumb_added
{ block; accounts_accessed; accounts_created; tokens_used; _ } )
->
(let add_block =
Block.add_if_doesn't_exist ~logger ~constraint_constants
~accounts_accessed ~accounts_created
in
let hash = State_hash.With_state_hashes.state_hash in
let signature_kind = Mina_signature_kind.t_DEPRECATED in
let block =
With_hash.map
~f:
(Mina_block.write_all_proofs_to_disk ~signature_kind
~proof_cache_db )
block
in
match%bind
add_block_aux ~logger ~genesis_constants ~pool ~delete_older_than ~hash
~add_block ~tokens_used block
with
| Error e ->
let state_hash = hash block in
[%log warn]
~metadata:
[ ("state_hash", State_hash.to_yojson state_hash)
; ("error", `String (Caqti_error.show e))
]
"Failed to archive block with state hash $state_hash, see $error" ;
Deferred.unit
| Ok () ->
Deferred.unit ) )

(* [add_genesis_accounts] is called when starting the archive process *)
let add_genesis_accounts ~logger ~(runtime_config_opt : Runtime_config.t option)
Expand Down Expand Up @@ -4653,8 +4652,9 @@ let add_genesis_accounts ~logger ~(runtime_config_opt : Runtime_config.t option)
Account_id.Set.to_list account_id_set
in
let genesis_block =
let With_hash.{ data = block; hash = the_hash }, _ =
let With_hash.{ data = block; hash = the_hash } =
Mina_block.genesis ~precomputed_values
|> fst |> Mina_block.Validated.forget
in
With_hash.{ data = block; hash = the_hash }
in
Expand Down
129 changes: 112 additions & 17 deletions src/app/cli/src/init/fix_persistent_frontier.ml
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,33 @@ let apply_root_transitions ~logger ~db diffs =
.message err ) ) )
|> Result.ok_exn
in
let initial_root_history =
Transition_frontier.Persistent_frontier.Database.get_root_history db
in
let root_history_capacity =
Transition_frontier.Persistent_frontier.Database.root_history_capacity db
in
Transition_frontier.Persistent_frontier.Database.with_batch db
~f:(fun batch ->
( List.fold diffs ~init:initial_root_hash ~f:(fun old_root_hash diff ->
( List.fold diffs ~init:(initial_root_hash, initial_root_history)
~f:(fun (old_root_hash, old_root_history) diff ->
match diff with
| Diff.Lite.E.E
(Diff.Root_transitioned
{ new_root; garbage = Lite garbage; _ } ) ->
let parent_hash =
Root_data.Limited.Stable.Latest.transition new_root
|> Mina_block.Validated.Stable.Latest.header
|> Mina_block.Header.protocol_state
|> Mina_state.Protocol_state.previous_state_hash
in
assert (State_hash.equal parent_hash old_root_hash) ;
Transition_frontier.Persistent_frontier.Database.move_root
~old_root_hash ~new_root ~garbage batch ;
~old_root_hash ~new_root ~garbage ~old_root_history
~root_history_capacity batch ;
(* Return new root hash for next iteration *)
(Root_data.Limited.Stable.Latest.hashes new_root).state_hash
let old_root_history' =
if List.length old_root_history = root_history_capacity then
List.drop_last_exn old_root_history
else old_root_history
in
(new_root.state_hash, old_root_hash :: old_root_history')
| _ ->
failwith "Expected Root_transitioned diff" )
: State_hash.t )
: State_hash.t * State_hash.t list )
|> ignore ) ;
[%log' info logger] "Successfully applied $count diffs"
~metadata:[ ("count", `Int (List.length diffs)) ] ;
Expand All @@ -85,8 +91,57 @@ let apply_root_transitions ~logger ~db diffs =
~metadata:[ ("error", `String (Exn.to_string exn)) ] ;
Error ("Failed to apply root transitions: " ^ Exn.to_string exn)

let persist_all_transitions ~logger ~db breadcrumbs =
[%log info] "Re-persisting %d transitions" (List.length breadcrumbs) ;
Transition_frontier.Persistent_frontier.Database.with_batch db
~f:(fun batch ->
List.iter breadcrumbs ~f:(fun breadcrumb ->
Transition_frontier.Persistent_frontier.Database.set_transition
~state_hash:(Breadcrumb.state_hash breadcrumb)
~transition_data:(Breadcrumb.to_block_data_exn breadcrumb)
batch ) ) ;
[%log info] "Re-persisted %d transitions" (List.length breadcrumbs)

let print_ram_usage ~logger frontier_length rss_before rss_after rss_after_gc
elapsed =
let gc_stats = Gc.stat () in
let float_opt_json = Option.value_map ~default:`Null ~f:(fun x -> `Float x) in
[%log info]
"Loaded transition frontier of %d breadcrumbs in $elapsed seconds with RSS \
$rss_after_gc (started with $rss_before, before GC: $rss_after), see \
$gc_stats (taken after GC)"
frontier_length
~metadata:
[ ("elapsed", `Float (Time.Span.to_sec elapsed))
; ("rss_after", float_opt_json rss_after)
; ("rss_after_gc", float_opt_json rss_after_gc)
; ("rss_before", float_opt_json rss_before)
; ( "gc_stats"
, `Assoc
[ ("heap_words", `Int gc_stats.heap_words)
; ("major_words", `Float gc_stats.major_words)
; ("minor_words", `Float gc_stats.minor_words)
; ( "forced_major_collections"
, `Int gc_stats.forced_major_collections )
; ("major_collections", `Int gc_stats.major_collections)
; ("minor_collections", `Int gc_stats.minor_collections)
; ("compactions", `Int gc_stats.compactions)
; ("promoted_words", `Float gc_stats.promoted_words)
; ("heap_chunks", `Int gc_stats.heap_chunks)
; ("live_words", `Int gc_stats.live_words)
; ("free_words", `Int gc_stats.free_words)
; ("largest_free", `Int gc_stats.largest_free)
; ("fragments", `Int gc_stats.fragments)
; ("live_blocks", `Int gc_stats.live_blocks)
; ("free_blocks", `Int gc_stats.free_blocks)
; ("top_heap_words", `Int gc_stats.top_heap_words)
; ("stack_size", `Int gc_stats.stack_size)
] )
]

let fix_persistent_frontier_root_do ~logger ~config_directory
~chain_state_locations ~max_frontier_depth runtime_config =
~chain_state_locations ~max_frontier_depth ~migrate_frontier runtime_config
=
let signature_kind = Mina_signature_kind.t_DEPRECATED in
(* Get compile-time constants *)
let genesis_constants = Genesis_constants.Compiled.genesis_constants in
Expand Down Expand Up @@ -131,6 +186,10 @@ let fix_persistent_frontier_root_do ~logger ~config_directory
~directory:chain_state_locations.frontier
~time_controller:(Block_time.Controller.basic ~logger)
~signature_kind
~root_history_capacity:
( 2
* Transition_frontier.global_max_length
precomputed_values.genesis_constants )
in
let proof_cache_db = Proof_cache_tag.create_identity_db () in
let%bind.Deferred.Result persistent_frontier_root_hash =
Expand Down Expand Up @@ -170,6 +229,8 @@ let fix_persistent_frontier_root_do ~logger ~config_directory
~epoch_ledger_backing_type:Stable_db
Signature_lib.Public_key.Compressed.Set.empty
in
let rss_before = Mina_stdlib_unix.File_system.read_rss_kb None in
let start = Time.now () in
(* TODO loading of frontier is redundant unless fixing is needed *)
(* Load transition frontier using the standard API *)
let%bind frontier =
Expand All @@ -178,7 +239,10 @@ let fix_persistent_frontier_root_do ~logger ~config_directory
~context:(module Context)
~retry_with_fresh_db:false ~max_frontier_depth ~verifier
~consensus_local_state ~persistent_root ~persistent_frontier
~catchup_mode:`Super ~set_best_tip:false ()
~catchup_mode:`Super
~set_best_tip:false
(* application data is used in frontier migration, so we need to retain it *)
~retain_application_data:migrate_frontier ~check_arcs:false ()
with
| Error err ->
let err_str =
Expand All @@ -198,14 +262,39 @@ let fix_persistent_frontier_root_do ~logger ~config_directory
| Ok f ->
f
in
let rss_after = Mina_stdlib_unix.File_system.read_rss_kb None in
Gc.compact () ;
let rss_after_gc = Mina_stdlib_unix.File_system.read_rss_kb None in
let elapsed = Time.diff (Time.now ()) start in
print_ram_usage ~logger
(Transition_frontier.all_breadcrumbs frontier |> List.length)
rss_before rss_after rss_after_gc elapsed ;
let frontier_root_hash =
Transition_frontier.root frontier |> Breadcrumb.state_hash
in
assert (State_hash.equal frontier_root_hash persistent_frontier_root_hash) ;
let with_persistent_frontier_instance f =
Persistent_frontier.with_instance_exn persistent_frontier ~f
in
let migrate_frontier_do (instance : Persistent_frontier.Instance.t) =
if migrate_frontier then
let root_hash =
Transition_frontier.root frontier |> Breadcrumb.state_hash
in
let breadcrumbs =
(* Excluding root, because for it application data is not preserved,
and transition record isn't used. *)
Transition_frontier.all_breadcrumbs frontier
|> List.filter ~f:(fun breadcrumb ->
not @@ State_hash.equal root_hash
@@ Breadcrumb.state_hash breadcrumb )
in
persist_all_transitions ~logger ~db:instance.db breadcrumbs
else ()
in
let clean_frontier () =
Transition_frontier.with_persistent_frontier_instance_exn frontier
~f:migrate_frontier_do ;
let%bind () = Transition_frontier.close ~loc:__LOC__ frontier in
Mina_stdlib_unix.File_system.remove_dir tmp_root_location
in
Expand Down Expand Up @@ -263,8 +352,7 @@ let fix_persistent_frontier_root_do ~logger ~config_directory
in
( ( breadcrumb
, Transition_frontier.Util.to_protocol_states_map_exn
@@ Root_data.Limited.Stable.Latest.protocol_states
@@ root_transition.new_root )
root_transition.new_root.protocol_states_for_scan_state )
, res ) )
in
[%log info] "Generated $count transition diffs"
Expand All @@ -278,7 +366,7 @@ let fix_persistent_frontier_root_do ~logger ~config_directory
[%log info] "Successfully moved frontier root to match persistent root"

let fix_persistent_frontier_root ~config_directory ~config_file
~max_frontier_depth =
~max_frontier_depth ~migrate_frontier =
Logger.Consumer_registry.register ~commit_id:"" ~id:Logger.Logger_id.mina
~processor:Internal_tracing.For_logger.processor
~transport:
Expand Down Expand Up @@ -322,7 +410,8 @@ let fix_persistent_frontier_root ~config_directory ~config_file
Deferred.Result.return ()
| `Both_exist ->
fix_persistent_frontier_root_do ~logger ~config_directory
~chain_state_locations ~max_frontier_depth runtime_config
~chain_state_locations ~max_frontier_depth ~migrate_frontier
runtime_config

let command =
Command.async
Expand All @@ -337,6 +426,11 @@ let command =
and max_frontier_depth =
flag "--max-frontier-depth"
~doc:"INT maximum frontier depth (default: 10)" (optional int)
and migrate_frontier =
flag "--migrate-frontier"
~doc:
"BOOL whether to migrate frontier to the new format (default: false)"
no_arg
in
Cli_lib.Exceptions.handle_nicely
@@ fun () ->
Expand All @@ -352,6 +446,7 @@ let command =
match%bind
fix_persistent_frontier_root ~config_directory:conf_dir ~config_file
~max_frontier_depth:(Option.value max_frontier_depth ~default:10)
~migrate_frontier
with
| Ok () ->
printf "Persistent frontier root fix completed successfully.\n" ;
Expand Down
Loading