24 lines
2.1 KiB
Bash
Executable file
24 lines
2.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# The engine gate (7 October 2026, the Devnet 3 start): a 21d8f454 igneumd with its commit string twice but ZERO igneum-pow/src/
|
|
# paths was placed in the artefact folder by a build outside the app tree; the fleet's hub ran it, the igneum-pow miner's blocks
|
|
# were every one rejected (Reject(BlockInvalid)), the go stopped. The commit-string gate cannot see this: the string comes from the
|
|
# fork's own git, the engine from the igneum-pow tree the build sat next to. So every igneumd and igneum-miner that
|
|
# tools/build-remote.sh fetches must carry igneum-pow source paths in its strings (rustc embeds the panic locations of the engine
|
|
# crate it compiled in: igneum-pow/src/...); none means the stub engine or a foreign igneum-pow, and the fetch refuses.
|
|
#
|
|
# tools/ci/engine-check.sh <binary> # exit 0 with the count, exit 1 "no igneum-pow/src/ path in <binary>"
|
|
# tools/ci/engine-check.sh --self-test # a fixture with the paths passes, one without fails
|
|
set -euo pipefail
|
|
if [ "${1:-}" = --self-test ]; then
|
|
t=$(mktemp -d); trap 'rm -rf "$t"' EXIT
|
|
printf 'binary junk\0/srv/builds/x/igneum-pow/src/lib.rs\0more junk\0igneum-pow/src/lottery.rs\0' > "$t/good"
|
|
printf 'binary junk\0/srv/builds/x/consensus/pow/src/stub.rs\0commit 21d8f454\0' > "$t/bad"
|
|
"$0" "$t/good" >/dev/null || { echo "engine-check self-test: a binary WITH igneum-pow paths was refused"; exit 1; }
|
|
if "$0" "$t/bad" >/dev/null 2>&1; then echo "engine-check self-test: a binary WITHOUT igneum-pow paths passed"; exit 1; fi
|
|
echo "engine-check self-test: a binary with igneum-pow/src/ paths passes, one without is refused"; exit 0
|
|
fi
|
|
f="${1:-}"; [ -f "$f" ] || { echo "engine-check: no file '$f'" >&2; exit 2; }
|
|
n=$(LC_ALL=C grep -a -c 'igneum-pow/src/' "$f" || true)
|
|
if [ "${n:-0}" -gt 0 ]; then echo "engine-check: $(basename "$f") carries $n igneum-pow/src/ path line(s): the igneum-pow engine"; exit 0; fi
|
|
echo "engine-check: no igneum-pow/src/ path in $(basename "$f"): the stub engine or a foreign igneum-pow tree (the commit string alone does not prove the engine; 7 Oct 2026 Devnet 3)" >&2
|
|
exit 1
|