Skip to content

Check which beacons of a beacon set need to be updated #95

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

Merged
merged 11 commits into from
Nov 16, 2023

Conversation

aquarat
Copy link
Collaborator

@aquarat aquarat commented Nov 15, 2023

This PR:

  • Starts by executing the existing shallow beacon set check based on the beacon set's value returned from the chain during the batch call.
  • For all feeds appearing to need an update it reads the latest values of the children of those feeds and does two timestamp checks to confirm the feeds are indeed updatable.
  • Child feeds that are not updatable have their on-chain values used in a second/follow-up threshold assessment. If during that check the calculated values don't exceed the deviation threshold the feeds are not updated.
  • Lastly, updatable child feeds are propagated to the updateFeeds function such that those feeds are not updated during the batch.

Closes #67

Replaces #75 (refactoring this was difficult/it was easier to start from main and re-implement)

@aquarat aquarat marked this pull request as ready for review November 16, 2023 08:31
@aquarat aquarat requested review from vponline and Siegrift and removed request for vponline November 16, 2023 08:32
@aquarat aquarat self-assigned this Nov 16, 2023
@aquarat aquarat changed the title (WIP) Deeply checked dapis Deeply checked dapis Nov 16, 2023
@aquarat aquarat changed the title Deeply checked dapis Check which beacons of a beacon set need to be updated Nov 16, 2023
Copy link
Contributor

@vponline vponline left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

Copy link
Collaborator

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

Also, as part of this issue we should remove the dummy gas estimation logic because the update transaction can't revert (unless of some rare race condition, but for that there is the generous static gas limit).

@aquarat aquarat requested a review from Siegrift November 16, 2023 14:23
Copy link
Collaborator

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

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

👍 LGTM (as usual feel free to ignore the nits).

@aquarat aquarat merged commit 287e763 into main Nov 16, 2023
@aquarat aquarat deleted the 67a-deep-check-child-beacons branch November 16, 2023 16:25
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.

Check which beacons of a beacon set need to be updated
3 participants