celestia-node
celestia-node copied to clipboard
refactor(params): Moving params to nodebuilder and adding config
Closes #1076
Reviewers: Please test for yourself to verify it still works.
@Wondertan what do you think of this approach?
In the style of #1161
These params could honestly even live inside of p2p module bc they are related to p2p.
I wouldnt be opposed to that, I originally had them in their own package - @Wondertan what do you think?
I agree that p2p
is fine also, so let's do this. This might also require changes in the flag names
Some issues came up during rebasing, fixing
@distractedm1nd, conflicts
i literally rebased this morning 🥲
Requesting changes because the solution for #1189 in this PR does not fix the core problem of #1189: our libs/pkgs should not import node and its modules, as it is a logical cyclic dependency(node depends on header and wise-versa) and prevents usage of header pkg without importing the node.
The alternative is passing the network name as a protocol prefix string which is better be optional. Our protocols will be used in other projects. Specifically, the header pkg and there is already ongoing work in https://github.com/celestiaorg/go-header
Let's revert the change and solve the #1189 issue in the subsequent PR, as it is out of scope. It's fine that the main will be broken for some time for Mamaki.
@Wondertan as long as celestia-node requires header-ex and fraud-ex to contain appended chainIDs, I'm fine with this approach.
Codecov Report
Merging #1168 (046c992) into main (d239616) will increase coverage by
0.27%
. The diff coverage is49.01%
.
@@ Coverage Diff @@
## main #1168 +/- ##
==========================================
+ Coverage 55.86% 56.14% +0.27%
==========================================
Files 160 160
Lines 9725 9932 +207
==========================================
+ Hits 5433 5576 +143
- Misses 3756 3802 +46
- Partials 536 554 +18
Impacted Files | Coverage Δ | |
---|---|---|
cmd/celestia/full.go | 36.76% <0.00%> (-3.56%) |
:arrow_down: |
cmd/celestia/light.go | 36.23% <0.00%> (-3.46%) |
:arrow_down: |
cmd/start.go | 29.26% <0.00%> (ø) |
|
fraud/service.go | 75.00% <ø> (ø) |
|
header/p2p/exchange.go | 68.38% <ø> (ø) |
|
nodebuilder/init.go | 63.51% <0.00%> (ø) |
|
nodebuilder/p2p/bitswap.go | 87.50% <ø> (ø) |
|
nodebuilder/p2p/bootstrap.go | 30.76% <ø> (ø) |
|
nodebuilder/p2p/genesis.go | 33.33% <ø> (ø) |
|
nodebuilder/p2p/host.go | 80.64% <ø> (ø) |
|
... and 24 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.