Skip to content

Implement New Participation Key REST endpoints #2656

@winder

Description

@winder

Implement REST endpoint stubs created in #2593
Use ParcipationID created in #2597

Acceptance Criteria:

  • Copy participation keys to data dir.
  • Implement all functions to implement goal partkey management commands.

Endpoint details from design document:

POST /v2/participation/
consumes: application/msgpack
produces: application/json

Add a participation key to the node. The key format has not been changed and can be generated by goal or algokey.

For the first iteration, the endpoint can consume the file generated by algokey in the body of the request. This file happens to be a sqlite database file, which is an awkward format to depend on. In the future we should define our own internal format and msgpack encode it similar to all of the other data we pass around. For development purposes we can continue to pass around the sqlite database file as a deprecated and undocumented input parameter.

The return value is a simple json response containing the ParticipationID.

There is an additional constraint: make sure that the participation key file is unused. It must contain all of the original keys. Specifically: it should have keys for all rounds in the valid range. This restriction only applies to this endpoint.

DELETE /v2/participation/<participation-id>
produces: application/json

Delete a participation key by ID. The ID is a new type retrieved by the status endpoint. A simple success response JSON is returned (or maybe just a 200).

GET /v2/participation/
GET /v2/participation/<participation-id>
produces: application/json

Get information about installed participation keys. This information is similar to the goal account partkeyinfo command and includes additional information like the last time a key was used.

Returns a simple list of basic participation key information if no ID is provided. Otherwise returns more detailed information about the requested participation key.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions