k8s: DIFFICULTY=24 in config.env, passed as --difficulty

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-19 00:24:28 +01:00
co-authored by Claude Sonnet 5.5
parent daa80a6d56
commit 0b3ead4b23
3 changed files with 11 additions and 1 deletions
+3 -1
View File
@@ -38,7 +38,9 @@ so:
``` ```
2. **Name.** Edit `base/config.env` (`PUBLIC_HOST`, and `PUBLIC_PORT` if the 2. **Name.** Edit `base/config.env` (`PUBLIC_HOST`, and `PUBLIC_PORT` if the
router cannot forward 4001 to 4001; `REGION` if the node should keep router cannot forward 4001 to 4001; `REGION` if the node should keep
listings for a region). listings for a region). `DIFFICULTY` (24) is the network's proof-of-work and
must match every other node: at another value this node refuses their
listings and they refuse its. Moving from the old 16 needs the new image too.
3. **Apply.** 3. **Apply.**
``` ```
kubectl apply -k k8s/base # with a LoadBalancer (MetalLB, kube-vip, ...) kubectl apply -k k8s/base # with a LoadBalancer (MetalLB, kube-vip, ...)
+7
View File
@@ -15,3 +15,10 @@ PUBLIC_PORT=4001
# this again). Changing this file restarts the pod, because the ConfigMap name # this again). Changing this file restarts the pod, because the ConfigMap name
# changes with its content. # changes with its content.
REGION= REGION=
# The proof-of-work (leading zero bits) this node requires of listings, reports
# and revocations. It must equal the network's: a node refuses what carries
# less than its own value, so a node at 24 and one at 16 exchange no listings.
# The default of the binary is 24; it is written here so it is visible, and so
# a later change of the network's value is one edit in one place.
DIFFICULTY=24
+1
View File
@@ -50,6 +50,7 @@ spec:
--no-default-bootstrap \ --no-default-bootstrap \
--no-mdns \ --no-mdns \
--no-login-link \ --no-login-link \
--difficulty "${DIFFICULTY:-24}" \
--http 0.0.0.0:8080 \ --http 0.0.0.0:8080 \
--listen /ip4/0.0.0.0/tcp/4001 \ --listen /ip4/0.0.0.0/tcp/4001 \
--listen /ip4/0.0.0.0/udp/4001/quic-v1 \ --listen /ip4/0.0.0.0/udp/4001/quic-v1 \