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

fix: add support for custom node config file #1240

Merged
merged 9 commits into from
Oct 20, 2023

Conversation

zivkovicmilos
Copy link
Member

@zivkovicmilos zivkovicmilos commented Oct 12, 2023

Description

This PR adds support for specifying a custom node configuration file using the --tm2-node-config flag.

Resolves #1234

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 🌱 feature New update to Gno 📦 ⛰️ gno.land Issues or PRs gno.land package related labels Oct 12, 2023
@zivkovicmilos zivkovicmilos self-assigned this Oct 12, 2023
@zivkovicmilos zivkovicmilos changed the title fix: add support for custom config file fix: add support for custom node config file Oct 12, 2023
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Oct 12, 2023
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Attention: 62 lines in your changes are missing coverage. Please review.

Comparison is base (0600d41) 47.50% compared to head (7d79506) 47.85%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1240      +/-   ##
==========================================
+ Coverage   47.50%   47.85%   +0.34%     
==========================================
  Files         367      372       +5     
  Lines       62221    62989     +768     
==========================================
+ Hits        29561    30142     +581     
- Misses      30242    30390     +148     
- Partials     2418     2457      +39     
Files Coverage Δ
gno.land/pkg/integration/gnoland.go 87.13% <ø> (ø)
tm2/pkg/bft/config/toml.go 77.19% <84.61%> (+14.44%) ⬆️
tm2/pkg/bft/config/config.go 49.61% <0.00%> (+7.01%) ⬆️
gno.land/cmd/gnoland/start.go 77.24% <53.33%> (-13.02%) ⬇️

... and 32 files with indirect coverage changes

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

@zivkovicmilos
Copy link
Member Author

zivkovicmilos commented Oct 12, 2023

@moul

While working on this PR I've come to the conclusion that our node init command is a total mess.

There is are many side effects happening when specifying the configuration file (inits happening behind the scenes, private key load-in circus...). I patch one thing, and another problem pops up. It's practically impossible to test the gnoland start command in-memory (unit test) without severe code gymnastics.

I've been discussing with @gfanton internally, and we would like to tackle this problem head on - the node initialization flow needs to be crystal clear and cannot be blocking efforts as it is now

227-seldom

Copy link
Member

@gfanton gfanton left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@zivkovicmilos
Copy link
Member Author

@moul ping for review 🙏

gno.land/cmd/gnoland/start.go Outdated Show resolved Hide resolved
gno.land/cmd/gnoland/start.go Outdated Show resolved Hide resolved
gno.land/cmd/gnoland/start.go Outdated Show resolved Hide resolved
@zivkovicmilos zivkovicmilos merged commit 902ccc6 into gnolang:master Oct 20, 2023
176 checks passed
@zivkovicmilos zivkovicmilos deleted the fix/support-node-config branch October 20, 2023 15:00
thehowl pushed a commit to thehowl/gno that referenced this pull request Oct 21, 2023
## Description

This PR adds support for specifying a custom node configuration file
using the `--tm2-node-config` flag.

Resolves gnolang#1234

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
gfanton pushed a commit to gfanton/gno that referenced this pull request Nov 9, 2023
## Description

This PR adds support for specifying a custom node configuration file
using the `--tm2-node-config` flag.

Resolves gnolang#1234

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 🌱 feature New update to Gno
Projects
Status: Done
Status: 🌟 Wanted for Launch
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

gnoland start --config flag is tied to the flag configuration and not the node config
4 participants