feat(p2p): override gossip topicValidators
in gossipsub
#10347
Labels
C-node
Component: Aztec Node
C-p2p
Component: peer to peer
P-high 🔥
Priority: high. Do this task next.
team-alpha
Overview
We are not correctly overriding the topicValidator functionality in libp2p which means even if a node validates that a transaction is invalid, and alters the peer score accordingly, it will still propagate the message further to other peers.
Within libp2p topic validation logic is as so:
Without the topic validator being set for a given topic Id, the MessageStatus will always be valid, even if we have separately validated that it is not.
This fix for this is trivial, for each p2p message we should set:
node.services.pubsub.topicValidators.set(topic, validator);
For each relevant topic.
For each topic:
Tx: use existing validation logic
Attestations: can the signature be recovered + is the proposal for the next slot and from the correct attester ( follow on from #10327)
Block Proposals: same as above
Epoch proof quotes: are they for the correct epoch
The text was updated successfully, but these errors were encountered: