-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dedicated PoST service for Proof generation (#5061)
## 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
- Loading branch information
Showing
44 changed files
with
1,798 additions
and
1,588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.