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

docs: Update upgrade docs #22105

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 72 additions & 6 deletions x/upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ the `Plan`, which targets a specific `Handler`, is persisted and scheduled. The
upgrade can be delayed or hastened by updating the `Plan.Height` in a new proposal.

```protobuf reference
https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/upgrade/v1beta1/tx.proto#L29-L41
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/upgrade/proto/cosmos/upgrade/v1beta1/tx.proto#L29-L40
```

#### Cancelling Upgrade Proposals
Expand All @@ -118,7 +118,7 @@ Of course this requires that the upgrade was known to be a bad idea well before
upgrade itself, to allow time for a vote.

```protobuf reference
https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/upgrade/v1beta1/tx.proto#L48-L57
https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/x/upgrade/proto/cosmos/upgrade/v1beta1/tx.proto#L47-L55
```

If such a possibility is desired, the upgrade height is to be
Expand Down Expand Up @@ -315,6 +315,28 @@ time: "0001-01-01T00:00:00Z"
upgraded_client_state: null
```

##### authority

The `authority` command allows users to query the address that is authorized to submit upgrade proposals.

```bash
simd query upgrade authority [flags]
```

This command returns the bech32-encoded address of the account that has the authority to submit upgrade proposals.

Example:

```bash
simd query upgrade authority
```

Example Output:

```bash
cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn
```

#### Transactions

The upgrade module supports the following transactions:
Expand All @@ -326,10 +348,10 @@ simd tx upgrade software-upgrade v2 --title="Test Proposal" --summary="testing"
--upgrade-info '{ "binaries": { "linux/amd64":"https://example.com/simd.zip?checksum=sha256:aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f" } }' --from cosmos1..
```

* `cancel-software-upgrade` - cancels a previously submitted upgrade proposal:
* `cancel-upgrade-proposal` - cancels a previously submitted upgrade proposal:

```bash
simd tx upgrade cancel-software-upgrade --title="Test Proposal" --summary="testing" --deposit="100000000stake" --from cosmos1..
simd tx upgrade cancel-upgrade-proposal --title="Test Proposal" --summary="testing" --deposit="100000000stake" --from cosmos1..
```

### REST
Expand Down Expand Up @@ -467,6 +489,28 @@ Example Output:
}
```

#### Authority

`Authority` queries the address that is authorized to submit upgrade proposals.

```bash
/cosmos/upgrade/v1beta1/authority
```

Example:

```bash
curl -X GET "http://localhost:1317/cosmos/upgrade/v1beta1/authority" -H "accept: application/json"
```

Example Output:

```json
{
"address": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
}
```

### gRPC

A user can query the `upgrade` module using gRPC endpoints.
Expand Down Expand Up @@ -507,7 +551,7 @@ cosmos.upgrade.v1beta1.Query/CurrentPlan
Example:

```bash
grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/CurrentPlan
grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/CurrentPlan
```

Example Output:
Expand All @@ -529,7 +573,7 @@ cosmos.upgrade.v1beta1.Query/ModuleVersions
Example:

```bash
grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/ModuleVersions
grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/ModuleVersions
```

Example Output:
Expand Down Expand Up @@ -605,6 +649,28 @@ Example Output:
}
```

#### Authority

`Authority` queries the address that is authorized to submit upgrade proposals.

```bash
cosmos.upgrade.v1beta1.Query/Authority
```

Example:

```bash
grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/Authority
```

Example Output:

```json
{
"address": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
}
```

## Resources

A list of (external) resources to learn more about the `x/upgrade` module.
Expand Down
Loading