feat: emit acc_idx topic on accrual index updates#502
Open
rosemary21 wants to merge 1 commit into
Open
Conversation
Add acc_idx indexed event emitted via EVENT_INDEXED_V2 on every accepted revenue report (rv_init and rv_ovr). The event carries the cumulative accrual index in 1e18 fixed-point precision, letting off-chain indexers rebuild per-holder owed amounts without re-reading all periods. Security properties enforced and pinned by tests: - Rejected duplicates (rv_rej) never emit acc_idx - Zero-amount reports (no-op) never emit acc_idx - period_id in topic always matches the reported period - Index is strictly monotonically increasing Pre-existing compilation blockers fixed to unblock the test suite: - DataKey exceeded the Soroban ≤50 XDR union variant limit; removed the two duplicate variants (PaymentTokenDecimals, FrozenOffering) that already existed in DataKey2 and updated their call sites accordingly - Added missing PauseState contracttype enum (SoftPaused/HardPaused/NotPaused) - Added missing DataKey2 variants: SupplyCap, DepositedRevenue, MinRevenueThreshold, InvestmentConstraints, AccrualIndex - Fixed RevoraError discriminant 48 conflict (VestingTransferBlocked vs PeriodAlreadyClosed); assigned PeriodAlreadyClosed=51 - Added RevoraError::StaleConcentrationData=52 - Fixed test_compute_share_invariants: i128 constant overflow and for-pattern - Fixed test_claim_transfer_fail: get_pending_periods→get_pending_periods_page, missing payout/payment_token args in register_offering/deposit_revenue Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@rosemary21 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 acc_idx indexed event emitted via EVENT_INDEXED_V2 on every accepted revenue report (rv_init and rv_ovr). The event carries the cumulative accrual index in 1e18 fixed-point precision, letting off-chain indexers rebuild per-holder owed amounts without re-reading all periods.
Security properties enforced and pinned by tests:
Pre-existing compilation blockers fixed to unblock the test suite:
closes #482