Skip to content

Conversation

@tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented Apr 9, 2025

Summary

Initialize the Pulse Scheduler Ethereum contracts with a base layer of functionality. Follows the structure/boilerplate of the existing Pulse contracts.

Rationale

Add state, functions, and tests for:

  • Subscription management
    • Only manager can CRUD subscriptions
  • Pushing and consuming price updates
    • An update to a subscription's feeds must have matching timestamps and contain all price IDs for that subscription.
    • Since we plan to make updating permissionless, an update is only allowed if the update criteria is met.
    • Only whitelisted readers can consume the price feeds.
  • Viewing active subscriptions (for keepers)

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Up next

  • Balance management (actually using manager funds)
  • Keeper/provider management (payment/registration, etc)
  • Gas strategy configuration
  • Gas benchmark tests

@vercel
Copy link

vercel bot commented Apr 9, 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 Apr 14, 2025 4:46pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 4:46pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 4:46pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 4:46pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Apr 14, 2025 4:46pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Apr 14, 2025 4:46pm

@tejasbadadare tejasbadadare changed the title Tb/pulse scheduler/init pulse-scheduler: init ethereum contracts Apr 9, 2025
@tejasbadadare tejasbadadare changed the title pulse-scheduler: init ethereum contracts pulse-scheduler: init ethereum contracts, subscriptions, updating prices Apr 9, 2025
- Updated price feed parsing to allow for a timestamp range of [-10s, now].
- Introduced validation for update conditions, including checks for heartbeat and price deviation.
- Added new error handling for outdated timestamps and unmet update conditions.
- Refactored subscription status to use a uint256 for last updated timestamp.
- Expanded test coverage for update conditions and validation scenarios.
Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a good start to me. Feel free to address my comments in follow up PRs, as this is pretty big and it's generally fine to merge as is.

Please do let @ali-bahjati take a look before merging though.

@tejasbadadare
Copy link
Contributor Author

@jayantk addressed your comments in #2585 , @ali-bahjati i'll probably make a new PR to address your feedback since it's already sizable and covers a bunch of disjoint changes

Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! looking forward to the subsequent prs.

@tejasbadadare tejasbadadare merged commit 59ea3c8 into main Apr 15, 2025
10 checks passed
@tejasbadadare tejasbadadare deleted the tb/pulse-scheduler/init branch April 15, 2025 16:37
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.

4 participants