Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
706fe4c
feat(p2p): support inbound-only peers without underlay addresses
gacevicljubisa Jan 22, 2026
20b39b9
start over with wasm
v1rtl Dec 7, 2025
301ee16
use wasmws transport
v1rtl Dec 7, 2025
7a65d7d
upgrade vyper to support wasm
v1rtl Dec 7, 2025
717cf5a
remove autonat from wasm build
v1rtl Dec 7, 2025
d847125
use go-libp2p fork with removed webrtc
v1rtl Dec 7, 2025
d0a2e64
split router into wasm and non-wasm to exclude irrelevant api routes for
v1rtl Dec 7, 2025
24beb97
compile to .wasm
v1rtl Dec 7, 2025
d6d2f71
use wasm-http-server for the router
v1rtl Dec 10, 2025
698264d
wasm demo setup
v1rtl Dec 10, 2025
30cabc5
use fs wrapper
v1rtl Dec 11, 2025
afc062d
fix: libp2p.go compilation on wasm again
v1rtl Jan 16, 2026
94af316
fix(pkg/sharky): use universal fs to prevent "not implemented" errors
v1rtl Jan 16, 2026
b303208
fix(pkg/p2p/discover): use DoH for WASM builds
v1rtl Jan 16, 2026
151a67f
feat(pkg/p2p/discover): split DNS resolution for native and WASM
v1rtl Jan 16, 2026
7f4dbef
fix(pkg/p2p/libp2p): split libp2p for native and wasm
v1rtl Jan 16, 2026
715d6d7
fix(pkg/p2p/libp2p): disable tcp transport entirely for wasm
v1rtl Jan 16, 2026
cfdf997
feat(pkg/p2p/libp2p): use wasmws websocket transport for wasm
v1rtl Jan 16, 2026
fc0682a
fix(pkg/node): resolve duplicate declarations after rebase from upstream
v1rtl Jan 22, 2026
7c3bc02
test(p2p): add tests for empty underlays
gacevicljubisa Jan 23, 2026
b39629d
test(p2p): fix addressbook persistence test
gacevicljubisa Jan 23, 2026
4f00ce9
fix(p2p): handle pre-release versions in bee260 backward compatibilit…
gacevicljubisa Jan 23, 2026
e40a238
fix(libp2p): address comments
gacevicljubisa Jan 23, 2026
62e5c1c
test(p2p): fix host factory option handling and enhance addressbook t…
gacevicljubisa Jan 23, 2026
a68c096
Merge branch 'pr-5326' into wasm-second-iteration
v1rtl Jan 25, 2026
5d972e0
Merge branch 'pr-5327' into wasm-second-iteration
v1rtl Jan 25, 2026
5c2bd51
fix: compress the bundle with extra build flags and removing unnecessary
v1rtl Jan 27, 2026
a6748db
chore: use `wasmhttp.Serve` for WASM
v1rtl Jan 27, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ _testmain.go
*.prof

.DS_Store

wasm-demo/bee.wasm
wasm-demo/sw_bundle.js
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ binary: dist FORCE
$(GO) version
$(GO) build -trimpath -ldflags "$(LDFLAGS)" -o dist/bee ./cmd/bee

.PHONY: wasm
wasm: export CGO_ENABLED=0
wasm: dist FORCE
$(GO) version
GOARCH=wasm GOOS=js $(GO) build -trimpath -tags="nethttpomithttp2" -gcflags="all=-l" -ldflags "$(LDFLAGS) -buildid=" -o wasm-demo/bee.wasm ./cmd/bee

dist:
mkdir $@

Expand Down Expand Up @@ -172,4 +178,4 @@ clean:
$(GO) clean
rm -rf dist/

FORCE:
FORCE:
77 changes: 46 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/caddyserver/certmagic v0.21.6
github.com/coreos/go-semver v0.3.0
github.com/ethereum/go-ethereum v1.15.11
github.com/ethersphere/batch-archive v0.0.5
github.com/ethersphere/batch-archive v0.0.4
github.com/ethersphere/go-price-oracle-abi v0.6.9
github.com/ethersphere/go-storage-incentives-abi v0.9.4
github.com/ethersphere/go-sw3-abi v0.6.9
Expand All @@ -25,7 +25,7 @@ require (
github.com/gorilla/websocket v1.5.3
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru/v2 v2.0.7
github.com/ipfs/go-cid v0.5.0
github.com/ipfs/go-cid v0.6.0
github.com/ipshipyard/p2p-forge v0.7.0
github.com/kardianos/service v1.2.2
github.com/klauspost/reedsolomon v1.11.8
Expand All @@ -34,14 +34,16 @@ require (
github.com/multiformats/go-multiaddr-dns v0.4.1
github.com/multiformats/go-multihash v0.2.3
github.com/multiformats/go-multistream v0.6.1
github.com/nlepage/go-wasm-http-server/v2 v2.2.1
github.com/opentracing/opentracing-go v1.2.0
github.com/prometheus/client_golang v1.22.0
github.com/spf13/afero v1.6.0
github.com/spf13/afero v1.15.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.7.0
github.com/spf13/viper v1.21.0
github.com/stretchr/testify v1.11.1
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/uber/jaeger-client-go v2.24.0+incompatible
github.com/v1rtl/go-libp2p-wasmws v0.0.0-20260116212130-d165f3c8e922
github.com/vmihailenco/msgpack/v5 v5.4.1
github.com/wealdtech/go-ens/v3 v3.5.1
gitlab.com/nolash/go-mockbytes v0.0.7
Expand All @@ -50,7 +52,7 @@ require (
golang.org/x/crypto v0.45.0
golang.org/x/net v0.47.0
golang.org/x/sync v0.18.0
golang.org/x/sys v0.38.0
golang.org/x/sys v0.39.0
golang.org/x/term v0.37.0
golang.org/x/time v0.12.0
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -61,7 +63,24 @@ require (
)

require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect
github.com/coder/websocket v1.8.14 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/hack-pad/safejs v0.1.1 // indirect
github.com/nlepage/go-js-promise v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/sagikazarmark/locafero v0.11.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
)

require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
Expand All @@ -72,14 +91,12 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/codahale/hdrhistogram v0.0.0-00010101000000-000000000000 // indirect
github.com/consensys/gnark-crypto v0.18.1 // indirect
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
github.com/felixge/fgprof v0.9.5
github.com/flynn/noise v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
Expand All @@ -90,17 +107,16 @@ require (
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/golang/snappy v1.0.0 // indirect
github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ipfs/go-log/v2 v2.6.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/koron/go-ssdp v0.0.6 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/libdns/libdns v0.2.2 // indirect
Expand All @@ -111,26 +127,22 @@ require (
github.com/libp2p/go-netroute v0.3.0 // indirect
github.com/libp2p/go-reuseport v0.4.0 // indirect
github.com/libp2p/go-yamux/v5 v5.0.1 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mholt/acmez/v3 v3.0.0 // indirect
github.com/miekg/dns v1.1.66 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multicodec v0.9.1 // indirect
github.com/multiformats/go-varint v0.0.7
github.com/multiformats/go-multicodec v0.10.0 // indirect
github.com/multiformats/go-varint v0.1.0
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/gomega v1.36.3 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/pion/datachannel v1.5.10 // indirect
github.com/pion/dtls/v2 v2.2.12 // indirect
github.com/pion/dtls/v3 v3.0.6 // indirect
Expand Down Expand Up @@ -159,14 +171,12 @@ require (
github.com/quic-go/qpack v0.6.0 // indirect
github.com/quic-go/quic-go v0.57.1 // indirect
github.com/quic-go/webtransport-go v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/shirou/gopsutil v3.21.5+incompatible // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/cast v1.3.0 // indirect
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/supranational/blst v0.3.14 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
Expand All @@ -181,15 +191,20 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0
go.uber.org/zap/exp v0.3.0 // indirect
golang.org/x/exp v0.0.0-20250606033433-dcc06ee1d476 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect
golang.org/x/exp v0.0.0-20251125195548-87e1e737ad39 // indirect
golang.org/x/mod v0.30.0 // indirect
golang.org/x/telemetry v0.0.0-20251111182119-bc8e575c7b54 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/tools v0.38.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
golang.org/x/tools v0.39.0 // indirect
google.golang.org/protobuf v1.36.10 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.4.1 // indirect
)

replace github.com/codahale/hdrhistogram => github.com/HdrHistogram/hdrhistogram-go v0.0.0-20200919145931-8dac23c8dac1

replace github.com/syndtr/goleveldb => ../goleveldb

replace github.com/libp2p/go-libp2p => ../go-libp2p

replace github.com/ethereum/go-ethereum => ../go-ethereum
Loading