Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwind all config loading changes since last release #16547

Merged
merged 16 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Revert "Merge pull request #16512 from MinaProtocol/georgeee/redo-161…
…86-after-review-fixes"

This reverts commit 6c93aa9, reversing
changes made to c7e6fc2.
  • Loading branch information
mrmr1993 committed Jan 28, 2025
commit 9bcecb51909ae1f51e9a7c4cb37f73cf9782ea9e
5 changes: 3 additions & 2 deletions src/app/cli/src/cli_entrypoint/mina_cli_entrypoint.ml
Original file line number Diff line number Diff line change
@@ -228,8 +228,9 @@ let setup_daemon logger ~itn_features =
and snark_work_fee =
flag "--snark-worker-fee" ~aliases:[ "snark-worker-fee" ]
~doc:
"FEE Amount a worker wants to get compensated for generating a snark \
proof"
(sprintf
"FEE Amount a worker wants to get compensated for generating a \
snark proof" )
(optional txn_fee)
and work_reassignment_wait =
flag "--work-reassignment-wait"
2 changes: 2 additions & 0 deletions src/app/cli/src/init/client.ml
Original file line number Diff line number Diff line change
@@ -567,6 +567,7 @@ let send_payment_graphql =
graphql_endpoint
({ Cli_lib.Flag.sender; fee; nonce; memo }, receiver, amount)
->
let open Deferred.Let_syntax in
let fee = Option.value ~default:default_transaction_fee fee in
let%map response =
let input =
@@ -595,6 +596,7 @@ let delegate_stake_graphql =
graphql_endpoint
({ Cli_lib.Flag.sender; fee; nonce; memo }, receiver)
->
let open Deferred.Let_syntax in
let fee = Option.value ~default:default_transaction_fee fee in
let%map response =
Graphql_client.query_exn
8 changes: 4 additions & 4 deletions src/lib/genesis_ledger_helper/genesis_ledger_helper.ml
Original file line number Diff line number Diff line change
@@ -847,14 +847,14 @@ module Config_loader : Config_loader_intf = struct
let%map.Option conf_dir = conf_dir in
Option.value ~default:(conf_dir ^/ "genesis") genesis_dir
in
let%bind.Deferred constants =
Runtime_config.Constants.load_constants_with_logging ?conf_dir
?cli_proof_level ~logger ~itn_features config_files
in
let%bind config =
Runtime_config.Json_loader.load_config_files ?conf_dir ~logger
config_files
in
let constants =
Runtime_config.Constants.load_constants' ?cli_proof_level ~itn_features
config
in
match%bind.Deferred
init_from_config_file ?overwrite_version ?genesis_dir ~logger ~constants
config
14 changes: 9 additions & 5 deletions src/lib/runtime_config/runtime_config.ml
Original file line number Diff line number Diff line change
@@ -2038,11 +2038,15 @@ module Constants : Constants_intf = struct
(* Use this function if you don't need/want the ledger configuration *)
let load_constants_with_logging ?conf_dir ?commit_id_short ?itn_features
?cli_proof_level ~logger config_files =
Deferred.Or_error.(
ok_exn
( Json_loader.load_config_files ?conf_dir ?commit_id_short ~logger
config_files
>>| load_constants' ?itn_features ?cli_proof_level ))
(* do not log reading compile time constants as this impacs cli command output *)
Deferred.Or_error.ok_exn
@@
let open Deferred.Or_error.Let_syntax in
let%map runtime_config =
Json_loader.load_config_files ?conf_dir ?commit_id_short ~logger
config_files
in
load_constants' ?itn_features ?cli_proof_level runtime_config

let load_constants = load_constants_with_logging ~logger:(Logger.null ())