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

Clean up init/join network CLI commands #3196

Merged
merged 28 commits into from
May 21, 2024
Merged

Conversation

sug0
Copy link
Collaborator

@sug0 sug0 commented May 8, 2024

Describe your changes

Closes #2423

Clean up the logic around init-network and join-network.

  • init-network no longer leaves behind a residual directory, it only outputs an archive with the chain data.
  • The generated release archive no longer contains a top-level .namada directory, only its contents.
  • join-network no longer configures CometBFT with persistent peers derived from genesis files by default, this is now gated behind the flag --add-persistent-peers.
  • Remove the fetch-wasms command which is somewhat redundant and was broken.
  • Heavily refactor gen_localnet.py
  • Allow generating localnets with multiple validators using gen_localnet.py

Indicate on which release or other PRs this topic is based on

v0.35.1

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 60.24%. Comparing base (4ed6229) to head (a61cbed).

Files Patch % Lines
crates/apps/src/lib/config/genesis/chain.rs 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3196      +/-   ##
==========================================
- Coverage   60.24%   60.24%   -0.01%     
==========================================
  Files         303      303              
  Lines       93191    93199       +8     
==========================================
- Hits        56145    56144       -1     
- Misses      37046    37055       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sug0 sug0 force-pushed the tiago/chain-init-cleanup branch 3 times, most recently from 0c48967 to e74d50a Compare May 9, 2024 13:22
@sug0 sug0 force-pushed the tiago/chain-init-cleanup branch from cd94df9 to e43acdc Compare May 9, 2024 14:08
@sug0 sug0 marked this pull request as ready for review May 9, 2024 14:21
sug0 added a commit that referenced this pull request May 9, 2024
@sug0 sug0 requested review from tzemanovic, jurevans and Fraccaman May 9, 2024 14:23
@sug0 sug0 requested a review from batconjurer May 9, 2024 18:14
@sug0
Copy link
Collaborator Author

sug0 commented May 9, 2024

maybe we should delete fetch-wasms altogether? it's kinda useless

sug0 added a commit that referenced this pull request May 10, 2024
@sug0 sug0 force-pushed the tiago/chain-init-cleanup branch from 891c530 to 35b8ca6 Compare May 10, 2024 07:39
batconjurer
batconjurer previously approved these changes May 10, 2024
tzemanovic
tzemanovic previously approved these changes May 10, 2024
Copy link
Member

@tzemanovic tzemanovic left a comment

Choose a reason for hiding this comment

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

nice, thx!

@sug0 sug0 dismissed stale reviews from tzemanovic and batconjurer via a61cbed May 10, 2024 12:25
@sug0 sug0 force-pushed the tiago/chain-init-cleanup branch from 35b8ca6 to a61cbed Compare May 10, 2024 12:25
brentstone added a commit that referenced this pull request May 10, 2024
* tiago/chain-init-cleanup:
  Changelog for #3196
  Remove unused global args in `init-network`
  scripts/gen_localnet.py: Parse epoch duration
  scripts/gen_localnet.py: Organize CLI args
  scripts/gen_localnet.py: Support multiple validators
  scripts/gen_localnet.py: Remove chain id from cmd str
  scripts/gen_localnet.py: Log which validator is joining network
  scripts/gen_localnet.py: Add colored output
  scripts/gen_localnet.py: Use modified templates
  scripts/gen_localnet.py: Move `init-network` to fn
  scripts/gen_localnet.py: Copy pre-genesis wallet to validator dir
  scripts/gen_localnet.py: Generalize `join-network`
  scripts/gen_localnet.py: Make script executable
  scripts/gen_localnet.py: Refactor to improve code quality
  scripts/gen_localnet.py: Move code to main function
  scripts/gen_localnet.py: Format code
  Remove fetch wasms CLI cmd
  Optionally add persistent peers to CometBFT
  Introduce helper fns to fetch wasm artifacts dir
  Rework `fetch-wasms` command
  Fix `join-network` in light of `init-network` changes
  Fix `init-network` in integration tests
  Return path to release archive from `init-network`
  Skip nonexistent wasm artifacts in `init-network`
  Only emit chain dist archive from `init-network`
  Do not include base dir in chain dist archive
  Stop copying wasm checksums twice to chain dist archive
  Package wasm artifacts with chain dist
@tzemanovic tzemanovic merged commit db25640 into main May 21, 2024
15 of 19 checks passed
@tzemanovic tzemanovic deleted the tiago/chain-init-cleanup branch May 21, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

init-network should be able to optionally bundle wasm files along with the network config files
4 participants