mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-10-20 18:56:24 +00:00
Stop one lost extrinsic from silencing the noter bot (#30)
Every report waits behind the previous one, and a submission only settled when it reached a block. One the pool dropped, rejected or replaced never settled, so every report queued after it waited forever. The watchdog meant to catch a silent bot was armed only after the first scan returned, so when that first scan was the one that hung there was no watchdog at all: the production container logged its last line one minute after starting on 2026-10-13 and stayed up, silent, for more than a day. - submit.js: a submission settles on a terminal status (Dropped, Invalid, Usurped, FinalityTimeout) or after SUBMIT_TIMEOUT_MS, and releases its status subscription. - The watchdog is armed before connecting and counts from the process start until a scan completes, so a heartbeat left by an earlier process in the same container does not count for this one. - The noter's own account is skipped: the chain refuses a noter's report about themselves, so it failed in every scan. - Unit tests for both rules, run inside the noter image in CI.
This commit is contained in:
1 parent
d25afe25bb
commit
1e8d5e3675
5 files changed
+209
-40
No files matched your search
@@ -77,6 +77,11 @@ jobs:
|
||||
- name: Crypto stack
|
||||
run: docker run --rm -v "$PWD/scripts/bot-smoke.mjs:/app/bot-smoke.mjs:ro" bot node bot-smoke.mjs ${{ matrix.mode }}
|
||||
|
||||
# Run inside the image, so the modules under test are the ones the image ships.
|
||||
- name: Unit tests
|
||||
if: matrix.bot == 'noter'
|
||||
run: docker run --rm -v "$PWD/noter/test:/app/test:ro" bot node --test test/submit.test.mjs
|
||||
|
||||
- name: The bot loads and stops at its missing mnemonic
|
||||
env:
|
||||
EXPECT: ${{ matrix.expect }}
|
||||
|
||||
Reference in new issue
Block a user