-
Notifications
You must be signed in to change notification settings - Fork 629
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
feat(fork-network): use the epoch config files to setup the nodes #12420
Conversation
9b9c27b
to
3eff44f
Compare
near_config.genesis.config.protocol_version = genesis_protocol_version; | ||
|
||
// This is based on the assumption that epoch length is part of genesis config and not epoch config. | ||
near_config.genesis.config.epoch_length = epoch_length; |
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.
maybe also assert that genesis and epoch config have the same lengths? is it possible that they are different?
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.
In this case, the epoch_length
, comes from the cli parameter passed by neard-runner
.
If we dump the epcoh config files on init
, the epoch config will have epoch_length=43200
(the value from mainnet)
The epoch_length
is a special case of epoch_config
. Given that a lot of tests instrument the epoch_length
from genesis, we decided to keep genesis as the source of truth for the epoch length.
3eff44f
to
4e95621
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12420 +/- ##
==========================================
- Coverage 71.47% 71.46% -0.02%
==========================================
Files 837 837
Lines 169348 169370 +22
Branches 169348 169370 +22
==========================================
- Hits 121043 121038 -5
- Misses 42962 42983 +21
- Partials 5343 5349 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
When setting up a forknet, the
neard fork-network set-validators
command is run afterneard init
. Ifinit
was executed with--dump-epoch-config
, theepoch_configs
directory is populated with themainnet
epoch configs.Additionally, the mirror tool now includes an option to provide overrides to the epoch configurations.
For further details, check this PR (#12421).
If epoch config files are present, they will be utilized to create the genesis configuration for the fork network.