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:
+3
-1
@@ -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, ...)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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 \
|
||||||
|
|||||||
Reference in New Issue
Block a user