Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
d45c920
feat(autotls): implement autotls check functionality
akrem-chabchoub Jan 19, 2026
ac81bb3
feat(autotls): enhance WSS connectivity checks and update configuration
akrem-chabchoub Jan 20, 2026
1bd3237
feat(autotls): add autotls check in config.yaml
akrem-chabchoub Jan 20, 2026
836cc6b
feat(config): add WSS configuration for local setup
akrem-chabchoub Jan 21, 2026
b0d601f
fix(autotls): ensure context cancellation is handled correctly during…
akrem-chabchoub Jan 21, 2026
a1488a2
fix(autotls): update WSS connectivity test to disconnect everything b…
akrem-chabchoub Jan 21, 2026
43d3bf3
fix(autotls): add WSS group option and enhance error handling for WSS…
akrem-chabchoub Jan 22, 2026
ca375b7
feat(autotls): add certificate renewal testing options and enhance co…
akrem-chabchoub Jan 23, 2026
48c5398
refactor(autotls): simplify certificate renewal options and update re…
akrem-chabchoub Jan 27, 2026
4e3b107
fix(autotls): increase certificate renewal wait time to 500 seconds f…
akrem-chabchoub Jan 27, 2026
10ff084
fix(autotls): extend timeout for certificate renewal to 15 minutes
akrem-chabchoub Jan 27, 2026
7c95858
feat(autotls): add ultralight group support and connectivity testing
akrem-chabchoub Feb 4, 2026
04e0444
feat(config): update local.yaml for ultralight configuration and enha…
akrem-chabchoub Feb 5, 2026
2959ac0
fix(autotls): re-enable certificate renewal test
akrem-chabchoub Feb 5, 2026
0dc82b0
feat(config): add local-dns-autotls and local-light-autotls configura…
akrem-chabchoub Feb 16, 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
4 changes: 3 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,9 @@ checks:
postage-depth: 21
postage-label: test-label
type: feed

autotls:
timeout: 5m
type: autotls
# simulations defines simulations Beekeeper can execute against the cluster
# type filed allows defining same simulation with different names and options
simulations:
Expand Down
82 changes: 81 additions & 1 deletion config/local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,38 @@ clusters:
config: local
count: 2
mode: node
local-dns-autotls:
_inherit: "local"
node-groups:
bootnode:
mode: bootnode
bee-config: bootnode-local-dns-autotls
config: local-dns-autotls
nodes:
- name: bootnode-0
bootnodes: /dns4/bootnode-0-headless.%s.svc.cluster.local/tcp/1634/p2p/QmaHzvd3iZduu275CMkMVZKwbsjXSyH3GJRj4UvFJApKcb
libp2p-key: '{"address":"28678fe31f09f722d53e77ca2395569f19959fa5","crypto":{"cipher":"aes-128-ctr","ciphertext":"0ff319684c4f8decf9c998047febe3417cfc45832b8bb62fd818183d54cf5d0183bfa021ed95addce3b33e83ce7ee73e926f00eea8241d96b349266a4d299829d3d22db0d536315b52b34db4a6778bfd3ce7631ad7256ea0bb9c50abea9de35d740b6fdc50caf929b1d19494690d9ed649105d02c14f5ec49d","cipherparams":{"iv":"4e9a50fb5852b5e61964f696be78066b"},"kdf":"scrypt","kdfparams":{"n":32768,"r":8,"p":1,"dklen":32,"salt":"4d513e81647e4150bb648ed8d2dda28d460802336bf24d620119eac66ae0c0c4"},"mac":"9ae71db96e5ddc1c214538d42082212bbbe53aeac09fcc3e3a8eff815648331e"},"version":3,"id":"ae3bc991-d89f-405a-9e6a-60e27347e22d"}'
swarm-key: '{"address":"f176839c150e52fe30e5c2b5c648465c6fdfa532","crypto":{"cipher":"aes-128-ctr","ciphertext":"352af096f0fca9dfbd20a6861bde43d988efe7f179e0a9ffd812a285fdcd63b9","cipherparams":{"iv":"613003f1f1bf93430c92629da33f8828"},"kdf":"scrypt","kdfparams":{"n":32768,"r":8,"p":1,"dklen":32,"salt":"ad1d99a4c64c95c26131e079e8c8a82221d58bf66a7ceb767c33a4c376c564b8"},"mac":"cafda1bc8ca0ffc2b22eb69afd1cf5072fd09412243443be1b0c6832f57924b6"},"version":3}'
bee:
bee-config: bee-local-dns-autotls
config: local-dns-autotls
count: 3
mode: node
light:
bee-config: bee-local-light-autotls
config: local-light-autotls
count: 2
mode: node
wss:
bee-config: bee-local-wss
config: local
count: 2
mode: node
ultralight:
bee-config: bee-local-ultralight
config: local-ultralight
count: 1
mode: node
local-dns:
_inherit: "local"
node-groups:
Expand All @@ -42,11 +74,21 @@ clusters:
config: local-dns
count: 3
mode: node
wss:
bee-config: bee-local-wss
config: local-dns
count: 2
mode: node
light:
bee-config: bee-local-light
config: local-light
count: 2
mode: node
# ultralight:
# bee-config: bee-local-ultralight
# config: local-ultralight
# count: 2
# mode: node
local-gc:
_inherit: "local"
node-groups:
Expand Down Expand Up @@ -100,13 +142,37 @@ node-groups:
update-strategy: "RollingUpdate"
local-dns:
_inherit: "local"
local-dns-autotls:
_inherit: "local"
local-light-autotls:
_inherit: "local-light"
local-gc:
_inherit: "local"
local-light:
_inherit: "local"
local-ultralight:
_inherit: "local"
labels:
app.kubernetes.io/component: "node"
app.kubernetes.io/name: "bee"
app.kubernetes.io/part-of: "bee"
app.kubernetes.io/version: "latest"
beekeeper.ethswarm.org/node-funder: "false"

# bee-configs defines Bee configuration that can be assigned to node-groups
bee-configs:
bootnode-local-dns-autotls:
_inherit: "bee-local-dns-autotls"
bootnode-mode: true
bee-local-dns-autotls:
_inherit: "bee-local"
bootnode: /dnsaddr/bootnode-0-headless.local.svc.cluster.local
p2p-wss-enable: true
bee-local-light-autotls:
_inherit: "bee-local"
bootnode: /dnsaddr/bootnode-0-headless.local.svc.cluster.local
full-node: false
p2p-wss-enable: true
bee-local:
_inherit: ""
allow-private-cidrs: true
Expand Down Expand Up @@ -134,7 +200,7 @@ bee-configs:
p2p-addr: ":1634"
p2p-wss-addr: ":1635"
p2p-ws-enable: false
p2p-wss-enable: true
p2p-wss-enable: false
password: "beekeeper"
payment-early-percent: 50
payment-threshold: 13500000
Expand All @@ -157,6 +223,9 @@ bee-configs:
bootnode-local:
_inherit: "bee-local"
bootnode-mode: true
bee-local-wss:
_inherit: "bee-local"
p2p-wss-enable: true
bee-local-dns:
_inherit: "bee-local"
bootnode: /dnsaddr/localhost
Expand All @@ -171,6 +240,11 @@ bee-configs:
bee-local-gc:
_inherit: "bee-local"
cache-capacity: 10
bee-local-ultralight:
_inherit: "bee-local"
blockchain-rpc-endpoint: ""
full-node: false
swap-enable: false
bootnode-local-gc:
_inherit: "bee-local"
cache-capacity: 10
Expand Down Expand Up @@ -398,3 +472,9 @@ checks:
postage-depth: 21
postage-label: test-label
type: feed
ci-autotls:
timeout: 15m
type: autotls
options:
ultralight-group: ultralight
wss-group: wss
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/go-git/go-git/v5 v5.13.2
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.1
github.com/multiformats/go-multiaddr v0.12.3
github.com/opentracing/opentracing-go v1.2.0
github.com/prometheus/client_golang v1.21.1
github.com/prometheus/common v0.62.0
Expand Down Expand Up @@ -94,7 +95,6 @@ require (
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 v0.12.3 // indirect
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multicodec v0.9.0 // indirect
Expand Down
18 changes: 18 additions & 0 deletions pkg/bee/api/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,24 @@ func (n *NodeService) Peers(ctx context.Context) (resp Peers, err error) {
return resp, err
}

// ConnectResponse represents the response from the connect endpoint
type ConnectResponse struct {
Address string `json:"address"`
}

// Connect connects to a peer using the provided multiaddress.
// The multiaddr should be in the format: /ip4/x.x.x.x/tcp/port/...
// Returns the overlay address of the connected peer.
func (n *NodeService) Connect(ctx context.Context, multiaddr string) (resp ConnectResponse, err error) {
err = n.client.requestJSON(ctx, http.MethodPost, "/connect"+multiaddr, nil, &resp)
return resp, err
}

// Disconnect disconnects from a peer with the given overlay address.
func (n *NodeService) Disconnect(ctx context.Context, overlay swarm.Address) error {
return n.client.requestJSON(ctx, http.MethodDelete, "/peers/"+overlay.String(), nil, nil)
}

// Readiness represents node's readiness
type Readiness struct {
Status string `json:"status"`
Expand Down
24 changes: 24 additions & 0 deletions pkg/bee/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,30 @@ func (c *Client) Peers(ctx context.Context) (peers []swarm.Address, err error) {
return peers, err
}

// Connect connects to a peer using the provided multiaddress.
// Returns the overlay address of the connected peer.
func (c *Client) Connect(ctx context.Context, multiaddr string) (swarm.Address, error) {
resp, err := c.api.Node.Connect(ctx, multiaddr)
if err != nil {
return swarm.ZeroAddress, fmt.Errorf("connect to %s: %w", multiaddr, err)
}

addr, err := swarm.ParseHexAddress(resp.Address)
if err != nil {
return swarm.ZeroAddress, fmt.Errorf("parse overlay address %s: %w", resp.Address, err)
}

return addr, nil
}

// Disconnect disconnects from a peer with the given overlay address.
func (c *Client) Disconnect(ctx context.Context, overlay swarm.Address) error {
if err := c.api.Node.Disconnect(ctx, overlay); err != nil {
return fmt.Errorf("disconnect from %s: %w", overlay, err)
}
return nil
}

// PinRootHash pins root hash of given reference.
func (c *Client) PinRootHash(ctx context.Context, ref swarm.Address) error {
return c.api.Pinning.PinRootHash(ctx, ref)
Expand Down
Loading