Skip to content

Add outsideUpdateWindow boolean to proof of reserves#4759

Draft
cawthorne wants to merge 15 commits intomainfrom
feature/add-ripcord-boolean-to-proof-of-reserves
Draft

Add outsideUpdateWindow boolean to proof of reserves#4759
cawthorne wants to merge 15 commits intomainfrom
feature/add-ripcord-boolean-to-proof-of-reserves

Conversation

@cawthorne
Copy link
Copy Markdown
Contributor

@cawthorne cawthorne commented Mar 21, 2026

Add outsideUpdateWindow to proof-of-reserves

Adds a planned-pause signal to the proof-of-reserves EA so monitoring can silence alerts during known off-schedule periods, distinct from an unplanned provider outage.

Feeds that have a defined update window should include startUTC and endUTC (format HHMM) in their job spec. Automatic window signaling from multi-address-list (for feeds without explicit start/end times) is out of scope here and will follow in a separate PR.

Changes

proof-of-reserves

  • reserves endpoint: if startUTC/endUTC are in the request and the current UTC time is outside that window, returns HTTP 503 with outsideUpdateWindow: true instead of fetching balances
  • multiReserves endpoint: when any sub-reserve is outside its window, returns HTTP 200/errored with error.outsideUpdateWindow: true, preserving the existing error shape

Behaviour

Scenario Response
multi-address-list cache empty (504) 200/errored — unchanged
reserves outside startUTC/endUTC 503 outsideUpdateWindow: true
multiReserves sub-reserve outside window 200/errored with error.outsideUpdateWindow: true
Normal in-window request 200 with result — unchanged

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 21, 2026

🦋 Changeset detected

Latest commit: 6a0c945

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chainlink/proof-of-reserves-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cawthorne cawthorne marked this pull request as draft March 21, 2026 14:37
@cawthorne cawthorne changed the title Feature/add ripcord boolean to proof of reserves Add outsideUpdateWindow boolean to proof of reserves Mar 21, 2026
Remove stale meta and metricsMeta fields from snapshots that are no longer present in the adapter response.
- multi-address-list now includes windowStartMs/windowEndMs in its response,
  derived from when the scheduler ran and CACHE_MAX_AGE, so consumers know
  the validity window without needing to know the scheduler config
- proof-of-reserves reserves endpoint checks for windowStartMs/windowEndMs
  in the protocol adapter response and emits outsideUpdateWindow if the
  current time is outside that window
- proof-of-reserves multiReserves endpoint propagates outsideUpdateWindow
  from any sub-reserve instead of throwing an AdapterError
@cawthorne cawthorne force-pushed the feature/add-ripcord-boolean-to-proof-of-reserves branch from 9282b81 to ec75450 Compare April 1, 2026 12:15
…ndMs from reserves.ts

Splits the work into two PRs:
- PR 1 (this branch): outsideUpdateWindow for feeds with explicit startUTC/endUTC, and multiReserves handling
- PR 2 (future): automatic window signaling from multi-address-list via scheduler config
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