Skip to content
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

feat(p2p): override gossip topicValidators in gossipsub #10347

Closed
Maddiaa0 opened this issue Dec 2, 2024 · 1 comment
Closed

feat(p2p): override gossip topicValidators in gossipsub #10347

Maddiaa0 opened this issue Dec 2, 2024 · 1 comment
Assignees
Labels
C-node Component: Aztec Node C-p2p Component: peer to peer P-high 🔥 Priority: high. Do this task next. team-alpha

Comments

@Maddiaa0
Copy link
Member

Maddiaa0 commented Dec 2, 2024

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:
Image

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

@Maddiaa0 Maddiaa0 added C-node Component: Aztec Node C-p2p Component: peer to peer P-high 🔥 Priority: high. Do this task next. team-alpha labels Dec 2, 2024
@Maddiaa0 Maddiaa0 self-assigned this Dec 5, 2024
@Maddiaa0
Copy link
Member Author

closed by #10734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-node Component: Aztec Node C-p2p Component: peer to peer P-high 🔥 Priority: high. Do this task next. team-alpha
Projects
None yet
Development

No branches or pull requests

1 participant