π Description
INDEXER_INTEGRATION.md documents how src/starknet/agreement-index.ts builds its index from chain events, but doesn't appear to describe what happens if a previously-indexed block is later reorged out β a real scenario on most chains, distinct from the ordinary cache-eviction concerns already tracked elsewhere.
π§© Requirements and context
- Document the current (or intended) reorg-handling behavior: does the indexer re-scan from a safe depth, or is there a known gap?
- If there is a real gap, add a minimal safeguard (e.g. only treat blocks past a confirmation depth as final) in
src/starknet/agreement-index.ts.
- Add a test simulating a reorg (a block's events superseded by a competing block) and assert the index converges to the canonical state.
π οΈ Suggested execution
- Investigate current reorg behavior in
src/starknet/agreement-index.ts and write up findings in INDEXER_INTEGRATION.md.
- If needed, add a confirmation-depth threshold before treating indexed data as final.
- Add a reorg-simulation test.
β
Acceptance criteria
π Security notes
An unhandled reorg could let stale/superseded event data drive incorrect agreement state β treat this as a data-integrity issue, not just documentation.
π Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
π Description
INDEXER_INTEGRATION.mddocuments howsrc/starknet/agreement-index.tsbuilds its index from chain events, but doesn't appear to describe what happens if a previously-indexed block is later reorged out β a real scenario on most chains, distinct from the ordinary cache-eviction concerns already tracked elsewhere.π§© Requirements and context
src/starknet/agreement-index.ts.π οΈ Suggested execution
src/starknet/agreement-index.tsand write up findings inINDEXER_INTEGRATION.md.β Acceptance criteria
INDEXER_INTEGRATION.mdaccurately describes reorg behavior/limitations.π Security notes
An unhandled reorg could let stale/superseded event data drive incorrect agreement state β treat this as a data-integrity issue, not just documentation.
π Guidelines