[go: up one dir, main page]

[DAC] Version API

To support the evolution of DAC, it makes sense to start versioning the API provided to the client and other DAC nodes.

The plan on how we want to tackle DAC API versioning is outlined in the following document. The takeaway from it is:

  1. DAC API will be versioned via URI path, where v_x will represent API major version and not endpoint version.
  2. Major version will be bumped for backwards incompatible change only, in which case the whole API is upgraded.
  3. Documentation for the versioned API will be automatically generated.
  4. Independently of the DAC API, we will version DAC components such as dac certificate, serialization scheme.

Plan of attack

  1. Releasing experimental but binding V0 API (!8678 (merged)):
    • Replacing version_rpc_arg with v0_api_prefix (!8750 (merged)) as a follow-up
  2. Introducing V1 API (!8762 (merged) ):
    • We introduce V1 API, with the single "GET v1/preimage" endpoint for the start.
    • !8764 (merged) tentatively as a follow-up (improve code organization of RPC_server to reflect API versioning)
  3. Start working on V1 API step by step, e.g.:
    • Continue adding shared endpoints with v0
    • Remove legacy specific endpoints
    • Introduce expiration level (will change a lot of endpoints)
  4. Freeze V1 api and thus release it.

Note that in the process of working on either 3. (ad hoc style), the following issues encountered during !8554 (closed) will have to be handled: #5636 (closed), #5635 (closed), #5631 (closed), #5627 (closed), #5577 (closed)

Edited by Martin Tomazic