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

allow custom configs in Gnosis binary #4134

Merged
merged 1 commit into from
Sep 19, 2022
Merged

allow custom configs in Gnosis binary #4134

merged 1 commit into from
Sep 19, 2022

Conversation

etan-status
Copy link
Contributor

When running as Gnosis-chain binary the config was no longer adjustable. Restores loading custom configs when running as Gnosis-chain binary, as long as the following keys remain same:

  • SLOTS_PER_EPOCH=16
  • SECONDS_PER_SLOT=5
  • BASE_REWARD_FACTOR=25
  • EPOCHS_PER_SYNC_COMMITTEE_PERIOD=512

This allows running the Gnosis-chain binary on custom test networks.

When running as Gnosis-chain binary the config was no longer adjustable.
Restores loading custom configs when running as Gnosis-chain binary,
as long as the following keys remain same:
- SLOTS_PER_EPOCH=16
- SECONDS_PER_SLOT=5
- BASE_REWARD_FACTOR=25
- EPOCHS_PER_SYNC_COMMITTEE_PERIOD=512

This allows running the Gnosis-chain binary on custom test networks.
proc getRuntimeConfig*(eth2Network: Option[string]): RuntimeConfig {.raises: [Defect, IOError].} =
checkNetworkParameterUse eth2Network
gnosisMetadata.cfg
proc getRuntimeConfig*(
Copy link
Contributor

@zah zah Sep 17, 2022

Choose a reason for hiding this comment

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

This function should be removed now and all usages can be replaced with loadEth2Network(ethNetwork).cfg (or its moral equivalent).

In particular, the use of defaultRuntimeConfig is inappropriate due to the reasoning provided in #4121 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds more like a followup rather than a part of relaxing the Gnosis specific restrictions, but generally agree that this can now be done.

@github-actions
Copy link

Unit Test Results

       12 files       860 suites   1h 7m 5s ⏱️
  1 982 tests   1 835 ✔️ 147 💤 0
10 662 runs  10 472 ✔️ 190 💤 0

Results for commit 2f0a4b6.

@zah zah merged commit abd6581 into unstable Sep 19, 2022
@zah zah deleted the dev/etan/nw-gnosis branch September 19, 2022 09:25
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