Skip to content

fix(config): disable options rejected by bee in light and ultra-light… - #621

Open
martinconic wants to merge 7 commits into
masterfrom
refactor/node-mode-two-regimes
Open

martinconic wants to merge 7 commits into
masterfrom
refactor/node-mode-two-regimes

Conversation

@martinconic

@martinconic martinconic commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Companion to ethersphere/bee#5596. Supersedes #580, whose changes this branch carries.

What changes

Profiles move from full-node to node-mode. Every bee-config in config.yaml, local.yaml, light-node.yaml, public-testnet.yaml, staging.yaml and testnet-bee-playground.yaml now sets node-mode (full, light or ultra-light) instead of full-node.

Light and ultra-light profiles stop inheriting options bee rejects. With node-mode set, bee rejects storage incentives outside full mode and a chequebook without swap. These profiles inherited both as true from their full-node parent:

Profile mode swap chequebook incentives
bee-local-light light true true false
bee-local-light-autotls light true true false
bee-local-ultralight-autotls ultra-light false false false
light-node light true true false

The ultra-light profile now really has no endpoint. bee-local-ultralight-autotls set blockchain-rpc-endpoint: to null, which inheritance treats as unset, so it inherited ws://geth-swap:8546 from bee-local-dns: on master that node has been running as a light node. It is now blockchain-rpc-endpoint: "", which clears the inherited value, so the node is a genuine ultra-light node and bee does not warn that the endpoint is ignored.

Bootnodes disable storage incentives. The bootnode profiles (bootnode, bootnode-local, bootnode-local-dns, bootnode-local-dns-autotls, bootnode-local-gc, geth-playground-bootnode) inherited storage-incentives-enable: true. Bee never runs the incentives agent on a bootnode and, with node-mode set, warns about it on every start; the profiles now set it to false. Nothing changes at runtime.

The local-dns cluster also runs one node in bee's legacy regime. A new bee-legacy group (1 node, profile bee-local-dns-legacy) overrides the inherited node-mode with "" and sets full-node: true, so bee infers the mode the way releases before node-mode did. It runs next to the 3 node-mode: full nodes, so bee#5596's CI covers both regimes in one cluster.

Orchestration. orchestration.Config gains NodeMode plus IsFullNode, IsLightNode and IsUltraLightNode, which read node-mode and fall back to full-node (and the RPC endpoint) when it is unset or empty. FullNodeNames, LightNodeNames, ShuffledFullNodeClients and ClosestFullNodeClient use them, and UltraLightNodeNames is added.

CI. golangci-lint bumped to v2.11.3 with the lint cache disabled.

Merge order

Bee releases up to and including v2.8.3 reject unknown config keys at startup (CheckUnknownParams), and they have no node-mode option. A node from any of those releases refuses to start with a .bee.yaml rendered from these profiles. This PR should therefore merge only after bee#5596 is merged and released, since the remote profiles (staging, public-testnet, testnet-bee-playground) deploy released images.

Testing

  • TestNodeModeHelpers covers the helpers for explicit modes and the full-node fallback.
  • TestLocalDNSLegacyNodeGroup loads config/local.yaml and checks that the bee-legacy node renders node-mode: "" with full-node: true, while bee-local-dns keeps node-mode: full.
  • A bee binary built from bee#5596's branch, started with the rendered legacy profile, logs the legacy-inference warning with node_mode="full"; the bee-local-dns profile resolves to full without it.
  • Every bee-config across all config/*.yaml files (19 profiles) was rendered by beekeeper and resolved by bee#5596's real config pipeline: all resolve without warnings except the intended migration warning on bee-local-dns-legacy. The only profile bee rejects is sepolia (full-node/node-mode: full without an RPC endpoint), unchanged from master, where bee fails it at chain init; its endpoint is expected to come from outside beekeeper.
  • go vet, the pkg/config and pkg/orchestration tests, and make lint pass. bee#5596's Beekeeper workflow is pinned to this branch, so its run exercises the cluster end to end.

… profiles

Light and ultra-light profiles inherit storage-incentives-enable: true
(and, for ultra-light, chequebook-enable: true) from their full-node base
profile. Bee rejects storage incentives outside full mode and chequebook
without swap, so the light nodes in the local-dns cluster never became
ready and the bee Beekeeper CI job failed at cluster setup. Set the
inherited options to false where the mode does not support them.
@martinconic
martinconic marked this pull request as ready for review September 3, 2026 13:01
@martinconic
martinconic changed the base branch from refactor/node-mode-config to master September 4, 2026 12:12
Run one full node in the local-dns cluster with node-mode unset so bee's
legacy regime, which infers the mode from full-node, is exercised next to
the explicit node-mode groups. The profile overrides the inherited
node-mode with an empty value.
… bootnodes

The ultra-light autotls profile set blockchain-rpc-endpoint to null, which
inheritance treats as unset, so it inherited the parent's endpoint: on
master the node ran as a light node, and with node-mode bee ignores the
endpoint and warns. Set it to an empty string so it is cleared.

Bootnodes inherit storage-incentives-enable: true, which has no effect on
them and now makes bee warn on every start. Disable it on the bootnode
profiles.
martinconic added a commit to ethersphere/bee that referenced this pull request Oct 16, 2026
Beekeeper master configures nodes with full-node, which bee resolves
through the legacy node mode. The node-mode profiles in
ethersphere/beekeeper#621 merge after a bee release that knows node-mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant