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

Proposal: rename config file bcoin.conf -> node.conf #556

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BluSyn
Copy link
Collaborator

@BluSyn BluSyn commented Aug 3, 2018

Rationale:

  • This is more consistent naming now that we have separate conf files for wallet. (bcoin.conf and wallet.conf appears inconsistent, and ~/.bcoin/bcoin.conf is also redundant)
  • Allows more easy portability of the code to forks such as bcash, resulting fewer changes, and less documentation.
  • This would allow bclient to be instantly compatible with forks such as bcash without extra parameters or modifications. (https://github.com/bcoin-org/bclient/blob/master/bin/bcoin-cli#L36)

Cons:

  • Would result in a breaking change that all bcoin users would have to migrate to. In theory we could make this change backwards compatible, but appears that would require changing bcfg to support fallback conf files.
  • Requires synchronous changes/releases for bcoin, bcash and bclient

Additional considerations:
Environment variables are also inconsistent, eg. bcoin expects BCOIN_, bcash expects BCASH_, bclient expected BCOIN_ (even when talking to bcash). Ideally this could also be unified.

Nodar proposed changing to BNODE_ and BWALLET_. This would also be a breaking change for existing users, but would have a big impact on our ability to unify documentation/tutorials, resulting in less confusion for future users.

Note: ENV change is not currently included in this PR.

Thoughts?

@codecov-io
Copy link

Codecov Report

Merging #556 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #556   +/-   ##
=======================================
  Coverage   52.88%   52.88%           
=======================================
  Files         104      104           
  Lines       27700    27700           
  Branches     4748     4748           
=======================================
  Hits        14649    14649           
  Misses      13051    13051
Impacted Files Coverage Δ
lib/node/fullnode.js 55.82% <100%> (ø) ⬆️

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 f24a9b6...5b67939. Read the comment docs.

@tynes
Copy link
Member

tynes commented Aug 3, 2018

In regards to BNODE_ and BWALLET_, that would result in collisions between bcoin and bcash if you wanted to run them both in the same environment

@bucko13
Copy link
Contributor

bucko13 commented Aug 5, 2018

but appears that would require changing bcfg to support fallback conf files.

I think this is something we should probably consider anyway. Not having this caused some friction implementing bcfg in bPanel.

@BluSyn
Copy link
Collaborator Author

BluSyn commented Aug 5, 2018

In regards to BNODE_ and BWALLET_, that would result in collisions between bcoin and bcash if you wanted to run them both in the same environment

While true, 90% of configuration is generally the same between the two, and any differences can be handled via CLI or conf file options. While it's a rare use case, I think this would actually simplify ENV-based config when running both in parallel.

@tuxcanfly
Copy link
Member

Agree that node.conf is more consistent. Rather than updating bcfg to fallback, maybe we should use a migration?

Not sure about ENV, I'd prefer to have different but consistent prefixes. But open to having a common one if it helps deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants