Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the cascade registration flow and cleans up the supernode code by removing unused constants, streamlining dependencies through adaptor interfaces, and refining task creation and error handling. Key changes include:
- Removal of unused P2P constants and deprecation of storage-specific methods.
- Refactoring of CascadeRegistrationTask to use adaptor services for encoding, storage, and Lumera interactions.
- Renaming and dependency injection changes in the cascade action server for improved modularity and clearer logging.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| supernode/services/common/p2p.go | Removed obsolete P2P constant definitions. |
| supernode/services/cascade/task.go | Removed storage initialization from task creation. |
| supernode/services/cascade/service.go | Updated service fields and task creation using new adaptor interfaces. |
| supernode/services/cascade/register.go | Revised error wrapping and parameter passing in the cascade registration flow. |
| supernode/services/cascade/helper.go | Refactored encoding and artefact storage to use adaptor services. |
| supernode/services/cascade/adaptors/* | Introduced new adaptor interfaces for Codec, P2P, and Lumera clients. |
| supernode/node/action/server/cascade/cascade_action_server.go | Renamed server type and switched to a factory-based task creation. |
| pkg/logtrace/fields.go | Added new fields for task and action IDs to enhance logging. |
| go.mod | Added a module replace directive for local development. |
Comments suppressed due to low confidence (2)
supernode/node/action/server/cascade/cascade_action_server.go:14
- [nitpick] Renaming the server type from CascadeActionServer to ActionServer may reduce clarity regarding its association with cascade operations. Consider retaining 'Cascade' in the type name if the specificity is important for the public API.
type ActionServer struct {
supernode/services/cascade/adaptors/p2p.go:91
- [nitpick] The down-sampling logic using shuffle and slicing is concise; however, it would be beneficial to double-check that the computation for the 'want' variable (based on storeSymbolsPercent) meets the intended sampling rate in all cases.
if len(keys) > loadSymbolsBatchSize {
mateeullahmalik
approved these changes
May 13, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.