cosmos/circuit
Table of Contents
cosmos/circuit/module/v1/module.proto
TopModule
Module is the config object of the circuit module.
| Field | Type | Label | Description |
| authority | string | authority defines the custom module authority. If not set, defaults to the governance module. |
cosmos/circuit/v1/query.proto
TopAccountResponse
AccountResponse is the response type for the Query/Account RPC method.
| Field | Type | Label | Description |
| permission | Permissions |
|
AccountsResponse
AccountsResponse is the response type for the Query/Accounts RPC method.
| Field | Type | Label | Description |
| accounts | GenesisAccountPermissions | repeated |
|
| pagination | cosmos.base.query.v1beta1.PageResponse | pagination defines the pagination in the response. |
DisabledListResponse
DisabledListResponse is the response type for the Query/DisabledList RPC method.
| Field | Type | Label | Description |
| disabled_list | string | repeated |
|
QueryAccountRequest
QueryAccountRequest is the request type for the Query/Account RPC method.
| Field | Type | Label | Description |
| address | string |
|
QueryAccountsRequest
QueryAccountsRequest is the request type for the Query/Accounts RPC method.
| Field | Type | Label | Description |
| pagination | cosmos.base.query.v1beta1.PageRequest | pagination defines an optional pagination for the request. |
QueryDisabledListRequest
QueryDisableListRequest is the request type for the Query/DisabledList RPC method.
Query
Query defines the circuit gRPC querier service.
| Method Name | Request Type | Response Type | Description |
| Account | QueryAccountRequest | AccountResponse | Account returns account permissions. |
| Accounts | QueryAccountsRequest | AccountsResponse | Account returns account permissions. |
| DisabledList | QueryDisabledListRequest | DisabledListResponse | DisabledList returns a list of disabled message urls |
Methods with HTTP bindings
| Method Name | Method | Pattern | Body |
| Account | GET | /cosmos/circuit/v1/accounts/{address} | |
| Accounts | GET | /cosmos/circuit/v1/accounts | |
| DisabledList | GET | /cosmos/circuit/v1/disable_list |
cosmos/circuit/v1/tx.proto
TopMsgAuthorizeCircuitBreaker
MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type.
| Field | Type | Label | Description |
| granter | string | granter is the granter of the circuit breaker permissions and must have LEVEL_SUPER_ADMIN. |
|
| grantee | string | grantee is the account authorized with the provided permissions. |
|
| permissions | Permissions | permissions are the circuit breaker permissions that the grantee receives. These will overwrite any existing permissions. LEVEL_NONE_UNSPECIFIED can be specified to revoke all permissions. |
MsgAuthorizeCircuitBreakerResponse
MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type.
| Field | Type | Label | Description |
| success | bool |
|
MsgResetCircuitBreaker
MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type.
| Field | Type | Label | Description |
| authority | string | authority is the account authorized to trip or reset the circuit breaker. |
|
| msg_type_urls | string | repeated | msg_type_urls specifies a list of Msg type URLs to resume processing. If it is left empty all Msg processing for type URLs that the account is authorized to trip will resume. |
MsgResetCircuitBreakerResponse
MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type.
| Field | Type | Label | Description |
| success | bool |
|
MsgTripCircuitBreaker
MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type.
| Field | Type | Label | Description |
| authority | string | authority is the account authorized to trip the circuit breaker. |
|
| msg_type_urls | string | repeated | msg_type_urls specifies a list of type URLs to immediately stop processing. IF IT IS LEFT EMPTY, ALL MSG PROCESSING WILL STOP IMMEDIATELY. This value is validated against the authority's permissions and if the authority does not have permissions to trip the specified msg type URLs (or all URLs), the operation will fail. |
MsgTripCircuitBreakerResponse
MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type.
| Field | Type | Label | Description |
| success | bool |
|
Msg
Msg defines the circuit Msg service.
| Method Name | Request Type | Response Type | Description |
| AuthorizeCircuitBreaker | MsgAuthorizeCircuitBreaker | MsgAuthorizeCircuitBreakerResponse | AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another account's circuit breaker permissions. |
| TripCircuitBreaker | MsgTripCircuitBreaker | MsgTripCircuitBreakerResponse | TripCircuitBreaker pauses processing of Msg's in the state machine. |
| ResetCircuitBreaker | MsgResetCircuitBreaker | MsgResetCircuitBreakerResponse | ResetCircuitBreaker resumes processing of Msg's in the state machine that have been been paused using TripCircuitBreaker. |
cosmos/circuit/v1/types.proto
TopGenesisAccountPermissions
GenesisAccountPermissions is the account permissions for the circuit breaker in genesis
| Field | Type | Label | Description |
| address | string |
|
|
| permissions | Permissions |
|
GenesisState
GenesisState is the state that must be provided at genesis.
| Field | Type | Label | Description |
| account_permissions | GenesisAccountPermissions | repeated |
|
| disabled_type_urls | string | repeated |
|
Permissions
Permissions are the permissions that an account has to trip
or reset the circuit breaker.
| Field | Type | Label | Description |
| level | Permissions.Level | level is the level of permissions granted to this account. |
|
| limit_type_urls | string | repeated | limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type URLs that the account can trip. It is an error to use limit_type_urls with a level other than LEVEL_SOME_MSGS. |
Permissions.Level
Level is the permission level.
| Name | Number | Description |
| LEVEL_NONE_UNSPECIFIED | 0 | LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit breaker permissions. |
| LEVEL_SOME_MSGS | 1 | LEVEL_SOME_MSGS indicates that the account will have permission to trip or reset the circuit breaker for some Msg type URLs. If this level is chosen, a non-empty list of Msg type URLs must be provided in limit_type_urls. |
| LEVEL_ALL_MSGS | 2 | LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit breaker for Msg's of all type URLs. |
| LEVEL_SUPER_ADMIN | 3 | LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker actions and can grant permissions to other accounts. |
Scalar Value Types
| .proto Type | Notes | Python Type |
| double | float | |
| float | float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int/long |
| uint32 | Uses variable-length encoding. | int/long |
| uint64 | Uses variable-length encoding. | int/long |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int/long |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | int |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | int/long |
| sfixed32 | Always four bytes. | int |
| sfixed64 | Always eight bytes. | int/long |
| bool | boolean | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | str/unicode |
| bytes | May contain any arbitrary sequence of bytes. | str |