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
As Non light client: broadcast BlockHeaders #2343
Conversation
296f9a2
to
8eef5e7
Compare
8eef5e7
to
fff5e2d
Compare
@nibhar how can I test if the messages are correctly de-duped with a local devnet? What log messages do I have to look for, or add? |
Running it without any changes, I only see one log message |
fff5e2d
to
e62924e
Compare
e62924e
to
991649d
Compare
I think what should happen is that the pubsub implementation should create a unique identifier for messages. Important is that the messages we publish here are identical no matter who they are published by in terms of that identifier. So the desired behaviour would be that no traffic is produced for the additional publishes in excess of what a single publish would produce. By the way, we do have a similar problem with macro blocks. They are assembled locally and for the asynchronous nature of the distributed system multiple nodes can produce a block at the same time, publishing it once each. However macro blocks are not unique as they can have a variety of different valid proofs. Thus they do (and should) create different identifiers and therefore will be IWANTed by other peers. Just in case this helps to see differences about this behaviour. |
991649d
to
46a5700
Compare
Just experienced this while updating my node and it syncing up with the chain again after I rebuilt with the latest tag: It's also broadcasting old blocks during (live?) sync. |
I looked at the websocket connections to my peers, and I receive a message of 440B (bytes I think) every second from every full/history peer. I'm connected to 13 peers, that's 5.7kB/s. Quite a bit of traffic. |
This makes every non light client rebroadcast blocks they get on the block header topic. It is not ideal as it may lead to duplication depending on how pubsup messages are de-duped.
To my knowledge in this case the messages actual bytes are the distinguishing factor. If that is the case they should all be the same for micro blocks and only differ with macro blocks which have different proofs.
Resolves #2288