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
8 changes: 5 additions & 3 deletions src/lib/genesis_ledger_helper/genesis_ledger_helper.ml
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ module Genesis_proof = struct
return None

let generate_inputs ~runtime_config ~proof_level ~ledger ~genesis_epoch_data
~constraint_constants ~blockchain_proof_system_id
~constraint_constants ~blockchain_proof_system_id ~compile_config
~(genesis_constants : Genesis_constants.t) =
let consensus_constants =
Consensus.Constants.create ~constraint_constants
Expand All @@ -682,6 +682,7 @@ module Genesis_proof = struct
{ Genesis_proof.Inputs.runtime_config
; constraint_constants
; proof_level
; compile_config
; blockchain_proof_system_id
; genesis_ledger = ledger
; genesis_epoch_data
Expand All @@ -708,6 +709,7 @@ module Genesis_proof = struct
; consensus_constants = inputs.consensus_constants
; constraint_constants = inputs.constraint_constants
; genesis_body_reference = inputs.genesis_body_reference
; compile_config = inputs.compile_config
}
| _ ->
Deferred.return (Genesis_proof.create_values_no_proof inputs)
Expand Down Expand Up @@ -783,7 +785,7 @@ module Config_loader : Config_loader_intf = struct
Runtime_config.Constants.constraint_constants constants
in
let proof_level = Runtime_config.Constants.proof_level constants in
let _compile_config = Runtime_config.Constants.compile_config constants in
let compile_config = Runtime_config.Constants.compile_config constants in
let genesis_constants =
Runtime_config.Constants.genesis_constants constants
in
Expand Down Expand Up @@ -816,7 +818,7 @@ module Config_loader : Config_loader_intf = struct
let proof_inputs =
Genesis_proof.generate_inputs ~runtime_config:config ~proof_level
~ledger:genesis_ledger ~constraint_constants ~genesis_constants
~blockchain_proof_system_id ~genesis_epoch_data
~compile_config ~blockchain_proof_system_id ~genesis_epoch_data
in
(proof_inputs, config)

Expand Down
4 changes: 4 additions & 0 deletions src/lib/genesis_proof/genesis_proof.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Inputs = struct
; constraint_constants : Genesis_constants.Constraint_constants.t
; proof_level : Genesis_constants.Proof_level.t
; genesis_constants : Genesis_constants.t
; compile_config : Mina_compile_config.t
; genesis_ledger : Genesis_ledger.Packed.t
; genesis_epoch_data : Consensus.Genesis_epoch_data.t
; genesis_body_reference : Consensus.Body_reference.t
Expand Down Expand Up @@ -85,6 +86,7 @@ module T = struct
; constraint_constants : Genesis_constants.Constraint_constants.t
; genesis_constants : Genesis_constants.t
; proof_level : Genesis_constants.Proof_level.t
; compile_config : Mina_compile_config.t
Copy link
Member Author

@georgeee georgeee Jan 23, 2025

Choose a reason for hiding this comment

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

RE commit 788ab19

This field is added to Genesis_proof.t so that it later appears in Precomputed_values.t and in all of the places that get it.

I don't like this solution. I tried to revert it on compatible, but there turned out to be many places which need to be updated.

I suggest to leave it "as is" and later find a better solution for passing Mina_compile_config.t to various structures. BTW, the name will soon be completely pointless, as this config is configured in runtime now as much as in runtime. I suggest after refactoring to get rid of any compile-time configuration whatsoever we reconsider use of both Mina_compile_config.t and Precomputed_values.t. And skip spending time on partial solutions now

Copy link
Member

Choose a reason for hiding this comment

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

I agree that this is terrible. The original PR should not have landed in this state.

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you against it so much as to ask us to rework this immediately?

Or are you okay with this change to live in the codebase for a bit longer? Until we have more progress on dismantling the compile-time config and then we plan to remove Mina_compile_config.t, so it will naturally disappear from Inputs.t as well.

; genesis_ledger : Genesis_ledger.Packed.t
; genesis_epoch_data : Consensus.Genesis_epoch_data.t
; genesis_body_reference : Consensus.Body_reference.t
Expand Down Expand Up @@ -223,6 +225,7 @@ let create_values_no_proof (t : Inputs.t) =
; constraint_constants = t.constraint_constants
; proof_level = t.proof_level
; genesis_constants = t.genesis_constants
; compile_config = t.compile_config
; genesis_ledger = t.genesis_ledger
; genesis_epoch_data = t.genesis_epoch_data
; genesis_body_reference = t.genesis_body_reference
Expand All @@ -240,6 +243,7 @@ let to_inputs (t : t) : Inputs.t =
; constraint_constants = t.constraint_constants
; proof_level = t.proof_level
; genesis_constants = t.genesis_constants
; compile_config = t.compile_config
; genesis_ledger = t.genesis_ledger
; genesis_epoch_data = t.genesis_epoch_data
; genesis_body_reference = t.genesis_body_reference
Expand Down
1 change: 1 addition & 0 deletions src/lib/precomputed_values/precomputed_values.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ let for_unit_tests =
; protocol_state_with_hashes
; constraint_system_digests = hashes
; proof_data = None
; compile_config = Mina_compile_config.For_unit_tests.t
})