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

[proto] update protocol version 28 #23

Merged
merged 11 commits into from
Sep 5, 2023
Merged

[proto] update protocol version 28 #23

merged 11 commits into from
Sep 5, 2023

Conversation

hexfusion
Copy link
Contributor

@hexfusion hexfusion commented Sep 5, 2023

This PR adds support for protocol version 28 and AvalancheGo v1.10.9+. It also bumps protoc-gen-tonic generated code to v0.3.0 and protoc-gen-prost to v0.2.3 and moves them to the community hosted plugins provided by buf. This is a new feature and means that buf does not require the plugins locally to generate code.

The large diff is caused by an update in protoc-gen-prost to support tonic 0.9 which added support for

  • max_decoding_message_size
  • max_encoding_message_size

This requires all protos to be regenerated.

neoeinstein/protoc-gen-prost#72

Signed-off-by: Sam Batschelet <[email protected]>
@hexfusion
Copy link
Contributor Author

hexfusion commented Sep 5, 2023

Not sure what is up with docs and conformance tests cc @exdx

Signed-off-by: Sam Batschelet <[email protected]>
@hexfusion
Copy link
Contributor Author

Proto p2p updates broke message, will resolve in a bit.

@hexfusion hexfusion self-assigned this Sep 5, 2023
@hexfusion hexfusion added dependencies Pull requests that update a dependency file gRPC/proto labels Sep 5, 2023
Signed-off-by: Sam Batschelet <[email protected]>
@@ -94,10 +94,6 @@ prometheus = { version = "0.13.3", default-features = false, features = ["proces
base64 = { version = "0.21.2", optional = true } # https://github.com/marshallpierce/rust-base64
num-bigint = { version = "0.4.3", optional = true }

[build-dependencies]
protoc-gen-prost = "0.2.3"
protoc-gen-tonic = "0.3.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

now using community plugins which are hosted by buf

Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
crates/avalanche-types/src/message/ping.rs Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

used for testing

Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be hidden behind #[cfg(tests)]

Copy link
Collaborator

Choose a reason for hiding this comment

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

All of these clients should probably be behind feature flags. All this code is probably hurting compile times when it's unlikely that the majority of it is being used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed

Copy link
Contributor

Choose a reason for hiding this comment

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

But we can tackle it in a followup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had it that way but it was a lot of features. It does support this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#25

];
include!("sync.tonic.rs");
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤔 .... Does this mean that the whole client implementation is included here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not the client implementation just the client types.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think so. If you look at that file, it's a full-fledged gRPC client implementation for the sync-service.

Copy link
Collaborator

Choose a reason for hiding this comment

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

🥇

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are both the proto-files and the generated code checked into source control? We only need one or the other as code generation is deterministic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it makes sense as verification of the diff but would not be explicitly required.

Copy link
Contributor

@exdx exdx left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

Copy link
Collaborator

@richardpringle richardpringle left a comment

Choose a reason for hiding this comment

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

Left a "Comment" review as well. I think we need to make some changes, but they are beyond the scope of this PR. The changes here look good.

@rkuris rkuris merged commit 6dd4f8e into main Sep 5, 2023
6 checks passed
@rkuris rkuris deleted the proto-v28 branch September 5, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file gRPC/proto
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants