-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Use dedicated PoST service for Proof generation #5061
Conversation
4c86676
to
558aaa8
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5061 +/- ##
=========================================
+ Coverage 77.0% 77.2% +0.1%
=========================================
Files 260 260
Lines 30575 30599 +24
=========================================
+ Hits 23562 23636 +74
+ Misses 5482 5423 -59
- Partials 1531 1540 +9
|
fc378b4
to
249db8f
Compare
## Motivation Closes #4171 Occasionally the test will fail with an incorrect assertion of an error. The stream receive can fail either because the deadline was exceeded or due to bad timing for another (random) reason. Since it doesn't matter which return code is received, just that the stream ended I changed the assertion to also allow `code.Unkown`. ## Changes - change assertion to allow `codes.DeadlineExceeded` and `codes.Unkown` instead of just the former. - Additionally get rid of the global GRPC config. This will allow to run GRPC service tests in parallel (which will be used by #5061) ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [ ] Update [changelog](../CHANGELOG.md) as needed
1618557
to
ca7ba55
Compare
## Motivation Closes #4171 Occasionally the test will fail with an incorrect assertion of an error. The stream receive can fail either because the deadline was exceeded or due to bad timing for another (random) reason. Since it doesn't matter which return code is received, just that the stream ended I changed the assertion to also allow `code.Unkown`. ## Changes - change assertion to allow `codes.DeadlineExceeded` and `codes.Unkown` instead of just the former. - Additionally get rid of the global GRPC config. This will allow to run GRPC service tests in parallel (which will be used by #5061) ## Test Plan <!-- Please specify how these changes were tested (e.g. unit tests, manual testing, etc.) --> ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
cf42665
to
b1822e2
Compare
f86d6c8
to
b19e447
Compare
b19e447
to
32d95b0
Compare
bors try |
tryBuild failed: |
c0c5967
to
906f08a
Compare
27a3497
to
97d882b
Compare
490ad72
to
ff05d06
Compare
fb39c0b
to
21064a7
Compare
dd91ee8
to
584315d
Compare
bors try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as we agreed to continue refactoring in a follow-up.
tryBuild succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
bors merge |
## Motivation Part of #5042 Merge after #5091 ## Changes - Generating poofs is now done via the GRPC API - Foundation laid in #5091 - Upon connection `PostClient` is passed to services via the `postConnectionListener` interface. At the moment these are: `activation::Builder` and `activation::NIPostBuilder` who use it to generate a proof - Instead of starting the `PostSupervisor` when `PostServiceCmd` is set it is started when `StartSmeshing == true` - The connection does not require authentication (yet) - will be addressed in #5131 - Connection cannot handle multiple post services (yet) - NiPoSTBuilder doesn't verify PoST proofs any more - PoST Service does this already before providing the proof - additionally when publishing the ATX it goes through the ATX handler that validates the ATX again before broadcasting it. - Refactored tests in `activation` package to use new API - Integration tests that do not use mocks for generating PoST proofs have been moved to `activation/e2e` to allow the use of the `api/grpcserver` package in them - `e2e` tests spin up a post service using the post supervisor and query a proof from there - Slimmed down `postSetupProvider` interface: - it is used by the `activation::Builder` and implemented by `activation::PostSetupManager` - some of its functionality has been moved into `PostClient` (`GenerateProof` -> `Proof`) - Replaced `go-spacemesh/log` with `zap` in a few components in the `activation` package. ## Test Plan - All existing tests involving proof generation have been migrated to use the new PoST service - New tests added to test the connection specifically. - Test added for custom types in config. ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
Pull request successfully merged into develop. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
## Motivation Follow up on #5061 (comment) This changes the `activation.Builder` and `activation.NIPostBuilder` to use `grpcservice.PostService` directly instead of the later signalling new and dropped connections to them. ## Changes - Inverse dependency between the three components as discussed in previous PR - During startup the `grpcservice.PostService` is now always initialized along the other node services, but only registered in the `grpcserver` when it is configured for at least one of the available listeners. ## Test Plan n/a ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
## Motivation Follow up on #5061 (comment) This changes the `activation.Builder` and `activation.NIPostBuilder` to use `grpcservice.PostService` directly instead of the later signalling new and dropped connections to them. ## Changes - Inverse dependency between the three components as discussed in previous PR - During startup the `grpcservice.PostService` is now always initialized along the other node services, but only registered in the `grpcserver` when it is configured for at least one of the available listeners. ## Test Plan n/a ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
Motivation
Part of #5042
Merge after #5091
Changes
PostClient
is passed to services via thepostConnectionListener
interface. At the moment these are:activation::Builder
andactivation::NIPostBuilder
who use it to generate a proofPostSupervisor
whenPostServiceCmd
is set it is started whenStartSmeshing == true
activation
package to use new APIactivation/e2e
to allow the use of theapi/grpcserver
package in theme2e
tests spin up a post service using the post supervisor and query a proof from therepostSetupProvider
interface:activation::Builder
and implemented byactivation::PostSetupManager
PostClient
(GenerateProof
->Proof
)go-spacemesh/log
withzap
in a few components in theactivation
package.Test Plan
TODO