chore(thorchain,mayachain): remove affiliate fee indexers - #1285
Conversation
The affiliate fee indexers underreported fees (same-block memo matching missed streaming swaps, block-search history capped by the node's event index, websocket gaps had no backfill). The revenue dashboard now sources affiliate fees directly from midgard, so the indexers and their /api/v1/affiliate routes are no longer consumed by anything. Also removes the thorchain V1 node client, which existed solely for the indexer's pre-hardfork block search. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughThe change removes affiliate fee indexing and related API surfaces from MayaChain and THORChain. It also removes THORChain V1 endpoint configuration and updates startup wiring and the sample environment file. ChangesAffiliate functionality removal
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Removes the affiliate fee indexers and their
/api/v1/affiliate/*routes from the thorchain and mayachain coinstacks, along with the thorchain V1 node client that existed solely for the indexer's pre-hardfork block search.Motivation
The indexers systematically underreported affiliate fees (mayachain: 124 fees all-time vs 379 actually on-chain):
BlockSearch, capped by the node's event index (ours only reaches back to ~2025-07-04, after the first ssmaya swaps).parts[4] == "ssmaya").The revenue dashboard now sources affiliate fees directly from Midgard (shapeshift/revenue-dashboard), which has none of these gaps. With that deployed, nothing consumes these routes — verified by sweeping all shapeshift repos for
/affiliate/fees,/affiliate/revenue, and the generated unchained-client methods.Changes
go/pkg/thorchain/affiliateFees.goandgo/pkg/mayachain/affiliateFees.goindexerparameter fromapi.Newand theHandlerstructsSync()from bothcmd/main.goswagger.json(removal-only, byte-parity with generator)cfgV1/httpClientV1andLCD_V1_*/RPC_V1_*config + sample.env entries (verified indexer-only: tx history and all other paths use the main client)Follow-ups
LCD_V1_URL/RPC_V1_URLand their API keys from secretsAffiliateRevenue/AffiliateFeesmodels on next codegen🤖 Generated with Claude Code
Summary by CodeRabbit
LCD_API_KEY.