Files
pezkuwi-subquery/noter/Dockerfile
T
SatoshiQaziMuhammed c5be7f62f8 noter: prove a stake from the hub's own state once the People chain takes proofs (#39)
The People chain is gaining `prove_stake` (pezkuwi-DKS #132): a stake is proven from the Asset
Hub's own state through a relay-anchored storage proof, instead of a noter reporting it and
re-confirming it every three days -- which does not fit at forty million.

When the People chain's metadata has `stakingScore.proveStake`, the bot:
- builds the proof (`prove.js`): the relay parent of People's best block, which People kept in
  `RelayRoots`; the relay proof of `Paras::Heads(1000)` there; the hub proof of the account's
  `Staking::Bonded`/`Ledger`/`Nominators`, `NominationPools::PoolMembers`, and for a member the
  pool and its bonded account;
- submits it when the hub's figure differs from the People chain's, or when what People holds
  was never proven; never re-confirms an unchanged, proven stake;
- watches the Asset Hub's finalized blocks for staking and pool events and proves the tracked
  accounts they touch as they happen; the periodic scan stays as a safety net.

Before the upgrade nothing changes: the noter path is used as today. The bot's own reading only
decides when to prove; what lands is what the proof says. `prove.test.mjs` pins the pool account
derivation against Zagros pool 10.
2026-10-29 04:21:56 +04:00

16 lines
535 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 prove.js ./
CMD ["node", "bot.js"]