Skip to content
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

fix(issue-1052): Single topic for RPC Message #1061

Merged
merged 14 commits into from
Mar 25, 2024

Conversation

AlejandroCabeza
Copy link
Collaborator

Description

Rename RPC's Message topicIds to topicId.
Please, do look carefully into this one as I'm not sure how a well covered by tests is the repo, and my changes could be breaking stuff.

Issue

Closes (hopefully): #1052

@AlejandroCabeza AlejandroCabeza self-assigned this Mar 7, 2024
@AlejandroCabeza AlejandroCabeza linked an issue Mar 7, 2024 that may be closed by this pull request
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 82.07547% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 82.52%. Comparing base (ca01ee0) to head (6eec9db).
Report is 2 commits behind head on unstable.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable    #1061      +/-   ##
============================================
- Coverage     82.81%   82.52%   -0.30%     
============================================
  Files            91       91              
  Lines         15750    15820      +70     
============================================
+ Hits          13043    13055      +12     
- Misses         2707     2765      +58     
Files Coverage Δ
libp2p/protocols/pubsub/floodsub.nim 87.70% <100.00%> (+0.10%) ⬆️
libp2p/protocols/pubsub/gossipsub/behavior.nim 88.83% <100.00%> (ø)
libp2p/protocols/pubsub/mcache.nim 92.00% <100.00%> (-0.60%) ⬇️
libp2p/protocols/pubsub/pubsub.nim 84.29% <100.00%> (ø)
libp2p/protocols/pubsub/pubsubpeer.nim 88.58% <ø> (ø)
libp2p/protocols/pubsub/rpc/message.nim 93.33% <100.00%> (ø)
libp2p/protocols/pubsub/gossipsub/scoring.nim 90.25% <90.90%> (-0.71%) ⬇️
libp2p/protocols/pubsub/rpc/protobuf.nim 85.42% <76.19%> (-1.38%) ⬇️
libp2p/protocols/pubsub/rpc/messages.nim 54.54% <61.90%> (+1.68%) ⬆️
libp2p/protocols/pubsub/gossipsub.nim 85.33% <79.82%> (-1.72%) ⬇️

... and 6 files with indirect coverage changes

@arnetheduck
Copy link
Contributor

one thing missing here is that the code must check that there is (at least) one topic when decoding the message from bytes

@AlejandroCabeza AlejandroCabeza force-pushed the fix/issue/1052-single-topic-message branch from 4e01b37 to ed5d9d4 Compare March 11, 2024 15:01
@AlejandroCabeza AlejandroCabeza force-pushed the fix/issue/1052-single-topic-message branch from ed5d9d4 to cb5bd9a Compare March 11, 2024 15:14
@AlejandroCabeza
Copy link
Collaborator Author

one thing missing here is that the code must check that there is (at least) one topic when decoding the message from bytes

What's the expected behaviour if there isn't?

@arnetheduck
Copy link
Contributor

What's the expected behaviour if there isn't?

penalize the peer for sending an invalid message (same as if signature was bad or it wasn't protobuf at all)

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

Copy link
Collaborator

@lchenut lchenut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arnetheduck arnetheduck merged commit 458b088 into unstable Mar 25, 2024
9 checks passed
@arnetheduck arnetheduck deleted the fix/issue/1052-single-topic-message branch March 25, 2024 11:06
@AlejandroCabeza AlejandroCabeza restored the fix/issue/1052-single-topic-message branch April 4, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

Single topic in RPC message
5 participants