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

node: updates for node.Config #74

Merged
merged 7 commits into from
Sep 24, 2021
Merged

node: updates for node.Config #74

merged 7 commits into from
Sep 24, 2021

Conversation

Wondertan
Copy link
Member

Context

Work on #30 turns out quite big and to follow the practice of keeping PR relatively small, I've extracted some work related to configs into separate PR

Changes

  • Simplify and prettify FullNode tests
  • Extract node.Config into a new subpackage to avoid circular dependencies
  • De/serialization functions for Config
  • Use Config value everywhere instead of pointers
    • Pointers create issues with serialization which can be fixed using mapstructure, but that is some additional complexity that does no make sense for me.
    • If you have arguments against using values for Config - pls bring them up, because I don't get the.
  • New FX utility

renaynay
renaynay previously approved these changes Sep 22, 2021
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

I'm okay with these changes. I don't really like passing the core config directly to the new full node but it's fine.

@renaynay renaynay linked an issue Sep 22, 2021 that may be closed by this pull request
7 tasks
liamsi
liamsi previously approved these changes Sep 23, 2021
Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

👍🏼

@Wondertan
Copy link
Member Author

I've moved back the Config to node, as there is another solution to dep cycle and I still prefer to keep Config in the node package, so it is clear that is related to the node by just looking into node.Config.

@Wondertan
Copy link
Member Author

Also, I've changed the toml parser to BurntSushi/toml from pelletier/go-toml/v2 as the latter does not support Config parsing of Tendermint config needed in #81, as having two parsers is not good, even if the latter is much better in terms of performance.

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

👏🏼 nothing to complain about.

node/config.go Show resolved Hide resolved
@Wondertan
Copy link
Member Author

Shipit-tipihS

@Wondertan Wondertan merged commit a51bc99 into main Sep 24, 2021
@Wondertan Wondertan deleted the hlib/config-updates branch September 24, 2021 16:24
@Wondertan Wondertan restored the hlib/config-updates branch January 7, 2022 14:40
@Wondertan Wondertan deleted the hlib/config-updates branch January 7, 2022 15:55
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.

repo: Define Node's repository to manage all on disk data
3 participants