Indexer: Arena v2 schema — podium epochs, CRED, XP, WarBow history #254
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#254
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?
Context
Indexer schema and API for TimeArena multi-epoch podiums. Parent epic: #238.
Relevant files
indexer/migrations/indexer/src/decoder.rs,indexer/src/api.rsdocs/indexer/design.mdAcceptance criteria
idx_arena_buy,idx_arena_podium_epoch,idx_arena_podium_snapshot,idx_play_cred_claim,idx_player_xp,idx_warbow_epoch_scoreGET /v1/timecurve/*withGET /v1/arena/*(timers, podiums, epochs)GET /v1/arena/podiums: live predictions per category per epochGET /v1/arena/timers: all five deadlines (Last Buy + 4 podiums)Verification checklist
integration_stage2.rscoverage for new eventsSCHEMA_VERSIONbump + frontendindexerApi.tstypesmarked as related to #238
mentioned in issue #238
Implementation summary
20260528130000_arena_v2_schema; decoder/persist for Arena events;GET /v1/arena/*inapi_arena.rs.Acceptance criteria
/v1/arena/timers,/podiums,/buysVerification checklist
cargo testintegration_stage2 updates (follow-up)mentioned in commit
27173ca8a3Verification run (2026-06-01)
Verified GitLab #254 in worktree
issue/254-arena-indexer-schema, merged tomainat4a0ead5.What changed
idx_warbow_epoch_scoreingest: newindexer/src/warbow_score.rssnapshotsbattlePoints(player)at the log block after BP-affecting events (Buy,WarBowSteal,WarBowRevenge,WarBowFlagClaimed); decode added for revenge/flag events.idx_arena_podium_snapshot: SQL view overidx_arena_podium_epoch(migration20260601120000_idx_arena_podium_snapshot_view_gl254).GET /v1/arena/vault-funding/recent: fixed axumQuerydeserialization (was returning 400).GET /v1/arena/podiums: adds indexedepochper category fromidx_arena_podium_epoch.INV-INDEXER-254-ARENA-SCHEMA, design §254,play-active-time-arenaskill,arena-views.md.integration_stage2.rs: table reset hygiene,idx_warbow_epoch_scorepersist smoke, donations API smoke ordering fix.Automated checks
cargo test --test integration_stage2withYIELDOMEGA_PG_TEST_URL(Postgres in Docker): passcargo clippy -D warnings: passManual verification checklist (QA)
idx_arena_buy,idx_arena_podium_epoch, viewidx_arena_podium_snapshot,idx_play_cred_claim,idx_player_xp,idx_warbow_epoch_score; noidx_timecurve_*buy tablesGET /v1/arena/timersreturns Last Buy + fourpodium_deadlines_secGET /v1/arena/podiumsreturnsrows[]withepochand headwinners/valuesidx_warbow_epoch_scorehas rows for the active WarBow epoch (ingestion + RPC)GET /v1/arena/vault-funding/recent?limit=5→ HTTP 200x-schema-version≥ 2.4.0 on arena routesOpen gap (issue stays open)
GET /v1/arena/podiumsstill builds winner slots from headpodium()RPC;epochis indexed but live per-category predictions from Postgres (pre–sale-end UX in the issue body) are not fully implemented. Requesting QA sign-off on that slice before close.mentioned in issue #273
Live podium predictions slice verified and merged via #273 (commit
d902d7f):GET /v1/arena/podiums+idx_arena_podium_live+bash scripts/verify-podium-live-anvil.sh. Please re-run the #273 manual checklist on #254 before closing.GitLab #254 verification (Cloud Agent, 2026-06-02)
Verified Indexer: Arena v2 schema — podium epochs, CRED, XP, WarBow history on
main@7d7d3da. Issue remains open per process (live predictions gap closed via #273; QA sign-off only).Acceptance criteria (issue body)
idx_arena_buy,idx_arena_podium_epoch,idx_arena_podium_snapshot,idx_play_cred_claim,idx_player_xp,idx_warbow_epoch_scoreverify-podium-live-anvil.sh:\dt idx_*— all present;idx_arena_podium_snapshotis a view (to_regclassOK)GET /v1/timecurve/*withGET /v1/arena/*indexer/src/api.rsmountsapi_arena::arena_routes()only;integration_stage2.rs::api_legacy_player_reserve_routes_return_404; frontendindexerApi.test.tsuses/v1/arena/*GET /v1/arena/podiums: live predictions per category per epochbash scripts/verify-podium-live-anvil.sh— UX order,podium_prediction: truewith entrants,idx_arena_podium_liverows;integration_stage2::arena_podiums_live_predictions_smokeGET /v1/arena/timers: Last Buy + four podium deadlineslast_buy_deadline_sec+podium_deadlines_seclength 4;api_http_smokehits/v1/arena/timers→ 200integration_stage2::postgres_stage2_persist_all_events_and_rollback_after;SELECT … WHERE tablename LIKE 'idx_timecurve%'→ 0 rowsidx_warbow_epoch_scorecount 3 after Anvil buys; persist smoke forArenaWarbowSteal/Guard+ArenaWarbowEpochScoreinintegration_stage2Verification checklist (issue + 2026-06-01 comment)
integration_stage2.rscoveragecargo test --test integration_stage2(3/3) withYIELDOMEGA_PG_TEST_URLSCHEMA_VERSION+ frontend typesindexerSCHEMA_VERSION = "2.5.0";x-schema-version: 2.5.0on/v1/arena/timers;npm test -- src/lib/indexerApi.test.ts(21/21)cargo clippy -D warningscd indexer && cargo clippy --all-targets -- -D warnings(Rust 1.96)idx_timecurve_*buy tablesGET /v1/arena/vault-funding/recent?limit=5{"items":[],"limit":5,"offset":0}on fresh deployverify-podium-live-anvil.shOK (read_block=18,live_rows=12)idx_warbow_epoch_scoreidx_warbow_epoch_scorecount 1; Anvil DB had rows after buysDocs / invariants cross-check
INV-INDEXER-254-ARENA-SCHEMA— matchesdocs/testing/invariants-and-business-logic.mdanddocs/indexer/design.md#arena-v2-schema-http-gitlab-254.cursor/skills/yieldomega-guardrails/SKILL.md— references #254 arena HTTPskills/play-active-time-arena/SKILL.md— arena routes +verify-podium-live-anvil.shNo repository changes required this pass.
Follow-ups (optional)
scripts/verify-arena-indexer-schema-anvil.shalias doc indocs/testing/ci.mdif QA wants a #254-only entrypoint separate from #273 live-podium script.AGENTS.mdCloud VM Postgres:yieldomegarole needsCREATEDBwhen not using Dockeryieldomega-pg(native Postgres on port 5433).mentioned in merge request !400
mentioned in issue #282
mentioned in issue #283
marked as related to #283
GitLab #254 verification (Cloud Agent, 2026-06-03)
Verified Indexer: Arena v2 schema — podium epochs, CRED, XP, WarBow history on
main@6d520e7a988b307c8e0a7b0a1a88da3dbd7dbeb5. All acceptance criteria and QA checklist items PASS. Closing this issue.Acceptance criteria (issue body)
idx_arena_buy,idx_arena_podium_epoch,idx_arena_podium_snapshot,idx_play_cred_claim,idx_player_xp,idx_warbow_epoch_scorebash scripts/verify-podium-live-anvil.sh:\dt— five base tables present;idx_arena_podium_snapshotview (to_regclassOK)GET /v1/timecurve/*withGET /v1/arena/*indexer/src/api.rsmergesapi_arena::arena_routes()only;integration_stage2.rs::api_legacy_player_reserve_routes_return_404;cd frontend && npm test -- src/lib/indexerApi.test.ts(22/22) uses/v1/arena/*GET /v1/arena/podiums: live predictions per category per epochbash scripts/verify-podium-live-anvil.sh— UX order,podium_prediction: truewith entrants,idx_arena_podium_liverows (live_rows=12);integration_stage2::arena_podiums_live_predictions_smokeGET /v1/arena/timers: Last Buy + four podium deadlinesintegration_stage2api_http_smoke→/v1/arena/timers200 withlast_buy_deadline_sec/rowsshapeintegration_stage2::postgres_stage2_persist_all_events_and_rollback_after;SELECT … WHERE tablename LIKE 'idx_timecurve%'→ 0 rowsidx_warbow_epoch_scorecount 3 after Anvil buys; persist smoke for WarBow events inintegration_stage2Verification checklist (issue + comments)
integration_stage2.rscoverageYIELDOMEGA_PG_TEST_URL=… cargo test --test integration_stage2— 4/4SCHEMA_VERSION+ frontend typesSCHEMA_VERSION = "2.5.0"; verify script headerx-schema-version: 2.5.0on/v1/arena/podiums;indexerApi.test.ts22/22cargo clippy -D warningscd indexer && cargo clippy --all-targets -- -D warningsidx_timecurve_*buy tablesGET /v1/arena/vault-funding/recent?limit=5integration_stage2api_vault_funding_smoke→ HTTP 200verify-podium-live-anvil.shOK (read_block=28,live_rows=12)idx_warbow_epoch_scoreDocs / invariants cross-check
INV-INDEXER-254-ARENA-SCHEMA— present indocs/testing/invariants-and-business-logic.md; matchesdocs/indexer/design.md#arena-v2-schema-http-gitlab-254.cursor/skills/yieldomega-guardrails/SKILL.md— references #254 arena HTTPskills/play-active-time-arena/SKILL.md— arena routes +verify-podium-live-anvil.shNo repository changes required this pass.
Follow-ups (optional)
scripts/verify-arena-indexer-schema-anvil.sh(or CI doc entry) if QA wants a #254-only entrypoint separate from the #273 live-podium script.mentioned in merge request !415
mentioned in issue #306
mentioned in issue #307
mentioned in issue #356
marked as related to #356
mentioned in issue #364