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

Open
wants to merge 15 commits into
base: compatible
Choose a base branch
from

Conversation

mrmr1993
Copy link
Member

This PR unwinds all the changes around loading configurations since the last release. This is a more aggressive version of #16546.

This PR was created by reverting the merges of each of a short list of offending PRs:

git revert -m 1 a2aac90c3b93e00515d265ca142634a26422d15e
git revert -m 1 6c93aa928aece8dcbd3de11200bf09a643fff8bc
git revert -m 1 c3c7c34b0719c016239f83c770603eb7768f9adc
git revert -m 1 c701a315ad9b2997250d5f577232c8de839f552c
git revert -m 1 ec43a6b7eaaf4b1acc9e9dc812cd19f5311f51d2
git revert -m 1 c130dfab6b7a99ed882e293540876ac95a1ff599
git revert -m 1 8a2a077d80aac3ed5181a694e1f2aa841a9e15e7
git revert -m 1 e130ac77a50149ebb0ff3840e4ac5dae32afe201
git revert -m 1 0b1293261ae9d170244a57eb0d3656e0add8dfef
git revert -m 1 6df5977c39b37653eb8360f63448fcb033a485f3

Some of these have small conflicts, mostly generated from the merge with #16093.

The remaining commits are to fix compilation failures after the reverts, except for 1bb57d6 which takes a more opinionated approach to actually propagate and use the runtime config's values for the implementation from #16093.

…ess-logging"

This reverts commit a2aac90, reversing
changes made to 9b8de11.
…86-after-review-fixes"

This reverts commit 6c93aa9, reversing
changes made to c7e6fc2.
…ing-from-cfg-loading"

This reverts commit c3c7c34, reversing
changes made to 40c86e2.
…onfig-logging"

This reverts commit c701a31, reversing
changes made to 9dbaa6d.
…ll-rt-config-to-graphql"

This reverts commit ec43a6b, reversing
changes made to 4ac4143.
…undant-fields-from-compile_config-type"

This reverts commit c130dfa, reversing
changes made to ecc244a.
…nfigurable_constants-to-toplevel"

This reverts commit 8a2a077, reversing
changes made to e130ac7.
…stants-loader-part-1"

This reverts commit e130ac7, reversing
changes made to b7f2e3d.
…-config-loading"

This reverts commit 0b12932, reversing
changes made to 6df5977.
…ntom-config"

This reverts commit 6df5977, reversing
changes made to ea896cc.
@mrmr1993 mrmr1993 requested review from a team as code owners January 29, 2025 00:06
@mrmr1993
Copy link
Member Author

!ci-build-me

@mrmr1993
Copy link
Member Author

!ci-nightly-me

@mrmr1993
Copy link
Member Author

@mrmr1993
Copy link
Member Author

!ci-build-me

let add_genesis_accounts ~logger
~(precomputed_values_opt : Precomputed_values.t option) pool =
match precomputed_values_opt with
let add_genesis_accounts ~logger ~(runtime_config_opt : Runtime_config.t option)
Copy link
Member

Choose a reason for hiding this comment

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

reviewer note

now we use the runtime config opt instead of the precomputed_value type. This seems a like we want to expose more to deeper levels of the application. The intention is to now parse the precomputed values out.

Copy link
Member

Choose a reason for hiding this comment

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

now we pass in the constraint and genesis constants from a higher level.

Copy link
Member

Choose a reason for hiding this comment

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

i was wrong we now compute the genesis proof and inputs within the add genesis accounts function.

Comment on lines +37 to +38
Process.run
~env:(`Extend [ ("MINA_CONFIG_FILE", config_file) ])
Copy link
Member

Choose a reason for hiding this comment

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

MINA_CONFIG_FILE can now be set to specify the config file path for testing.

@@ -344,7 +350,7 @@ module Make (Inputs : Intf.Inputs_intf) :
flag "--daemon-address" ~aliases:[ "daemon-address" ]
(required (Arg_type.create Host_and_port.of_string))
~doc:"HOST-AND-PORT address daemon is listening on"
and cli_proof_level =
and proof_level =
Copy link
Member

Choose a reason for hiding this comment

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

proof level can be set from the command line and ovveride the compile time config entry.

@@ -309,6 +310,8 @@ let there_and_back_again ~num_txn_per_acct ~txns_per_block ~slot_time ~fill_rate
return ()

let output_there_and_back_cmds =
let genesis_constants = Genesis_constants.Compiled.genesis_constants in
Copy link
Member

Choose a reason for hiding this comment

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

loaded and initialized at start

Comment on lines +402 to +405
~minimum_user_command_fee:genesis_constants.minimum_user_command_fee
~default_transaction_fee:default
in
there_and_back_again ~num_txn_per_acct ~txns_per_block ~txn_fee_option
Copy link
Member

Choose a reason for hiding this comment

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

no more daemon overriding with this logic

and graphql_target_node_option =
flag "--graphql-target-node" ~aliases:[ "graphql-target-node" ]
~doc:
"URL The graphql node to send graphl commands to. must be in \
format `<ip>:<port>`. default is `127.0.0.1:3085`"
(optional string)
and minimum_user_command_fee_opt = Cli_lib.Flag.fee_common in
Copy link
Member

Choose a reason for hiding this comment

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

this code removes the runtime overwrite and sticks to the compile time configuration.

@@ -387,33 +390,23 @@ let output_there_and_back_cmds =
transactions, if this is not present then we use the env var \
MINA_PRIVKEY_PASS"
(optional string)
and config_file = Cli_lib.Flag.config_files
Copy link
Member

Choose a reason for hiding this comment

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

we no longer care about the runtime files, only the baked in compile config.

@svv232
Copy link
Member

svv232 commented Feb 9, 2025

For later after the review is completed; noting it down while I remember

I want to make sure we can fully sync to mainnet and complete bootstrap with the current compile time config. By complete I expect to see the log looking something like

2024-12-05 22:08:17 UTC [Info] Bootstrap completed in "499.871108 seconds": $bootstrap_stats
  bootstrap_stats: [
  {
    "cycle_result": "success",
    "sync_ledger_time": "51.003126 seconds",
    "staged_ledger_data_download_time": "29.502922 seconds",
    "staged_ledger_construction_time": "223.346249 seconds",
    "local_state_sync_required": true,
    "local_state_sync_time": "127.585909 seconds"
  } 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants