Skip to content

feat: credit staleness, bounded recompute, price oracle, budget regression baselines - #1422

Merged
Akanimoh12 merged 1 commit into
Akanimoh12:test-implement-dripsfrom
aniokedianne:feat/issue-1184-1185-1186-1194
Aug 26, 2026
Merged

feat: credit staleness, bounded recompute, price oracle, budget regression baselines#1422
Akanimoh12 merged 1 commit into
Akanimoh12:test-implement-dripsfrom
aniokedianne:feat/issue-1184-1185-1186-1194

Conversation

@aniokedianne

Copy link
Copy Markdown
Contributor

Closes #1186
Closes #1185
Closes #1184
Closes #1194

Summary

  • Add credit score staleness reporting #1186 Credit score staleness reporting: stores computed_at_ledger in persistent storage per creator; get_credit_breakdown now returns ledger_age, computed_at_ledger, and is_stale based on a configurable threshold (default 8 640 ledgers ≈ 12 h). Threshold is admin-settable via set_credit_staleness_threshold.

  • Make the credit score recomputation bounded and incremental #1185 Bounded paginated recompute: introduces a dense CreatorIndex(u32)Address mapping maintained on register_profile. recompute_credit_scores_page(cursor, limit) processes at most 50 creators per call and returns (next_cursor, is_done), enabling callers to page through the full set without hitting ledger budget limits.

  • Add a price oracle interface for cross-token normalisation #1184 Price oracle interface: OraclePrice { price_scaled: i128, updated_at: u64 } type; set_token_oracle / remove_token_oracle admin methods; fetch_oracle_price uses try_invoke_contract so a reverting oracle degrades gracefully to None without propagating a panic. Stale prices (older than 1 h) are rejected. Missing or failed oracles return 0 for ranking — tipping is never blocked.

  • Add gas/budget regression tests with committed baselines #1194 Budget regression tests with committed baselines: budget_baselines.toml captures CPU/MEM baselines for 6 entry points; test_budget_regression.rs asserts each measured value stays within 10% of its baseline; CI workflow gains a budget-delta reporting step that posts deltas to the job summary.

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@aniokedianne 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! 🚀

Learn more about application limits

@aniokedianne
aniokedianne force-pushed the feat/issue-1184-1185-1186-1194 branch from e1308c1 to 3b75c09 Compare August 26, 2026 02:15
@aniokedianne
aniokedianne changed the base branch from main to test-implement-drips August 26, 2026 10:05
…ssion baselines

Closes Akanimoh12#1186 — credit score staleness reporting: track computed_at_ledger
in persistent storage, fill is_stale/ledger_age in get_credit_breakdown.

Closes Akanimoh12#1185 — bounded paginated credit recompute: dense CreatorIndex for
O(page) iteration, recompute_credit_scores_page with 50-entry page cap.

Closes Akanimoh12#1184 — price oracle interface: OraclePrice type, set/remove/fetch
helpers using try_invoke_contract for graceful degradation, cache fallback.

Closes Akanimoh12#1194 — gas/budget regression tests: committed baselines in
budget_baselines.toml, 10% tolerance assertions, CI step for delta report.
@aniokedianne
aniokedianne force-pushed the feat/issue-1184-1185-1186-1194 branch from 3b75c09 to fd11285 Compare August 26, 2026 14:30
@Akanimoh12
Akanimoh12 merged commit 5eae1bd into Akanimoh12:test-implement-drips Aug 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants