Commit Graph

5 Commits

Author SHA1 Message Date
pezkuwichain 92022d79c1 Fix noter bot: serialize signAndSend to stop concurrent-nonce tx rejection
fullScan() processes accounts in concurrent batches of 10, and each account's
own data-gathering takes variable time, so multiple accounts' submitStakingDetails
calls landed close enough together to race on nonce assignment - the pool then
rejected most of them as duplicate-priority ("Priority is too low ... already in
the pool"). Observed live: 37 of 50 tracked accounts silently dropped in a single
scan cycle, including real accounts with genuine stake (Serok, QaziM) whose trust
scores stayed stuck at 0 as a result even after the separate NotRegisteredNoter
bond issue was fixed.

Routes every submission (both fullScan's batches and the live event listener)
through a single queue so exactly one signAndSend is ever in flight at a time,
in call order - data-gathering stays concurrent (unaffected), only the actual
chain submission is serialized.
2026-07-14 17:51:08 -07:00
pezkuwichain 718fea7cad fix: noter bot flip-flop bug — combine direct+pool before cache comparison
processAccount() was comparing direct staking against cache BEFORE
checking pool data. This caused a flip-flop: when cache=121K and
direct=100K, the bot submitted 100K (missing pool). Next scan it
detected the difference and submitted 121K. Every 5 minutes, forever.

Worse, when direct staking went to 0, the bot submitted 0 which
caused the pallet to delete StakingStartBlock — permanently removing
the user from tracking and zeroing their trust score.

Fix: collect ALL staking data (direct + pool) first, combine into
a single total, then compare against cache. Also adds queryFailed
flag to prevent downgrading stake when pool RPC query fails.
2026-02-28 01:32:55 +03:00
pezkuwichain fc5d101b75 fix: noter bot queries staking data from Asset Hub instead of Relay Chain
Staking pallet moved from RC to AH. Updated noter to query
assetHubApi.query.staking.* for direct staking data.
2026-02-21 14:12:48 +03:00
pezkuwichain 64c5f9e5d6 feat: add noter secret setup script 2026-02-17 01:35:02 +03:00
pezkuwichain 174bd41d6e feat: add noter bot service for staking score data submission 2026-02-17 01:32:51 +03:00