Indexer scope: 13 contract events emitted but not decoded — clarify intentional gap vs missing coverage #112
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#112
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?
P3-low scope clarification:
indexer/src/decoder.rsdecodes 34 events; the contracts undercontracts/src/emit 44 unique events. 13 events emitted by deployed contracts have notopic0 == ...::SIGNATURE_HASHarm in the decoder. Some of these are obvious operator/governance toggles that don't need history; others might be planned indexer coverage that just hasn't landed.Methodology
grep -rh '^\s*event ' contracts/src --include='*.sol' | sort -u→ 44 unique names.grep -E 'topic0 == .*::SIGNATURE_HASH' indexer/src/decoder.rs | sort -u→ 34 unique names.grep -rn 'emit <Name>'(not just declared).Events emitted but not decoded
BurrowProtocolRevenueSplitRabbitTreasuryBurrowReserveBucketsRabbitTreasuryBurrowWithdrawalFeeAccruedRabbitTreasuryBuyFeeRoutingEnabledTimeCurveCharmRedemptionEnabledTimeCurveCl8ySurplusToProtocolRabbitTreasuryClaimedDoubPresaleVestingClaimsEnabledDoubPresaleVestingPrizePusherSetTimeCurveReservePodiumPayoutsEnabledRabbitTreasuryTimeCurveBuyRouterSetTimeCurveVestingStartedDoubPresaleVestingWithdrawnFeeSinkAlso noted:
AllocationClaimedis decoded by the indexer (TimeCurveEventsLegacy::AllocationClaimed) but no longer emitted by current contracts — kept as backfill compat. Not an issue, just noting for completeness.Why this matters
User-activity events (
Claimedfrom DoubPresaleVesting) without history mean a future "show my claim history" UI would have no source. Today thePresaleVestingPagereads state directly from the contract — no historical view — so the gap is currently invisible.Operator toggle events (
BuyFeeRoutingEnabled,ClaimsEnabled, etc.) without history mean explorability of operator actions is limited; reading current state is fine, but "when did this flip" is unanswerable.Treasury accounting events (
BurrowProtocolRevenueSplit,BurrowReserveBuckets, etc.) without history mean Rabbit Treasury historical PnL / fee-flow analysis is unsupported.Question for dev
Which of these are intentionally not indexed (e.g., operator toggles where current state is enough), and which are planned coverage that just hasn't landed yet?
If splits naturally:
BuyFeeRoutingEnabled,CharmRedemptionEnabled,ClaimsEnabled,PrizePusherSet,ReservePodiumPayoutsEnabled,TimeCurveBuyRouterSetClaimed,VestingStarted,WithdrawnBurrowProtocolRevenueSplit,BurrowReserveBuckets,BurrowWithdrawalFeeAccrued,Cl8ySurplusToProtocolNo code change requested unless you want one. Filing for visibility per 4/29 standing rule.
Severity
P3-low. Scope/planning question, not a defect. No current user-facing impact.
cc @PlasticDigits
All events do need to be decoded, recorded and stored in postgres db for future proofing.
mentioned in commit
bcb24e84ecFix landed on main (indexer emits — GL #112)
Per maintainer feedback on this issue, all previously undecoded protocol emits now decode and persist to Postgres (operator toggles, Rabbit treasury splits, podium
PrizePusherSet,DoubPresaleVestinglifecycle/claims gate,FeeSink.Withdrawn,TimeCurveBuyRoutersurplus dust, router address updates). HistoricalAllocationClaimedstill maps to the existing charms-redeemed table for backfill (no duplicate table).What merged
indexer/migrations/20260502130000_gl112_extended_event_tables.{up,down}.sql— thirteenidx_*tables with the usual metadata + event columns and(tx_hash, log_index)PK.indexer/src/decoder.rs—sol!parity + decode arms + roundtrip tests for vesting claim + FeeSink withdrawal.indexer/src/persist.rs— idempotent INSERTs mirroring existing patterns.indexer/src/reorg.rs— rollback deletes extended to cover every persisted event table (sorted list).Docs / invariants (INV-INDEXER-112)
docs/testing/invariants-and-business-logic.md#indexer-emitted-event-coverage-gitlab-112— cross-linked fromdocs/indexer/design.md, contributor guardrails.cursor/skills/yieldomega-guardrails/SKILL.md, and third-party/agent indexskills/README.md.Please verify (@brouie — issue stays open until you confirm)
main, bump an indexer-backed DB via migrations; confirm fifteen new indexes exist under theidx_*names from the migration.cd indexer && YIELDOMEGA_PG_TEST_URL=postgres://...(CI-style URL) →cargo test: integration test should exercise everyDecodedEventvariant, idempotent replay, androllback_afterwiping block 100 sample rows across new tables (watchidx_doub_vesting_*,idx_fee_sink_withdrawn,idx_rabbit_protocol_revenue_split).BuyFeeRoutingEnabled,ClaimsEnabled, or a vestingClaimedand SELECT the matchingidx_*row for (block_number,contract_address).Leaving this issue open for your sign-off per request.
Correction: Verification step 1 should say thirteen new
idx_*tables created by migration20260502130000_gl112_extended_event_tables(PostgreSQL btree indexes aside).Verification PASS on
gl112_extended_event_tablesmigration. Cargo test:cargo testagainst freshyieldomega_indexer_testDB → 19 unit tests + 1 integration test PASS, 0 failures. New decoder roundtrips covered:roundtrip_doub_vesting_claimed,roundtrip_fee_sink_withdrawn. Integration testpostgres_stage2_persist_all_events_and_rollback_afterexercises every DecodedEvent variant + idempotent replay + rollback_after wiping block 100 rows across the new tables. Tables: All 13 newidx_*tables present in test DB after migration auto-applied:idx_timecurve_buy_fee_routing_enabled,idx_timecurve_charm_redemption_enabled,idx_timecurve_reserve_podium_payouts_enabled,idx_timecurve_buy_router_set,idx_timecurve_buy_router_cl8y_surplus,idx_rabbit_burrow_reserve_buckets,idx_rabbit_protocol_revenue_split,idx_rabbit_withdrawal_fee_accrued,idx_podium_pool_prize_pusher_set,idx_doub_vesting_started,idx_doub_vesting_claimed,idx_doub_vesting_claims_enabled,idx_fee_sink_withdrawn. Dev's specifically-mentioned tables (idx_doub_vesting_*,idx_fee_sink_withdrawn,idx_rabbit_protocol_revenue_split) all present. API scope: unchanged — confirmed via integration test (no new endpoints, only persist layer). Skipping optional live smoke ingestion since integration test already drives every variant against postgres. cc @PlasticDigitsmentioned in commit
49c758bc81mentioned in commit
32cf66eebbmentioned in issue #309
mentioned in issue #312
mentioned in issue #317
mentioned in merge request !463
mentioned in merge request !484