node/state: Refactor state constructor into a better pattern
This PR is intended to provide a framework to refactor the rest of our "service" construction according to this pattern. It does the following:
- moves state-related constructor components into the
node/statesubpackage - defines state components as a
fx.Module - moves state-related config opts into the
node/statesubpackage - moves configuration options for node into
node/configurationpackage to avoid cyclical dependencies
The work contained in this PR is related to https://github.com/celestiaorg/celestia-node/issues/958.
Will rebase on #965
Codecov Report
Merging #997 (27ca75f) into main (ace2fda) will increase coverage by
3.69%. The diff coverage is60.81%.
@@ Coverage Diff @@
## main #997 +/- ##
==========================================
+ Coverage 58.03% 61.72% +3.69%
==========================================
Files 132 149 +17
Lines 7937 8559 +622
==========================================
+ Hits 4606 5283 +677
+ Misses 2855 2823 -32
+ Partials 476 453 -23
| Impacted Files | Coverage Δ | |
|---|---|---|
| cmd/celestia/full.go | 39.68% <0.00%> (-2.70%) |
:arrow_down: |
| cmd/celestia/light.go | 39.06% <0.00%> (-3.32%) |
:arrow_down: |
| cmd/flags_header.go | 40.67% <0.00%> (-5.76%) |
:arrow_down: |
| cmd/start.go | 27.27% <0.00%> (-2.00%) |
:arrow_down: |
| core/fetcher.go | 65.17% <ø> (+13.39%) |
:arrow_up: |
| das/daser.go | 88.63% <ø> (+6.81%) |
:arrow_up: |
| ipld/get.go | 82.60% <ø> (+5.46%) |
:arrow_up: |
| ipld/helpers.go | 100.00% <ø> (ø) |
|
| nodebuilder/header/opts.go | 0.00% <0.00%> (ø) |
|
| nodebuilder/node/type.go | 35.71% <ø> (ø) |
|
| ... and 108 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
There are still issues with config modifier persistence. Looking into it...
FAIL: TestFullReconstructFromLights (32.60s)