Files
pezkuwi-subquery/noter/Dockerfile
T
Satoshi Qazi Muhammed 7a51810333 Re-confirm unchanged stake, and never submit a partial total
People Chain now counts a staking duration only up to the last confirmation
of the stake plus MaxDataAge (fourteen days), so a stopped noter cannot leave
scores climbing on unchecked data. The bot submitted only on change, which
under that rule would freeze every account whose stake stays put.

confirm.js decides when unchanged stake is sent again: not while a
submission is pending (each one restarts the dispute window), not on
half-read data, and only once the last confirmation is CONFIRM_EVERY_BLOCKS
old (default three days). On a runtime without stakingScore.lastConfirmed
the bot behaves as before.

The direct-staking query failed silently into zeros, and a zero that lands
clears the account's stake clock on chain. It now reports the failure, and a
failure in either half skips the account for that scan.
2026-10-18 20:56:46 +04:00

16 lines
526 B
Docker

FROM node:24-alpine
WORKDIR /app
# Install exactly what package-lock.json records, so the image runs the
# versions that were reviewed and tested rather than whatever the ranges
# resolve to on the day it is built. The optional dependencies are the light
# client (@bizinikiwi/connect, smoldot), which the bot never loads: it talks to
# the chains over WsProvider.
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --omit=optional --no-audit --no-fund
COPY bot.js submit.js confirm.js ./
CMD ["node", "bot.js"]