Add verify-indexer-reorg-anvil smoke script #351
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#351
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Transition Gap Analysis (#342) — P2 #11. Bundles M-I4.
Current codebase
rollback_afterdirectly inintegration_stage2.rs— synthetic reorg handling.REORG_STRATEGY.mddefines tiers; no Anvil script walksfind_common_ancestor+ re-ingest end-to-end.scripts/verify-indexer-reorg-anvil.sh(called out in gap analysis).Why needed
Live reorg E2E validates transition event rollback (level history, epoch assignment, session summary) under realistic RPC reorder — reduces mainnet reorg risk.
Constraints / guardrails
verify-*-anvil.shpatterns (Anvil, native Postgres on:5433, Foundry on PATH).Relevant files
indexer/src/ingestion.rs(reorg walk)indexer/tests/integration_stage2.rsscripts/verify-wallet-profile-anvil.sh(template)docs/testing/REORG_STRATEGY.mdscripts/verify-indexer-reorg-anvil.shRecommended direction
anvil_resetor shallow reorg to common ancestor.chain_pointer, level history, and key transition rows consistent.docs/testing/ci.mdor invariants.Acceptance criteria
scripts/qa/README.md.Test plan
bash scripts/verify-indexer-reorg-anvil.shcd indexer && cargo testbash scripts/verify-cloud-postgres.shAttack / abuse test plan
Verification criteria
bash scripts/verify-indexer-reorg-anvil.shPASS on Cloud VM.mentioned in issue #342
mentioned in commit
4907e9dce5mentioned in merge request !525
mentioned in commit
1dae16d806mentioned in issue #344
Verification complete — #351
Verified on Cloud VM (
main@origin/main). No repo changes required; closing issue.Acceptance criteria
bash scripts/verify-indexer-reorg-anvil.sh→ exit 0 (~8 min). Output:=== verify-indexer-reorg-anvil: OK (buyer=0x7099…, ancestor>=13, buy_count=1) ===scripts/qa/README.mdscripts/qa/README.md§ "Indexer Anvil verify scripts (gap #342)" listsverify-indexer-reorg-anvil.sh→ #351. Cross-links:docs/testing/invariants-and-business-logic.md(INV-INDEXER-351-REORG-ANVIL),indexer/REORG_STRATEGY.md,docs/testing/e2e-anvil.md,docs/testing/ci.md(optional),skills/script-with-timearena-local/SKILL.md.assert_no_ingest_divergence/wait_for_reorg_healcalldie()(non-zero + log tail). Negative probe:DATABASE_URL=…/nonexistent_db_351 bash scripts/verify-indexer-reorg-anvil.sh→ exit 1,verify-indexer-reorg-anvil: indexer /v1/status unavailable+ DB error in indexer log. Happy path logsreorg detected+rolled back after reorg.Test plan (issue body)
bash scripts/verify-indexer-reorg-anvil.shcd indexer && cargo testbash scripts/verify-cloud-postgres.shAttack / abuse criteria
verify_indexer_stack.shdrops/recreates app DB each run (yieldomega_verify_pg_reset_app_db);verify-cloud-postgres.shPASS after script runCOUNT(idx_arena_buy) == COUNT(DISTINCT tx_hash) == 1andidx_arena_level_up == 0post-heal; wallet statsbuy_count=1,level_history[1].reached_atnullIntegration assertions (post-reorg)
chain_pointerblock/hash matches RPC headTimeArena.level(buyer) == 1GET /v1/arena/wallet/{address}/stats:buy_count=1, L1reached_atset, L2reached_atnullFollow-ups
docs/testing/ci.mdto a documented agent/CI gate once reorg smoke runtime (~8 min deploy+ingest) is acceptable in scheduled jobs.