Skip to content

Commit

Permalink
Docs for MsgPruneAcknowledgement (cosmos#5510)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Jan 10, 2024
1 parent f9b918f commit e7a2844
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/docs/01-ibc/06-channel-upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,37 @@ The application's `OnChanUpgradeRestore` callback method will be invoked.

It will then be possible to re-initiate an upgrade by sending a `MsgChannelOpenInit` message.

## Pruning Acknowledgements

Acknowledgements can be pruned by broadcasting the `MsgPruneAcknowledgements` message.

> Note: It is only possible to prune acknowledgements after a channel has been upgraded, so pruning will fail
> if the channel has not yet been upgraded.
```protobuf
// MsgPruneAcknowledgements defines the request type for the PruneAcknowledgements rpc.
message MsgPruneAcknowledgements {
option (cosmos.msg.v1.signer) = "signer";
option (gogoproto.goproto_getters) = false;
string port_id = 1;
string channel_id = 2;
uint64 limit = 3;
string signer = 4;
}
```

The `port_id` and `channel_id` specify the port and channel to act on, and the `limit` specifies the upper bound for the number
of acknowledgements and packet receipts to prune.

### CLI Usage

Acknowledgements can be pruned via the cli with the `prune-acknowledgements` command.

```bash
simd tx ibc channel prune-acknowledgements [port] [channel] [limit]
```

## IBC App Recommendations

IBC application callbacks should be primarily used to validate data fields and do compatibility checks.
Expand Down

0 comments on commit e7a2844

Please sign in to comment.