-
Notifications
You must be signed in to change notification settings - Fork 56
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
refactor: Change from protobuf to cbor for gRPC #3061
refactor: Change from protobuf to cbor for gRPC #3061
Conversation
8f0274c
to
b5a27ed
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3061 +/- ##
===========================================
- Coverage 79.47% 79.41% -0.06%
===========================================
Files 343 345 +2
Lines 26511 26534 +23
===========================================
+ Hits 21067 21070 +3
- Misses 3934 3945 +11
- Partials 1510 1519 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 15 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.
Wow this is good work lots of proto code removed. Is nicer and cleaner! Left some minor questions/suggestions.
// handleEncryptionMessage handles incoming FetchEncryptionKeyRequest messages from the pubsub network. | ||
func (s *pubSubService) handleRequestFromPeer(peerID libpeer.ID, topic string, msg []byte) ([]byte, error) { | ||
req := new(pb.FetchEncryptionKeyRequest) | ||
if err := proto.Unmarshal(msg, req); err != nil { | ||
req := new(fetchEncryptionKeyRequest) |
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.
thought: not very common way of creating a value on heap.
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.
You know that is your code right 😉
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.
LGTM
dc7d230
to
212d1aa
Compare
## Relevant issue(s) Resolves sourcenetwork#3057 ## Description This PR makes the net gRPC server use cbor instead of protobuf. By doing this we remove the protobuf overhead and the related dependencies which will make compilation to wasm simpler and simplify browser support.
Relevant issue(s)
Resolves #3057
Description
This PR makes the net gRPC server use cbor instead of protobuf. By doing this we remove the protobuf overhead and the related dependencies which will make compilation to wasm simpler and simplify browser support.
Tasks
How has this been tested?
make test
Specify the platform(s) on which this was tested: