> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cosmos.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Slashing

> gRPC queries and transaction messages defined by the slashing module in Cosmos SDK v0.55.

<Info>
  Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`.
</Info>

## Queries

A node exposes only the services its application registers:

* gRPC on port 9090
* REST on port 1317, if the method has an HTTP binding

Run `grpcurl -plaintext localhost:9090 list` to see what a node serves.

Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries).

Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes.

Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding.

### Params

Params queries the parameters of slashing module

|      |                                        |
| ---- | -------------------------------------- |
| gRPC | `cosmos.slashing.v1beta1.Query/Params` |
| REST | `GET /cosmos/slashing/v1beta1/params`  |

Request `QueryParamsRequest`:

This message has no fields.

Response `QueryParamsResponse`:

| Field    | Type                                        | Description |
| -------- | ------------------------------------------- | ----------- |
| `params` | [`Params`](#cosmos-slashing-v1beta1-params) |             |

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/Params
```

### SigningInfo

SigningInfo queries the signing info of given cons address

|      |                                                            |
| ---- | ---------------------------------------------------------- |
| gRPC | `cosmos.slashing.v1beta1.Query/SigningInfo`                |
| REST | `GET /cosmos/slashing/v1beta1/signing_infos/{consAddress}` |

Request `QuerySigningInfoRequest`:

| Field          | Type     | Description                                                                                     |
| -------------- | -------- | ----------------------------------------------------------------------------------------------- |
| `cons_address` | `string` | cons\_address is the address to query signing info of Encoded as cosmos.ConsensusAddressString. |

Response `QuerySigningInfoResponse`:

| Field              | Type                                                                    | Description                                                          |
| ------------------ | ----------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `val_signing_info` | [`ValidatorSigningInfo`](#cosmos-slashing-v1beta1-validatorsigninginfo) | val\_signing\_info is the signing info of requested val cons address |

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
grpcurl -plaintext -d '{"cons_address":"<string>"}' \
  localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfo
```

### SigningInfos

SigningInfos queries signing info of all validators

|      |                                              |
| ---- | -------------------------------------------- |
| gRPC | `cosmos.slashing.v1beta1.Query/SigningInfos` |
| REST | `GET /cosmos/slashing/v1beta1/signing_infos` |

Request `QuerySigningInfosRequest`:

| Field        | Type                                                    | Description |
| ------------ | ------------------------------------------------------- | ----------- |
| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) |             |

Response `QuerySigningInfosResponse`:

| Field        | Type                                                                       | Description                                |
| ------------ | -------------------------------------------------------------------------- | ------------------------------------------ |
| `info`       | [`ValidatorSigningInfo`](#cosmos-slashing-v1beta1-validatorsigninginfo)\[] | info is the signing info of all validators |
| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse)                  |                                            |

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \
  localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfos
```

## Transaction messages

These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into.

Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings).

* Handler: Generated client method
* Signer: Account that must sign
* Amino name: Legacy identifier used by hardware wallets and other Amino signers

### Unjail

Unjail defines a method for unjailing a jailed validator, thus returning them into the bonded validator set, so they can begin receiving provisions and rewards again.

|            |                                      |
| ---------- | ------------------------------------ |
| Type URL   | `/cosmos.slashing.v1beta1.MsgUnjail` |
| Handler    | `cosmos.slashing.v1beta1.Msg/Unjail` |
| Signer     | `validator_addr`                     |
| Amino name | `cosmos-sdk/MsgUnjail`               |

| Field            | Type     | Description                               |
| ---------------- | -------- | ----------------------------------------- |
| `validator_addr` | `string` | Encoded as cosmos.ValidatorAddressString. |

In a transaction:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "@type": "/cosmos.slashing.v1beta1.MsgUnjail",
  "validator_addr": "<string>"
}
```

Response `MsgUnjailResponse`:

This message has no fields.

### UpdateParams

UpdateParams defines a governance operation for updating the x/slashing module parameters. The authority defaults to the x/gov module account.

|            |                                            |
| ---------- | ------------------------------------------ |
| Type URL   | `/cosmos.slashing.v1beta1.MsgUpdateParams` |
| Handler    | `cosmos.slashing.v1beta1.Msg/UpdateParams` |
| Signer     | `authority`                                |
| Amino name | `cosmos-sdk/x/slashing/MsgUpdateParams`    |

<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note>

| Field       | Type                                        | Description                                                                                                                |
| ----------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `authority` | `string`                                    | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. |
| `params`    | [`Params`](#cosmos-slashing-v1beta1-params) | params defines the x/slashing parameters to update. NOTE: All parameters must be supplied.                                 |

In a transaction:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "@type": "/cosmos.slashing.v1beta1.MsgUpdateParams",
  "authority": "<string>",
  "params": {
    "signed_blocks_window": "1",
    "min_signed_per_window": "0.05",
    "downtime_jail_duration": "0s",
    "slash_fraction_double_sign": "0.05",
    "slash_fraction_downtime": "0.05"
  }
}
```

Response `MsgUpdateParamsResponse`:

This message has no fields.

## Types

Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field.

### cosmos.base.query.v1beta1.PageRequest

PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex:

`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }`

| Field         | Type     | Description                                                                                                                                                                                                                          |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `key`         | `bytes`  | key is a value returned in PageResponse.next\_key to begin querying the next page most efficiently. Only one of offset or key should be set.                                                                                         |
| `offset`      | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.                                                                                   |
| `limit`       | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.                                                                                              |
| `count_total` | `bool`   | count\_total is set to true  to indicate that the result set should include a count of the total number of items available for pagination in UIs. count\_total is only respected when offset is used. It is ignored when key is set. |
| `reverse`     | `bool`   | reverse is set to true if results are to be returned in the descending order.                                                                                                                                                        |

### cosmos.base.query.v1beta1.PageResponse

PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest.

`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }`

| Field      | Type     | Description                                                                                                                                  |
| ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `next_key` | `bytes`  | next\_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. |
| `total`    | `uint64` | total is total number of results available if PageRequest.count\_total was set, its value is undefined otherwise                             |

### cosmos.slashing.v1beta1.Params

Params represents the parameters used for by the slashing module.

| Field                        | Type       | Description                                                                                |
| ---------------------------- | ---------- | ------------------------------------------------------------------------------------------ |
| `signed_blocks_window`       | `int64`    |                                                                                            |
| `min_signed_per_window`      | `bytes`    | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. |
| `downtime_jail_duration`     | `Duration` |                                                                                            |
| `slash_fraction_double_sign` | `bytes`    | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. |
| `slash_fraction_downtime`    | `bytes`    | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. |

### cosmos.slashing.v1beta1.ValidatorSigningInfo

ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity.

| Field                   | Type        | Description                                                                                                                                                                                                                  |
| ----------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `address`               | `string`    | Encoded as cosmos.ConsensusAddressString.                                                                                                                                                                                    |
| `start_height`          | `int64`     | Height at which validator was first a candidate OR was un-jailed                                                                                                                                                             |
| `index_offset`          | `int64`     | Index which is incremented every time a validator is bonded in a block and *may* have signed a pre-commit or not. This in conjunction with the signed\_blocks\_window param determines the index in the missed block bitmap. |
| `jailed_until`          | `Timestamp` | Timestamp until which the validator is jailed due to liveness downtime.                                                                                                                                                      |
| `tombstoned`            | `bool`      | Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior.                                                  |
| `missed_blocks_counter` | `int64`     | A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap.                                                                                                                     |
