Skip to content

feat: cross-oracle staleness event#1036

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
farouqyakubu6-creator:cross-oracle
Jul 26, 2026
Merged

feat: cross-oracle staleness event#1036
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
farouqyakubu6-creator:cross-oracle

Conversation

@farouqyakubu6-creator

Copy link
Copy Markdown

closes #848

Add cross-oracle staleness event

- Add CrossOracleStalenessEvent struct to events.rs with full doc comments
- Add EventEmitter::emit_cross_oracle_staleness with nonce topic x_stale
- Refactor fetch_single_oracle_result to return (price, publish_time) via
  new fetch_single_oracle_result_with_timestamp helper
- Detect timestamp divergence across oracle sources in
  fetch_and_verify_oracle_result and emit CrossOracleStalenessEvent when
  any source's publish_time lags the freshest by more than max_staleness_secs
- Add cross_oracle_staleness_tests.rs with 13 focused tests covering
  struct fields, emitter, threshold boundaries, freshest-timestamp fold,
  single-source skip, and event equality
- Register test module in lib.rs
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@farouqyakubu6-creator 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

@greatest0fallt1me
greatest0fallt1me merged commit 5b41ada into Predictify-org:master Jul 26, 2026
0 of 2 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jul 26, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add cross-oracle staleness event

3 participants