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 msgId fn #10346

Closed
Maddiaa0 opened this issue Dec 2, 2024 · 0 comments · Fixed by #10415
Closed

feat(p2p): override msgId fn #10346

Maddiaa0 opened this issue Dec 2, 2024 · 0 comments · Fixed by #10415
Assignees
Labels
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

Gossipsub grants the ability to set a msgIdFn and a fastMsgIdFn that are used to determine if a message is the same.

By default, gossipsub will allocate a random string if this has not been overridden, this behaviour is not good for us as it means that even though all of our messages have a unique identifier p2pMessageIdentifier (defined on the gossipable interface) they are not actually in use.
This results in txs sent to two different nodes having two different MsgIds, which means they are identified as different messages in gossipsub control messages, which will result scenarios where the same message being propagated across the p2p network multiple times over.

It should be enough to replace these msgIdFns with a function that resolves to the p2pMessageIdentifier.

AC

Replace the message ID function with a custom one that reads the p2pMessageIdentifier

@Maddiaa0 Maddiaa0 added 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-p2p Component: peer to peer P-high 🔥 Priority: high. Do this task next. team-alpha
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant