Skip to content

feat(argus): ControllerService update loop, ChainPriceService poll loop #2693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tejasbadadare
Copy link
Contributor

Summary

  • Create main Controller update loop. This orchestrates the other services and makes the decision on whether or not to push prices for a subscription.
  • Create ChainPriceService polling loop. This runs on an interval to track the on-chain prices.
    • Update ChainPriceState data structures to be subscription oriented, since we need to maintain the on-chain price for each feed for each subscription.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
    • Added integration tests for the update loop that validate the orchestration of other services (e.g. calling PricePusherService when feeds need to be updated)
    • Added unit tests for needs_update, which tests scenarios around update criteria. Given a pyth price, chain price, and update criteria, the function returns a boolean indicating whether the subscription should be updated or not.
    • Considered adding integration tests for ChainPriceService, but since it's a light wrapper around an RPC API, figured there's not much value in writing tests for this.
  • Manually tested the code

Copy link

vercel bot commented May 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 9:21pm

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.

1 participant