Skip to content

Commit 4b52f82

Browse files
authored
Bump Protobuf and tooling and add section to proto docs outlining buf publishing (ava-labs#1552)
1 parent a99a809 commit 4b52f82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1228
-382
lines changed

.github/workflows/buf-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v3
20-
- uses: bufbuild/buf-setup-action@v1.11.0
20+
- uses: bufbuild/buf-setup-action@v1.19.0
2121
with:
2222
github_token: ${{ github.token }}
2323
- uses: bufbuild/buf-lint-action@v1

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ require (
5959
gonum.org/v1/gonum v0.11.0
6060
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c
6161
google.golang.org/grpc v1.50.1
62-
google.golang.org/protobuf v1.28.1
62+
google.golang.org/protobuf v1.30.0
6363
gopkg.in/natefinch/lumberjack.v2 v2.0.0
6464
)
6565

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
864864
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
865865
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
866866
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
867-
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
868-
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
867+
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
868+
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
869869
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
870870
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
871871
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

proto/README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,36 @@
22

33
Now Serving: **Protocol Version 26**
44

5-
Protobuf files are hosted at [https://buf.build/ava-labs/avalanche](https://buf.build/ava-labs/avalanche) and can be used as dependencies in other projects.
5+
Protobuf files are hosted at
6+
[https://buf.build/ava-labs/avalanche](https://buf.build/ava-labs/avalanche) and
7+
can be used as dependencies in other projects.
68

7-
Protobuf linting and generation for this project is managed by [buf](https://github.com/bufbuild/buf).
9+
Protobuf linting and generation for this project is managed by
10+
[buf](https://github.com/bufbuild/buf).
811

9-
Please find installation instructions on [https://docs.buf.build/installation/](https://docs.buf.build/installation/) or use `Dockerfile.buf` provided in the `proto/` directory of AvalancheGo.
12+
Please find installation instructions on
13+
[https://docs.buf.build/installation/](https://docs.buf.build/installation/) or
14+
use `Dockerfile.buf` provided in the `proto/` directory of AvalancheGo.
1015

11-
Any changes made to proto definition can be updated by running `protobuf_codegen.sh` located in the `scripts/` directory of AvalancheGo.
16+
Any changes made to proto definition can be updated by running
17+
`protobuf_codegen.sh` located in the `scripts/` directory of AvalancheGo.
1218

13-
Introduction to `buf` [https://docs.buf.build/tour/introduction](https://docs.buf.build/tour/introduction)
19+
Introduction to `buf`
20+
[https://docs.buf.build/tour/introduction](https://docs.buf.build/tour/introduction)
1421

1522
## Protocol Version Compatibility
1623

17-
The protobuf definitions and generated code are versioned based on the [RPCChainVMProtocol](../version/version.go#L13) defined for the RPCChainVM.
18-
Many versions of an Avalanche client can use the same [RPCChainVMProtocol](../version/version.go#L13). But each Avalanche client and subnet vm must use the same protocol version to be compatible.
24+
The protobuf definitions and generated code are versioned based on the
25+
[RPCChainVMProtocol](../version/version.go#L13) defined for the RPCChainVM.
26+
Many versions of an Avalanche client can use the same
27+
[RPCChainVMProtocol](../version/version.go#L13). But each Avalanche client and
28+
subnet vm must use the same protocol version to be compatible.
29+
30+
## Publishing to Buf Schema Registry
31+
32+
- Checkout appropriate tag in AvalancheGo `git checkout v1.10.1`
33+
- Change to proto/ directory `cd proto`.
34+
- Publish new tag to buf registry. `buf push -t v26`
35+
36+
Note: Publishing requires auth to the ava-labs org in buf
37+
https://buf.build/ava-labs/repositories

proto/pb/aliasreader/aliasreader.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/pb/aliasreader/aliasreader_grpc.pb.go

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/pb/appsender/appsender.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/pb/appsender/appsender_grpc.pb.go

Lines changed: 22 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/pb/http/http.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/pb/http/http_grpc.pb.go

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)