Skip to content

As a developer, I want to broadcast block only after they have been fully validated, to avoid broadcasting invalid blocks #952

@tizoc

Description

@tizoc

Blocks received from the gossip network are currently being broadcasted without being validated first, this is not correct behavior and may result in the nodes being banned.

The same happens with other gossip messages (snarks and transactions).

Task is to delay re-broadcasting until we know that the data is valid (and to skip broadcasting for invalid data, possibly also banning the peer).

Right now broadcasting happens when processing the incoming message here even before it has been successfully decoded:

https://github.com/openmina/openmina/blob/5baabe6e62ef3637b651b8a974a8cdd93aca4696/p2p/src/network/pubsub/p2p_network_pubsub_reducer.rs#L473-L492
https://github.com/openmina/openmina/blob/5baabe6e62ef3637b651b8a974a8cdd93aca4696/p2p/src/network/pubsub/p2p_network_pubsub_reducer.rs#L187

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions