The slashing module is responsible for validator punishment mechanisms, or disincentivizing any attributable action by a protocol-recognized actor with value at stake by penalizing them (“slashing”). Penalties may include, but are not limited to:

  • burning some amount of their stake
  • removing their ability to vote on future blocks for a period of time

For more information, visit https://docs.cosmos.network/main/modules/slashing/

Message Types

Msg defines the slashing Msg service.

tx.proto
service Msg {
  // 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.
  rpc Unjail(MsgUnjail) returns (MsgUnjailResponse);
}

MsgUnjail

MsgUnjail defines the Msg/Unjail request type.

tx.proto
message MsgUnjail {
  option (cosmos.msg.v1.signer) = "validator_addr";

  option (gogoproto.goproto_getters)  = false;
  option (gogoproto.goproto_stringer) = true;

  string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "address"];
}

MsgUnjailResponse

MsgUnjailResponse defines the Msg/Unjail response type.

tx.proto
message MsgUnjailResponse {}

Queries

Query provides defines the gRPC querier service.

query.proto
service Query {
  // Params queries the parameters of slashing module
  rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
    option (google.api.http).get = "/cosmos/slashing/v1beta1/params";
  }

  // SigningInfo queries the signing info of given cons address
  rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) {
    option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}";
  }

  // SigningInfos queries signing info of all validators
  rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) {
    option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos";
  }
}

QueryParamsRequest

QueryParamsRequest is the request type for the Query/Params RPC method.

query.proto
message QueryParamsRequest {}

QueryParamsResponse

QueryParamsResponse is the response type for the Query/Params RPC method.

query.proto
message QueryParamsResponse {
  Params params = 1 [(gogoproto.nullable) = false];
}

QuerySigningInfoRequest

QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC method.

query.proto
message QuerySigningInfoRequest {
  // cons_address is the address to query signing info of
  string cons_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

QuerySigningInfoResponse

QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC method.

query.proto
message QuerySigningInfoResponse {
  // val_signing_info is the signing info of requested val cons address
  ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false];
}

QuerySigningInfosRequest

QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC method.

query.proto
message QuerySigningInfosRequest {
  cosmos.base.query.v1beta1.PageRequest pagination = 1;
}

QuerySigningInfosResponse

QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC method.

query.proto
message QuerySigningInfosResponse {
  // info is the signing info of all validators
  repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info       = 1 [(gogoproto.nullable) = false];
  cosmos.base.query.v1beta1.PageResponse                pagination = 2;
}