Comments (4)
Yes, there is a limit for message size everywhere we use delimited readers, and that's the default max message size in libp2p.
The limit is there to protect the peer from memory use DoS attacks; otherwise a peer could just send a multi-gigabyte message that slowly consumes all memory and crashes.
from go-libp2p-pubsub.
Ok, but the host object should take care of that by marking the peer as a flood peer and closing its connection. Pubsub being an "application" over libp2p core should simply not care of this limitation.
This restriction will somehow add some complexity as the message composed shall not exceed 1MB in size. If, for some reason, I have to send more data than 1MB, the program must fragment the data in more than 1 message and then the peer should be able to recompose back the original data from more messages received.
from go-libp2p-pubsub.
This limit needs to be there otherwise the delimited reader will silently read the huge message and consume all the memory.
Yes, it adds complexity, but we can't not have a limit.
from go-libp2p-pubsub.
Closing this, as I think it has been resolved.
from go-libp2p-pubsub.
Related Issues (20)
- panic: putting same entry twice not supported HOT 18
- Pubsub flood due to same message propagated multiple times HOT 8
- question: msgId and possible memory leak? HOT 3
- question: How to optimize the transmission efficiency of pubsub? HOT 3
- Message rebroadcast hours later HOT 1
- Libp2p Pubsub kicks all of my peers after upgrading from 0.8.0 to 0.9.3 HOT 15
- How to write a validator or peer filter that blocks by IP addresses? HOT 4
- Is it possible to publish a message on a topic only for specific peers? HOT 2
- `SetTopicScoreParams` after join a new pubsub topic HOT 1
- feature: Metrics for GossipSub HOT 5
- feature: Prune should include an optional reason HOT 6
- Next function returns own messages HOT 2
- Query: GossipSub publish doesn't return failure even if node is not connected to any peers for a topic HOT 3
- Gossip mesh includes all peers in the network HOT 8
- Bug Report: Stuck Goroutine in libp2p-pubsub handleSendingMessages HOT 3
- NewStream failure right after startup HOT 10
- New release compatible with go-libp2p v0.32 HOT 2
- bug: Newly added nodes receive a flood of messages that were published hours ago.
- Duplicate Messages and High Outgoing Traffic in GossipSub HOT 5
- Query: Access to topic level peer scores to application layer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libp2p-pubsub.