-
Notifications
You must be signed in to change notification settings - Fork 186
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
Broadcast Loops #573
Comments
I completely agree. I think we should have ttls in utc seconds, and the signature should probably include them when present. I think we need a pubsub spec change for this, i'll be happy to support you in the interest group in specs. |
actually expiration in the envelope. |
hrm, including in the signature maybe backwards incompatible, so it can only be advisory as it may be tampered with. |
Make it a per-topic option. |
Specifically, repurpose the seqno? |
I think this would break some systems that rely on it. |
Sure. |
Rely on it being sequential? |
But yeah, making this a per-topic option would go a long way. |
We were using the default first-seen strategy which means we'd loop messages every 2 minutes (when they expire from the cache). This new strategy keeps the message in the cache until we haven't seen it for 2 minutes, ensuring that it eventually drops off the network (with high likelihood). The correct fix is message expiration: libp2p/go-libp2p-pubsub#573, but that requires deeper protocol changes.
Rather monotonically increasing. |
unixnanos? unixnanos with a counter in case we try to go backwards? |
unixnano init and then sequentially increasing. I don't see anything wrong with allowing an initializer, but we just do unixnano without an initializer for now i think. |
Well, specifically I was thinking about having a guaranteed monotonically increasing clock. I.e.:
We aren't going to broadcast one message per nanosecond, but I like being extra paranoid. |
Yes -- the part that is missing is knowledge of the last seqno basically. |
Can we not just initialize to the current time on reboot? According to kuba, that's what we already do. To deal with fast reboots, we can insert a very tiny sleep before sending the first message. |
sure. |
In F3, we've run into some pretty severe broadcast loops. From what we can tell, the time cache is basically useless.
The core issue is that we have NO TTLs and/or expiration on messages. Personally, I'd recommend a simple expiration to all messages that's strictly less than the time cache duration. We can even treat the time cache duration as a network parameter, refusing to propagate messages that have an expiration more than that duration in the future.
The text was updated successfully, but these errors were encountered: