api3dao / signed-api

A monorepo for managing signed data
MIT License
2 stars 8 forks source link

Implement Signed api v2 #347

Closed Siegrift closed 2 months ago

Siegrift commented 3 months ago

Closes https://github.com/api3dao/signed-api/issues/262 Closes https://github.com/api3dao/signed-api/issues/306 Closes https://github.com/api3dao/signed-api/issues/326 Closes https://github.com/api3dao/signed-api/issues/327

Rationale

In preparation for new version of OEV Auctioneer, we need to serve beacon data for "oev" beacons, which are derived from the base feed beacons (the ones that Airseeker updates). These are derived by hashing the template ID.

As discussed on call, this will be a breaking change for the Signed APIs, because it enforces a strict input payload. To roll this out without breakage the following needs to happen:

  1. Signed API needs to be implemented to support both v1 and v2 (released from these new changes).
  2. Signed APIs need to be redeployed
  3. Airnode feeds will be redeployed

This is achieved by doing the following:

  1. Airnode feed pushing schema has changed and Signed API tries to parse both v2 and v1 payload. It converts both to an internal representation that it persists in memory.
  2. The endpoint has a new flag isOev which specifies whether the endpoint returns OEV data (for the derived beacons) or the base ones (for Airseeker usage). This field is required for explicitness, as it's a crucial setting.
Siegrift commented 2 months ago

Added the OEV team to take a look as well.