erigon icon indicating copy to clipboard operation
erigon copied to clipboard

Erigon must not use `Publish` from go-libp2p-pubsub to forward messages

Open ppopth opened this issue 1 year ago • 1 comments

From what I see here https://github.com/erigontech/erigon/blob/main/cl/phase1/network/gossip_manager.go#L138-L140

Erigon Caplin uses Publish method of struct pubsub.Topic of go-libp2p-pubsub to forward messages. In fact, message forwarding is already done internally in go-libp2p-pubsub. You don't have to call any method to do so. You should use Publish only to publish a message as an originator. I think if the library is misused, it can result to some misbehavior.

Can you confirm that it's really misused? If I understand it incorrectly, please let me know.

ppopth avatar Dec 30 '24 22:12 ppopth

was not aware - thanks. will look into this

Giulio2002 avatar Dec 31 '24 12:12 Giulio2002