From b64f947c1a9a1ec27815de099d85b656623de3e4 Mon Sep 17 00:00:00 2001 From: rene <41963722+renaynay@users.noreply.github.com> Date: Tue, 7 May 2024 15:57:47 +0200 Subject: [PATCH 1/4] fix(pruner/light): Fix light availability window provided (#3370) Thank you @walldiss for finding this. --- pruner/full/window_test.go | 14 ++++++++++++++ pruner/light/window.go | 4 +++- pruner/light/window_test.go | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pruner/full/window_test.go create mode 100644 pruner/light/window_test.go diff --git a/pruner/full/window_test.go b/pruner/full/window_test.go new file mode 100644 index 0000000000..627c76abe2 --- /dev/null +++ b/pruner/full/window_test.go @@ -0,0 +1,14 @@ +package full + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +// TestFullWindowConst exists to ensure that any changes to the sampling window +// are deliberate. +func TestFullWindowConst(t *testing.T) { + assert.Equal(t, time.Duration(Window), (30*24*time.Hour)+time.Hour) +} diff --git a/pruner/light/window.go b/pruner/light/window.go index 2241ecb063..eeabb0fda7 100644 --- a/pruner/light/window.go +++ b/pruner/light/window.go @@ -1,9 +1,11 @@ package light import ( + "time" + "github.com/celestiaorg/celestia-node/pruner" ) // Window is the availability window for light nodes in the Celestia // network (30 days). -const Window = pruner.AvailabilityWindow(30 * 24 * 60 * 60) +const Window = pruner.AvailabilityWindow(30 * 24 * time.Hour) diff --git a/pruner/light/window_test.go b/pruner/light/window_test.go new file mode 100644 index 0000000000..d74d594f70 --- /dev/null +++ b/pruner/light/window_test.go @@ -0,0 +1,14 @@ +package light + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +// TestLightWindowConst exists to ensure that any changes to the sampling window +// are deliberate. +func TestLightWindowConst(t *testing.T) { + assert.Equal(t, time.Duration(Window), 30*24*time.Hour) +} From 31a504f607ead68028a2587679e53fecff7a416a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 19:45:16 +0500 Subject: [PATCH 2/4] chore(deps): Bump golangci/golangci-lint-action from 5.1.0 to 5.3.0 (#3369) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/go-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index 021b8dd01b..e7abca5d10 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -41,7 +41,7 @@ jobs: go-version: ${{ inputs.go-version }} - name: golangci-lint - uses: golangci/golangci-lint-action@v5.1.0 + uses: golangci/golangci-lint-action@v5.3.0 with: args: --timeout 10m version: v1.56 From b2b75c1e88f9cb23c7eaca400b5d966d9a727f37 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 18:41:18 +0200 Subject: [PATCH 3/4] chore(deps): Bump github.com/hashicorp/go-getter from 1.7.0 to 1.7.4 (#3341) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hlib Kanunnikov --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 040ea12fa5..d852a48c61 100644 --- a/go.mod +++ b/go.mod @@ -188,7 +188,7 @@ require ( github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.0 // indirect + github.com/hashicorp/go-getter v1.7.4 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect diff --git a/go.sum b/go.sum index a06533f79c..1a726f0891 100644 --- a/go.sum +++ b/go.sum @@ -961,8 +961,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY= -github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0= +github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= From c04bbd251e7947180aadba793255e16e3126ef56 Mon Sep 17 00:00:00 2001 From: Gaurang Patel Date: Wed, 8 May 2024 08:06:56 -0500 Subject: [PATCH 4/4] chore(makefile): comment for install-global to clarify linux support only (#3340) refs #3169 && #3197 Instead of make install, I was using make install-global because my path ordered the go/bin last. Took me a bit of time to clarify why the -t option wasn't working, so I had just removed it locally.. Anyway, figured I'd put this up --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec041ea8b5..000d01fa02 100644 --- a/Makefile +++ b/Makefile @@ -73,9 +73,10 @@ else endif .PHONY: install +## install-global: Install the celestia-node binary (only for systems that support GNU coreutils, i.e. Linux). install-global: @echo "--> Installing Celestia" - @install -v ./build/* -t ${PREFIX}/bin/ + @install -v ./build/* -t ${PREFIX}/bin .PHONY: install-global ## go-install: Build and install the celestia-node binary into the GOBIN directory.