feat: add funding event tracking with cursor-based pagination#2
Merged
feat: add funding event tracking with cursor-based pagination#2
Conversation
This comment has been minimized.
This comment has been minimized.
- Capture actual funded deltas (AccountDeposit + ContractID) from funding loop - Record funding events to funding_events table with amount_sc, estimated upload/download bytes - Add cursor-based (created_at, id) pagination for funding history API - Add GET /funding/events admin endpoint with Go client support - Add SQL migration for funding_events table with composite indexes - Calculate estimated bytes from SC amount using host sector costs at funding time - Cap estimatedBytes overflow at math.MaxInt64
d86c0fc to
b258e1a
Compare
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add funding event tracking with cursor-based pagination
This PR introduces tracking of account funding events, recording each deposit made during the funding process along with estimated upload and download byte coverage. A new admin API endpoint (
GET /funding/events) allows querying these events using cursor-based pagination.Key changes:
FundAccountsmethod now returns deposit details alongside funded/drained counts, enabling downstream recording of individual depositsFundingCursor(timestamp + ID) enables stable pagination through events ordered by creation timefunding_eventstable with indexes for account+host lookups, host+time queries, and cursor-based pagination; includes migrationGET /funding/eventsendpoint withafter,id, andlimitquery parameters