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

PR #16186, split for re-review #16502

Open
wants to merge 25 commits into
base: georgeee/redo-16186-for-better-review-base
Choose a base branch
from
Open
Show file tree
Hide file tree
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 Jan 22, 2025
33ce3c3
Introduce Runtime_config.Constants
georgeee Jan 22, 2025
71bd217
Rename Genesis_ledger_helper.init_from_config_file
georgeee Jan 22, 2025
e053563
Split out legacy part from inputs_from_config_file
georgeee Jan 22, 2025
788ab19
Add compile_config to Genesis_proof.Inputs
georgeee Jan 22, 2025
37e3584
Add config_files flag to Cli_lib
georgeee Jan 22, 2025
f070475
Remove default_transaction_fee from node_config
georgeee Jan 22, 2025
ffbfe45
Implement init_from_config_file (non-legacy)
georgeee Jan 22, 2025
b2eb3df
Use init_from_config_file in mina_lib tests
georgeee Jan 22, 2025
34d7a98
Use init_from_config_file in archive
georgeee Jan 22, 2025
d5a56e3
Accept optional --config-file in standalone SW
georgeee Jan 22, 2025
7860cdf
Accept optional --config-file in 'internal snark-worker'
georgeee Jan 22, 2025
3062393
Use load_constants in snarky_tests
georgeee Jan 22, 2025
eaba812
Accept optional --config-file in vrf cli commands
georgeee Jan 22, 2025
09bd9bd
Use load_constants in delegation_verify app
georgeee Jan 22, 2025
2249d75
Accept --config-file in hash ledger and two other
georgeee Jan 22, 2025
10df606
Accept optional --config-file for compile-time-constants
georgeee Jan 22, 2025
39b7c74
Accept optional --config-file in constraint_system_digests
georgeee Jan 22, 2025
eefcc50
Accept optional --config-file in 'internal run-prover'
georgeee Jan 22, 2025
bb8ebe1
Accept optional --config-file in 'internal run-verifier', 'internal r…
georgeee Jan 22, 2025
c1d7fbd
Move load_config_files to Genesis_ledger_helpers
georgeee Jan 22, 2025
b47cf86
Remove default_snark_worker_fee usage
georgeee Jan 22, 2025
cb395b2
Use non-legacy inputs_from_config_file in load_config_files
georgeee Jan 22, 2025
b98f42f
Remove legacy functions from Config_loader
georgeee Jan 22, 2025
60b5ab3
Remainder of changes from PR #16186
georgeee Jan 22, 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
16 changes: 7 additions & 9 deletions src/lib/mina_lib/tests/tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ let%test_module "Epoch ledger sync tests" =

let dir_prefix = "sync_test_data"

let genesis_constants = Genesis_constants.For_unit_tests.t

let constraint_constants =
Genesis_constants.For_unit_tests.Constraint_constants.t

let make_dirname s =
let open Core in
let uuid = Uuid_unix.create () |> Uuid.to_string in
Expand All @@ -51,7 +46,9 @@ let%test_module "Epoch ledger sync tests" =
let runtime_config : Runtime_config.t =
{ daemon = None
; genesis = None
; proof = None
; proof =
Some
{ Runtime_config.Proof_keys.default with level = Some No_check }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment about the change: we set the proof level used in mina_lib test to be No_check through runtime config and not through constants (which would be a 1:1 rewrite from previous code).

It'd be somewhat more straightforward to use the following code in the call below:

~constants:({(Runtime_config.Constants.magic_for_unit_tests runtime_config) with proof_level = No_check})

But it would work just the same as what is implemented now.

; ledger =
Some
{ base = Named "test"
Expand All @@ -66,10 +63,11 @@ let%test_module "Epoch ledger sync tests" =
}
in
match%map
Genesis_ledger_helper.Config_loader.init_from_config_file_legacy
Genesis_ledger_helper.Config_loader.init_from_config_file
~genesis_dir:(make_dirname "genesis_dir")
~constraint_constants ~genesis_constants ~logger
~proof_level:No_check runtime_config ~cli_proof_level:None
~constants:
(Runtime_config.Constants.magic_for_unit_tests runtime_config)
~logger runtime_config
with
| Ok (precomputed_values, _) ->
precomputed_values
Expand Down
13 changes: 13 additions & 0 deletions src/lib/runtime_config/runtime_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,19 @@ module Proof_keys = struct
; fork
}

let default =
{ level = None
; sub_windows_per_window = None
; ledger_depth = None
; work_delay = None
; block_window_duration_ms = None
; transaction_capacity = None
; coinbase_amount = None
; supercharged_coinbase_factor = None
; account_creation_fee = None
; fork = None
}

let to_json_layout
{ level
; sub_windows_per_window
Expand Down