Skip to content

Commit

Permalink
Merge branch 'main' into bez/11582-chain-config-query
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 10, 2022
2 parents 07d7e6f + 214b11d commit 3c31faf
Show file tree
Hide file tree
Showing 76 changed files with 963 additions and 403 deletions.
2 changes: 1 addition & 1 deletion UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ The protos can as well be downloaded using `buf export buf.build/cosmos/cosmos-s

Cosmos message protobufs should be extended with `cosmos.msg.v1.signer`:

```proto
```protobuf
message MsgSetWithdrawAddress {
option (cosmos.msg.v1.signer) = "delegator_address"; ++
Expand Down
2 changes: 1 addition & 1 deletion client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/spf13/pflag v1.0.5
google.golang.org/grpc v1.50.0
google.golang.org/protobuf v1.28.1
gotest.tools/v3 v3.3.0
gotest.tools/v3 v3.4.0
)

require (
Expand Down
5 changes: 2 additions & 3 deletions client/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down Expand Up @@ -67,6 +66,6 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
2 changes: 1 addition & 1 deletion core/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
cosmossdk.io/depinject v1.0.0-alpha.3
github.com/cosmos/cosmos-proto v1.0.0-alpha7
google.golang.org/protobuf v1.28.1
gotest.tools/v3 v3.3.0
gotest.tools/v3 v3.4.0
sigs.k8s.io/yaml v1.3.0
)

Expand Down
5 changes: 2 additions & 3 deletions core/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
Expand Down Expand Up @@ -79,8 +78,8 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
pgregory.net/rapid v0.5.2 h1:zC+jmuzcz5yJvG/igG06aLx8kcGmZY435NcuyhblKjY=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
Expand Down
2 changes: 1 addition & 1 deletion depinject/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/regen-network/gocuke v0.6.2
github.com/stretchr/testify v1.8.0
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e
gotest.tools/v3 v3.3.0
gotest.tools/v3 v3.4.0
)

require (
Expand Down
5 changes: 2 additions & 3 deletions depinject/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oE
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Expand Down Expand Up @@ -81,7 +80,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M=
pgregory.net/rapid v0.5.3/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
8 changes: 4 additions & 4 deletions docs/architecture/adr-020-protobuf-transaction-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ compatibility.
In order to facilitate signing, transactions are separated into `TxBody`,
which will be re-used by `SignDoc` below, and `signatures`:

```proto
```protobuf
// types/types.proto
package cosmos_sdk.v1;
Expand Down Expand Up @@ -190,7 +190,7 @@ the wire. This has the advantages of:
Signatures are structured using the `SignDoc` below which reuses the serialization of
`TxBody` and `AuthInfo` and only adds the fields which are needed for signatures:

```proto
```protobuf
// types/types.proto
message SignDoc {
// A protobuf serialization of a TxBody that matches the representation in TxRaw.
Expand Down Expand Up @@ -295,7 +295,7 @@ The following public keys are implemented: secp256k1, secp256r1, ed25519 and leg

Ex:

```proto
```protobuf
message PubKey {
bytes key = 1;
}
Expand Down Expand Up @@ -408,7 +408,7 @@ To generate a signature in `SIGN_MODE_DIRECT_AUX` these steps would be followed:
1. Encode `SignDocAux` (with the same requirement that fields must be serialized
in order):

```proto
```protobuf
// types/types.proto
message SignDocAux {
bytes body_bytes = 1;
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/adr-021-protobuf-query-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ custom ABCI queries and even reuse a substantial amount of the GRPC infrastructu

Each module with custom queries should define a service canonically named `Query`:

```proto
```protobuf
// x/bank/types/types.proto
service Query {
Expand All @@ -54,7 +54,7 @@ from also providing app-level queries that return use the app-level `oneof`s.

A hypothetical example for the `gov` module would look something like:

```proto
```protobuf
// x/gov/types/types.proto
import "google/protobuf/any.proto";
Expand Down Expand Up @@ -159,7 +159,7 @@ translates REST calls into GRPC calls using special annotations on service
methods. Modules that want to expose REST queries should add `google.api.http`
annotations to their `rpc` methods as in this example below.

```proto
```protobuf
// x/bank/types/types.proto
service Query {
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/adr-028-public-key-addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ For new multisig public keys, we define the `typ` parameter not based on any enc

Example:

```proto
```protobuf
package cosmos.crypto.multisig;
message PubKey {
Expand Down Expand Up @@ -231,7 +231,7 @@ Since all Cosmos SDK account types are serialized in the state, we propose to us

Example: all public key types have a unique protobuf message type similar to:

```proto
```protobuf
package cosmos.crypto.sr25519;
message PubKey {
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/adr-029-fee-grant-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type FeeAllowanceI {

Two basic fee allowance types, `BasicAllowance` and `PeriodicAllowance` are defined to support known use cases:

```proto
```protobuf
// BasicAllowance implements FeeAllowanceI with a one-time grant of tokens
// that optionally expires. The delegatee can use up to SpendLimit to cover fees.
message BasicAllowance {
Expand Down Expand Up @@ -98,7 +98,7 @@ message PeriodicAllowance {

Allowances can be granted and revoked using `MsgGrantAllowance` and `MsgRevokeAllowance`:

```proto
```protobuf
// MsgGrantAllowance adds permission for Grantee to spend up to Allowance
// of fees from the account of Granter.
message MsgGrantAllowance {
Expand All @@ -116,7 +116,7 @@ message MsgGrantAllowance {

In order to use allowances in transactions, we add a new field `granter` to the transaction `Fee` type:

```proto
```protobuf
package cosmos.tx.v1beta1;
message Fee {
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/adr-030-authz-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ the field will be `nil`.

### `Msg` Service

```proto
```protobuf
service Msg {
// Grant grants the provided authorization to the grantee on the granter's
// account with the provided expiration time.
Expand Down Expand Up @@ -216,7 +216,7 @@ This CLI command will send a `MsgRevoke` transaction.

#### `SendAuthorization`

```proto
```protobuf
// SendAuthorization allows the grantee to spend up to spend_limit coins from
// the granter's account.
message SendAuthorization {
Expand All @@ -226,7 +226,7 @@ message SendAuthorization {

#### `GenericAuthorization`

```proto
```protobuf
// GenericAuthorization gives the grantee unrestricted permissions to execute
// the provided method on behalf of the granter's account.
message GenericAuthorization {
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-031-msg-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ the code generated by them as a replacement for `Msg` handlers.
Below we define how this will look for the `SubmitProposal` message from `x/gov` module.
We start with a `Msg` `service` definition:

```proto
```protobuf
package cosmos.gov;
service Msg {
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-036-arbitrary-signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ It's applications developers decision how `Data` should be treated, by treated w

Proto definition:

```proto
```protobuf
// MsgSignData defines an arbitrary, general-purpose, off-chain message
message MsgSignData {
// Signer is the sdk.AccAddress of the message signer
Expand Down
10 changes: 5 additions & 5 deletions docs/architecture/adr-042-group-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Group members can create proposals and vote on them through group accounts using
It has an `admin` account which can manage members in the group, update the group
metadata and set a new admin.

```proto
```protobuf
message GroupInfo {
// group_id is the unique ID of this group.
Expand All @@ -63,7 +63,7 @@ message GroupInfo {
}
```

```proto
```protobuf
message GroupMember {
// group_id is the unique ID of the group.
Expand Down Expand Up @@ -102,7 +102,7 @@ and then to create separate group accounts with different decision policies
and delegate the desired permissions from the master account to
those "sub-accounts" using the [`x/authz` module](adr-030-authz-module.md).

```proto
```protobuf
message GroupAccountInfo {
// address is the group account address.
Expand Down Expand Up @@ -167,7 +167,7 @@ A threshold decision policy defines a minimum support votes (_yes_), based on a
of voter weights, for a proposal to pass. For
this decision policy, abstain and veto are treated as no support (_no_).

```proto
```protobuf
message ThresholdDecisionPolicy {
// threshold is the minimum weighted sum of support votes for a proposal to succeed.
Expand All @@ -191,7 +191,7 @@ Internally, a proposal also tracks:
* its `Result`: unfinalized, accepted or rejected
* its `VoteState` in the form of a `Tally`, which is calculated on new votes and when executing the proposal.

```proto
```protobuf
// Tally represents the sum of weighted votes.
message Tally {
option (gogoproto.goproto_getters) = false;
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-043-nft-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (m msgServer) Send(ctx context.Context, msg *types.MsgSend) (*types.MsgSend

The query service methods for the `x/nft` module are:

```proto
```protobuf
service Query {
// Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-049-state-sync-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ snapshot and the restoration. Each module could have mutiple snapshotters, and f
implement `ExtensionSnapshotter` as extension snapshotters. When setting up the application, the snapshot `Manager` should call
`RegisterExtensions([]ExtensionSnapshotter…)` to register all the extension snapshotters.

```proto
```protobuf
// SnapshotItem is an item contained in a rootmulti.Store snapshot.
// On top of the exsiting SnapshotStoreItem and SnapshotIAVLItem, we add two new options for the item.
message SnapshotItem {
Expand Down
8 changes: 4 additions & 4 deletions docs/architecture/adr-050-sign-mode-textual-annex1.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ where:

Given the proto definition:

```proto
```protobuf
message AllowedMsgAllowance {
repeated string allowed_messages = 1;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ End of Allowed messages

Given the following Protobuf messages:

```proto
```protobuf
enum VoteOption {
VOTE_OPTION_UNSPECIFIED = 0;
VOTE_OPTION_YES = 1;
Expand Down Expand Up @@ -268,7 +268,7 @@ Strings are rendered as-is.

#### Example

```proto
```protobuf
message TestData {
string signer = 1;
string metadata = 2;
Expand Down Expand Up @@ -298,7 +298,7 @@ _This paragraph is in the Annex for informational purposes only, and will be rem
- all protobuf messages to be used with `SIGN_MODE_TEXTUAL` CAN have a short title associated with them that can be used in format strings whenever the type URL is explicitly referenced via the `cosmos.msg.v1.textual.msg_title` Protobuf message option.
- if this option is not specified for a Msg, then the Protobuf fully qualified name will be used.

```proto
```protobuf
message MsgSend {
option (cosmos.msg.v1.textual.msg_title) = "bank send coins";
}
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/adr-050-sign-mode-textual.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In an effort to remove Amino from the SDK, a new sign mode needs to be created f

We propose to have SIGN_MODE_TEXTUAL’s signing payload `SignDocTextual` to be an array of strings, encoded as a `\n`-delimited string (see point #9). Each string corresponds to one "screen" on the hardware wallet device, with no (or little) additional formatting done by the hardware wallet itself.

```proto
```protobuf
message SignDocTextual {
repeated string screens = 1;
}
Expand Down Expand Up @@ -136,7 +136,7 @@ End of transaction messages

Given the following Protobuf message:

```proto
```protobuf
message Grant {
google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"];
google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
Expand Down Expand Up @@ -167,7 +167,7 @@ Application developers may choose to not follow default renderer value output fo

This is done by setting the `cosmos.msg.v1.textual.expert_custom_renderer` Protobuf option to a non-empty string. This option CAN ONLY be set on a Protobuf message representing transaction message object (implementing `sdk.Msg` interface).

```proto
```protobuf
message MsgFooBar {
// Optional comments to describe in human-readable language the formatting
// rules of the custom renderer.
Expand Down
Loading

0 comments on commit 3c31faf

Please sign in to comment.