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: add the ability to add packages to genesis transactions #2327

Merged
merged 7 commits into from
Jun 11, 2024

Conversation

zivkovicmilos
Copy link
Member

@zivkovicmilos zivkovicmilos commented Jun 11, 2024

Description

This PR introduces the ability to specify a package directory that will recursively be added (deployed) to the genesis.json, utilizing the existing gnoland genesis txs add command.

It also separates out the logic from gnoland genesis txs add into:

  • gnoland genesis txs add sheets for individual tx sheet files (ex. from tx-archive output)
  • gnoland genesis txs add packages for recursively adding packages (ex. examples)

sample

Related:

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@zivkovicmilos zivkovicmilos added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Jun 11, 2024
@zivkovicmilos zivkovicmilos requested a review from ajnavarro June 11, 2024 14:03
@zivkovicmilos zivkovicmilos self-assigned this Jun 11, 2024
@zivkovicmilos zivkovicmilos requested review from gfanton and a team as code owners June 11, 2024 14:03
gno.land/cmd/gnoland/genesis_txs_add.go Outdated Show resolved Hide resolved
gno.land/cmd/gnoland/genesis_txs_add.go Outdated Show resolved Hide resolved
@zivkovicmilos zivkovicmilos requested a review from gfanton June 11, 2024 14:12
Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

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

LGTM, the only thing I would do is to separate the functionality into two different commands. That will allow us in the future to add more functionality to them related to sheets or packages without needing to fiddle around with functionality that is not fully related.

gno.land/cmd/gnoland/genesis_txs_add.go Outdated Show resolved Hide resolved
@zivkovicmilos zivkovicmilos requested review from moul and a team as code owners June 11, 2024 15:57
@zivkovicmilos zivkovicmilos requested a review from ajnavarro June 11, 2024 15:57
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Jun 11, 2024
@zivkovicmilos
Copy link
Member Author

@r3v4s @adr-sk
We should probably incorporate this logic into the validator docs, as the initial examples folder should be preloaded 🙏

@zivkovicmilos zivkovicmilos added the breaking change Functionality that contains breaking changes label Jun 11, 2024
Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

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

Small nit to avoid a panic, apart from that, LGTM.

gno.land/cmd/gnoland/genesis_txs.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 82.10526% with 17 lines in your changes missing coverage. Please review.

Project coverage is 54.62%. Comparing base (5541e35) to head (fb25fc1).

Files Patch % Lines
gno.land/cmd/gnoland/genesis_txs_add_packages.go 81.81% 3 Missing and 3 partials ⚠️
gno.land/cmd/gnoland/genesis_txs_add_sheet.go 84.21% 3 Missing and 3 partials ⚠️
gno.land/cmd/gnoland/genesis_txs.go 81.81% 1 Missing and 1 partial ⚠️
gno.land/pkg/gnoland/genesis.go 0.00% 2 Missing ⚠️
gno.land/pkg/integration/testing_node.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2327      +/-   ##
==========================================
+ Coverage   54.60%   54.62%   +0.01%     
==========================================
  Files         579      581       +2     
  Lines       77899    77952      +53     
==========================================
+ Hits        42539    42582      +43     
- Misses      32191    32196       +5     
- Partials     3169     3174       +5     
Flag Coverage Δ
gno.land 61.89% <82.10%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@zivkovicmilos zivkovicmilos merged commit e2e0611 into master Jun 11, 2024
16 checks passed
@zivkovicmilos zivkovicmilos deleted the dev/zivkovicmilos/genesis-txs branch June 11, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Functionality that contains breaking changes 📦 ⛰️ gno.land Issues or PRs gno.land package related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants