Draft: DAC: Prefix endpoints with API version
Context
Fyi !8554 (closed) will likely replace this MR (!)
For more context about versioning DAC API and how this MR fits in -> see #5437 (closed).
This MR prefixes the endpoints that will be supported via the first release (and also used during the demo) with v1 prefix. As such this endpoints will be binding from now on and may only be changed in the backwards compatible manner. Modifying existing RPC, will require a major version upgrade.
The current V1 API will consist of the following endpoints:
PUT v1/preimageGET v1/preimagePUT v1/dac_member_signatureGET v1/certificatesGET v1/missing_pageGET v1/monitor/certificateGET v1/monitor/root_hashes
Note that legacy GET /verify_signature and POST /store_preimage will not be released as part of V1 API and consequently were not prefixed. This means that current legacy test are running as a mix of before-mentioned endpoints and and V1 endpoints. Whether this is problematic or not has been discussed here.
As a followup, I suggest two axis of work:
- Modularize internal codebase and test suite via
V1modules. This modules will be pre-pended with banner documentation that explains the binding contract ofV1API and that it's modification should be taken extreme care of (backwards compatibility only) - Migrate
legacytest suite toful_infrastructureso thatGET /verify_signatureandPOST /store_preimageendpoints can be removed and with it eventually also the wholelegacymode.
Manually testing the MR
CLI should pass.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR