-
Notifications
You must be signed in to change notification settings - Fork 214
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
Integrate PoST draft API into node #5042
Labels
Comments
This was referenced Sep 21, 2023
bors bot
pushed a commit
that referenced
this issue
Oct 5, 2023
## Motivation Part of #5042 This PR adds the GRPC API for the PoST service and adds tests verifying it works correctly. ## Changes - PoST service is downloaded with tests and builds, as well as included in the `Dockerfile` - `PostSetupManager` now uses `zap` directly instead of the `go-spacemesh/log` wrapper - `grpcserver.PostService` uses the PoST service API is added to gRPCs `PrivateListener` endpoint - temporary, will be changed to public + authentication in the future - Any amount of PoST services can connect to the API but only the first calling `Register` will be able to successfully create a stream - in the future this will be extended to allow any number of PoST services to connect - a successful `Register` will create a `PostClient` and notify all services that are `postConnectionListener` about the service connecting (and disconnecting) - TODO: bundled PoST service is started when the node starts ## Test Plan - new tests have been added for gRPC API ## 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
bors bot
pushed a commit
that referenced
this issue
Oct 6, 2023
## Motivation Part of #5042 This PR adds the GRPC API for the PoST service and adds tests verifying it works correctly. ## Changes - PoST service is downloaded with tests and builds, as well as included in the `Dockerfile` - `PostSetupManager` now uses `zap` directly instead of the `go-spacemesh/log` wrapper - `grpcserver.PostService` uses the PoST service API is added to gRPCs `PrivateListener` endpoint - temporary, will be changed to public + authentication in the future - Any amount of PoST services can connect to the API but only the first calling `Register` will be able to successfully create a stream - in the future this will be extended to allow any number of PoST services to connect - a successful `Register` will create a `PostClient` and notify all services that are `postConnectionListener` about the service connecting (and disconnecting) - TODO: bundled PoST service is started when the node starts ## Test Plan - new tests have been added for gRPC API ## 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
bors bot
pushed a commit
that referenced
this issue
Oct 11, 2023
## 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
Reopened because spacemeshos/api#269 isn't done yet. |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Update node to use the new gRPC API to query for proof from the PoST service instead of using the
post
library directly for proof generation.Acceptance criteria
Implementation hints
The text was updated successfully, but these errors were encountered: