feat(indexer): registry cleanup, Kumbaya ingest, platform-usage API (#319) #481
No reviewers
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!481
Loading…
Reference in a new issue
No description provided.
Delete branch "verify/issue-319-indexer-registry-platform-usage"
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?
Summary
Implements GitLab #319 gap-analysis follow-up:
DoubPresaleVestingfromaddress-registry.megaeth-mainnet.jsonTimeArenaBuyRouter.BuyViaKumbayaintoidx_arena_buy_router_kumbayaand enrichGET /v1/arena/buyswithpay_kind/entry_pay_assetGET /v1/arena/platform-usage(schema 2.12.0) from Arena v2 tablesfilter_maprow drops on referral list handlers with 500 on corrupt rowscursor=block:log_indexpagination toGET /v1/arena/buysandGET /v1/arena/activity(offset retained for compatibility)INDEXER_REGISTRY_REQUIRE_BUY_ROUTERand includeTimeArenaBuyRouterinindex_addresses()fetchArenaPlatformUsagestub; pointarenaPlatformUsageApiPathat/v1/arena/platform-usageVerification checklist
rg DoubPresaleVesting indexer/address-registry.megaeth-mainnet.json→ no matches/v1/arena/buyswith pay kindcd indexer && cargo test—api_issue319_smokeassertsentry_pay_asset=eth,pay_kind=0cd indexer && cargo test— platform-usage route smoke;cd frontend && npm test—indexerApi.test.tstry_row_get+corrupt_row_response(500) instead offilter_mapdropapi_issue319_smoke—next_cursorround-trip; bad cursor → 400cd indexer && cargo clippy --all-targets -- -D warnings && cargo testbash scripts/verify-time-arena-buy-router-anvil.shcd frontend && npm testFollow-ups
BuyViaKumbayatx → API row (requires full stack + indexer restart after registry merge).changed the description
changed the description
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit
0f34b77db6. Configure here.Buys cursor mismatches sort order
Medium Severity
GET /v1/arena/buyspaginates with a(block_number, log_index)cursor and filter, but rows are ordered byblock_timestampfirst. When timestamps are not monotonic with block height, later pages can skip buys that still belong in the feed or stop early while older rows remain.Reviewed by Cursor Bugbot for commit
0f34b77db6. Configure here.Security review — MR !481
Commit reviewed:
0f34b77db6ee3a6d85b6b847b3843f9bd4bb18a3Scope: Indexer registry cleanup (
DoubPresaleVestingremoval),TimeArenaBuyRouter.BuyViaKumbayaingest +/v1/arena/buysenrichment, restoredGET /v1/arena/platform-usage, cursor pagination on buys/activity, referral corrupt-row 500 handling,INDEXER_REGISTRY_REQUIRE_BUY_ROUTERwiring, frontend platform-usage client.Outcome:
FINDINGS: 0medium+Areas reviewed
fetch_warbow_action_totalsinterpolates only compile-time&'static strtable/WHERE fragments.entry_pay_assetenrichmenttx_hash, buyer,charm_wad) come from co-indexed on-chain events;pay_kindis router-emitted and path-validated on-chain. Mis-association risk is limited to same-tx duplicate buyer/charm edge cases (display only).idx_arena_buy_router_kumbayapersisted with parameterized INSERT and included inARENA_INDEX_TABLESrollback.INDEXER_REGISTRY_REQUIRE_BUY_ROUTERcorrectly enforced; buy router added toindex_addresses()only when configured.corrupt_row_response+ genericinternal_db_error_responseavoid silent row drops and do not echo SQL details.URLSearchParamsfor query building; no new dangerously-rendered HTML from API fields in this diff.Prior threads
GET /v1/arena/buys— not re-reported: pagination completeness bug on public on-chain data; no attacker-controlled privilege boundary or injection path.Inline threads: none (zero medium+ findings).
block:securitynot applied.changed this line in version 2 of the diff
mentioned in commit
f1d01175eeadded 87 commits
mainf1d01175- Merge branch 'main' into verify/issue-319-indexer-registry-platform-usageCompare with previous version
Resolved merge conflicts with
main(merge commitf1d01175).Resolution summary
main'sapi_cursorpagination helpers andpg_row_requiredcorrupt-row handling; removed duplicateapi_pagination.rs.BuyViaKumbayaonArenaBuyViaKumbaya: updatesidx_arena_buy.pay_kindand insertsidx_arena_buy_router_kumbaya.GET /v1/arena/buysnow joins Kumbaya rows forentry_pay_asset/router_attested_gross_doubon top of main's timestamp cursor paging.api_platform_usage_smoke,api_buys_cursor_smoke(incl. bad-cursor 400),api_buy_via_kumbaya_pay_kind_smoke.Checks:
cargo clippy --all-targets -- -D warnings,cargo test,npm run typecheck,npm test— all PASS.resolved all threads
changed the description
Security review — MR !481
Commit reviewed:
f1d01175eed1487475c20c9ed0322db49795672d(post-merge withmain)Scope: Delta vs
main— Kumbaya ingest (idx_arena_buy_router_kumbayamigration + persist/reorg),GET /v1/arena/buysKumbaya LEFT JOIN enrichment (entry_pay_asset,router_attested_gross_doub),INDEXER_REGISTRY_REQUIRE_BUY_ROUTERwiring, decoder reorder, invariant doc updates. Platform-usage API, cursor pagination, referral corrupt-row handling, and frontend platform-usage client were already onmainat merge; re-checked those paths for regressions introduced by this delta.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Areas reviewed
ARENA_BUYS_SELECT_SQLformat!, Kumbaya INSERT, cursor binds)limit/offset/cursor components parsed and bound as parameters.BuyViaKumbayadecoded only from registry-filtered router address; router validatespayKindon-chain (_validatePath); persist uses parameterized INSERT + reorg table list.pay_kindUPDATE scoped bytx_hash— display metadata only; router emits one buy per call (nonReentrant).tx_hash, buyer,charm_wad) are co-indexed on-chain fields; mis-join limited to same-tx duplicate buyer/charm edge cases (display only, no fund impact).INDEXER_REGISTRY_REQUIRE_BUY_ROUTERfail-closed viastrict_parse; buy router included inindex_addresses()when configured.pg_row_required+internal_db_error_responseunchanged; no SQL echo in responses.Prior threads
mainmerge (TimestampBlockLogCursormatchesblock_timestampsort); pagination completeness on public on-chain data, not a privilege-boundary issue.0f34b77) — superseded by this pass on merge commitf1d01175.Inline threads: none (zero medium+ findings).
block:securitynot applied.mentioned in commit
f7cf193dd7