diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-05 22:46:52 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-05 22:46:52 +0000 |
| commit | ceae3d076b5ad11ee84729ae43f14e9312896646 (patch) | |
| tree | 7e9132aa871fdc01cb95268d2f5ea3bb11853ddf /scripts/check-money-log-lines.sh | |
| parent | be63e83d79e7e00e6b8ca889a70e6a19886aa1d8 (diff) | |
| parent | 66e0b9158d050c46b1ff2509faeee3f4573cac1c (diff) | |
Bring main onto the line this project actually ships
main had drifted to a history with no ancestor in common with the tree we
build and deploy. It sat at be63e83 (2026-08-09) with 28 commits; the shipped
line, deploy/soak-2026-08-21, had 383. The two shared nothing -- git
merge-base returns no result at all -- so anyone cloning this repository
landed on a default branch that was neither current nor related to the
running node.
The 28 commits on main were audited before this merge: every one is already
present in the tree by content, including the two that are hardest to see
because they were rewritten afterwards -- the payout reorg-safety work
(PayoutBlockStillOnChain, since evolved to re-check on every retry rather
than once at maturity) and the nostr relay certificate verification
(SSL_set1_host, now with a Windows root-store path). Nothing on main is lost
by this merge.
Recorded as a merge rather than a force-push: main only ever moves forward,
its old history stays reachable as the first parent, and this is revertible.
The tree is taken wholesale from the merged branch, so main's content is now
exactly what was built and tested.
What this brings onto main:
- compactblock: BIP152-style compact block relay ported from upstream 1.2.23,
primitives and unit test only, with the RAND_bytes failure path closed and
the reconstruction allocation bounded.
- upstream/main 17741d9: isolated testnet parameters and genesis, optional
2 MB large pages for RandomX. Mainnet genesis verified byte-identical
through upstream's BuildGenesisBlock() refactor.
- deploy: every image built on bookworm so binaries run on Debian 12, and the
container build now honours the RandomX and libsecp256k1 pins it had been
silently ignoring since before 1.2.15.
Gates at this tree: 15/15 selftests, compactblock's 17 checks, consensus
constants unchanged against e4f898c apart from the pre-existing
MAX_BLOCK_SIZE_GEN, mainnet genesis intact, money-log check ok.
Diffstat (limited to 'scripts/check-money-log-lines.sh')
| -rwxr-xr-x | scripts/check-money-log-lines.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/check-money-log-lines.sh b/scripts/check-money-log-lines.sh new file mode 100755 index 0000000..c9f348b --- /dev/null +++ b/scripts/check-money-log-lines.sh | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | # Money-moving payout lines must print every time they fire: they are the | ||
| 3 | # audit trail for obligations created, moved and destroyed, and LogPrint's | ||
| 4 | # burst collapse can stand one line in for any number of events inside one | ||
| 5 | # 3-second window (issue #3: 100 voids totalling 4,950 BTF read as one | ||
| 6 | # 49.49 BTF line). Every line carrying one of the phrases below must use | ||
| 7 | # LogPrintAlways, which keeps the category gate but skips the collapse. | ||
| 8 | # | ||
| 9 | # Adding a payout line that reports money moving? Use LogPrintAlways and | ||
| 10 | # add its phrase here. A phrase found in a plain LogPrint call fails this | ||
| 11 | # check; anything else passes, so a non-money line is never held up by it. | ||
| 12 | set -euo pipefail | ||
| 13 | cd "$(dirname "$0")/.." | ||
| 14 | |||
| 15 | phrases='was orphaned -- voiding|orphaned while queued|\[payout\] paid %s to %s|FAILED to pay|writing off|SKIPPED bad address' | ||
| 16 | |||
| 17 | # Call sites span several lines; flatten each call to a single line first so | ||
| 18 | # the phrase and the macro it belongs to are matched together. Only a line | ||
| 19 | # whose first token is the macro starts a call, so comments mentioning | ||
| 20 | # LogPrint are never mistaken for one. | ||
| 21 | bad=$(awk ' | ||
| 22 | /^[ \t]*LogPrint(Always)?[(]/ { | ||
| 23 | if (collecting) print buf | ||
| 24 | buf = $0; collecting = 1; next | ||
| 25 | } | ||
| 26 | collecting { | ||
| 27 | buf = buf $0 | ||
| 28 | if (/;[ \t]*$/) { print buf; collecting = 0 } | ||
| 29 | } | ||
| 30 | END { if (collecting) print buf } | ||
| 31 | ' src/rpc.cpp | grep -E '^[[:space:]]*LogPrint[(]' | grep -E "$phrases" || true) | ||
| 32 | |||
| 33 | if [ -n "$bad" ]; then | ||
| 34 | echo "error: money-moving payout line(s) on collapsing LogPrint:" >&2 | ||
| 35 | echo "$bad" >&2 | ||
| 36 | exit 1 | ||
| 37 | fi | ||
| 38 | echo "ok: every money-moving payout line in src/rpc.cpp uses LogPrintAlways" | ||