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

gossipsub: Preventing routing loops with timestamps and expirations #659

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stebalien
Copy link
Member

See libp2p/go-libp2p-pubsub#573 for some context.

I'm proposing that we solve the "routing loops" issue, an issue where messages linger in the network indefinitely (or at least for long periods of time), by repurposing the seqno fields of messages as a message timestamp. All messages would expire 2 minutes (likely configurable on a per-topic basis) after they're sent.

This is a rough-draft and I'm happy to address any feedback and/or consider alternative approaches.

@Stebalien
Copy link
Member Author

@vyzo any opinions on this approach? Would you prefer to add an additional expiration field?

@vyzo
Copy link
Contributor

vyzo commented Jan 31, 2025

they are pretty much the same functionality wise. Expiry might be easier to work with, but timestamp is more robust i think as the decision is at the receiver. So we cant have senders set their expiry at 2262.

@vyzo
Copy link
Contributor

vyzo commented Jan 31, 2025

I also dont think we need additional field, and it can continue to function as a seqno for older clients, given sufficient resolution. We can use nanos, but micros should also be ok.

@MarcoPolo MarcoPolo self-requested a review January 31, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

2 participants