-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me - nice and backwards compatible.
@vyzo So, this is backward compatible because existing peers will not use limited Relays, right ? The limited relay will ofc be a new protocol that existing peers will have no idea about. Also, note that we will have to change the stream opening code in non-chatty protocols such as DHT & friends to instruct the network to go ahead with opening streams on transient conns. |
yeah, it's backwards compatible. |
The changes in things like the DHT will be in the incoming connection notifee -- there we can check for transient conns and ignore them if we are not prepared to deal with them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some quick changes. Also need to fix the conflicts.
// GetUseTransient returns true if the use transient option is set in the context. | ||
func GetUseTransient(ctx context.Context) bool { | ||
v := ctx.Value(useTransient) | ||
if v != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return v != nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double sigh...
Co-authored-by: Yusef Napora <yusef@protocol.ai>
…ncy with other options
43260f4
to
c7a93c4
Compare
It adds a transient mark in the metadata and a context option to opt-in for opening streams on transient connections.