Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
echo "version=$GO_VERSION" >> $GITHUB_OUTPUT

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v6
with:
go-version: ${{ steps.get-go-version.outputs.version }}
cache: true
Expand Down
39 changes: 27 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
###################################################
### Supernode Makefile
###################################################

.PHONY: build build-sncli build-sn-manager
.PHONY: install-lumera setup-supernodes system-test-setup install-deps
.PHONY: gen-cascade gen-supernode
.PHONY: test-e2e test-unit test-integration test-system
.PHONY: release

# tools/paths
GO ?= go

# Build variables
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
GIT_COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
Expand All @@ -23,10 +30,14 @@ SN_MANAGER_LDFLAGS = -X main.Version=$(VERSION) \
-X main.GitCommit=$(GIT_COMMIT) \
-X main.BuildTime=$(BUILD_TIME)

build:
go.sum: go.mod
${GO} mod tidy
${GO} mod verify

build: go.sum
@mkdir -p release
@echo "Building supernode..."
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 ${GO} build \
-trimpath \
-ldflags="-s -w $(LDFLAGS)" \
-o release/supernode-linux-amd64 \
Expand All @@ -39,15 +50,19 @@ build-sncli: release/sncli
SNCLI_SRC := $(wildcard cmd/sncli/*.go) \
$(wildcard cmd/sncli/**/*.go)

release/sncli: $(SNCLI_SRC) cmd/sncli/go.mod cmd/sncli/go.sum
cmd/sncli/go.sum: cmd/sncli/go.mod
cd cmd/sncli && ${GO} mod tidy
cd cmd/sncli && ${GO} mod verify

release/sncli: $(SNCLI_SRC) cmd/sncli/go.sum
@mkdir -p release
@echo "Building sncli..."
@RELEASE_DIR=$(CURDIR)/release && \
cd cmd/sncli && \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=amd64 \
go build \
${GO} build \
-trimpath \
-ldflags="-s -w $(LDFLAGS)" \
-o $$RELEASE_DIR/sncli && \
Expand All @@ -61,7 +76,7 @@ build-sn-manager:
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64 \
go build \
${GO} build \
-trimpath \
-ldflags="-s -w $(SN_MANAGER_LDFLAGS)" \
-o ../release/sn-manager \
Expand All @@ -70,13 +85,13 @@ build-sn-manager:
@echo "sn-manager built successfully at release/sn-manager"

test-unit:
go test -v ./...
${GO} test -v ./...

test-integration:
go test -v -p 1 -count=1 -tags=integration ./...
${GO} test -v -p 1 -count=1 -tags=integration ./...

test-system:
cd tests/system && go test -tags=system_test -v .
cd tests/system && ${GO} test -tags=system_test -v .

gen-cascade:
protoc \
Expand All @@ -90,7 +105,7 @@ gen-cascade:
gen-supernode:
protoc \
--proto_path=proto \
--proto_path=$$(go list -m -f '{{.Dir}}' github.com/grpc-ecosystem/grpc-gateway)/third_party/googleapis \
--proto_path=$$(${GO} list -m -f '{{.Dir}}' github.com/grpc-ecosystem/grpc-gateway)/third_party/googleapis \
--go_out=gen \
--go_opt=paths=source_relative \
--go-grpc_out=gen \
Expand Down Expand Up @@ -140,17 +155,17 @@ system-test-setup: install-lumera setup-supernodes
# Run system tests with complete setup
test-e2e:
@echo "Running system tests..."
@cd tests/system && go test -tags=system_test -v .
@cd tests/system && ${GO} test -tags=system_test -v .

# Run cascade e2e tests only
test-cascade:
@echo "Running cascade e2e tests..."
@cd tests/system && go mod tidy && go test -tags=system_test -v -run TestCascadeE2E .
@cd tests/system && ${GO} mod tidy && ${GO} test -tags=system_test -v -run TestCascadeE2E .

# Run sn-manager e2e tests only
test-sn-manager:
@echo "Running sn-manager e2e tests..."
@cd tests/system && go test -tags=system_test -v -run '^TestSNManager' .
@cd tests/system && ${GO} test -tags=system_test -v -run '^TestSNManager' .



Expand Down
5 changes: 2 additions & 3 deletions cmd/sncli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ go 1.25.1

replace (
github.com/LumeraProtocol/supernode/v2 => ../..
github.com/LumeraProtocol/supernode/v2/supernode => ../../supernode
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.50.14
)

require (
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
github.com/LumeraProtocol/lumera v1.8.4
github.com/LumeraProtocol/supernode/v2 v2.3.88
github.com/LumeraProtocol/lumera v1.8.5
github.com/LumeraProtocol/supernode/v2 v2.0.0-00010101000000-000000000000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 2.4.9 or code from latest directory like it is right now would be best

github.com/cosmos/cosmos-sdk v0.53.0
github.com/spf13/cobra v1.10.1
google.golang.org/grpc v1.76.0
Expand Down
4 changes: 2 additions & 2 deletions cmd/sncli/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 h1:ig/FpDD2JofP/NExKQUbn7uOSZzJAQqogfqluZK4ed4=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0/go.mod h1:otE2jQekW/PqXk1Awf5lmfokJx4uwuqcj1ab5SpGeW0=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/LumeraProtocol/lumera v1.8.4 h1:6XzLS9gd0m3lOnppNS05WuZx4VCBEGvUN/KpVkSjqro=
github.com/LumeraProtocol/lumera v1.8.4/go.mod h1:twrSLfuXcHvmfQoN5e02Bg7rfeevUjF34SVqEJIvH1E=
github.com/LumeraProtocol/lumera v1.8.5 h1:VfRm9bEWYehd7Ek6YJFdQBFXH47SCuDO6IFdzq3y5+g=
github.com/LumeraProtocol/lumera v1.8.5/go.mod h1:DcG+PermGhl5uA51VaSA0EC+FXpDVm2XgifmYL9jJvE=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
cosmossdk.io/math v1.5.3
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/DataDog/zstd v1.5.7
github.com/LumeraProtocol/lumera v1.8.4
github.com/LumeraProtocol/lumera v1.8.5
github.com/LumeraProtocol/rq-go v0.2.1
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/cenkalti/backoff/v4 v4.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 h1:ig/FpDD2JofP/NExKQUbn7uOSZzJAQqogfqluZK4ed4=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0/go.mod h1:otE2jQekW/PqXk1Awf5lmfokJx4uwuqcj1ab5SpGeW0=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/LumeraProtocol/lumera v1.8.4 h1:6XzLS9gd0m3lOnppNS05WuZx4VCBEGvUN/KpVkSjqro=
github.com/LumeraProtocol/lumera v1.8.4/go.mod h1:twrSLfuXcHvmfQoN5e02Bg7rfeevUjF34SVqEJIvH1E=
github.com/LumeraProtocol/lumera v1.8.5 h1:VfRm9bEWYehd7Ek6YJFdQBFXH47SCuDO6IFdzq3y5+g=
github.com/LumeraProtocol/lumera v1.8.5/go.mod h1:DcG+PermGhl5uA51VaSA0EC+FXpDVm2XgifmYL9jJvE=
github.com/LumeraProtocol/rq-go v0.2.1 h1:8B3UzRChLsGMmvZ+UVbJsJj6JZzL9P9iYxbdUwGsQI4=
github.com/LumeraProtocol/rq-go v0.2.1/go.mod h1:APnKCZRh1Es2Vtrd2w4kCLgAyaL5Bqrkz/BURoRJ+O8=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
Expand Down
2 changes: 1 addition & 1 deletion pkg/lumera/modules/action/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (m *module) GetAction(ctx context.Context, actionID string) (*types.QueryGe
ActionID: actionID,
})
if err != nil {
return nil, fmt.Errorf("failed to get action: %w", err)
return nil, err
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change creates an inconsistency with GetActionFee and GetParams below, which both wrap errors with context. Unless there's a specific need to return the raw error here (e.g., for specific gRPC status checking that wrapping interferes with), it's better to be consistent.

Suggested change
return nil, err
return nil, fmt.Errorf("failed to get action: %w", err)

Fix it with Roo Code or mention @roomote and request a fix.

Copy link
Contributor Author

@akobrin1 akobrin1 Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapping an error in GetAction creates duplicate error... it is wrapped on higher levels in all calls to GetAction.
We need either keep wrapping in GetAction and remove wrapping with the same error message in all calls to GetAction.

}

return resp, nil
Expand Down
12 changes: 10 additions & 2 deletions supernode/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ The supernode will connect to the Lumera network and begin participating in the
if err != nil {
logFields["error"] = err.Error()
}
if verificationResult != nil && !verificationResult.IsValid() {
logFields["summary"] = verificationResult.Summary()
if verificationResult != nil {
if len(verificationResult.Errors) > 0 {
logFields["errors"] = verificationResult.Errors
}
if len(verificationResult.Warnings) > 0 {
logFields["warnings"] = verificationResult.Warnings
}
if !verificationResult.IsValid() {
logFields["summary"] = verificationResult.Summary()
}
}
logtrace.Fatal(ctx, "Config verification failed", logFields)
}
Expand Down