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

feat: cli: set current network version from params #8111

Merged
merged 1 commit into from
Feb 17, 2022

Conversation

travisperson
Copy link
Contributor

@travisperson travisperson commented Feb 16, 2022

allows automation to correctly set the network version for the currently built network with no variable inputs.

Related Issues

When creating a network, by default, the latest network version (NewestNetworkVersion) is used in the genesis network template file. If the network does not start on the default latest network version (eg has upgrade epochs set / GenesisNetworkVersion is smaller), the network will fail to startup due to invalid network versions.

Proposed Changes

Add a flag that will use the build param GenesisNetworkVersion to set the network version. This ensures that the genesis network version always matches the network being built (if lotus-seed is built with the network flags).

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • All commits have a clear commit message.
  • The PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, INTERFACE BREAKING CHANGE, CONSENSUS BREAKING, build, chore, ci, docs,perf, refactor, revert, style, test
    • area: api, chain, state, vm, data transfer, market, mempool, message, block production, multisig, networking, paychan, proving, sealing, wallet, deps
  • This PR has tests for new functionality or change in behaviour
  • If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or Discussion Tutorials.
  • CI is green

@travisperson travisperson requested a review from a team as a code owner February 16, 2022 20:47
@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #8111 (ca9bcc9) into master (d9c7634) will increase coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8111      +/-   ##
==========================================
+ Coverage   39.16%   39.21%   +0.04%     
==========================================
  Files         660      660              
  Lines       71436    71434       -2     
==========================================
+ Hits        27978    28010      +32     
+ Misses      38635    38592      -43     
- Partials     4823     4832       +9     
Impacted Files Coverage Δ
cmd/lotus-seed/genesis.go 0.00% <0.00%> (ø)
miner/warmup.go 62.50% <0.00%> (-12.50%) ⬇️
miner/miner.go 55.73% <0.00%> (-2.63%) ⬇️
storage/miner.go 69.31% <0.00%> (-2.28%) ⬇️
paychmgr/simple.go 79.32% <0.00%> (-0.93%) ⬇️
blockstore/autobatch.go 57.14% <0.00%> (-0.85%) ⬇️
chain/sync_manager.go 66.77% <0.00%> (-0.63%) ⬇️
chain/gen/gen.go 68.80% <0.00%> (-0.62%) ⬇️
storage/wdpost_changehandler.go 97.64% <0.00%> (-0.48%) ⬇️
extern/sector-storage/sched_worker.go 78.19% <0.00%> (-0.30%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9c7634...ca9bcc9. Read the comment docs.

Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

This is good, I'd also be happy to have build.GenesisNetworkVersion (instead of NewestNetworkVersion) be the default if the new network-version flag isn't supplied

allows automation to correctly set the network version for the currently
built network with no variable inputs.
@travisperson travisperson force-pushed the travis/set-current-network-version branch from 3938dfe to ca9bcc9 Compare February 16, 2022 21:03
@travisperson
Copy link
Contributor Author

I like that, updated.

@arajasek
Copy link
Contributor

Merged into feat/fvm (#8120), but no reason not to land this in master too

@arajasek arajasek merged commit 72021b3 into master Feb 17, 2022
@arajasek arajasek deleted the travis/set-current-network-version branch February 17, 2022 16: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.

3 participants