Standing supervisor restarts the miner with the node (dead template subscription); block-rate collector keeps difficulty and reads red share as 1 minus blue over DAA
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
9e348366d7
commit
9a294b42e7
2 changed files with 8 additions and 2 deletions
|
|
@ -33,6 +33,9 @@ start_node() {
|
|||
pkill -9 -f "$NODE_RE" 2>/dev/null; sleep 2
|
||||
IGNEUM_PROOF_VERIFIER=${ver:-} setsid nohup $nb --devnet $SUFFIX --appdir=$APP --rpclisten=0.0.0.0:26610 --evm-rpclisten=127.0.0.1:26790 --listen=0.0.0.0:26611 $peers --override-params-file=$OVR --nodnsseed --disable-upnp --nologfiles --yes </dev/null >> $LOG 2>&1 &
|
||||
sleep 8; echo "RESULT standing_node_started $(stamp) bin=$nb pid=$(node_pid) digest=$(grep -o 'digest: [0-9a-f]*' $LOG | tail -1 | awk '{print substr($2,1,16)}')"
|
||||
# a standalone igneum-miner keeps a dead template subscription after its node restarts (20:24Z: templates frozen,
|
||||
# fetch_errors climbing, no submits), so the miner and its worker are restarted with the node; the loop brings them back
|
||||
pkill -9 -f '^/opt/igneum/pkg/bin/igneum-miner mine' 2>/dev/null; pkill -9 -f '^/opt/igneum/pkg/bin/igneum-worker-cuda --serve --device 0 --pack packs' 2>/dev/null; true
|
||||
}
|
||||
HOST_VERIFIER=""
|
||||
miner_loop() {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ SEED_CMD = r"""L=${SEED_LOG:-/root/fleet/dn2-node.log}; P=$(pgrep -f "${SEED_PAT
|
|||
echo accepted=$(grep -c 'PoW accepted' $L) red=$(grep -ciE 'red block|colored red|is red' $L) reorg_max=$(grep -oE 'selected-chain reorg: [0-9]+ chain blocks' $L | grep -oE '[0-9]+ chain' | awk '{if ($1>m) m=$1} END {print m+0}') locks=$(grep -c 'LOCKED' $L)
|
||||
grep -E 'Finality: (checkpoint [0-9]+ determined|checkpoint [0-9]+ LOCKED|certificate at index [0-9]+ received)' $L | tail -40 | sed -E 's/^([0-9-]+ [0-9:.]+)[^]]*\] //' | cut -c1-170
|
||||
echo cpu_rss=$(ps -o %cpu=,rss= -p $P 2>/dev/null | tr -s ' ') rx_tx=$(cat /proc/$P/net/dev 2>/dev/null | awk 'NR>2 && $1!="lo:" {rx+=$2; tx+=$10} END {print rx, tx}')
|
||||
${SEED_MINER:-/opt/igneum/pkg/bin/igneum-miner} watch 1 grpc://127.0.0.1:${SEED_RPC:-26610} 2>/dev/null | grep -o 'blocks=[0-9]*.*synced=[a-z]*' | sed -E 's/difficulty=[0-9.]* sink=[0-9a-f]* //' | tail -1
|
||||
${SEED_MINER:-/opt/igneum/pkg/bin/igneum-miner} watch 1 grpc://127.0.0.1:${SEED_RPC:-26610} 2>/dev/null | grep -o 'blocks=[0-9]*.*synced=[a-z]*' | tail -1
|
||||
curl -s -m 6 -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"igneum_getExecStatus","params":[]}' http://127.0.0.1:${SEED_EVM:-26790}/ | python3 -c 'import sys,json; r=sys.stdin.read(); d=json.loads(r).get("result",{}) if r.strip() else {}; print("exec", int(d.get("executedTip","0x0"),16))' 2>/dev/null"""
|
||||
def sample(run):
|
||||
reg = Registry.load()
|
||||
|
|
@ -24,7 +24,10 @@ def sample(run):
|
|||
env = " ".join(f"{k}={v}" for k, v in (seed_env or {}).items()); rc, out, err = seed.run((env + " " if env else "") + SEED_CMD, 60); row["seed_raw"] = out[-4000:]
|
||||
for l in out.split("\n"):
|
||||
if l.startswith("accepted="): row.update(dict(kv.split("=") for kv in l.split()))
|
||||
elif l.startswith("blocks="): row.update({"w_" + k: v for k, v in (kv.split("=") for kv in l.split() if "=" in kv)})
|
||||
elif l.startswith("blocks="):
|
||||
row.update({"w_" + k: v for k, v in (kv.split("=") for kv in l.split() if "=" in kv)})
|
||||
try: row["red_share"] = round(1 - int(row["w_blue"]) / max(int(row["w_daa"]), 1), 4) # the node logs no red line; red = 1 - blue score / DAA score
|
||||
except Exception: pass
|
||||
elif l.startswith("exec "): row["exec_tip"] = int(l.split()[1])
|
||||
elif l.startswith("cpu_rss="): row["cpu_rss"] = l
|
||||
fin = [l for l in out.split("\n") if "Finality:" in l]; row["finality_tail"] = fin[-12:]
|
||||
|
|
|
|||
Loading…
Reference in a new issue