Files
zeekayandHanzo Dev 3d9a6b421b The chains answer straight from luxd; the rpc door is gone
The door existed to keep mainnet's admin API off the public path while its
import needed it on and a restart was not yet safe. Both are over: the
import finished at 1,082,780 and 1.37.9 restarts cleanly, so mainnet now runs
with the admin API off like the others. luxd itself refuses admin_, debug_,
personal_ and txpool_ (none are enabled) and answers CORS, which is
everything the door did.

Routes name luxd-archive:9630. Mainnet restarted into this shape at the tip
and was answering at 1,082,780 with history, state and every sampled
transaction intact. The door had capped an in-cluster indexer at 2.5 blocks/s
against 167 direct.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-23 06:21:01 -07:00

37 lines
1.7 KiB
YAML

# One-off recovery: import the canonical mainnet archive into luxd-archive.
# Needs the import shape on luxd-archive first (see its header): the admin API
# on and the archives mounted. It ran once, 2026-09-23, to 1,082,780.
# Not in the kustomization — an import is a recovery operation, not a lifecycle
# step. Apply it once against an empty database; it exits when the head is
# 1,082,780. admin_importChain skips blocks it already has, so a retry resumes,
# and it ends when its client does, so the client is this Job and not a shell.
apiVersion: batch/v1
kind: Job
metadata: {name: luxd-import, namespace: lux-mainnet}
spec:
backoffLimit: 20
activeDeadlineSeconds: 86400
template:
spec:
restartPolicy: OnFailure
nodeSelector: {hanzo.ai/role: platform}
containers:
- name: import
image: curlimages/curl:8.11.1
command: ["sh", "-c"]
args:
- |
RPC=http://luxd-archive:9630/v1/chain/C/rpc
RLP=/archives/lux-mainnet/lux-mainnet-96369.rlp
num() { curl -s -m 20 -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' "$RPC" | sed -n 's/.*"result":"\(0x[0-9a-f]*\)".*/\1/p'; }
while :; do
h=$(num)
[ "$h" = "0x10859c" ] && { echo "complete: head 1082780"; exit 0; }
echo "$(date -u +%T) head=${h:-down} importing"
curl -s --max-time 0 -X POST -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"admin_importChain\",\"params\":[\"$RLP\"]}" "$RPC"
echo; sleep 10
done
resources: {requests: {cpu: 10m, memory: 16Mi}}