Skip to content

Commit 21334c8

Browse files
Merge branch 'master' into feat/soc-dispersed
2 parents 2ebdca2 + 02704a1 commit 21334c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1835
-549
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COPY . ./
88

99
RUN make binary
1010

11-
FROM debian:12.10-slim
11+
FROM debian:12.12-slim
1212

1313
ENV DEBIAN_FRONTEND=noninteractive
1414

Dockerfile.dev

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,24 @@ RUN make binary \
1313
REACHABILITY_OVERRIDE_PUBLIC=${REACHABILITY_OVERRIDE_PUBLIC} \
1414
BATCHFACTOR_OVERRIDE_PUBLIC=${BATCHFACTOR_OVERRIDE_PUBLIC}
1515

16-
FROM debian:12.10-slim
16+
FROM debian:12.12-slim
1717

1818
ENV DEBIAN_FRONTEND=noninteractive
1919

2020
RUN apt-get update && apt-get install -y --no-install-recommends \
21-
ca-certificates; \
21+
ca-certificates \
22+
iputils-ping \
23+
netcat-openbsd \
24+
telnet \
25+
curl \
26+
wget \
27+
jq \
28+
net-tools; \
2229
apt-get clean; \
2330
rm -rf /var/lib/apt/lists/*; \
2431
groupadd -r bee --gid 999; \
2532
useradd -r -g bee --uid 999 --no-log-init -m bee;
2633

27-
# make sure mounted volumes have correct permissions
2834
RUN mkdir -p /home/bee/.bee && chown 999:999 /home/bee/.bee
2935

3036
COPY --from=build /src/dist/bee /usr/local/bin/bee

go.mod

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/ethersphere/bee/v2
22

33
go 1.25
44

5-
toolchain go1.25.1
5+
toolchain go1.25.2
66

77
require (
88
contrib.go.opencensus.io/exporter/prometheus v0.4.2
@@ -32,6 +32,7 @@ require (
3232
github.com/multiformats/go-multiaddr-dns v0.3.1
3333
github.com/multiformats/go-multihash v0.2.3
3434
github.com/multiformats/go-multistream v0.5.0
35+
github.com/multiformats/go-varint v0.0.7
3536
github.com/opentracing/opentracing-go v1.2.0
3637
github.com/prometheus/client_golang v1.21.1
3738
github.com/spf13/afero v1.6.0
@@ -67,8 +68,7 @@ require (
6768
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
6869
github.com/cespare/xxhash/v2 v2.3.0 // indirect
6970
github.com/codahale/hdrhistogram v0.0.0-00010101000000-000000000000 // indirect
70-
github.com/consensys/bavard v0.1.27 // indirect
71-
github.com/consensys/gnark-crypto v0.16.0 // indirect
71+
github.com/consensys/gnark-crypto v0.18.1 // indirect
7272
github.com/containerd/cgroups v1.1.0 // indirect
7373
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
7474
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
@@ -125,14 +125,12 @@ require (
125125
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
126126
github.com/minio/sha256-simd v1.0.1 // indirect
127127
github.com/mitchellh/mapstructure v1.4.1 // indirect
128-
github.com/mmcloughlin/addchain v0.4.0 // indirect
129128
github.com/mr-tron/base58 v1.2.0 // indirect
130129
github.com/multiformats/go-base32 v0.1.0 // indirect
131130
github.com/multiformats/go-base36 v0.2.0 // indirect
132131
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
133132
github.com/multiformats/go-multibase v0.2.0 // indirect
134133
github.com/multiformats/go-multicodec v0.9.0 // indirect
135-
github.com/multiformats/go-varint v0.0.7 // indirect
136134
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
137135
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
138136
github.com/opencontainers/runtime-spec v1.2.0 // indirect
@@ -153,7 +151,7 @@ require (
153151
github.com/spaolacci/murmur3 v1.1.0 // indirect
154152
github.com/spf13/cast v1.3.0 // indirect
155153
github.com/spf13/jwalterweatherman v1.0.0 // indirect
156-
github.com/spf13/pflag v1.0.5 // indirect
154+
github.com/spf13/pflag v1.0.6 // indirect
157155
github.com/subosito/gotenv v1.2.0 // indirect
158156
github.com/supranational/blst v0.3.14 // indirect
159157
github.com/tklauser/go-sysconf v0.3.12 // indirect
@@ -176,7 +174,6 @@ require (
176174
gopkg.in/ini.v1 v1.57.0 // indirect
177175
gopkg.in/yaml.v3 v3.0.1 // indirect
178176
lukechampine.com/blake3 v1.2.1 // indirect
179-
rsc.io/tmplfunc v0.0.3 // indirect
180177
)
181178

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

go.sum

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,9 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ
175175
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo=
176176
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
177177
github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ=
178-
github.com/consensys/bavard v0.1.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs=
179-
github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs=
180178
github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=
181-
github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo=
182-
github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU=
179+
github.com/consensys/gnark-crypto v0.18.1 h1:RyLV6UhPRoYYzaFnPQA4qK3DyuDgkTgskDdoGqFt3fI=
180+
github.com/consensys/gnark-crypto v0.18.1/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c=
183181
github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE=
184182
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
185183
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=
@@ -413,7 +411,6 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
413411
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7 h1:y3N7Bm7Y9/CtpiVkw/ZWj6lSlDF3F74SfKwfTCer72Q=
414412
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik=
415413
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
416-
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
417414
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
418415
github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
419416
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -663,9 +660,6 @@ github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxd
663660
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
664661
github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A=
665662
github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4=
666-
github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY=
667-
github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU=
668-
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
669663
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
670664
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
671665
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
@@ -913,8 +907,9 @@ github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3k
913907
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
914908
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
915909
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
916-
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
917910
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
911+
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
912+
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
918913
github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM=
919914
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
920915
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=
@@ -1500,7 +1495,5 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
15001495
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
15011496
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
15021497
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
1503-
rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU=
1504-
rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA=
15051498
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
15061499
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=

openapi/Swarm.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,12 +565,6 @@ paths:
565565
tags:
566566
- Tag
567567
description: Tags can be thought of as upload sessions which can be tracked using the tags endpoint. It will keep track of the chunks that are uploaded as part of the tag and will push them out to the network once a done split is called on the Tag. This happens internally if you use the `Swarm-Deferred-Upload` header.
568-
requestBody:
569-
required: true
570-
content:
571-
application/json:
572-
schema:
573-
$ref: "SwarmCommon.yaml#/components/schemas/NewTagRequest"
574568
responses:
575569
"201":
576570
description: New Tag Info

openapi/SwarmCommon.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,6 @@ components:
295295
MultiAddress:
296296
type: string
297297

298-
NewTagRequest:
299-
type: object
300-
properties:
301-
address:
302-
$ref: "#/components/schemas/SwarmAddress"
303-
304298
NewTagResponse:
305299
type: object
306300
properties:

packaging/docker/README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,60 @@
22

33
The docker-compose provides an app container for Bee.
44
To prepare your machine to run docker compose execute
5-
```
5+
6+
```bash
67
mkdir -p bee && cd bee
78
wget -q https://raw.githubusercontent.com/ethersphere/bee/master/packaging/docker/docker-compose.yml
89
wget -q https://raw.githubusercontent.com/ethersphere/bee/master/packaging/docker/env -O .env
910
```
11+
1012
Set all configuration variables inside `.env`
1113

1214
If you want to run node in full mode, set `BEE_FULL_NODE=true`
1315

1416
Bee requires an Ethereum endpoint to function. Obtain a free Infura account and set:
17+
1518
- `BEE_BLOCKCHAIN_RPC_ENDPOINT=wss://sepolia.infura.io/ws/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
1619

1720
Set bee password by either setting `BEE_PASSWORD` or `BEE_PASSWORD_FILE`
1821

1922
If you want to use password file set it to
23+
2024
- `BEE_PASSWORD_FILE=/password`
2125

2226
Mount password file local file system by adding
23-
```
27+
28+
```yaml
2429
- ./password:/password
2530
```
31+
2632
to bee volumes inside `docker-compose.yml`
2733

2834
Start it with
29-
```
35+
36+
```bash
3037
docker-compose up -d
3138
```
3239

3340
From logs find URL line with `on sepolia you can get both sepolia eth and sepolia bzz from` and prefund your node
34-
```
41+
42+
```bash
3543
docker-compose logs -f bee-1
3644
```
3745

3846
Update services with
39-
```
47+
48+
```bash
4049
docker-compose pull && docker-compose up -d
4150
```
4251

4352
## Running multiple Bee nodes
53+
4454
It is easy to run multiple bee nodes with docker compose by adding more services to `docker-compose.yaml`
4555
To do so, open `docker-compose.yaml`, copy lines 4-54 and past this after line 54 (whole bee-1 section).
4656
In the copied lines, replace all occurrences of `bee-1` with `bee-2` and adjust the `API_ADDR` and `P2P_ADDR` to respectively `1733`, `1734.`
4757
Lastly, add your newly configured services under `volumes` (last lines), such that it looks like:
58+
4859
```yaml
4960
volumes:
5061
bee-1:

pkg/addressbook/addressbook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func run(t *testing.T, f bookFunc) {
4747
t.Fatal(err)
4848
}
4949

50-
bzzAddr, err := bzz.NewAddress(crypto.NewDefaultSigner(pk), multiaddr, addr1, 1, trxHash)
50+
bzzAddr, err := bzz.NewAddress(crypto.NewDefaultSigner(pk), []ma.Multiaddr{multiaddr}, addr1, 1, trxHash)
5151
if err != nil {
5252
t.Fatal(err)
5353
}

pkg/api/peer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ func (s *Service) peerConnectHandler(w http.ResponseWriter, r *http.Request) {
3131
return
3232
}
3333

34-
bzzAddr, err := s.p2p.Connect(r.Context(), paths.MultiAddress)
34+
bzzAddr, err := s.p2p.Connect(r.Context(), []multiaddr.Multiaddr{paths.MultiAddress})
35+
3536
if err != nil {
3637
logger.Debug("p2p connect failed", "addresses", paths.MultiAddress, "error", err)
3738
logger.Error(nil, "p2p connect failed", "addresses", paths.MultiAddress)

pkg/api/peer_test.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@ func TestConnect(t *testing.T) {
4545
t.Fatal(err)
4646
}
4747

48-
bzzAddress, err := bzz.NewAddress(crypto.NewDefaultSigner(privateKey), underlama, overlay, 0, nil)
48+
bzzAddress, err := bzz.NewAddress(crypto.NewDefaultSigner(privateKey), []ma.Multiaddr{underlama}, overlay, 0, nil)
4949
if err != nil {
5050
t.Fatal(err)
5151
}
5252

5353
testServer, _, _, _ := newTestServer(t, testServerOptions{
54-
P2P: mock.New(mock.WithConnectFunc(func(ctx context.Context, addr ma.Multiaddr) (*bzz.Address, error) {
55-
if addr.String() == errorUnderlay {
56-
return nil, testErr
54+
P2P: mock.New(mock.WithConnectFunc(func(ctx context.Context, addrs []ma.Multiaddr) (*bzz.Address, error) {
55+
for _, addr := range addrs {
56+
if addr.String() == errorUnderlay {
57+
return nil, testErr
58+
}
5759
}
5860
return bzzAddress, nil
5961
})),
@@ -81,9 +83,11 @@ func TestConnect(t *testing.T) {
8183
t.Run("error - add peer", func(t *testing.T) {
8284
t.Parallel()
8385
testServer, _, _, _ := newTestServer(t, testServerOptions{
84-
P2P: mock.New(mock.WithConnectFunc(func(ctx context.Context, addr ma.Multiaddr) (*bzz.Address, error) {
85-
if addr.String() == errorUnderlay {
86-
return nil, testErr
86+
P2P: mock.New(mock.WithConnectFunc(func(ctx context.Context, addrs []ma.Multiaddr) (*bzz.Address, error) {
87+
for _, addr := range addrs {
88+
if addr.String() == errorUnderlay {
89+
return nil, testErr
90+
}
8791
}
8892
return bzzAddress, nil
8993
})),

0 commit comments

Comments
 (0)