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

add authz types #13

Closed
wants to merge 2 commits into from
Closed

add authz types #13

wants to merge 2 commits into from

Conversation

cmwaters
Copy link

This PR adds the proto definitions corresponding to the authz module here

@webmaster128
Copy link
Member

Re-opening to trigger CI build after config change. Diff LGTM.

@webmaster128
Copy link
Member

Could you use yarn codegen, which runs prettier on the generated code?

@cmwaters
Copy link
Author

I get the following errors when using yarn codegen:

yarn codegen 
Processing wasmd 0.16 proto files ...
google/protobuf/descriptor.proto: File not found.
cosmos_proto/cosmos.proto:4:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
cosmos_proto/cosmos.proto:8:8: "google.protobuf.MessageOptions" is not defined.
cosmos_proto/cosmos.proto: "google.protobuf.MessageOptions" is not defined.
cosmos_proto/cosmos.proto:14:8: "google.protobuf.FieldOptions" is not defined.
gogoproto/gogo.proto:32:1: Import "google/protobuf/descriptor.proto" was not found or had errors.
gogoproto/gogo.proto:38:8: "google.protobuf.EnumOptions" is not defined.
gogoproto/gogo.proto: "google.protobuf.EnumOptions" is not defined.
...

It seems like there are some third party proto files that are missing

@webmaster128
Copy link
Member

Are those errors or warning? Do you get a success error code (echo $? must be 0)?

@webmaster128
Copy link
Member

Could you try

git submodule init && git submodule update && yarn && yarn codegen && echo "🚀🚀🚀🚀"
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done in 0s 124ms
Processing wasmd 0.16 proto files ...
cosmos/base/tendermint/v1beta1/query.proto:4:1: warning: Import gogoproto/gogo.proto is unused.
cosmos/tx/v1beta1/service.proto:7:1: warning: Import gogoproto/gogo.proto is unused.
ibc/core/client/v1/tx.proto:8:1: warning: Import ibc/core/client/v1/client.proto is unused.
Processing wasmd 0.18 proto files ...
cosmos/base/tendermint/v1beta1/query.proto:4:1: warning: Import gogoproto/gogo.proto is unused.
cosmos/tx/v1beta1/service.proto:7:1: warning: Import gogoproto/gogo.proto is unused.
ibc/core/client/v1/tx.proto:8:1: warning: Import ibc/core/client/v1/client.proto is unused.
cosmos/authz/v1beta1/tx.proto:7:1: warning: Import google/protobuf/timestamp.proto is unused.
cosmos/authz/v1beta1/tx.proto:9:1: warning: Import cosmos/base/abci/v1beta1/abci.proto is unused.
cosmos/base/tendermint/v1beta1/query.proto:4:1: warning: Import gogoproto/gogo.proto is unused.
cosmos/upgrade/v1beta1/query.proto:4:1: warning: Import google/protobuf/any.proto is unused.
🚀🚀🚀🚀

This works for me on your branch. It includes a bunch of codegen updated that that are needed, like

+/** Since: cosmos-sdk 0.43 */

as well as the formatting.

@cmwaters
Copy link
Author

Okay I will give it another go. Maybe I don't have the standard google protobuf files on my computer

@cmwaters
Copy link
Author

I'm getting some problem with the checksum:

 10% ❯ git submodule init && git submodule update && yarn && yarn codegen && echo "🚀🚀🚀🚀"
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0018: │ @protobufjs/base64@npm:1.1.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/codegen@npm:2.0.4: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/eventemitter@npm:1.1.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/aspromise@npm:1.1.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/fetch@npm:1.1.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/inquire@npm:1.1.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/float@npm:1.0.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ @types/long@npm:4.0.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/pool@npm:1.1.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/utf8@npm:1.1.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ @protobufjs/path@npm:1.1.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ @types/node@npm:15.6.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ @types/node@npm:15.6.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ @types/object-hash@npm:1.3.4: The remote archive doesn't match the expected checksum
➤ YN0018: │ @types/prettier@npm:1.19.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ lodash@npm:4.17.21: The remote archive doesn't match the expected checksum
➤ YN0018: │ long@npm:4.0.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ dataloader@npm:1.4.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ object-hash@npm:1.3.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ protobufjs@npm:6.11.2: The remote archive doesn't match the expected checksum
➤ YN0018: │ ts-proto@npm:1.84.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ prettier@npm:2.3.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ ts-poet@npm:4.5.0: The remote archive doesn't match the expected checksum
➤ YN0018: │ ts-proto-descriptors@npm:1.2.1: The remote archive doesn't match the expected checksum
➤ YN0018: │ typescript@patch:typescript@npm%3A4.2.4#builtin<compat/typescript>::version=4.2.4&hash=a45b0e: The remote archive doesn't match the expected checksum
➤ YN0018: │ typescript@npm:4.2.4: The remote archive doesn't match the expected checksum
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 0s 64ms

Are you able to just push the codegen changes to my branch?

@webmaster128
Copy link
Member

Do you have git-lfs installed? See "Checking out code" in https://github.com/cosmos/cosmjs/blob/main/HACKING.md#checking-out-code

@webmaster128
Copy link
Member

I'll add authz and feegrant in my own PR now based on your work and publish 0.3 with that.

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