mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-11-04 07:31:06 +00:00
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.
This commit is contained in:
1 parent
af7a0b4d6f
commit
c5be7f62f8
5 files changed
+186
-20
No files matched your search
@@ -85,7 +85,7 @@ jobs:
|
||||
# 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 test/confirm.test.mjs
|
||||
run: docker run --rm -v "$PWD/noter/test:/app/test:ro" bot node --test test/submit.test.mjs test/confirm.test.mjs test/prove.test.mjs
|
||||
|
||||
- name: The bot loads and stops at its missing mnemonic
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user