-
Notifications
You must be signed in to change notification settings - Fork 548
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
PR #16186, split for re-review #16502
Open
georgeee
wants to merge
25
commits into
georgeee/redo-16186-for-better-review-base
Choose a base branch
from
georgeee/redo-16186-for-better-review
base: georgeee/redo-16186-for-better-review-base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
37fde44
Move transaction_capacity_log_2 to Runtime_config
georgeee 33ce3c3
Introduce Runtime_config.Constants
georgeee 71bd217
Rename Genesis_ledger_helper.init_from_config_file
georgeee e053563
Split out legacy part from inputs_from_config_file
georgeee 788ab19
Add compile_config to Genesis_proof.Inputs
georgeee 37e3584
Add config_files flag to Cli_lib
georgeee f070475
Remove default_transaction_fee from node_config
georgeee ffbfe45
Implement init_from_config_file (non-legacy)
georgeee b2eb3df
Use init_from_config_file in mina_lib tests
georgeee 34d7a98
Use init_from_config_file in archive
georgeee d5a56e3
Accept optional --config-file in standalone SW
georgeee 7860cdf
Accept optional --config-file in 'internal snark-worker'
georgeee 3062393
Use load_constants in snarky_tests
georgeee eaba812
Accept optional --config-file in vrf cli commands
georgeee 09bd9bd
Use load_constants in delegation_verify app
georgeee 2249d75
Accept --config-file in hash ledger and two other
georgeee 10df606
Accept optional --config-file for compile-time-constants
georgeee 39b7c74
Accept optional --config-file in constraint_system_digests
georgeee eefcc50
Accept optional --config-file in 'internal run-prover'
georgeee bb8ebe1
Accept optional --config-file in 'internal run-verifier', 'internal r…
georgeee c1d7fbd
Move load_config_files to Genesis_ledger_helpers
georgeee b47cf86
Remove default_snark_worker_fee usage
georgeee cb395b2
Use non-legacy inputs_from_config_file in load_config_files
georgeee b98f42f
Remove legacy functions from Config_loader
georgeee 60b5ab3
Remainder of changes from PR #16186
georgeee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,16 +230,20 @@ module Vrf = struct | |
flag "--total-stake" | ||
~doc:"AMOUNT The total balance of all accounts in the epoch ledger" | ||
(optional int) | ||
in | ||
and config_file = Flag.config_files in | ||
Exceptions.handle_nicely | ||
@@ fun () -> | ||
let env = Secrets.Keypair.env in | ||
let constraint_constants = | ||
Genesis_constants.Compiled.constraint_constants | ||
let open Deferred.Let_syntax in | ||
let%bind constraint_constants = | ||
let logger = Logger.create () in | ||
let%map conf = | ||
Runtime_config.Constants.load_constants ~logger config_file | ||
in | ||
Runtime_config.Constants.constraint_constants conf | ||
in | ||
if Option.is_some (Sys.getenv env) then | ||
eprintf "Using password from environment variable %s\n" env ; | ||
let open Deferred.Let_syntax in | ||
(* TODO-someday: constraint constants from config file. *) | ||
let%bind () = | ||
let password = | ||
|
@@ -297,17 +301,21 @@ module Vrf = struct | |
\"epochSeed\": _, \"delegatorIndex\": _} JSON message objects read on \ | ||
stdin" | ||
(let open Command.Let_syntax in | ||
let%map_open privkey_path = Flag.privkey_read_path in | ||
let%map_open privkey_path = Flag.privkey_read_path | ||
and config_file = Flag.config_files in | ||
Exceptions.handle_nicely | ||
@@ fun () -> | ||
let constraint_constants = | ||
Genesis_constants.Compiled.constraint_constants | ||
in | ||
let env = Secrets.Keypair.env in | ||
if Option.is_some (Sys.getenv env) then | ||
eprintf "Using password from environment variable %s\n" env ; | ||
let open Deferred.Let_syntax in | ||
(* TODO-someday: constraint constants from config file. *) | ||
let%bind constraint_constants = | ||
let logger = Logger.create () in | ||
let%map conf = | ||
Runtime_config.Constants.load_constants ~logger config_file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary use of logging, removed in |
||
in | ||
Runtime_config.Constants.constraint_constants conf | ||
in | ||
let%bind () = | ||
let password = | ||
lazy | ||
|
@@ -362,13 +370,18 @@ module Vrf = struct | |
totalStake: 1000000000}. The threshold is not checked against a \ | ||
ledger; this should be done manually to confirm whether threshold_met \ | ||
in the output corresponds to an actual won block." | ||
( Command.Param.return @@ Exceptions.handle_nicely | ||
(let open Command.Let_syntax in | ||
let%map_open config_file = Flag.config_files in | ||
Exceptions.handle_nicely | ||
@@ fun () -> | ||
let open Deferred.Let_syntax in | ||
let constraint_constants = | ||
Genesis_constants.Compiled.constraint_constants | ||
let%bind constraint_constants = | ||
let logger = Logger.create () in | ||
let%map conf = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unnecessary use of logging, removed in |
||
Runtime_config.Constants.load_constants ~logger config_file | ||
in | ||
Runtime_config.Constants.constraint_constants conf | ||
in | ||
(* TODO-someday: constraint constants from config file. *) | ||
let lexbuf = Lexing.from_channel In_channel.stdin in | ||
let lexer = Yojson.init_lexer () in | ||
let%bind () = | ||
|
@@ -399,7 +412,7 @@ module Vrf = struct | |
(Error_json.error_to_yojson err) ) ; | ||
`Repeat () ) | ||
in | ||
exit 0 ) | ||
exit 0) | ||
|
||
let command_group = | ||
Command.group ~summary:"Commands for vrf evaluations" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary use of logging, removed in
compatible
.