go-spacemesh
go-spacemesh copied to clipboard
Serve API to return poet registrations state
Motivation
Smesher needs to understand situation with poet registrations (success, failed, residual, no registrations and etc.) Easiest way is providing API for that.
Description
Closes #6174
- created smesher identity states
- created new grpc service (SmeshingIdentitiesService) to serve new API
- implemented logic to save failed registrations, retry to register in case if deadline for submit challenge is not passed, and update recording into db in case, if registrations were successful after another try
- fixed tests
- made some small refactoring
Connected PR: https://github.com/spacemeshos/api/pull/369
Test Plan
Unit tests
TODO
- [x] Explain motivation or link existing issue(s)
- [x] Test changes and document test plan
- [x] Update documentation as needed
- [x] Update changelog as needed
@ConvallariaMaj could you execute
go get github.com/spacemeshos/api/release/go@499d12efc
go mod tidy
and commit the result? This will allow the PR to be built and doesn't pollute the PR view with errors that the code can't be built 🙂
Codecov Report
Attention: Patch coverage is 69.56522% with 84 lines in your changes missing coverage. Please review.
Project coverage is 79.9%. Comparing base (
c4e59b6) to head (0aa7d97). Report is 1 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #6266 +/- ##
=========================================
- Coverage 79.9% 79.9% -0.1%
=========================================
Files 353 355 +2
Lines 46396 46614 +218
=========================================
+ Hits 37103 37246 +143
- Misses 7191 7255 +64
- Partials 2102 2113 +11
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Some quite minor nits, otherwise looks good
Note: this PR depends on https://github.com/spacemeshos/api/pull/369
This PR was used as part of the work to create #6452.