diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a27372e..6b67054 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -56,7 +56,36 @@ updates: include: "scope" # ────────────────────────────────────────────────────────────── - # 2. GitHub Actions Workflows + # 2. Go Modules (go.mod / go.sum) + # ────────────────────────────────────────────────────────────── + - package-ecosystem: "gomod" + directory: "/example/" + target-branch: "master" + schedule: + interval: "weekly" + day: "monday" + time: "09:00" + timezone: "America/New_York" + allow: + - dependency-type: "direct" + groups: + security-deps: + patterns: + - "*crypto*" + - "*security*" + - "*auth*" + - "*jwt*" + - "*oauth*" + update-types: ["minor", "patch"] + open-pull-requests-limit: 10 + assignees: ["mrz1836"] + labels: ["chore", "dependencies", "gomod"] + commit-message: + prefix: "chore" + include: "scope" + + # ────────────────────────────────────────────────────────────── + # 3. GitHub Actions Workflows # ────────────────────────────────────────────────────────────── - package-ecosystem: "github-actions" directory: "/" @@ -79,7 +108,7 @@ updates: include: "scope" # ────────────────────────────────────────────────────────────── - # 3. DevContainer (devcontainer.json : base image + features) + # 4. DevContainer (devcontainer.json : base image + features) # ────────────────────────────────────────────────────────────── - package-ecosystem: "devcontainers" directory: "/" diff --git a/client.go b/client.go index f9127ab..9d8dfe4 100644 --- a/client.go +++ b/client.go @@ -19,6 +19,7 @@ import ( "github.com/libp2p/go-libp2p" dht "github.com/libp2p/go-libp2p-kad-dht" + "github.com/libp2p/go-libp2p-kad-dht/records" pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/host" @@ -27,6 +28,9 @@ import ( "github.com/libp2p/go-libp2p/p2p/discovery/mdns" drouting "github.com/libp2p/go-libp2p/p2p/discovery/routing" "github.com/multiformats/go-multiaddr" + + ds "github.com/ipfs/go-datastore" + dssync "github.com/ipfs/go-datastore/sync" ) var ( @@ -92,7 +96,7 @@ func NewClient(config Config) (Client, error) { } // Set up DHT - kadDHT, err := setupDHT(ctx, h, bootstrapPeers, clientLogger, cancel) + kadDHT, err := setupDHT(ctx, h, config, bootstrapPeers, clientLogger, cancel) if err != nil { return nil, err } @@ -204,8 +208,46 @@ func createHost(_ context.Context, hostOpts []libp2p.Option, config Config, rela return h, nil } -func setupDHT(ctx context.Context, h host.Host, bootstrapPeers []peer.AddrInfo, _ logger, cancel context.CancelFunc) (*dht.IpfsDHT, error) { - kadDHT, err := dht.New(ctx, h, dht.Mode(dht.ModeServer), dht.BootstrapPeers(bootstrapPeers...)) +func setupDHT(ctx context.Context, h host.Host, config Config, bootstrapPeers []peer.AddrInfo, log logger, cancel context.CancelFunc) (*dht.IpfsDHT, error) { + // Determine DHT mode (default to server) + mode := dht.ModeServer + if config.DHTMode == "client" { + mode = dht.ModeClient + log.Infof("DHT mode: client (query-only, no provider storage)") + } else { + log.Infof("DHT mode: server (will advertise and store provider records)") + } + + // Build DHT options + dhtOpts := []dht.Option{ + dht.Mode(mode), + dht.BootstrapPeers(bootstrapPeers...), + } + + // If server mode and custom cleanup interval specified, configure ProviderManager + if mode == dht.ModeServer && config.DHTCleanupInterval > 0 { + log.Infof("Configuring DHT cleanup interval: %v", config.DHTCleanupInterval) + + // Create an in-memory datastore for the provider manager + // Same as default DHT datastore creation + datastore := dssync.MutexWrap(ds.NewMapDatastore()) + + providerManager, err := records.NewProviderManager( + ctx, + h.ID(), + h.Peerstore(), + datastore, + records.CleanupInterval(config.DHTCleanupInterval), + ) + if err != nil { + _ = h.Close() + cancel() + return nil, fmt.Errorf("failed to create provider manager: %w", err) + } + dhtOpts = append(dhtOpts, dht.ProviderStore(providerManager)) + } + + kadDHT, err := dht.New(ctx, h, dhtOpts...) if err != nil { _ = h.Close() cancel() diff --git a/config.go b/config.go index 0c9eab2..ffa338c 100644 --- a/config.go +++ b/config.go @@ -79,4 +79,22 @@ type Config struct { // If not provided, bootstrap peers will be used as relays. // Example: []string{"/ip4/1.2.3.4/tcp/4001/p2p/QmPeerID"} RelayPeers []string + + // DHTMode specifies whether this node runs the DHT in client or server mode. + // Valid values: "client", "server" + // - "client": Can query DHT but doesn't advertise itself or store provider records. + // No ProviderManager cleanup overhead. + // - "server": Participates fully in DHT, advertises itself, stores provider records. + // Has periodic cleanup overhead. Default mode for proper P2P networks. + // If not provided or empty, defaults to "server" mode. + DHTMode string + + // DHTCleanupInterval is the interval at which the DHT's ProviderManager performs + // garbage collection of expired provider records. The cleanup involves querying all + // provider records and removing expired entries. + // Only applies when DHTMode is "server". + // If not provided or zero, uses the DHT default (1 hour). + // Recommended: 6-24 hours for production to reduce CPU overhead. + // The cleanup frequency trades off between memory usage (stale records) and CPU usage. + DHTCleanupInterval time.Duration } diff --git a/dht_config_test.go b/dht_config_test.go new file mode 100644 index 0000000..6ad0977 --- /dev/null +++ b/dht_config_test.go @@ -0,0 +1,318 @@ +package p2p + +import ( + "bytes" + "log" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// Test log message constants to avoid duplication +const ( + logMsgDHTModeServer = "DHT mode: server" + logMsgDHTModeClient = "DHT mode: client" + logMsgConfiguringCleanupInterval = "Configuring DHT cleanup interval" +) + +// testClientConfig is a helper to create a test client with log capture +type testClientConfig struct { + name string + dhtMode string + cleanupInterval time.Duration +} + +// createTestClient is a helper function that reduces duplication in client creation and log setup +func createTestClient(t *testing.T, cfg testClientConfig) (Client, string) { + t.Helper() + + privKey, err := GeneratePrivateKey() + require.NoError(t, err, "failed to generate private key") + + // Capture log output + var buf bytes.Buffer + oldOutput := log.Writer() + log.SetOutput(&buf) + t.Cleanup(func() { log.SetOutput(oldOutput) }) + + config := Config{ + Name: cfg.name, + PrivateKey: privKey, + DHTMode: cfg.dhtMode, + DHTCleanupInterval: cfg.cleanupInterval, + } + + client, err := NewClient(config) + require.NoError(t, err, "failed to create client") + require.NotNil(t, client, "client should not be nil") + t.Cleanup(func() { _ = client.Close() }) + + return client, buf.String() +} + +// TestDHTModeSelection tests DHT mode configuration (server/client/default) +func TestDHTModeSelection(t *testing.T) { + tests := []struct { + name string + dhtMode string + expectedLogMsg string + additionalMsgOpt string // optional additional message to check + }{ + { + name: "default mode (empty string defaults to server)", + dhtMode: "", + expectedLogMsg: logMsgDHTModeServer, + additionalMsgOpt: "will advertise and store provider records", + }, + { + name: "explicit server mode", + dhtMode: "server", + expectedLogMsg: logMsgDHTModeServer, + additionalMsgOpt: "will advertise and store provider records", + }, + { + name: "client mode", + dhtMode: "client", + expectedLogMsg: logMsgDHTModeClient, + additionalMsgOpt: "query-only, no provider storage", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, output := createTestClient(t, testClientConfig{ + name: "test-mode-" + tt.name, + dhtMode: tt.dhtMode, + }) + + assert.Contains(t, output, tt.expectedLogMsg) + if tt.additionalMsgOpt != "" { + assert.Contains(t, output, tt.additionalMsgOpt) + } + }) + } +} + +// TestDHTCleanupIntervalConfiguration tests cleanup interval settings +func TestDHTCleanupIntervalConfiguration(t *testing.T) { + tests := []struct { + name string + dhtMode string + cleanupInterval time.Duration + expectCleanupConfigLog bool + expectedIntervalString string + }{ + { + name: "server mode without cleanup interval (uses libp2p default)", + dhtMode: "server", + cleanupInterval: 0, + expectCleanupConfigLog: false, + }, + { + name: "server mode with 6 hour cleanup", + dhtMode: "server", + cleanupInterval: 6 * time.Hour, + expectCleanupConfigLog: true, + expectedIntervalString: "6h0m0s", + }, + { + name: "server mode with 24 hour cleanup", + dhtMode: "server", + cleanupInterval: 24 * time.Hour, + expectCleanupConfigLog: true, + expectedIntervalString: "24h0m0s", + }, + { + name: "server mode with 72 hour cleanup", + dhtMode: "server", + cleanupInterval: 72 * time.Hour, + expectCleanupConfigLog: true, + expectedIntervalString: "72h0m0s", + }, + { + name: "server mode with 30 minute cleanup", + dhtMode: "server", + cleanupInterval: 30 * time.Minute, + expectCleanupConfigLog: true, + expectedIntervalString: "30m0s", + }, + { + name: "client mode ignores cleanup interval", + dhtMode: "client", + cleanupInterval: 24 * time.Hour, + expectCleanupConfigLog: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, output := createTestClient(t, testClientConfig{ + name: "test-cleanup-" + tt.name, + dhtMode: tt.dhtMode, + cleanupInterval: tt.cleanupInterval, + }) + + if tt.expectCleanupConfigLog { + assert.Contains(t, output, logMsgConfiguringCleanupInterval) + if tt.expectedIntervalString != "" { + assert.Contains(t, output, tt.expectedIntervalString) + } + } else { + assert.NotContains(t, output, logMsgConfiguringCleanupInterval) + } + }) + } +} + +// TestDHTConfigurationCombinations tests various configuration combinations +func TestDHTConfigurationCombinations(t *testing.T) { + tests := []struct { + name string + dhtMode string + cleanupInterval time.Duration + expectedModeLog string + expectCleanupConfigLog bool + expectedIntervalString string + }{ + { + name: "default configuration (empty mode, no interval)", + dhtMode: "", + cleanupInterval: 0, + expectedModeLog: logMsgDHTModeServer, + expectCleanupConfigLog: false, + }, + { + name: "server mode with 48h cleanup", + dhtMode: "server", + cleanupInterval: 48 * time.Hour, + expectedModeLog: logMsgDHTModeServer, + expectCleanupConfigLog: true, + expectedIntervalString: "48h0m0s", + }, + { + name: "client mode with cleanup specified (ignored)", + dhtMode: "client", + cleanupInterval: 24 * time.Hour, + expectedModeLog: logMsgDHTModeClient, + expectCleanupConfigLog: false, + }, + { + name: "server mode without cleanup", + dhtMode: "server", + cleanupInterval: 0, + expectedModeLog: logMsgDHTModeServer, + expectCleanupConfigLog: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, output := createTestClient(t, testClientConfig{ + name: "test-combo-" + tt.name, + dhtMode: tt.dhtMode, + cleanupInterval: tt.cleanupInterval, + }) + + assert.Contains(t, output, tt.expectedModeLog, "mode log should be present") + + if tt.expectCleanupConfigLog { + assert.Contains(t, output, logMsgConfiguringCleanupInterval, "cleanup config should be logged") + if tt.expectedIntervalString != "" { + assert.Contains(t, output, tt.expectedIntervalString, "interval string should match") + } + } else { + assert.NotContains(t, output, logMsgConfiguringCleanupInterval, "cleanup config should not be logged") + } + }) + } +} + +// TestDHTClientBasicFunctionality verifies client mode basic operations +func TestDHTClientBasicFunctionality(t *testing.T) { + client, output := createTestClient(t, testClientConfig{ + name: "test-client-functionality", + dhtMode: "client", + }) + + // Verify client mode was selected + assert.Contains(t, output, logMsgDHTModeClient) + + // Verify client has basic functionality + peerID := client.GetID() + assert.NotEmpty(t, peerID, "client should have a peer ID") +} + +// TestP2PClientTypeAlias verifies backward compatibility type alias +func TestP2PClientTypeAlias(t *testing.T) { + privKey, err := GeneratePrivateKey() + require.NoError(t, err) + + config := Config{ + Name: "test-type-alias", + PrivateKey: privKey, + } + + // This should compile due to type alias + var p2pClient P2PClient + p2pClient, err = NewClient(config) + require.NoError(t, err) + require.NotNil(t, p2pClient) + defer func() { _ = p2pClient.Close() }() + + // Verify it's also a Client + client := p2pClient + assert.NotNil(t, client) +} + +// BenchmarkDHTServerMode benchmarks client creation with server mode +func BenchmarkDHTServerMode(b *testing.B) { + privKey, err := GeneratePrivateKey() + if err != nil { + b.Fatal(err) + } + + config := Config{ + Name: "bench-server", + PrivateKey: privKey, + DHTMode: "server", + DHTCleanupInterval: 24 * time.Hour, + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + client, err := NewClient(config) + if err != nil { + b.Fatal(err) + } + if client != nil { + _ = client.Close() + } + } +} + +// BenchmarkDHTClientMode benchmarks client creation with client mode +func BenchmarkDHTClientMode(b *testing.B) { + privKey, err := GeneratePrivateKey() + if err != nil { + b.Fatal(err) + } + + config := Config{ + Name: "bench-client", + PrivateKey: privKey, + DHTMode: "client", + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + client, err := NewClient(config) + if err != nil { + b.Fatal(err) + } + if client != nil { + _ = client.Close() + } + } +} diff --git a/example/go.mod b/example/go.mod index 69ededb..d3f2713 100644 --- a/example/go.mod +++ b/example/go.mod @@ -1,9 +1,9 @@ -module github.com/ordishs/p2p_poc/example +module github.com/bsv-blockchain/go-p2p-message-bus/example go 1.24.6 require ( - github.com/bsv-blockchain/go-p2p-message-bus v0.0.8 + github.com/bsv-blockchain/go-p2p-message-bus v0.1.0 github.com/libp2p/go-libp2p v0.44.0 ) @@ -25,8 +25,8 @@ require ( github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/huin/goupnp v1.3.0 // indirect - github.com/ipfs/boxo v0.35.0 // indirect - github.com/ipfs/go-cid v0.5.0 // indirect + github.com/ipfs/boxo v0.35.1 // indirect + github.com/ipfs/go-cid v0.6.0 // indirect github.com/ipfs/go-datastore v0.9.0 // indirect github.com/ipfs/go-log/v2 v2.8.2 // indirect github.com/ipld/go-ipld-prime v0.21.0 // indirect @@ -45,7 +45,7 @@ require ( github.com/libp2p/go-libp2p-record v0.3.1 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.5 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect - github.com/libp2p/go-netroute v0.3.0 // indirect + github.com/libp2p/go-netroute v0.4.0 // indirect github.com/libp2p/go-reuseport v0.4.0 // indirect github.com/libp2p/go-yamux/v5 v5.1.0 // indirect github.com/libp2p/zeroconf/v2 v2.2.0 // indirect @@ -77,21 +77,21 @@ require ( github.com/pion/mdns/v2 v2.0.7 // indirect github.com/pion/randutil v0.1.0 // indirect github.com/pion/rtcp v1.2.16 // indirect - github.com/pion/rtp v1.8.24 // indirect + github.com/pion/rtp v1.8.25 // indirect github.com/pion/sctp v1.8.40 // indirect github.com/pion/sdp/v3 v3.0.16 // indirect github.com/pion/srtp/v3 v3.0.8 // indirect github.com/pion/stun v0.6.1 // indirect - github.com/pion/stun/v3 v3.0.0 // indirect + github.com/pion/stun/v3 v3.0.1 // indirect github.com/pion/transport/v2 v2.2.10 // indirect github.com/pion/transport/v3 v3.0.8 // indirect - github.com/pion/turn/v4 v4.1.1 // indirect + github.com/pion/turn/v4 v4.1.2 // indirect github.com/pion/webrtc/v4 v4.1.6 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.1 // indirect - github.com/prometheus/procfs v0.18.0 // indirect + github.com/prometheus/common v0.67.2 // indirect + github.com/prometheus/procfs v0.19.2 // indirect github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/quic-go v0.55.0 // indirect github.com/quic-go/webtransport-go v0.9.0 // indirect @@ -114,7 +114,7 @@ require ( golang.org/x/net v0.46.0 // indirect golang.org/x/sync v0.17.0 // indirect golang.org/x/sys v0.37.0 // indirect - golang.org/x/telemetry v0.0.0-20251022145735-5be28d707443 // indirect + golang.org/x/telemetry v0.0.0-20251028164327-d7a2859f34e8 // indirect golang.org/x/text v0.30.0 // indirect golang.org/x/time v0.14.0 // indirect golang.org/x/tools v0.38.0 // indirect diff --git a/example/go.sum b/example/go.sum index 900eafc..1d9633a 100644 --- a/example/go.sum +++ b/example/go.sum @@ -86,12 +86,12 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/ipfs/boxo v0.35.0 h1:3Mku5arSbAZz0dvb4goXRsQuZkFkPrGr5yYdu0YM1pY= -github.com/ipfs/boxo v0.35.0/go.mod h1:uhaF0DGnbgEiXDTmD249jCGbxVkMm6+Ew85q6Uub7lo= +github.com/ipfs/boxo v0.35.1 h1:MGL3aaaxnu/h9KKq+X/6FxapI/qlDmnRNk33U7tz/fQ= +github.com/ipfs/boxo v0.35.1/go.mod h1:/p1XZVp+Yzv78RuKjb3BESBYEQglRgDrWvmN5mFrsus= github.com/ipfs/go-block-format v0.2.3 h1:mpCuDaNXJ4wrBJLrtEaGFGXkferrw5eqVvzaHhtFKQk= github.com/ipfs/go-block-format v0.2.3/go.mod h1:WJaQmPAKhD3LspLixqlqNFxiZ3BZ3xgqxxoSR/76pnA= -github.com/ipfs/go-cid v0.5.0 h1:goEKKhaGm0ul11IHA7I6p1GmKz8kEYniqFopaB5Otwg= -github.com/ipfs/go-cid v0.5.0/go.mod h1:0L7vmeNXpQpUS9vt+yEARkJ8rOg43DF3iPgn4GIN0mk= +github.com/ipfs/go-cid v0.6.0 h1:DlOReBV1xhHBhhfy/gBNNTSyfOM6rLiIx9J7A4DGf30= +github.com/ipfs/go-cid v0.6.0/go.mod h1:NC4kS1LZjzfhK40UGmpXv5/qD2kcMzACYJNntCUiDhQ= github.com/ipfs/go-datastore v0.9.0 h1:WocriPOayqalEsueHv6SdD4nPVl4rYMfYGLD4bqCZ+w= github.com/ipfs/go-datastore v0.9.0/go.mod h1:uT77w/XEGrvJWwHgdrMr8bqCN6ZTW9gzmi+3uK+ouHg= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= @@ -152,8 +152,8 @@ github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUI github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= -github.com/libp2p/go-netroute v0.3.0 h1:nqPCXHmeNmgTJnktosJ/sIef9hvwYCrsLxXmfNks/oc= -github.com/libp2p/go-netroute v0.3.0/go.mod h1:Nkd5ShYgSMS5MUKy/MU2T57xFoOKvvLR92Lic48LEyA= +github.com/libp2p/go-netroute v0.4.0 h1:sZZx9hyANYUx9PZyqcgE/E1GUG3iEtTZHUEvdtXT7/Q= +github.com/libp2p/go-netroute v0.4.0/go.mod h1:Nkd5ShYgSMS5MUKy/MU2T57xFoOKvvLR92Lic48LEyA= github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= github.com/libp2p/go-yamux/v5 v5.1.0 h1:8Qlxj4E9JGJAQVW6+uj2o7mqkqsIVlSUGmTWhlXzoHE= @@ -237,8 +237,8 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= github.com/pion/rtcp v1.2.16 h1:fk1B1dNW4hsI78XUCljZJlC4kZOPk67mNRuQ0fcEkSo= github.com/pion/rtcp v1.2.16/go.mod h1:/as7VKfYbs5NIb4h6muQ35kQF/J0ZVNz2Z3xKoCBYOo= -github.com/pion/rtp v1.8.24 h1:+ICyZXUQDv95EsHN70RrA4XKJf5MGWyC6QQc1u6/ynI= -github.com/pion/rtp v1.8.24/go.mod h1:rF5nS1GqbR7H/TCpKwylzeq6yDM+MM6k+On5EgeThEM= +github.com/pion/rtp v1.8.25 h1:b8+y44GNbwOJTYWuVan7SglX/hMlicVCAtL50ztyZHw= +github.com/pion/rtp v1.8.25/go.mod h1:rF5nS1GqbR7H/TCpKwylzeq6yDM+MM6k+On5EgeThEM= github.com/pion/sctp v1.8.40 h1:bqbgWYOrUhsYItEnRObUYZuzvOMsVplS3oNgzedBlG8= github.com/pion/sctp v1.8.40/go.mod h1:SPBBUENXE6ThkEksN5ZavfAhFYll+h+66ZiG6IZQuzo= github.com/pion/sdp/v3 v3.0.16 h1:0dKzYO6gTAvuLaAKQkC02eCPjMIi4NuAr/ibAwrGDCo= @@ -247,16 +247,16 @@ github.com/pion/srtp/v3 v3.0.8 h1:RjRrjcIeQsilPzxvdaElN0CpuQZdMvcl9VZ5UY9suUM= github.com/pion/srtp/v3 v3.0.8/go.mod h1:2Sq6YnDH7/UDCvkSoHSDNDeyBcFgWL0sAVycVbAsXFg= github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= -github.com/pion/stun/v3 v3.0.0 h1:4h1gwhWLWuZWOJIJR9s2ferRO+W3zA/b6ijOI6mKzUw= -github.com/pion/stun/v3 v3.0.0/go.mod h1:HvCN8txt8mwi4FBvS3EmDghW6aQJ24T+y+1TKjB5jyU= +github.com/pion/stun/v3 v3.0.1 h1:jx1uUq6BdPihF0yF33Jj2mh+C9p0atY94IkdnW174kA= +github.com/pion/stun/v3 v3.0.1/go.mod h1:RHnvlKFg+qHgoKIqtQWMOJF52wsImCAf/Jh5GjX+4Tw= github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q= github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E= github.com/pion/transport/v3 v3.0.8 h1:oI3myyYnTKUSTthu/NZZ8eu2I5sHbxbUNNFW62olaYc= github.com/pion/transport/v3 v3.0.8/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ= -github.com/pion/turn/v4 v4.1.1 h1:9UnY2HB99tpDyz3cVVZguSxcqkJ1DsTSZ+8TGruh4fc= -github.com/pion/turn/v4 v4.1.1/go.mod h1:2123tHk1O++vmjI5VSD0awT50NywDAq5A2NNNU4Jjs8= +github.com/pion/turn/v4 v4.1.2 h1:Em2svpl6aBFa88dLhxypMUzaLjC79kWZWx8FIov01cc= +github.com/pion/turn/v4 v4.1.2/go.mod h1:ISYWfZYy0Z3tXzRpyYZHTL+U23yFQIspfxogdQ8pn9Y= github.com/pion/webrtc/v4 v4.1.6 h1:srHH2HwvCGwPba25EYJgUzgLqCQoXl1VCUnrGQMSzUw= github.com/pion/webrtc/v4 v4.1.6/go.mod h1:wKecGRlkl3ox/As/MYghJL+b/cVXMEhoPMJWPuGQFhU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -271,11 +271,11 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1: github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= -github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= +github.com/prometheus/common v0.67.2 h1:PcBAckGFTIHt2+L3I33uNRTlKTplNzFctXcWhPyAEN8= +github.com/prometheus/common v0.67.2/go.mod h1:63W3KZb1JOKgcjlIr64WW/LvFGAqKPj0atm+knVGEko= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.18.0 h1:2QTA9cKdznfYJz7EDaa7IiJobHuV7E1WzeBwcrhk0ao= -github.com/prometheus/procfs v0.18.0/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= github.com/quic-go/quic-go v0.55.0 h1:zccPQIqYCXDt5NmcEabyYvOnomjs8Tlwl7tISjJh9Mk= @@ -460,8 +460,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20251022145735-5be28d707443 h1:eE5IhBiTMPgrcTS6Mlh7IG4MdydRrXr2y60Jn/JC6kM= -golang.org/x/telemetry v0.0.0-20251022145735-5be28d707443/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= +golang.org/x/telemetry v0.0.0-20251028164327-d7a2859f34e8 h1:DwMAzqwLj2rVin75cRFh1kfhwQY3hyHrU1oCEDZXPmQ= +golang.org/x/telemetry v0.0.0-20251028164327-d7a2859f34e8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= diff --git a/go.mod b/go.mod index 2920ed8..9f34518 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/bsv-blockchain/go-p2p-message-bus go 1.24.6 require ( + github.com/ipfs/go-datastore v0.9.0 github.com/libp2p/go-libp2p v0.44.0 github.com/libp2p/go-libp2p-kad-dht v0.35.1 github.com/libp2p/go-libp2p-pubsub v0.15.0 @@ -29,9 +30,8 @@ require ( github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/huin/goupnp v1.3.0 // indirect - github.com/ipfs/boxo v0.35.0 // indirect - github.com/ipfs/go-cid v0.5.0 // indirect - github.com/ipfs/go-datastore v0.9.0 // indirect + github.com/ipfs/boxo v0.35.1 // indirect + github.com/ipfs/go-cid v0.6.0 // indirect github.com/ipfs/go-log/v2 v2.8.2 // indirect github.com/ipld/go-ipld-prime v0.21.0 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -47,7 +47,7 @@ require ( github.com/libp2p/go-libp2p-record v0.3.1 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.7.5 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect - github.com/libp2p/go-netroute v0.3.0 // indirect + github.com/libp2p/go-netroute v0.4.0 // indirect github.com/libp2p/go-reuseport v0.4.0 // indirect github.com/libp2p/go-yamux/v5 v5.1.0 // indirect github.com/libp2p/zeroconf/v2 v2.2.0 // indirect @@ -78,22 +78,22 @@ require ( github.com/pion/mdns/v2 v2.0.7 // indirect github.com/pion/randutil v0.1.0 // indirect github.com/pion/rtcp v1.2.16 // indirect - github.com/pion/rtp v1.8.24 // indirect + github.com/pion/rtp v1.8.25 // indirect github.com/pion/sctp v1.8.40 // indirect github.com/pion/sdp/v3 v3.0.16 // indirect github.com/pion/srtp/v3 v3.0.8 // indirect github.com/pion/stun v0.6.1 // indirect - github.com/pion/stun/v3 v3.0.0 // indirect + github.com/pion/stun/v3 v3.0.1 // indirect github.com/pion/transport/v2 v2.2.10 // indirect github.com/pion/transport/v3 v3.0.8 // indirect - github.com/pion/turn/v4 v4.1.1 // indirect + github.com/pion/turn/v4 v4.1.2 // indirect github.com/pion/webrtc/v4 v4.1.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.67.1 // indirect - github.com/prometheus/procfs v0.18.0 // indirect + github.com/prometheus/common v0.67.2 // indirect + github.com/prometheus/procfs v0.19.2 // indirect github.com/quic-go/qpack v0.5.1 // indirect github.com/quic-go/quic-go v0.55.0 // indirect github.com/quic-go/webtransport-go v0.9.0 // indirect @@ -116,7 +116,7 @@ require ( golang.org/x/net v0.46.0 // indirect golang.org/x/sync v0.17.0 // indirect golang.org/x/sys v0.37.0 // indirect - golang.org/x/telemetry v0.0.0-20251022145735-5be28d707443 // indirect + golang.org/x/telemetry v0.0.0-20251028164327-d7a2859f34e8 // indirect golang.org/x/text v0.30.0 // indirect golang.org/x/time v0.14.0 // indirect golang.org/x/tools v0.38.0 // indirect diff --git a/go.sum b/go.sum index 900eafc..1d9633a 100644 --- a/go.sum +++ b/go.sum @@ -86,12 +86,12 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/ipfs/boxo v0.35.0 h1:3Mku5arSbAZz0dvb4goXRsQuZkFkPrGr5yYdu0YM1pY= -github.com/ipfs/boxo v0.35.0/go.mod h1:uhaF0DGnbgEiXDTmD249jCGbxVkMm6+Ew85q6Uub7lo= +github.com/ipfs/boxo v0.35.1 h1:MGL3aaaxnu/h9KKq+X/6FxapI/qlDmnRNk33U7tz/fQ= +github.com/ipfs/boxo v0.35.1/go.mod h1:/p1XZVp+Yzv78RuKjb3BESBYEQglRgDrWvmN5mFrsus= github.com/ipfs/go-block-format v0.2.3 h1:mpCuDaNXJ4wrBJLrtEaGFGXkferrw5eqVvzaHhtFKQk= github.com/ipfs/go-block-format v0.2.3/go.mod h1:WJaQmPAKhD3LspLixqlqNFxiZ3BZ3xgqxxoSR/76pnA= -github.com/ipfs/go-cid v0.5.0 h1:goEKKhaGm0ul11IHA7I6p1GmKz8kEYniqFopaB5Otwg= -github.com/ipfs/go-cid v0.5.0/go.mod h1:0L7vmeNXpQpUS9vt+yEARkJ8rOg43DF3iPgn4GIN0mk= +github.com/ipfs/go-cid v0.6.0 h1:DlOReBV1xhHBhhfy/gBNNTSyfOM6rLiIx9J7A4DGf30= +github.com/ipfs/go-cid v0.6.0/go.mod h1:NC4kS1LZjzfhK40UGmpXv5/qD2kcMzACYJNntCUiDhQ= github.com/ipfs/go-datastore v0.9.0 h1:WocriPOayqalEsueHv6SdD4nPVl4rYMfYGLD4bqCZ+w= github.com/ipfs/go-datastore v0.9.0/go.mod h1:uT77w/XEGrvJWwHgdrMr8bqCN6ZTW9gzmi+3uK+ouHg= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= @@ -152,8 +152,8 @@ github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUI github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= -github.com/libp2p/go-netroute v0.3.0 h1:nqPCXHmeNmgTJnktosJ/sIef9hvwYCrsLxXmfNks/oc= -github.com/libp2p/go-netroute v0.3.0/go.mod h1:Nkd5ShYgSMS5MUKy/MU2T57xFoOKvvLR92Lic48LEyA= +github.com/libp2p/go-netroute v0.4.0 h1:sZZx9hyANYUx9PZyqcgE/E1GUG3iEtTZHUEvdtXT7/Q= +github.com/libp2p/go-netroute v0.4.0/go.mod h1:Nkd5ShYgSMS5MUKy/MU2T57xFoOKvvLR92Lic48LEyA= github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= github.com/libp2p/go-yamux/v5 v5.1.0 h1:8Qlxj4E9JGJAQVW6+uj2o7mqkqsIVlSUGmTWhlXzoHE= @@ -237,8 +237,8 @@ github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= github.com/pion/rtcp v1.2.16 h1:fk1B1dNW4hsI78XUCljZJlC4kZOPk67mNRuQ0fcEkSo= github.com/pion/rtcp v1.2.16/go.mod h1:/as7VKfYbs5NIb4h6muQ35kQF/J0ZVNz2Z3xKoCBYOo= -github.com/pion/rtp v1.8.24 h1:+ICyZXUQDv95EsHN70RrA4XKJf5MGWyC6QQc1u6/ynI= -github.com/pion/rtp v1.8.24/go.mod h1:rF5nS1GqbR7H/TCpKwylzeq6yDM+MM6k+On5EgeThEM= +github.com/pion/rtp v1.8.25 h1:b8+y44GNbwOJTYWuVan7SglX/hMlicVCAtL50ztyZHw= +github.com/pion/rtp v1.8.25/go.mod h1:rF5nS1GqbR7H/TCpKwylzeq6yDM+MM6k+On5EgeThEM= github.com/pion/sctp v1.8.40 h1:bqbgWYOrUhsYItEnRObUYZuzvOMsVplS3oNgzedBlG8= github.com/pion/sctp v1.8.40/go.mod h1:SPBBUENXE6ThkEksN5ZavfAhFYll+h+66ZiG6IZQuzo= github.com/pion/sdp/v3 v3.0.16 h1:0dKzYO6gTAvuLaAKQkC02eCPjMIi4NuAr/ibAwrGDCo= @@ -247,16 +247,16 @@ github.com/pion/srtp/v3 v3.0.8 h1:RjRrjcIeQsilPzxvdaElN0CpuQZdMvcl9VZ5UY9suUM= github.com/pion/srtp/v3 v3.0.8/go.mod h1:2Sq6YnDH7/UDCvkSoHSDNDeyBcFgWL0sAVycVbAsXFg= github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= -github.com/pion/stun/v3 v3.0.0 h1:4h1gwhWLWuZWOJIJR9s2ferRO+W3zA/b6ijOI6mKzUw= -github.com/pion/stun/v3 v3.0.0/go.mod h1:HvCN8txt8mwi4FBvS3EmDghW6aQJ24T+y+1TKjB5jyU= +github.com/pion/stun/v3 v3.0.1 h1:jx1uUq6BdPihF0yF33Jj2mh+C9p0atY94IkdnW174kA= +github.com/pion/stun/v3 v3.0.1/go.mod h1:RHnvlKFg+qHgoKIqtQWMOJF52wsImCAf/Jh5GjX+4Tw= github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q= github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E= github.com/pion/transport/v3 v3.0.8 h1:oI3myyYnTKUSTthu/NZZ8eu2I5sHbxbUNNFW62olaYc= github.com/pion/transport/v3 v3.0.8/go.mod h1:+c2eewC5WJQHiAA46fkMMzoYZSuGzA/7E2FPrOYHctQ= -github.com/pion/turn/v4 v4.1.1 h1:9UnY2HB99tpDyz3cVVZguSxcqkJ1DsTSZ+8TGruh4fc= -github.com/pion/turn/v4 v4.1.1/go.mod h1:2123tHk1O++vmjI5VSD0awT50NywDAq5A2NNNU4Jjs8= +github.com/pion/turn/v4 v4.1.2 h1:Em2svpl6aBFa88dLhxypMUzaLjC79kWZWx8FIov01cc= +github.com/pion/turn/v4 v4.1.2/go.mod h1:ISYWfZYy0Z3tXzRpyYZHTL+U23yFQIspfxogdQ8pn9Y= github.com/pion/webrtc/v4 v4.1.6 h1:srHH2HwvCGwPba25EYJgUzgLqCQoXl1VCUnrGQMSzUw= github.com/pion/webrtc/v4 v4.1.6/go.mod h1:wKecGRlkl3ox/As/MYghJL+b/cVXMEhoPMJWPuGQFhU= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -271,11 +271,11 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1: github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.67.1 h1:OTSON1P4DNxzTg4hmKCc37o4ZAZDv0cfXLkOt0oEowI= -github.com/prometheus/common v0.67.1/go.mod h1:RpmT9v35q2Y+lsieQsdOh5sXZ6ajUGC8NjZAmr8vb0Q= +github.com/prometheus/common v0.67.2 h1:PcBAckGFTIHt2+L3I33uNRTlKTplNzFctXcWhPyAEN8= +github.com/prometheus/common v0.67.2/go.mod h1:63W3KZb1JOKgcjlIr64WW/LvFGAqKPj0atm+knVGEko= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.18.0 h1:2QTA9cKdznfYJz7EDaa7IiJobHuV7E1WzeBwcrhk0ao= -github.com/prometheus/procfs v0.18.0/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= github.com/quic-go/quic-go v0.55.0 h1:zccPQIqYCXDt5NmcEabyYvOnomjs8Tlwl7tISjJh9Mk= @@ -460,8 +460,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ= golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20251022145735-5be28d707443 h1:eE5IhBiTMPgrcTS6Mlh7IG4MdydRrXr2y60Jn/JC6kM= -golang.org/x/telemetry v0.0.0-20251022145735-5be28d707443/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= +golang.org/x/telemetry v0.0.0-20251028164327-d7a2859f34e8 h1:DwMAzqwLj2rVin75cRFh1kfhwQY3hyHrU1oCEDZXPmQ= +golang.org/x/telemetry v0.0.0-20251028164327-d7a2859f34e8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= diff --git a/types.go b/types.go index 338bd07..ae5b36e 100644 --- a/types.go +++ b/types.go @@ -27,6 +27,11 @@ type Client interface { Close() error } +// P2PClient is a type alias for Client, maintained for backward compatibility. +// +//nolint:revive // P2PClient is intentionally named for backward compatibility, stuttering is acceptable +type P2PClient = Client + // Message represents a received message from a peer. type Message struct { Topic string // The topic this message was received on