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

Update protobuf generation #322

Merged
merged 4 commits into from
Mar 6, 2023
Merged

Update protobuf generation #322

merged 4 commits into from
Mar 6, 2023

Conversation

KonradStaniec
Copy link
Contributor

Various cleanups in our protobufs:

I have also for now turned off a lot of linter rules regarding comments in proto files, as our protos are definitly under documented 😅

Rules I am talking about are:

    # TODO Decide which comments we would like to enfore by linter
    - COMMENT_MESSAGE
    - COMMENT_ENUM_VALUE
    - COMMENT_ENUM
    - COMMENT_RPC
    - COMMENT_ONEOF

Imo we should decide which of those rules we want to enforce , and then everybody should pick one module and add proper docs, then we can re-enable this rules.

Copy link
Member

@SebastianElvis SebastianElvis left a comment

Choose a reason for hiding this comment

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

Thanks! Finally we got rid of the protobuf error.

Regarding the lint rules, maybe each of us can create tickets for modules which one is responsible for. Wdyt?

@@ -8,7 +8,6 @@ BINDIR ?= $(GOPATH)/bin
BUILDDIR ?= $(CURDIR)/build
HTTPS_GIT := https://github.com/babylonchain/babylon.git
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
Copy link
Member

Choose a reason for hiding this comment

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

Why do we remove 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.

it was not used anywhere, also all buf usage comes from protoImage

@@ -43,37 +43,35 @@ message BTCSpvProof {
// which transaction was included and transaction index in the block
message TransactionKey {
uint32 index = 1;
bytes hash = 2 [
(gogoproto.customtype) = "github.com/babylonchain/babylon/types.BTCHeaderHashBytes"
Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, this format is enforced by proto-lint, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is mostly from proto-format. Currently it uses default config but if we will find some formatting weird we will be able to adjust it it in the future

@KonradStaniec
Copy link
Contributor Author

Regarding the lint rules, maybe each of us can create tickets for modules which one is responsible for. Wdyt?

Sounds like good idea, maybe we can disscus it on our next sprint planning meeting.

@KonradStaniec KonradStaniec merged commit bab6304 into dev Mar 6, 2023
@KonradStaniec KonradStaniec deleted the update-protobuf-generation branch March 6, 2023 10:59
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