celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

node/state: Refactor state constructor into a better pattern

Open renaynay opened this issue 3 years ago • 1 comments

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/state subpackage
  • defines state components as a fx.Module
  • moves state-related config opts into the node/state subpackage
  • moves configuration options for node into node/configuration package 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

renaynay avatar Aug 09 '22 15:08 renaynay

Codecov Report

Merging #997 (27ca75f) into main (ace2fda) will increase coverage by 3.69%. The diff coverage is 60.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.

codecov-commenter avatar Aug 12 '22 13:08 codecov-commenter

There are still issues with config modifier persistence. Looking into it...

renaynay avatar Sep 05 '22 08:09 renaynay

FAIL: TestFullReconstructFromLights (32.60s)

distractedm1nd avatar Sep 19 '22 09:09 distractedm1nd