@@ -618,20 +618,24 @@ let setup_daemon logger ~itn_features ~default_snark_worker_fee =
618618 " true|false Whether to send the commit SHA used to build the node to \
619619 the uptime service. (default: false)"
620620 no_arg
621- and hardfork_mode =
622- (*
623- There's 2 hardfork mode, namely Legacy and Auto. Reference:
624- - https://www.notion.so/o1labs/HF-Mina-node-changes-specification-216e79b1f910805d9865e44f2f4baf0e
625- - https://www.notion.so/o1labs/V2-MIP-draft-HF-automation-250e79b1f9108010b0c5f2b1f416640b
626- *)
627- flag " --hardfork-mode" ~aliases: [ " hardfork-mode" ]
621+ and hardfork_handling =
622+ (* The two hard fork modes are migrate-exit (the "auto" hard fork mode) and
623+ keep-running (the "legacy" hard fork mode). See
624+ https://github.com/MinaProtocol/MIPs/pull/32. This option currently only
625+ controls the ledger sync feature (keeping migrated versions of the root
626+ and epoch ledger databases alongside the stable ones). TODO: the code
627+ will eventually need to be updated so this option also causes the daemon
628+ to generate and save its own hard fork config at the [slot_chain_end] and
629+ then shut down. *)
630+ flag " --hardfork-handling" ~aliases: [ " hardfork-handling" ]
628631 ~doc:
629- " auto|legacy Mode of hardfork. Under auto mode, the daemon would back \
630- all ledgers that are needed for post-hardfork node to bootstrap with \
631- 2 databases, one for before, and one for after the hardfork. Under \
632- legacy mode, all databased backed ledgers are backed by one database. \
633- THIS FLAG IS INTERNAL USE ONLY AND WOULD BE REMOVED WITHOUT NOTICE"
634- (optional_with_default Hardfork_mode. Legacy Hardfork_mode. arg)
632+ " keep-running|migrate-exit Internal flag, controlling how the daemon \
633+ handles an upcoming hard fork. Exposed for testing purposes. \
634+ Currently it only causes the daemon to maintain migrated versions of \
635+ the root and epoch ledger databases alongside the stable databases. \
636+ (default: keep-running). "
637+ (optional_with_default Hardfork_handling. Keep_running
638+ Hardfork_handling. arg )
635639 in
636640 let to_pubsub_topic_mode_option =
637641 let open Gossip_net.Libp2p in
@@ -841,7 +845,7 @@ let setup_daemon logger ~itn_features ~default_snark_worker_fee =
841845 in
842846 let compile_config = Mina_compile_config.Compiled. t in
843847 let ledger_backing_type =
844- Mina_lib.Config. ledger_backing ~hardfork_mode
848+ Mina_lib.Config. ledger_backing ~hardfork_handling
845849 in
846850 let % bind ( precomputed_values
847851 , config_jsons
@@ -1484,7 +1488,7 @@ Pass one of -peer, -peer-list-file, -seed, -peer-list-url.|} ;
14841488 ~stop_time_interval ~node_status_url
14851489 ~graphql_control_port: itn_graphql_port ~simplified_node_stats
14861490 ~zkapp_cmd_limit: (ref compile_config.zkapp_cmd_limit)
1487- ~itn_features ~compile_config ~hardfork_mode () )
1491+ ~itn_features ~compile_config ~hardfork_handling () )
14881492 in
14891493 { mina
14901494 ; client_trustlist
0 commit comments