Skip to content

API: Add participation key generation endpoint to algod API#5781

Merged
winder merged 20 commits intoalgorand:masterfrom
winder:will/keygen-api
Oct 17, 2023
Merged

API: Add participation key generation endpoint to algod API#5781
winder merged 20 commits intoalgorand:masterfrom
winder:will/keygen-api

Conversation

@winder
Copy link
Copy Markdown
Contributor

@winder winder commented Oct 12, 2023

Summary

Implementation for #5578.

New endpoint for the admin API to generate and install participation keys.

POST /v2/participation/generate/{address}

The participation keys are generated in the background and installed when generation is complete. With this PR there is no progress reporting. Programs should poll the GET /v2/participation endpoint and look for the new key to appear. Once the new key is installed a key registration transaction can be made.

Test Plan

New unit tests.

@winder winder requested review from cce, gmalouf and jannotti October 12, 2023 15:49
@winder winder self-assigned this Oct 12, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 12, 2023

Codecov Report

Merging #5781 (ecc16b0) into master (d3df476) will increase coverage by 0.00%.
The diff coverage is 38.27%.

@@           Coverage Diff           @@
##           master    #5781   +/-   ##
=======================================
  Coverage   55.53%   55.53%           
=======================================
  Files         473      474    +1     
  Lines       66815    66851   +36     
=======================================
+ Hits        37105    37127   +22     
- Misses      27192    27199    +7     
- Partials     2518     2525    +7     
Files Coverage Δ
daemon/algod/api/server/v2/test/helpers.go 77.15% <100.00%> (+0.11%) ⬆️
data/account/participation.go 63.97% <100.00%> (+0.53%) ⬆️
cmd/goal/account.go 13.61% <0.00%> (-0.06%) ⬇️
daemon/algod/api/server/router.go 16.00% <0.00%> (-0.33%) ⬇️
libgoal/participation.go 0.00% <0.00%> (ø)
libgoal/participation/participation.go 66.66% <66.66%> (ø)
daemon/algod/api/server/v2/handlers.go 0.77% <0.00%> (-0.02%) ⬇️

... and 12 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@winder winder marked this pull request as ready for review October 13, 2023 12:42
Comment thread daemon/algod/api/server/v2/handlers.go Outdated
Comment thread libgoal/participation.go
Copy link
Copy Markdown
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some comments that I forgot to submit. I think I still have more to look at and understand though.

Comment thread daemon/algod/api/server/v2/handlers.go Outdated
Comment thread data/account/participation.go
Comment thread daemon/algod/api/algod.oas2.json Outdated
Comment thread daemon/algod/api/algod.oas2.json Outdated
Comment thread daemon/algod/api/algod.oas2.json
Comment thread test/e2e-go/features/transactions/onlineStatusChange_test.go
Comment thread daemon/algod/api/server/v2/handlers.go Outdated
Comment thread daemon/algod/api/server/v2/handlers.go Outdated
Comment thread daemon/algod/api/server/v2/handlers.go Outdated
@winder winder requested a review from jasonpaulos October 17, 2023 13:56
Copy link
Copy Markdown
Contributor

@jannotti jannotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some very small nits, but approving. If you want to change them, I'll reapprove immediately. Up to you.

Comment thread daemon/algod/api/server/v2/handlers.go
Comment thread daemon/algod/api/server/v2/handlers.go
Copy link
Copy Markdown
Contributor

@ohill ohill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants