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

circuitv2: clarify what to do when data limit is reached #526

Merged
merged 6 commits into from
Mar 23, 2023

Conversation

achingbrain
Copy link
Member

This documents the rust-libp2p behaviour when more data than is allowed is transferred over a relayed connection. js-libp2p will take the same approach. go-libp2p may need to be updated.

This documents the rust-libp2p behaviour when more data than is allowed is transferred over a relayed connection.  js-libp2p will take the same approach.  go-libp2p may need to be updated.
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @achingbrain improving the specification!

I suggest:

  • Including going over duration.
  • Differentiating by direct connection and relayed connection.
  • Specifying that both streams, to source and destination, should be reset.

Let me know what you think.

@p-shahi
Copy link
Member

p-shahi commented Mar 2, 2023

Should we update the revision to r3?

@p-shahi
Copy link
Member

p-shahi commented Mar 7, 2023

@MarcoPolo @marten-seemann all good for the go-libp2p side?


If more data than the limit specified in the `data` field is transferred
over the relayed connection, or the relayed connection has been open for longer than `duration`, the relay should reset the stream to the source and the stream to the destination. If the reservation
for the connection has expired the server may then apply any connection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who's the "server" here. Is it the relay? We probably shouldn't be using 2 different terms here.

The following sentence doesn't really make sense to me, as a relayed connection doesn't really show up as a normal connection in the connection manager.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a relayed connection doesn't really show up as a normal connection in the connection manager.

That sounds a bit too implementation-specific to me? I do agree though that the sentence is superfluous. "Do what you'd normally do" isn't really worth "specifying" I'd say.

@ddimaria
Copy link

No activity here in 2 weeks and this is approved. @p-shahi is this ready to merge?

@marten-seemann
Copy link
Contributor

No activity here in 2 weeks and this is approved. @p-shahi is this ready to merge?

No, my review hasn’t been addressed yet.

@achingbrain achingbrain changed the title docs: clarify what to do when data limit is reached circuitv2: clarify what to do when data limit is reached Mar 23, 2023
@achingbrain achingbrain merged commit 6634ca7 into master Mar 23, 2023
@achingbrain achingbrain deleted the docs/clarify-spec-when-limit-is-reached branch March 23, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants