Skip to content

Commit cfdf997

Browse files
committed
feat(pkg/p2p/libp2p): use wasmws websocket transport for wasm
1 parent 715d6d7 commit cfdf997

3 files changed

Lines changed: 23 additions & 19 deletions

File tree

go.mod

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ require (
1616
github.com/ethersphere/go-storage-incentives-abi v0.9.4
1717
github.com/ethersphere/go-sw3-abi v0.6.9
1818
github.com/ethersphere/langos v1.0.0
19-
github.com/go-playground/validator/v10 v10.11.1
19+
github.com/go-playground/validator/v10 v10.19.0
2020
github.com/gogo/protobuf v1.3.2
2121
github.com/google/go-cmp v0.7.0
2222
github.com/google/uuid v1.6.0
2323
github.com/gorilla/handlers v1.4.2
24-
github.com/gorilla/mux v1.8.0
24+
github.com/gorilla/mux v1.8.1
2525
github.com/gorilla/websocket v1.5.3
2626
github.com/hashicorp/go-multierror v1.1.1
2727
github.com/hashicorp/golang-lru/v2 v2.0.7
2828
github.com/ipfs/go-cid v0.6.0
29-
github.com/ipshipyard/p2p-forge v0.6.1
29+
github.com/ipshipyard/p2p-forge v0.7.0
3030
github.com/kardianos/service v1.2.2
3131
github.com/klauspost/reedsolomon v1.11.8
32-
github.com/libp2p/go-libp2p v0.45.0
32+
github.com/libp2p/go-libp2p v0.46.0
3333
github.com/multiformats/go-multiaddr v0.16.1
3434
github.com/multiformats/go-multiaddr-dns v0.4.1
3535
github.com/multiformats/go-multihash v0.2.3
@@ -43,13 +43,14 @@ require (
4343
github.com/stretchr/testify v1.11.1
4444
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
4545
github.com/uber/jaeger-client-go v2.24.0+incompatible
46-
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20251207155153-95835dee8ae4
47-
github.com/vmihailenco/msgpack/v5 v5.3.4
46+
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20260116212130-d165f3c8e922
47+
github.com/vmihailenco/msgpack/v5 v5.4.1
4848
github.com/wealdtech/go-ens/v3 v3.5.1
4949
gitlab.com/nolash/go-mockbytes v0.0.7
5050
go.uber.org/atomic v1.11.0
5151
go.uber.org/goleak v1.3.0
5252
golang.org/x/crypto v0.45.0
53+
golang.org/x/net v0.47.0
5354
golang.org/x/sync v0.18.0
5455
golang.org/x/sys v0.38.0
5556
golang.org/x/term v0.37.0
@@ -70,7 +71,6 @@ require (
7071
github.com/sagikazarmark/locafero v0.11.0 // indirect
7172
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
7273
go.yaml.in/yaml/v3 v3.0.4 // indirect
73-
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
7474
)
7575

7676
require (
@@ -86,7 +86,7 @@ require (
8686
github.com/consensys/gnark-crypto v0.18.1 // indirect
8787
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
8888
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
89-
github.com/davecgh/go-spew v1.1.1 // indirect
89+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
9090
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
9191
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
9292
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
@@ -95,15 +95,16 @@ require (
9595
github.com/felixge/fgprof v0.9.5
9696
github.com/flynn/noise v1.1.0 // indirect
9797
github.com/fsnotify/fsnotify v1.9.0 // indirect
98+
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
9899
github.com/go-kit/log v0.2.1 // indirect
99-
github.com/go-logfmt/logfmt v0.5.1 // indirect
100+
github.com/go-logfmt/logfmt v0.6.0 // indirect
100101
github.com/go-ole/go-ole v1.3.0 // indirect
101-
github.com/go-playground/locales v0.14.0 // indirect
102-
github.com/go-playground/universal-translator v0.18.0 // indirect
102+
github.com/go-playground/locales v0.14.1 // indirect
103+
github.com/go-playground/universal-translator v0.18.1 // indirect
103104
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
104105
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
105106
github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect
106-
github.com/hashicorp/errwrap v1.0.0 // indirect
107+
github.com/hashicorp/errwrap v1.1.0 // indirect
107108
github.com/holiman/uint256 v1.3.2 // indirect
108109
github.com/huin/goupnp v1.3.0 // indirect
109110
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -112,7 +113,7 @@ require (
112113
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
113114
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
114115
github.com/koron/go-ssdp v0.0.6 // indirect
115-
github.com/leodido/go-urn v1.2.1 // indirect
116+
github.com/leodido/go-urn v1.4.0 // indirect
116117
github.com/libdns/libdns v0.2.2 // indirect
117118
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
118119
github.com/libp2p/go-flow-metrics v0.2.0 // indirect
@@ -161,10 +162,11 @@ require (
161162
github.com/prometheus/client_model v0.6.2 // indirect
162163
github.com/prometheus/common v0.64.0
163164
github.com/prometheus/procfs v0.16.1 // indirect
164-
github.com/prometheus/statsd_exporter v0.22.7 // indirect
165-
github.com/quic-go/qpack v0.5.1 // indirect
166-
github.com/quic-go/quic-go v0.56.0 // indirect
165+
github.com/prometheus/statsd_exporter v0.26.1 // indirect
166+
github.com/quic-go/qpack v0.6.0 // indirect
167+
github.com/quic-go/quic-go v0.57.1 // indirect
167168
github.com/quic-go/webtransport-go v0.9.0 // indirect
169+
github.com/rogpeppe/go-internal v1.13.1 // indirect
168170
github.com/shirou/gopsutil v3.21.5+incompatible // indirect
169171
github.com/spaolacci/murmur3 v1.1.0 // indirect
170172
github.com/spf13/cast v1.10.0 // indirect
@@ -187,7 +189,7 @@ require (
187189
go.uber.org/zap/exp v0.3.0 // indirect
188190
golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39 // indirect
189191
golang.org/x/mod v0.30.0 // indirect
190-
golang.org/x/net v0.47.0 // indirect
192+
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
191193
golang.org/x/text v0.31.0 // indirect
192194
golang.org/x/tools v0.39.0 // indirect
193195
google.golang.org/protobuf v1.36.10 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,8 @@ github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
978978
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
979979
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20251207155153-95835dee8ae4 h1:1mvei7+YbH0cPd/eo+WCJmIM1FKDUbTAjD4LdPMYcqE=
980980
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20251207155153-95835dee8ae4/go.mod h1:FtW4JAL8wRRLZo6D77k6r7LxQBFTiaD9WCJnCXuhse4=
981+
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20260116212130-d165f3c8e922 h1:85mWMHAsMOeSUOgO2twjQqjdYJUKTeko32fxNUuuC4I=
982+
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20260116212130-d165f3c8e922/go.mod h1:FtW4JAL8wRRLZo6D77k6r7LxQBFTiaD9WCJnCXuhse4=
981983
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
982984
github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
983985
github.com/vmihailenco/msgpack/v5 v5.3.4 h1:qMKAwOV+meBw2Y8k9cVwAy7qErtYCwBzZ2ellBfvnqc=

wasm-demo/sw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ async function main() {
109109
"--password",
110110
"testing",
111111
"--bootnode",
112-
"/dnsaddr/testnet.ethswarm.org",
112+
"/ip4/49.12.172.37/tcp/32530/tls/sni/49-12-172-37.k2k4r8kibjadgpqco81quegou963p7lbcd9ti0bw8lrcc95ystm6by9d.libp2p.direct/ws/p2p/QmRHeoLCHjHoMur8PQpuV8acNJMmKPT61c3ZMLpTqY7og4",
113113
"--data-dir",
114114
"/home/user/.bee/sepolia",
115115
"--verbosity",
116116
"debug",
117117
// '--blockchain-rpc-endpoint',
118118
// 'https://ethereum-sepolia-rpc.publicnode.com/ac5b7f52aabd778861c2588f872f15c5fc34f0b343ec3d18ac2e91f5526e9c2b',
119119
"--mainnet=false",
120-
"--network-id=5",
120+
"--network-id=10",
121121
"--p2p-ws-enable",
122122
];
123123

0 commit comments

Comments
 (0)