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

fix: allow relay to forward unlimited bytes #5244

Merged
merged 10 commits into from
Apr 4, 2024

Conversation

drHuangMHT
Copy link
Contributor

@drHuangMHT drHuangMHT commented Mar 18, 2024

Description

Allow relay to forward unlimited bytes from one peer to another by checking if max_circuit_bytes equals to 0 before checking if bytes_sent exceeds max_circuit_bytes.
This will make current implementation follow the spec.
May close #5170.

Notes & open questions

Not sure how to write the test.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@drHuangMHT
Copy link
Contributor Author

Changelog entry will be added if the fix is accepted, discussion welcome.

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

thanks @drHuangMHT! LGTM just one nitpick. Can you also add a CHANGELOG.md entry and Cargo.toml update please?
cc @dariusc93

protocols/relay/src/copy_future.rs Outdated Show resolved Hide resolved
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

ah sorry, it's still missing the Cargo.toml version bump

protocols/relay/CHANGELOG.md Outdated Show resolved Hide resolved
@drHuangMHT drHuangMHT marked this pull request as ready for review April 1, 2024 15:08
@drHuangMHT drHuangMHT requested a review from jxs April 4, 2024 02:10
@drHuangMHT drHuangMHT requested a review from jxs April 4, 2024 15:53
@drHuangMHT
Copy link
Contributor Author

@jxs Need send-it lable and probably a re-approval to merge this

@jxs jxs added the send-it label Apr 4, 2024
@mergify mergify bot merged commit fdddacc into libp2p:master Apr 4, 2024
71 of 72 checks passed
@drHuangMHT drHuangMHT deleted the unlimited-relay branch April 22, 2024 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relay : 'Hop' spec supports zero limit, but the impl does not
2 participants