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

[release-v1.7] main: Use backported peer updates. #3083

Merged
merged 5 commits into from Apr 7, 2023

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Apr 7, 2023

This updates the 1.7 release to use the latest version of the peer module which includes updates to use the latest protocol version by default and reduces bandwidth usage in certain scenarios by avoiding requests for inventory that is already known.

In particular, the following updated module version is used:

  • github.com/decred/dcrd/peer/v3@v3.0.1

Note that it also cherry picks all of the commits included in updates to the peer/v3 module to ensure they are also included in the release branch even though it is not strictly necessary since the go.mod has been updated to require the new peer/v3.0.1 release and thus will pull in the new code. However, from past experience, not having code backported to modules available in the release branch too leads to headaches for devs building from source in their local workspace with overrides such as those in go.work.

This bumps the go directive for the peer module to 1.17 which will allow
the new module graph pruning and lazy loading capabilities introduced in
Go 1.17 to be used once the updated modules are released.

This means that, as described by the documentation, the go.mod file for
the module now include a separate require block that includes all of the
indirect dependencies.
This modifies the peer module to use the new formatting of doc comments
in the Go 1.19 release.
This updates the max and default protocol version the peer package uses
to the latest protocol version (wire.RemoveRejectVersion) and updates
the tests to account for the removal of the reject message.

It also adds a test that explicitly tests the handler on older protocol
versions since the associated message is no longer sent on the latest
one.
This updates AddKnownInventory and IsKnownInventory to use the concrete
struct as opposed to a pointer to it in order to allow different
instances of the struct to be used as a key versus needing to check with
the same instance.
This updates the 1.7 release to use the latest version of the peer
module which includes updates to use the latest protocol version by
default and reduces bandwidth usage in certain scenarios by avoiding
requests for inventory that is already known.

In particular, the following updated module version is used:

- github.com/decred/dcrd/peer/v3@v3.0.1
@davecgh davecgh added this to the 1.7.6 milestone Apr 7, 2023
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

Was not aware of this peer update, but the backport LGTM

@davecgh davecgh merged commit f3be674 into decred:release-v1.7 Apr 7, 2023
2 checks passed
@davecgh davecgh deleted the rel17_peer_backports branch April 7, 2023 01:57
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.

None yet

2 participants