Skip to content

[Bug] Read a map-era slash that takes the supplier below its minimum stake - #98

Merged
jorgecuesta merged 2 commits into
mainfrom
chore/money-followups
Oct 4, 2026
Merged

jorgecuesta merged 2 commits into
mainfrom
chore/money-followups

Conversation

@jorgecuesta

Copy link
Copy Markdown
Collaborator

Summary

  • The money history job reads a map-era slash that takes the supplier below its minimum stake. poktroll then emits EventSupplierUnbondingBegin between the slash burn and EventSupplierSlashed (x/tokenomics/keeper/settle_pending_claims.go, the same order from v0.1.27 to v0.1.32), and the bank segmentation only accepted the slash right after the burn.
  • The GraphQL descriptions of get_income and get_supplier_distribution say that by_reason splits in the family column (relay / global).

Issue

The beta history job stopped at height 133,593 (map_all_bonded_deflation) with 0 slash burns after the last claim, expected 1. Mainnet has 34 map-era heights with a slash and a below-minimum unbonding in the same block, so its history job would stop the same way when it reaches those eras.

Testing

  • yarn test:unit: the map-era payload test reads the real beta block 133,593 (fixture) and checks its 31 claims, their 558 upokt and the 1 upokt slash; it fails without the fix with the job's error. A synthetic test checks that any other event between the burn and the slash is still refused.
  • yarn test:money (PostgreSQL).

Deploy

The live indexer only reads the batched_vrd era today, so it needs no change. The history jobs need an image of this commit: beta resumes from 133,593, and mainnet's job switches to it before it reaches the map eras (below 703,870). The description wording is already applied in pnf by COMMENT ON FUNCTION.

The GraphQL descriptions of get_income and get_supplier_distribution named by_reason but not the column it fills, so a reader of the schema alone could not find the relay / global split.
…nimum stake

The map-era bank segmentation took a burn as a slash burn only when the next event was EventSupplierSlashed, but when the slash leaves the stake below the minimum poktroll emits EventSupplierUnbondingBegin between the two (settle_pending_claims.go), so the history job stopped on beta 133,593 with "0 slash burns after the last claim, expected 1". The unbonding event is now allowed in between, and that real block is a fixture of the map-era payload tests.
@jorgecuesta
jorgecuesta merged commit 5be4e9e into main Oct 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant