Closed renaynay closed 2 weeks ago
Attention: Patch coverage is 70.00000%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 44.73%. Comparing base (
2469e7a
) to head (088901f
). Report is 66 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
pruner/window.go | 50.00% | 2 Missing :warning: |
nodebuilder/das/constructors.go | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I have a couple of suggestions that could simplify the implementation:
Could we incorporate the default value for the SamplingWindow
directly within the [DefaultParameters()](https://github.com/celestiaorg/celestia-node/blob/c04bbd251e7947180aadba793255e16e3126ef56/das/options.go#L56-L63)
function? Could be just one-line addition.
Given that the SamplingWindow
value is always overwritten in our current setup, exposing this setting to users seems unnecessary and potentially misleading. We should consider making SamplingWindow
config field non-public. This approach would help prevent any confusion and ensure our configuration remains streamlined and intuitive.
While this isn't really a bug fix, it's more of a "UX" fix - I'm removing
SamplingWindow
from the node's config so that it doesn't confuse users to see "0ms" as the config value even though in practice it's 30 days.The reason there's a discrepancy is because we force the light sampling window in the DASer for light nodes in nodebuilder anyway so that config value is ignored regardless, meaning it does not need to be exposed.
Also adding
Duration()
method to return time.Duration instead of having to cast everywhere.