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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: build build-release build-sncli build-sn-manager
.PHONY: install-lumera setup-supernodes system-test-setup
.PHONY: install-lumera setup-supernodes system-test-setup install-deps
.PHONY: gen-cascade gen-supernode
.PHONY: test-e2e test-unit test-integration test-system

Expand Down Expand Up @@ -140,9 +140,9 @@ test-e2e:
# Run cascade e2e tests only
test-cascade:
@echo "Running cascade e2e tests..."
@cd tests/system && 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' .
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/LumeraProtocol/supernode/v2
go 1.24.1

replace (
github.com/LumeraProtocol/supernode/v2/supernode => ./supernode
github.com/bytedance/sonic => github.com/bytedance/sonic v1.14.0
github.com/bytedance/sonic/loader => github.com/bytedance/sonic/loader v0.3.0
)
Expand Down
16 changes: 3 additions & 13 deletions p2p/kademlia/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package kademlia

import (
"context"
"encoding/hex"
"fmt"
"io"
"net"
Expand Down Expand Up @@ -951,7 +950,7 @@ func (s *Network) handleGetValuesRequest(ctx context.Context, message *Message,
i++
}

values, count, err := s.dht.store.RetrieveBatchValues(ctx, keys, true)
values, count, err := s.dht.store.RetrieveBatchValues(ctx, keys, false)
if err != nil {
err = errors.Errorf("batch find values: %w", err)
s.appendRetrieveEntry(message.Sender.IP, RecentBatchRetrieveEntry{
Expand All @@ -976,17 +975,8 @@ func (s *Network) handleGetValuesRequest(ctx context.Context, message *Message,

for i, key := range keys {
val := KeyValWithClosest{
Value: values[i],
}
if len(val.Value) == 0 {
decodedKey, err := hex.DecodeString(keys[i])
if err != nil {
err = errors.Errorf("batch find vals: decode key: %w - key %s", err, keys[i])
return s.generateResponseMessage(BatchGetValues, message.Sender, ResultFailed, err.Error())
}

nodes, _ := s.dht.ht.closestContacts(Alpha, decodedKey, []*Node{message.Sender})
val.Closest = nodes.Nodes
Value: values[i],
Closest: make([]*Node, 0), // for compatibility, not used - each node now has full view of the whole network
}

request.Data[key] = val
Expand Down
12 changes: 3 additions & 9 deletions pkg/codec/codec_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading