Skip to content

Upgrade protobuf/gRPC toolchain and regenerate proto files#544

Merged
LarryRuane merged 1 commit intozcash:masterfrom
czarcas7ic:adam/upgrade-protobuf-grpc-toolchain
Feb 25, 2026
Merged

Upgrade protobuf/gRPC toolchain and regenerate proto files#544
LarryRuane merged 1 commit intozcash:masterfrom
czarcas7ic:adam/upgrade-protobuf-grpc-toolchain

Conversation

@czarcas7ic
Copy link
Contributor

@czarcas7ic czarcas7ic commented Feb 3, 2026

Summary

  • Regenerate all .pb.go files with the latest protoc toolchain (protoc v33.2, protoc-gen-go v1.36.11, protoc-gen-go-grpc v1.6.0)
  • Upgrade google.golang.org/grpc from v1.61.0 to v1.78.0 to satisfy the new SupportPackageIsVersion9 requirement
  • Upgrade google.golang.org/protobuf from v1.33.0 to v1.36.10
  • Add scripts/regenerate-protos.sh and make proto target for proto regeneration

Context

Installing the latest protoc toolchain and regenerating the proto files produces code that requires gRPC-Go v1.64.0+, causing compile failures against the previously pinned grpc v1.61.0.

The old generated code used protoc-gen-go-grpc v1.3.0 / protoc v4.25.2 which emitted SupportPackageIsVersion7. The new toolchain emits SupportPackageIsVersion9 and uses newer streaming types (grpc.ServerStreamingClient, grpc.ServerStreamingServer) that only exist in grpc-go v1.64.0+.

Error prior to change that no longer occurs after this PR:

Screenshot 2026-02-03 at 4 59 12 PM

Comment on lines -146 to -153
# Update your protoc, protobufs, grpc, .pb.go files
update-grpc:
go get -u google.golang.org/protobuf
go get -u google.golang.org/grpc
cd walletrpc && protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative service.proto
cd walletrpc && protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative darkside.proto
cd walletrpc && protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative compact_formats.proto
go mod tidy
Copy link
Contributor Author

Choose a reason for hiding this comment

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

make proto does this now

google.golang.org/grpc v1.61.0
google.golang.org/protobuf v1.33.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
google.golang.org/grpc v1.78.0
Copy link
Contributor Author

@czarcas7ic czarcas7ic Feb 3, 2026

Choose a reason for hiding this comment

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

This is the core of the fix

Copy link
Collaborator

@LarryRuane LarryRuane left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Tested, works for me. One small suggestion below.


for proto in "${PROTOS[@]}"; do
echo " ${proto}"
cd "${REPO_ROOT}/walletrpc" && protoc \
Copy link
Collaborator

Choose a reason for hiding this comment

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

REPO_ROOT, which is somewhat hard to understand, can be eliminated by putting around the cd and everything that follows (to the end of line 22).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed here, thanks

4600ece

@czarcas7ic
Copy link
Contributor Author

NP, thanks for quick review!

Copy link
Collaborator

@LarryRuane LarryRuane left a comment

Choose a reason for hiding this comment

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

ACK, please squash to one commit, thanks.

@czarcas7ic czarcas7ic force-pushed the adam/upgrade-protobuf-grpc-toolchain branch from 4600ece to e35baf7 Compare February 4, 2026 04:46
@czarcas7ic
Copy link
Contributor Author

@LarryRuane pinging to make sure you are tracking that it has been squashed

Copy link
Collaborator

@LarryRuane LarryRuane left a comment

Choose a reason for hiding this comment

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

ACK e35baf7

@LarryRuane LarryRuane merged commit f3cca99 into zcash:master Feb 25, 2026
3 checks passed
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.

2 participants