diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eab83a4..76e46262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,9 +53,11 @@ check of rewards - [#404](https://github.com/babylonlabs-io/babylon/pull/404) Improve adaptor signature nonce generation to match reference implementation - [#413](https://github.com/babylonlabs-io/babylon/pull/413) Fix adaptor -signature R verification +signature R verification` - [#441](https://github.com/babylonlabs-io/babylon/pull/441) Fix fuzzing test for `CreateBTCDelegationWithParamsFromBtcHeight` +- [#443](https://github.com/babylonlabs-io/babylon/pull/443) Fix swagger generation for incentive missing +`v1` in path ## v1.0.0-rc3 diff --git a/client/docs/config.json b/client/docs/config.json index fcd9415c..b2faef4a 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -59,12 +59,14 @@ "url": "./tmp-swagger-gen/babylon/btcstkconsumer/v1/query.swagger.json", "operationIds": { "rename": { - "Params": "BtcStkConsumerParams" + "Params": "BtcStkConsumerParams", + "FinalityProviders": "FinalityProvidersConsumer", + "FinalityProvider": "FinalityProviderConsumer" } } }, { - "url": "./tmp-swagger-gen/babylon/incentive/v1/query.swagger.json", + "url": "./tmp-swagger-gen/babylon/incentive/query.swagger.json", "operationIds": { "rename": { "Params": "IncentiveParams" diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 14e5a9e8..7206053f 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -9817,1057 +9817,10284 @@ paths: type: boolean tags: - Query -definitions: - babylon.btccheckpoint.v1.BTCCheckpointInfoResponse: - type: object - properties: - epoch_number: - type: string - format: uint64 - description: EpochNumber of this checkpoint. - best_submission_btc_block_height: - type: integer - format: int64 - title: btc height of the best submission of the epoch - best_submission_btc_block_hash: - type: string - title: >- - hash of the btc block which determines checkpoint btc block height - i.e. + /babylon/btcstkconsumer/v1/consumer_registry_list: + get: + summary: >- + ConsumerRegistryList queries the list of consumers that are registered + to Babylon + operationId: ConsumerRegistryList + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consumer_ids: + type: array + items: + type: string + title: >- + consumer_ids are IDs of the consumers in ascending + alphabetical order + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - youngest block of best submission Hexadecimal - best_submission_transactions: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: the BTC checkpoint transactions of the best submission - best_submission_vigilante_address_list: - type: array - items: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to BTC, - extracted from + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the - the checkpoint itself. - reporter: - type: string - title: >- - reporter is the address of the reporter who reported the - submissions, + corresponding request message has used PageRequest. - calculated from submission message MsgInsertBTCSpvProof itself - title: >- - CheckpointAddressesResponse contains the addresses of the submitter - and reporter of a + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QueryConsumerRegistryListResponse is response type for the + Query/ConsumerRegistryList RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - given checkpoint - title: list of vigilantes' addresses of the best submission - description: >- - BTCCheckpointInfoResponse contains all data about best submission of - checkpoint for + protocol buffer message. This string must contain at + least - given epoch. Best submission is the submission which is deeper in btc - ledger. - babylon.btccheckpoint.v1.CheckpointAddressesResponse: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to BTC, extracted - from + one "/" character. The last segment of the URL's path + must represent - the checkpoint itself. - reporter: - type: string - title: |- - reporter is the address of the reporter who reported the submissions, - calculated from submission message MsgInsertBTCSpvProof itself - title: >- - CheckpointAddressesResponse contains the addresses of the submitter and - reporter of a + the fully qualified name of the type (as in - given checkpoint - babylon.btccheckpoint.v1.Params: - type: object - properties: - btc_confirmation_depth: - type: integer - format: int64 - title: >- - btc_confirmation_depth is the confirmation depth in BTC. + `path/google.protobuf.Duration`). The name should be in + a canonical form - A block is considered irreversible only when it is at least k-deep in - BTC + (e.g., leading "." is not accepted). - (k in research paper) - checkpoint_finalization_timeout: - type: integer - format: int64 - title: >- - checkpoint_finalization_timeout is the maximum time window (measured - in BTC - blocks) between a checkpoint + In practice, teams usually precompile into the binary + all types that they - - being submitted to BTC, and + expect it to use in the context of Any. However, for + URLs which use the - - being reported back to BBN + scheme `http`, `https`, or no scheme, one can optionally + set up a type - If a checkpoint has not been reported back within w BTC blocks, then - BBN + server that maps type URLs to message definitions as + follows: - has dishonest majority and is stalling checkpoints (w in research - paper) - checkpoint_tag: - type: string - title: >- - 4byte tag in hex format, required to be present in the OP_RETURN - transaction - related to babylon - description: Params defines the parameters for the module. - babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse: - type: object - properties: - info: - type: object - properties: - epoch_number: - type: string - format: uint64 - description: EpochNumber of this checkpoint. - best_submission_btc_block_height: - type: integer - format: int64 - title: btc height of the best submission of the epoch - best_submission_btc_block_hash: - type: string - title: >- - hash of the btc block which determines checkpoint btc block height - i.e. + * If no scheme is provided, `https` is assumed. - youngest block of best submission Hexadecimal - best_submission_transactions: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: the BTC checkpoint transactions of the best submission - best_submission_vigilante_address_list: - type: array - items: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to BTC, - extracted from + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - the checkpoint itself. - reporter: - type: string - title: >- - reporter is the address of the reporter who reported the - submissions, + Note: this functionality is not currently available in + the official - calculated from submission message MsgInsertBTCSpvProof - itself - title: >- - CheckpointAddressesResponse contains the addresses of the - submitter and reporter of a + protobuf release, and it is not used for type URLs + beginning with - given checkpoint - title: list of vigilantes' addresses of the best submission - description: >- - BTCCheckpointInfoResponse contains all data about best submission of - checkpoint for + type.googleapis.com. - given epoch. Best submission is the submission which is deeper in btc - ledger. - title: |- - QueryBtcCheckpointInfoResponse is response type for the - Query/BtcCheckpointInfo RPC method - babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse: - type: object - properties: - info_list: - type: array - items: - type: object - properties: - epoch_number: - type: string - format: uint64 - description: EpochNumber of this checkpoint. - best_submission_btc_block_height: - type: integer - format: int64 - title: btc height of the best submission of the epoch - best_submission_btc_block_hash: - type: string - title: >- - hash of the btc block which determines checkpoint btc block - height i.e. - youngest block of best submission Hexadecimal - best_submission_transactions: - type: array - items: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the - position in `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - title: the BTC checkpoint transactions of the best submission - best_submission_vigilante_address_list: - type: array - items: - type: object - properties: - submitter: - type: string - description: >- - submitter is the address of the checkpoint submitter to - BTC, extracted from + Schemes other than `http`, `https` (or the empty scheme) + might be - the checkpoint itself. - reporter: - type: string - title: >- - reporter is the address of the reporter who reported the - submissions, + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - calculated from submission message MsgInsertBTCSpvProof - itself - title: >- - CheckpointAddressesResponse contains the addresses of the - submitter and reporter of a + URL that describes the type of the serialized message. - given checkpoint - title: list of vigilantes' addresses of the best submission - description: >- - BTCCheckpointInfoResponse contains all data about best submission of - checkpoint for - given epoch. Best submission is the submission which is deeper in - btc ledger. - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + Protobuf library provides support to pack/unpack Any values + in the form - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + of utility functions or additional generated methods of the + Any type. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryBtcCheckpointsInfoResponse is response type for the - Query/BtcCheckpointsInfo RPC method - babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse: - type: object - properties: - keys: - type: array - items: - type: object - properties: - first_tx_block_hash: - type: string - description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. - first_tx_index: - type: integer - format: int64 - second_tx_block_hash: - type: string - description: SecondBlockHash is the BTCHeaderHashBytes in hex. - second_tx_index: - type: integer - format: int64 - title: >- - SubmissionKeyResponse Checkpoint can be composed from multiple - transactions, - so to identify whole submission we need list of transaction keys. + Example 1: Pack and unpack a message in C++. - Each submission can generally be identified by this list of (txIdx, + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - blockHash) tuples. Note: this could possibly be optimized as if - transactions + Example 2: Pack and unpack a message in Java. - were in one block they would have the same block hash and different - indexes, + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } - but each blockhash is only 33 (1 byte for prefix encoding and 32 - byte hash), + Example 3: Pack and unpack a message in Python. - so there should be other strong arguments for this optimization - description: Keys All submissions transactions key saved during an epoch. - title: |- - QueryEpochSubmissionsResponse defines a response to get all submissions in - given epoch (QueryEpochSubmissionsRequest) - babylon.btccheckpoint.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - btc_confirmation_depth: - type: integer - format: int64 - title: >- - btc_confirmation_depth is the confirmation depth in BTC. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - A block is considered irreversible only when it is at least k-deep - in BTC + Example 4: Pack and unpack a message in Go - (k in research paper) - checkpoint_finalization_timeout: - type: integer - format: int64 - title: >- - checkpoint_finalization_timeout is the maximum time window - (measured in BTC + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - blocks) between a checkpoint + The pack methods provided by protobuf library will by + default use - - being submitted to BTC, and - - - being reported back to BBN - - If a checkpoint has not been reported back within w BTC blocks, - then BBN - - has dishonest majority and is stalling checkpoints (w in research - paper) - checkpoint_tag: - type: string - title: >- - 4byte tag in hex format, required to be present in the OP_RETURN - transaction + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - related to babylon - description: QueryParamsResponse is response type for the Query/Params RPC method. - babylon.btccheckpoint.v1.SubmissionKeyResponse: - type: object - properties: - first_tx_block_hash: - type: string - description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. - first_tx_index: - type: integer - format: int64 - second_tx_block_hash: - type: string - description: SecondBlockHash is the BTCHeaderHashBytes in hex. - second_tx_index: - type: integer - format: int64 - title: >- - SubmissionKeyResponse Checkpoint can be composed from multiple - transactions, + methods only use the fully qualified type name after the + last '/' - so to identify whole submission we need list of transaction keys. + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - Each submission can generally be identified by this list of (txIdx, + name "y.z". - blockHash) tuples. Note: this could possibly be optimized as if - transactions - were in one block they would have the same block hash and different - indexes, + JSON - but each blockhash is only 33 (1 byte for prefix encoding and 32 byte - hash), - so there should be other strong arguments for this optimization - babylon.btccheckpoint.v1.TransactionInfoResponse: - type: object - properties: - index: - type: integer - format: int64 - description: Index Bitcoin Transaction index in block. - hash: - type: string - description: Hash BTC Header hash as hex. - transaction: - type: string - description: transaction is the full transaction data as str hex. - proof: - type: string - title: >- - proof is the Merkle proof that this tx is included in the position in - `key` - title: |- - TransactionInfoResponse is the info of a tx on Bitcoin, - including - - the position of the tx on BTC blockchain - - the full tx content - - the Merkle proof that this tx is on the above position - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - description: |- - 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: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. + The JSON representation of an `Any` value uses the regular - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - description: >- - count_total is set to true to indicate that the result set should - include + representation of the deserialized, embedded message, with + an - a count of the total number of items available for pagination in UIs. + additional field `@type` which contains the type URL. + Example: - count_total is only respected when offset is used. It is ignored when - key + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - is set. - reverse: - type: boolean - description: >- - reverse is set to true if results are to be returned in the descending - order. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + If the embedded message type is well-known and has a custom + JSON - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: |- - total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + representation, that representation will be embedded adding + a field - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - google.protobuf.Any: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + `value` which holds the custom JSON in addition to the + `@type` - protocol buffer message. This string must contain at least + field. Example (for message [google.protobuf.Duration][]): - one "/" character. The last segment of the URL's path must represent + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - the fully qualified name of the type (as in + It is less efficient than using key. Only one of offset or key + should - `path/google.protobuf.Duration`). The name should be in a canonical - form + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - (e.g., leading "." is not accepted). + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. - In practice, teams usually precompile into the binary all types that - they + count_total is only respected when offset is used. It is ignored + when key - expect it to use in the context of Any. However, for URLs which use - the + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - scheme `http`, `https`, or no scheme, one can optionally set up a type - server that maps type URLs to message definitions as follows: + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /babylon/btcstkconsumer/v1/consumers_registry/{consumer_ids}: + get: + summary: >- + ConsumersRegistry queries the latest info for a given list of consumers + in Babylon's view + operationId: ConsumersRegistry + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consumers_register: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: >- + consumer_id is the ID of the consumer + - for Cosmos SDK chains, the consumer ID will be the IBC + client ID - * If no scheme is provided, `https` is assumed. + - for ETH L2 chains, the consumer ID will be the chain + ID of the ETH L2 + chain + consumer_name: + type: string + title: consumer_name is the name of the consumer + consumer_description: + type: string + title: >- + consumer_description is a description for the consumer + (can be empty) + cosmos_consumer_metadata: + type: object + properties: + channel_id: + type: string + title: >- + channel_id defines the IBC channel ID for the + consumer chain + title: >- + CosmosConsumerMetadata is the metadata for the Cosmos + integration + eth_l2_consumer_metadata: + type: object + properties: + finality_contract_address: + type: string + title: >- + finality_contract_address is the address of the + finality contract for - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + the ETH L2 integration + title: >- + ETHL2ConsumerMetadata is the metadata for the ETH L2 + integration + title: >- + ConsumerRegister is the registration information of a + consumer + description: >- + QueryConsumersRegistryResponse is response type for the + Query/ConsumersRegistry RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - Note: this functionality is not currently available in the official + protocol buffer message. This string must contain at + least - protobuf release, and it is not used for type URLs beginning with + one "/" character. The last segment of the URL's path + must represent - type.googleapis.com. + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form - Schemes other than `http`, `https` (or the empty scheme) might be + (e.g., leading "." is not accepted). - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a - URL that describes the type of the serialized message. + In practice, teams usually precompile into the binary + all types that they + expect it to use in the context of Any. However, for + URLs which use the - Protobuf library provides support to pack/unpack Any values in the form + scheme `http`, `https`, or no scheme, one can optionally + set up a type - of utility functions or additional generated methods of the Any type. + server that maps type URLs to message definitions as + follows: - Example 1: Pack and unpack a message in C++. + * If no scheme is provided, `https` is assumed. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Example 2: Pack and unpack a message in Java. + Note: this functionality is not currently available in + the official - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } + protobuf release, and it is not used for type URLs + beginning with - Example 3: Pack and unpack a message in Python. + type.googleapis.com. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Schemes other than `http`, `https` (or the empty scheme) + might be - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - The pack methods provided by protobuf library will by default use + URL that describes the type of the serialized message. - 'type.googleapis.com/full.type.name' as the type URL and the unpack - methods only use the fully qualified type name after the last '/' + Protobuf library provides support to pack/unpack Any values + in the form - in the type URL, for example "foo.bar.com/x/y.z" will yield type + of utility functions or additional generated methods of the + Any type. - name "y.z". + Example 1: Pack and unpack a message in C++. - JSON + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + Example 2: Pack and unpack a message in Java. - The JSON representation of an `Any` value uses the regular + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } - representation of the deserialized, embedded message, with an + Example 3: Pack and unpack a message in Python. - additional field `@type` which contains the type URL. Example: + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Example 4: Pack and unpack a message in Go - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - If the embedded message type is well-known and has a custom JSON + The pack methods provided by protobuf library will by + default use - representation, that representation will be embedded adding a field + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - `value` which holds the custom JSON in addition to the `@type` + methods only use the fully qualified type name after the + last '/' - field. Example (for message [google.protobuf.Duration][]): + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - grpc.gateway.runtime.Error: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized + name "y.z". - protocol buffer message. This string must contain at least - one "/" character. The last segment of the URL's path must - represent + JSON - the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in a - canonical form + The JSON representation of an `Any` value uses the regular - (e.g., leading "." is not accepted). + representation of the deserialized, embedded message, with + an + additional field `@type` which contains the type URL. + Example: - In practice, teams usually precompile into the binary all types - that they + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - expect it to use in the context of Any. However, for URLs which - use the + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - scheme `http`, `https`, or no scheme, one can optionally set up - a type + If the embedded message type is well-known and has a custom + JSON - server that maps type URLs to message definitions as follows: + representation, that representation will be embedded adding + a field + `value` which holds the custom JSON in addition to the + `@type` - * If no scheme is provided, `https` is assumed. + field. Example (for message [google.protobuf.Duration][]): - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_ids + in: path + required: true + type: array + items: + type: string + collectionFormat: csv + minItems: 1 + tags: + - Query + /babylon/btcstkconsumer/v1/finality_provider/{consumer_id}/{fp_btc_pk_hex}: + get: + summary: FinalityProvider info about one finality provider + operationId: FinalityProviderConsumer + responses: + '200': + description: A successful response. + schema: + type: object + properties: + finality_provider: + title: finality_provider contains the FinalityProvider + type: object + properties: + description: + description: >- + description defines the description terms for the finality + provider. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: >- + commission defines the commission rate of the finality + provider. + addr: + type: string + title: >- + babylon_pk is the Babylon secp256k1 PK of this finality + provider + btc_pk: + type: string + format: byte + title: >- + btc_pk is the Bitcoin secp256k1 PK of this finality + provider - Note: this functionality is not currently available in the - official + the PK follows encoding in BIP-340 spec + pop: + title: pop is the proof of possession of babylon_pk and btc_pk + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the + BIP-340 encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) - protobuf release, and it is not used for type URLs beginning - with + the signature follows encoding in either BIP-340 spec + or BIP-322 spec + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of this finality provider + at the given height + consumer_id: + type: string + title: >- + consumer_id is the consumer id this finality provider is + registered to + description: >- + FinalityProviderResponse defines a finality provider with + voting power information. + title: >- + QueryFinalityProviderResponse contains information about a + finality provider + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - type.googleapis.com. + protocol buffer message. This string must contain at + least + one "/" character. The last segment of the URL's path + must represent - Schemes other than `http`, `https` (or the empty scheme) might - be + the fully qualified name of the type (as in - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a + `path/google.protobuf.Duration`). The name should be in + a canonical form - URL that describes the type of the serialized message. + (e.g., leading "." is not accepted). - Protobuf library provides support to pack/unpack Any values in the - form + In practice, teams usually precompile into the binary + all types that they - of utility functions or additional generated methods of the Any - type. + expect it to use in the context of Any. However, for + URLs which use the + scheme `http`, `https`, or no scheme, one can optionally + set up a type - Example 1: Pack and unpack a message in C++. + server that maps type URLs to message definitions as + follows: - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + * If no scheme is provided, `https` is assumed. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - // or ... - if (any.isSameTypeAs(Foo.getDefaultInstance())) { - foo = any.unpack(Foo.getDefaultInstance()); - } + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Example 3: Pack and unpack a message in Python. + Note: this functionality is not currently available in + the official - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + protobuf release, and it is not used for type URLs + beginning with - Example 4: Pack and unpack a message in Go + type.googleapis.com. - foo := &pb.Foo{...} - any, err := anypb.New(foo) - if err != nil { - ... - } - ... - foo := &pb.Foo{} - if err := any.UnmarshalTo(foo); err != nil { - ... - } - The pack methods provided by protobuf library will by default use + Schemes other than `http`, `https` (or the empty scheme) + might be - 'type.googleapis.com/full.type.name' as the type URL and the unpack + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - methods only use the fully qualified type name after the last '/' + URL that describes the type of the serialized message. - in the type URL, for example "foo.bar.com/x/y.z" will yield type - name "y.z". + Protobuf library provides support to pack/unpack Any values + in the form + of utility functions or additional generated methods of the + Any type. - JSON + Example 1: Pack and unpack a message in C++. - The JSON representation of an `Any` value uses the regular + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - representation of the deserialized, embedded message, with an + Example 2: Pack and unpack a message in Java. - additional field `@type` which contains the type URL. Example: + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + Example 3: Pack and unpack a message in Python. - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - If the embedded message type is well-known and has a custom JSON + Example 4: Pack and unpack a message in Go - representation, that representation will be embedded adding a field + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } - `value` which holds the custom JSON in addition to the `@type` + The pack methods provided by protobuf library will by + default use - field. Example (for message [google.protobuf.Duration][]): + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - babylon.btclightclient.v1.BTCHeaderInfoResponse: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: integer - format: int64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a + methods only use the fully qualified type name after the + last '/' - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - babylon.btclightclient.v1.Params: - type: object - properties: - insert_headers_allow_list: - type: array - items: - type: string - title: >- - List of addresses which are allowed to insert headers to btc light - client + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - if the list is empty, any address can insert headers - description: Params defines the parameters for the module. - babylon.btclightclient.v1.QueryBaseHeaderResponse: - type: object - properties: - header: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: integer - format: int64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a + name "y.z". - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - description: |- - QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC - method. - babylon.btclightclient.v1.QueryContainsBytesResponse: - type: object - properties: - contains: - type: boolean - description: >- - QueryContainsResponse is response type for the temporary - Query/ContainsBytes - RPC method. - babylon.btclightclient.v1.QueryContainsResponse: - type: object - properties: - contains: - type: boolean - description: QueryContainsResponse is response type for the Query/Contains RPC method. - babylon.btclightclient.v1.QueryHashesResponse: - type: object - properties: - hashes: - type: array - items: - type: string - format: byte - pagination: - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + JSON - was set, its value is undefined otherwise - description: |- - 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; - } - description: QueryHashesResponse is response type for the Query/Hashes RPC method. - babylon.btclightclient.v1.QueryHeaderDepthResponse: - type: object - properties: - depth: - type: integer - format: int64 - title: >- - QueryMainChainDepthResponse is the response type for the - Query/MainChainDepth RPC + The JSON representation of an `Any` value uses the regular - it contains depth of the block in main chain - babylon.btclightclient.v1.QueryMainChainResponse: - type: object - properties: - headers: - type: array - items: - type: object - properties: - header_hex: - type: string - hash_hex: - type: string - height: - type: integer - format: int64 - work: - type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a + representation of the deserialized, embedded message, with + an - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - pagination: - type: object - properties: - next_key: + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_id + description: >- + consumer id is the consumer id this finality provider is registered + to + in: path + required: true + type: string + - name: fp_btc_pk_hex + description: >- + fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality + provider + in: path + required: true + type: string + tags: + - Query + /babylon/btcstkconsumer/v1/finality_provider_consumer/{fp_btc_pk_hex}: + get: + summary: FinalityProviderConsumer info about one finality provider's consumer id + operationId: FinalityProviderConsumer + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consumer_id: + type: string + title: >- + QueryFinalityProviderConsumerResponse returns the CZ finality + provier consumer id + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: fp_btc_pk_hex + description: >- + fp_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the finality + provider + in: path + required: true + type: string + tags: + - Query + /babylon/btcstkconsumer/v1/finality_providers/{consumer_id}: + get: + summary: FinalityProviders queries all finality providers for a given consumer + operationId: FinalityProvidersConsumer + responses: + '200': + description: A successful response. + schema: + type: object + properties: + finality_providers: + type: array + items: + type: object + properties: + description: + description: >- + description defines the description terms for the + finality provider. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: >- + commission defines the commission rate of the finality + provider. + addr: + type: string + title: >- + babylon_pk is the Babylon secp256k1 PK of this finality + provider + btc_pk: + type: string + format: byte + title: >- + btc_pk is the Bitcoin secp256k1 PK of this finality + provider + + the PK follows encoding in BIP-340 spec + pop: + title: pop is the proof of possession of babylon_pk and btc_pk + type: object + properties: + btc_sig_type: + title: >- + btc_sig_type indicates the type of btc_sig in the + pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the + BIP-340 encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) + + the signature follows encoding in either BIP-340 + spec or BIP-322 spec + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of this finality + provider at the given height + consumer_id: + type: string + title: >- + consumer_id is the consumer id this finality provider is + registered to + description: >- + FinalityProviderResponse defines a finality provider with + voting power information. + title: finality_providers contains all the finality providers + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryFinalityProvidersResponse is the response type for the + Query/FinalityProviders RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_id + in: path + required: true + type: string + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /babylon/btcstkconsumer/v1/params: + get: + summary: Parameters queries the parameters of the module. + operationId: BtcStkConsumerParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + permissioned_integration: + type: boolean + description: >- + permissioned_integration is a flag to enable permissioned + integration, i.e., + + requiring governance proposal to approve new integrations. + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query + /babylon/incentive/address/{address}/reward_gauge: + get: + summary: RewardGauge queries the reward gauge of a given stakeholder address + operationId: RewardGauges + responses: + '200': + description: A successful response. + schema: + type: object + properties: + reward_gauges: + type: object + additionalProperties: + type: object + properties: + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + title: |- + coins are coins that have been in the gauge + Can have multiple coin denoms + withdrawn_coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + title: >- + withdrawn_coins are coins that have been withdrawn by + the stakeholder already + title: >- + RewardGaugesResponse is an object that stores rewards + distributed to a BTC staking stakeholder + title: >- + reward_gauges is the map of reward gauges, where key is the + stakeholder type + + and value is the reward gauge holding all rewards for the + stakeholder in that type + description: >- + QueryRewardGaugesResponse is response type for the + Query/RewardGauges RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: address + description: address is the address of the stakeholder in bech32 string + in: path + required: true + type: string + tags: + - Query + /babylon/incentive/btc_staking_gauge/{height}: + get: + summary: BTCStakingGauge queries the BTC staking gauge of a given height + operationId: BTCStakingGauge + responses: + '200': + description: A successful response. + schema: + type: object + properties: + gauge: + title: gauge is the BTC staking gauge at the queried height + type: object + properties: + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + title: |- + coins that have been in the gauge + can have multiple coin denoms + description: >- + BTCStakingGaugeResponse is response type for the + Query/BTCStakingGauge RPC method. + description: >- + QueryBTCStakingGaugeResponse is response type for the + Query/BTCStakingGauge RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: height + description: height is the queried Babylon height + in: path + required: true + type: string + format: uint64 + tags: + - Query + /babylon/incentive/delegators/{delegator_address}/withdraw_address: + get: + summary: DelegatorWithdrawAddress queries withdraw address of a delegator. + operationId: DelegatorWithdrawAddress + responses: + '200': + description: A successful response. + schema: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /babylon/incentive/params: + get: + summary: Parameters queries the parameters of the module. + operationId: IncentiveParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + btc_staking_portion: + type: string + title: >- + btc_staking_portion is the portion of rewards that goes to + Finality Providers/delegations + + NOTE: the portion of each Finality Provider/delegation is + calculated by using its voting + + power and finality provider's commission + title: >- + Params defines the parameters for the module, including + portions of rewards + + distributed to each type of stakeholder. Note that sum of the + portions should + + be strictly less than 1 so that the rest will go to Comet + validators/delegations + + adapted from + https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/proto/cosmos/distribution/v1beta1/distribution.proto + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /babylon/zoneconcierge/v1/chain_info/{consumer_id}/header/{height}: + get: + summary: Header queries the CZ header and fork headers at a given height. + operationId: Header + responses: + '200': + description: A successful response. + schema: + type: object + properties: + header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the header + on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides + the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + fork_headers: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes + this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the + same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same + height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a valid + quorum + + certificate. Such forks exist since Babylon considers CZs + might have + + dishonest majority. Also note that the IBC-Go implementation + will only + + consider the first header in a fork valid, since the + subsequent headers + + cannot be verified without knowing the validator set in the + previous header. + description: >- + QueryHeaderResponse is response type for the Query/Header RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_id + in: path + required: true + type: string + - name: height + in: path + required: true + type: string + format: uint64 + tags: + - Query + /babylon/zoneconcierge/v1/chains: + get: + summary: ChainList queries the list of chains that checkpoint to Babylon + operationId: ChainList + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consumer_ids: + type: array + items: + type: string + title: >- + consumer_ids are IDs of the chains in ascending alphabetical + order + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + 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; + } + title: >- + QueryChainListResponse is response type for the Query/ChainList + RPC method + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /babylon/zoneconcierge/v1/chains_info: + get: + summary: >- + ChainsInfo queries the latest info for a given list of chains in + Babylon's view + operationId: ChainsInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + chains_info: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes + this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ + ledger + + (hash, height) jointly provides the position + of the header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ + ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon + block that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the + babylon block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on + Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that + includes this header + + (babylon_block_height, babylon_tx_hash) + jointly provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers + at the same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the + same height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in + struct `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a + valid quorum + + certificate. Such forks exist since Babylon considers + CZs might have + + dishonest majority. Also note that the IBC-Go + implementation will only + + consider the first header in a fork valid, since the + subsequent headers + + cannot be verified without knowing the validator set in + the previous header. + title: >- + latest_forks is the latest forks, formed as a series of + IndexedHeader (from + + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: >- + timestamped_headers_count is the number of timestamped + headers in CZ's + + canonical chain + title: ChainInfo is the information of a CZ + description: >- + QueryChainsInfoResponse is response type for the Query/ChainsInfo + RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_ids + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Query + /babylon/zoneconcierge/v1/epoch_chains_info: + get: + summary: |- + EpochChainsInfo queries the latest info for a list of chains + in a given epoch in Babylon's view + operationId: EpochChainsInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + chains_info: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes + this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ + ledger + + (hash, height) jointly provides the position + of the header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ + ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon + block that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the + babylon block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on + Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that + includes this header + + (babylon_block_height, babylon_tx_hash) + jointly provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers + at the same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the + same height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in + struct `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a + valid quorum + + certificate. Such forks exist since Babylon considers + CZs might have + + dishonest majority. Also note that the IBC-Go + implementation will only + + consider the first header in a fork valid, since the + subsequent headers + + cannot be verified without knowing the validator set in + the previous header. + title: >- + latest_forks is the latest forks, formed as a series of + IndexedHeader (from + + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: >- + timestamped_headers_count is the number of timestamped + headers in CZ's + + canonical chain + title: ChainInfo is the information of a CZ + title: chain_info is the info of the CZ + description: >- + QueryEpochChainsInfoResponse is response type for the + Query/EpochChainsInfo RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: epoch_num + in: query + required: false + type: string + format: uint64 + - name: consumer_ids + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + tags: + - Query + /babylon/zoneconcierge/v1/finalized_chain_info/{consumer_id}/height/{height}: + get: + summary: >- + FinalizedChainInfoUntilHeight queries the BTC-finalised info no later + than + + the provided CZ height, with proofs + operationId: FinalizedChainInfoUntilHeight + responses: + '200': + description: A successful response. + schema: + type: object + properties: + finalized_chain_info: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes + this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of + the header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ + ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon + block that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the + babylon block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on + Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that + includes this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at + the same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the + same height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in + struct `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a + valid quorum + + certificate. Such forks exist since Babylon considers CZs + might have + + dishonest majority. Also note that the IBC-Go + implementation will only + + consider the first header in a fork valid, since the + subsequent headers + + cannot be verified without knowing the validator set in + the previous header. + title: >- + latest_forks is the latest forks, formed as a series of + IndexedHeader (from + + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: >- + timestamped_headers_count is the number of timestamped + headers in CZ's + + canonical chain + title: ChainInfo is the information of a CZ + epoch_info: + title: epoch_info is the metadata of the last BTC-finalised epoch + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: >- + current_epoch_interval is the epoch interval at the time + of this epoch + first_block_height: + type: string + format: uint64 + title: >- + first_block_height is the height of the first block in + this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this + epoch. + + Babylon needs to remember the last header's time of each + epoch to complete + + unbonding validators/delegations when a previous epoch's + checkpoint is + + finalised. The last_block_time field is nil in the epoch's + beginning, and + + is set upon the end of this epoch. + sealer_app_hash: + type: string + format: byte + title: >- + sealer is the last block of the sealed epoch + + sealer_app_hash points to the sealer but stored in the 1st + header + + of the next epoch + sealer_block_hash: + type: string + format: byte + title: >- + sealer_block_hash is the hash of the sealer + + the validator set has generated a BLS multisig on the + hash, + + i.e., hash of the last block in the epoch + raw_checkpoint: + title: raw_checkpoint is the raw checkpoint of this epoch + type: object + properties: + epoch_num: + type: string + format: uint64 + title: >- + epoch_num defines the epoch number the raw checkpoint is + for + block_hash: + type: string + format: byte + title: >- + block_hash defines the 'BlockID.Hash', which is the hash + of + + the block that individual BLS sigs are signed on + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of + the BLS multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated + from individual BLS + + sigs + btc_submission_key: + title: >- + btc_submission_key is position of two BTC txs that include the + raw + + checkpoint of this epoch + type: object + properties: + key: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified by + hash of block in + + which transaction was included and transaction index in + the block + proof: + title: proof is the proof that the chain info is finalized + type: object + properties: + proof_cz_header_in_epoch: + title: >- + proof_cz_header_in_epoch is the proof that the CZ header + is timestamped + + within a certain epoch + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating + Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_sealed: + title: proof_epoch_sealed is the proof that the epoch is sealed + type: object + properties: + validator_set: + type: array + items: + type: object + properties: + validator_address: + type: string + title: >- + validator_address is the address of the + validator + bls_pub_key: + type: string + format: byte + title: >- + bls_pub_key is the BLS public key of the + validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the + validator at the given epoch + title: >- + ValidatorWithBlsKey couples validator address, + voting power, and its bls + + public key + title: >- + validator_set is the validator set of the sealed epoch + + This validator set has generated a BLS multisig on + `app_hash` of + + the sealer header + proof_epoch_info: + title: >- + proof_epoch_info is the Merkle proof that the epoch's + metadata is committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for + calculating Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_val_set: + title: >- + proof_epoch_info is the Merkle proof that the epoch's + validator set is + + committed to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for + calculating Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_submitted: + type: array + items: + type: object + properties: + key: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be + identified by hash of block in + + which transaction was included and transaction index + in the block + description: >- + key is the position (txIdx, blockHash) of this tx on + BTC blockchain + + Although it is already a part of SubmissionKey, we + store it here again + + to make TransactionInfo self-contained. + + For example, storing the key allows TransactionInfo + to not relay on + + the fact that TransactionInfo will be ordered in the + same order as + + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is included + in the position in `key` + + TODO: maybe it could use here better format as we + already processed and + + validated the proof? + title: |- + TransactionInfo is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: >- + proof_epoch_submitted is the proof that the epoch's + checkpoint is included + + in BTC ledger It is the two TransactionInfo in the best + (i.e., earliest) + + checkpoint submission + description: >- + QueryFinalizedChainInfoUntilHeightResponse is response type for + the + + Query/FinalizedChainInfoUntilHeight RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_id + description: consumer_id is the ID of the CZ + in: path + required: true + type: string + - name: height + description: >- + height is the height of the CZ chain + + such that the returned finalised chain info will be no later than + this + + height + in: path + required: true + type: string + format: uint64 + - name: prove + description: >- + prove indicates whether the querier wants to get proofs of this + timestamp. + in: query + required: false + type: boolean + tags: + - Query + /babylon/zoneconcierge/v1/finalized_chains_info: + get: + summary: >- + FinalizedChainsInfo queries the BTC-finalised info of chains with given + IDs, with proofs + operationId: FinalizedChainsInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + finalized_chains_info: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + finalized_chain_info: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of + the header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ + ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon + block that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the + babylon block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on + Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that + includes this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: >- + consumer_id is the unique ID of the + consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ + ledger + + (hash, height) jointly provides the + position of the header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ + ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the + babylon block that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the + babylon block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header + on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that + includes this header + + (babylon_block_height, babylon_tx_hash) + jointly provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed + headers at the same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at + the same height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is + in struct `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should + have a valid quorum + + certificate. Such forks exist since Babylon + considers CZs might have + + dishonest majority. Also note that the IBC-Go + implementation will only + + consider the first header in a fork valid, since the + subsequent headers + + cannot be verified without knowing the validator set + in the previous header. + title: >- + latest_forks is the latest forks, formed as a series + of IndexedHeader (from + + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: >- + timestamped_headers_count is the number of + timestamped headers in CZ's + + canonical chain + title: ChainInfo is the information of a CZ + epoch_info: + title: >- + epoch_info is the metadata of the last BTC-finalised + epoch + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: >- + current_epoch_interval is the epoch interval at the + time of this epoch + first_block_height: + type: string + format: uint64 + title: >- + first_block_height is the height of the first block + in this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in + this epoch. + + Babylon needs to remember the last header's time of + each epoch to complete + + unbonding validators/delegations when a previous + epoch's checkpoint is + + finalised. The last_block_time field is nil in the + epoch's beginning, and + + is set upon the end of this epoch. + sealer_app_hash: + type: string + format: byte + title: >- + sealer is the last block of the sealed epoch + + sealer_app_hash points to the sealer but stored in + the 1st header + + of the next epoch + sealer_block_hash: + type: string + format: byte + title: >- + sealer_block_hash is the hash of the sealer + + the validator set has generated a BLS multisig on + the hash, + + i.e., hash of the last block in the epoch + raw_checkpoint: + title: raw_checkpoint is the raw checkpoint of this epoch + type: object + properties: + epoch_num: + type: string + format: uint64 + title: >- + epoch_num defines the epoch number the raw + checkpoint is for + block_hash: + type: string + format: byte + title: >- + block_hash defines the 'BlockID.Hash', which is the + hash of + + the block that individual BLS sigs are signed on + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers + of the BLS multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is + aggregated from individual BLS + + sigs + btc_submission_key: + title: >- + btc_submission_key is position of two BTC txs that + include the raw + + checkpoint of this epoch + type: object + properties: + key: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be + identified by hash of block in + + which transaction was included and transaction + index in the block + proof: + title: proof is the proof that the chain info is finalized + type: object + properties: + proof_cz_header_in_epoch: + title: >- + proof_cz_header_in_epoch is the proof that the CZ + header is timestamped + + within a certain epoch + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for + calculating Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_sealed: + title: >- + proof_epoch_sealed is the proof that the epoch is + sealed + type: object + properties: + validator_set: + type: array + items: + type: object + properties: + validator_address: + type: string + title: >- + validator_address is the address of the + validator + bls_pub_key: + type: string + format: byte + title: >- + bls_pub_key is the BLS public key of the + validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the + validator at the given epoch + title: >- + ValidatorWithBlsKey couples validator address, + voting power, and its bls + + public key + title: >- + validator_set is the validator set of the sealed + epoch + + This validator set has generated a BLS multisig + on `app_hash` of + + the sealer header + proof_epoch_info: + title: >- + proof_epoch_info is the Merkle proof that the + epoch's metadata is committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for + calculating Merkle root + + The data could be arbitrary format, + providing nessecary data + + for example neighbouring node hash + proof_epoch_val_set: + title: >- + proof_epoch_info is the Merkle proof that the + epoch's validator set is + + committed to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for + calculating Merkle root + + The data could be arbitrary format, + providing nessecary data + + for example neighbouring node hash + proof_epoch_submitted: + type: array + items: + type: object + properties: + key: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be + identified by hash of block in + + which transaction was included and transaction + index in the block + description: >- + key is the position (txIdx, blockHash) of this + tx on BTC blockchain + + Although it is already a part of + SubmissionKey, we store it here again + + to make TransactionInfo self-contained. + + For example, storing the key allows + TransactionInfo to not relay on + + the fact that TransactionInfo will be ordered + in the same order as + + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is + included in the position in `key` + + TODO: maybe it could use here better format as + we already processed and + + validated the proof? + title: >- + TransactionInfo is the info of a tx on Bitcoin, + + including + + - the position of the tx on BTC blockchain + + - the full tx content + + - the Merkle proof that this tx is on the above + position + title: >- + proof_epoch_submitted is the proof that the epoch's + checkpoint is included + + in BTC ledger It is the two TransactionInfo in the + best (i.e., earliest) + + checkpoint submission + title: >- + FinalizedChainInfo is the information of a CZ that is + BTC-finalised + description: |- + QueryFinalizedChainsInfoResponse is response type for the + Query/FinalizedChainsInfo RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_ids + description: consumer_ids is the list of ids of CZs. + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: prove + description: >- + prove indicates whether the querier wants to get proofs of this + timestamp. + in: query + required: false + type: boolean + tags: + - Query + /babylon/zoneconcierge/v1/headers/{consumer_id}: + get: + summary: |- + ListHeaders queries the headers of a chain in Babylon's view, with + pagination support + operationId: ListHeaders + responses: + '200': + description: A successful response. + schema: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides + the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: headers is the list of headers + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + 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; + } + description: >- + QueryListHeadersResponse is response type for the + Query/ListHeaders RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_id + in: path + required: true + type: string + - name: pagination.key + description: |- + 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. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + 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. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + 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. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /babylon/zoneconcierge/v1/headers/{consumer_id}/epochs/{epoch_num}: + get: + summary: |- + ListEpochHeaders queries the headers of a chain timestamped in a given + epoch of Babylon, with pagination support + operationId: ListEpochHeaders + responses: + '200': + description: A successful response. + schema: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides + the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: headers is the list of headers + description: >- + QueryListEpochHeadersResponse is response type for the + Query/ListEpochHeaders + + RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: consumer_id + in: path + required: true + type: string + - name: epoch_num + in: path + required: true + type: string + format: uint64 + tags: + - Query + /babylon/zoneconcierge/v1/params: + get: + summary: Params queries the parameters of the module. + operationId: ZoneConciergeParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + ibc_packet_timeout_seconds: + type: integer + format: int64 + title: >- + ibc_packet_timeout_seconds is the time period after which + an unrelayed + + IBC packet becomes timeout, measured in seconds + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - Query +definitions: + babylon.btccheckpoint.v1.BTCCheckpointInfoResponse: + type: object + properties: + epoch_number: + type: string + format: uint64 + description: EpochNumber of this checkpoint. + best_submission_btc_block_height: + type: integer + format: int64 + title: btc height of the best submission of the epoch + best_submission_btc_block_hash: + type: string + title: >- + hash of the btc block which determines checkpoint btc block height + i.e. + + youngest block of best submission Hexadecimal + best_submission_transactions: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: the BTC checkpoint transactions of the best submission + best_submission_vigilante_address_list: + type: array + items: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to BTC, + extracted from + + the checkpoint itself. + reporter: + type: string + title: >- + reporter is the address of the reporter who reported the + submissions, + + calculated from submission message MsgInsertBTCSpvProof itself + title: >- + CheckpointAddressesResponse contains the addresses of the submitter + and reporter of a + + given checkpoint + title: list of vigilantes' addresses of the best submission + description: >- + BTCCheckpointInfoResponse contains all data about best submission of + checkpoint for + + given epoch. Best submission is the submission which is deeper in btc + ledger. + babylon.btccheckpoint.v1.CheckpointAddressesResponse: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to BTC, extracted + from + + the checkpoint itself. + reporter: + type: string + title: |- + reporter is the address of the reporter who reported the submissions, + calculated from submission message MsgInsertBTCSpvProof itself + title: >- + CheckpointAddressesResponse contains the addresses of the submitter and + reporter of a + + given checkpoint + babylon.btccheckpoint.v1.Params: + type: object + properties: + btc_confirmation_depth: + type: integer + format: int64 + title: >- + btc_confirmation_depth is the confirmation depth in BTC. + + A block is considered irreversible only when it is at least k-deep in + BTC + + (k in research paper) + checkpoint_finalization_timeout: + type: integer + format: int64 + title: >- + checkpoint_finalization_timeout is the maximum time window (measured + in BTC + + blocks) between a checkpoint + + - being submitted to BTC, and + + - being reported back to BBN + + If a checkpoint has not been reported back within w BTC blocks, then + BBN + + has dishonest majority and is stalling checkpoints (w in research + paper) + checkpoint_tag: + type: string + title: >- + 4byte tag in hex format, required to be present in the OP_RETURN + transaction + + related to babylon + description: Params defines the parameters for the module. + babylon.btccheckpoint.v1.QueryBtcCheckpointInfoResponse: + type: object + properties: + info: + type: object + properties: + epoch_number: + type: string + format: uint64 + description: EpochNumber of this checkpoint. + best_submission_btc_block_height: + type: integer + format: int64 + title: btc height of the best submission of the epoch + best_submission_btc_block_hash: + type: string + title: >- + hash of the btc block which determines checkpoint btc block height + i.e. + + youngest block of best submission Hexadecimal + best_submission_transactions: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: the BTC checkpoint transactions of the best submission + best_submission_vigilante_address_list: + type: array + items: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to BTC, + extracted from + + the checkpoint itself. + reporter: + type: string + title: >- + reporter is the address of the reporter who reported the + submissions, + + calculated from submission message MsgInsertBTCSpvProof + itself + title: >- + CheckpointAddressesResponse contains the addresses of the + submitter and reporter of a + + given checkpoint + title: list of vigilantes' addresses of the best submission + description: >- + BTCCheckpointInfoResponse contains all data about best submission of + checkpoint for + + given epoch. Best submission is the submission which is deeper in btc + ledger. + title: |- + QueryBtcCheckpointInfoResponse is response type for the + Query/BtcCheckpointInfo RPC method + babylon.btccheckpoint.v1.QueryBtcCheckpointsInfoResponse: + type: object + properties: + info_list: + type: array + items: + type: object + properties: + epoch_number: + type: string + format: uint64 + description: EpochNumber of this checkpoint. + best_submission_btc_block_height: + type: integer + format: int64 + title: btc height of the best submission of the epoch + best_submission_btc_block_hash: + type: string + title: >- + hash of the btc block which determines checkpoint btc block + height i.e. + + youngest block of best submission Hexadecimal + best_submission_transactions: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: the BTC checkpoint transactions of the best submission + best_submission_vigilante_address_list: + type: array + items: + type: object + properties: + submitter: + type: string + description: >- + submitter is the address of the checkpoint submitter to + BTC, extracted from + + the checkpoint itself. + reporter: + type: string + title: >- + reporter is the address of the reporter who reported the + submissions, + + calculated from submission message MsgInsertBTCSpvProof + itself + title: >- + CheckpointAddressesResponse contains the addresses of the + submitter and reporter of a + + given checkpoint + title: list of vigilantes' addresses of the best submission + description: >- + BTCCheckpointInfoResponse contains all data about best submission of + checkpoint for + + given epoch. Best submission is the submission which is deeper in + btc ledger. + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + title: |- + QueryBtcCheckpointsInfoResponse is response type for the + Query/BtcCheckpointsInfo RPC method + babylon.btccheckpoint.v1.QueryEpochSubmissionsResponse: + type: object + properties: + keys: + type: array + items: + type: object + properties: + first_tx_block_hash: + type: string + description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. + first_tx_index: + type: integer + format: int64 + second_tx_block_hash: + type: string + description: SecondBlockHash is the BTCHeaderHashBytes in hex. + second_tx_index: + type: integer + format: int64 + title: >- + SubmissionKeyResponse Checkpoint can be composed from multiple + transactions, + + so to identify whole submission we need list of transaction keys. + + Each submission can generally be identified by this list of (txIdx, + + blockHash) tuples. Note: this could possibly be optimized as if + transactions + + were in one block they would have the same block hash and different + indexes, + + but each blockhash is only 33 (1 byte for prefix encoding and 32 + byte hash), + + so there should be other strong arguments for this optimization + description: Keys All submissions transactions key saved during an epoch. + title: |- + QueryEpochSubmissionsResponse defines a response to get all submissions in + given epoch (QueryEpochSubmissionsRequest) + babylon.btccheckpoint.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + btc_confirmation_depth: + type: integer + format: int64 + title: >- + btc_confirmation_depth is the confirmation depth in BTC. + + A block is considered irreversible only when it is at least k-deep + in BTC + + (k in research paper) + checkpoint_finalization_timeout: + type: integer + format: int64 + title: >- + checkpoint_finalization_timeout is the maximum time window + (measured in BTC + + blocks) between a checkpoint + + - being submitted to BTC, and + + - being reported back to BBN + + If a checkpoint has not been reported back within w BTC blocks, + then BBN + + has dishonest majority and is stalling checkpoints (w in research + paper) + checkpoint_tag: + type: string + title: >- + 4byte tag in hex format, required to be present in the OP_RETURN + transaction + + related to babylon + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.btccheckpoint.v1.SubmissionKeyResponse: + type: object + properties: + first_tx_block_hash: + type: string + description: FirstTxBlockHash is the BTCHeaderHashBytes in hex. + first_tx_index: + type: integer + format: int64 + second_tx_block_hash: + type: string + description: SecondBlockHash is the BTCHeaderHashBytes in hex. + second_tx_index: + type: integer + format: int64 + title: >- + SubmissionKeyResponse Checkpoint can be composed from multiple + transactions, + + so to identify whole submission we need list of transaction keys. + + Each submission can generally be identified by this list of (txIdx, + + blockHash) tuples. Note: this could possibly be optimized as if + transactions + + were in one block they would have the same block hash and different + indexes, + + but each blockhash is only 33 (1 byte for prefix encoding and 32 byte + hash), + + so there should be other strong arguments for this optimization + babylon.btccheckpoint.v1.TransactionInfoResponse: + type: object + properties: + index: + type: integer + format: int64 + description: Index Bitcoin Transaction index in block. + hash: + type: string + description: Hash BTC Header hash as hex. + transaction: + type: string + description: transaction is the full transaction data as str hex. + proof: + type: string + title: >- + proof is the Merkle proof that this tx is included in the position in + `key` + title: |- + TransactionInfoResponse is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + description: |- + 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: + type: string + format: uint64 + description: >- + 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: + type: boolean + description: >- + 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: + type: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + 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; + } + google.protobuf.Any: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + grpc.gateway.runtime.Error: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + babylon.btclightclient.v1.BTCHeaderInfoResponse: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: integer + format: int64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a + + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + babylon.btclightclient.v1.Params: + type: object + properties: + insert_headers_allow_list: + type: array + items: + type: string + title: >- + List of addresses which are allowed to insert headers to btc light + client + + if the list is empty, any address can insert headers + description: Params defines the parameters for the module. + babylon.btclightclient.v1.QueryBaseHeaderResponse: + type: object + properties: + header: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: integer + format: int64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a + + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + description: |- + QueryBaseHeaderResponse is the response type for the Query/BaseHeader RPC + method. + babylon.btclightclient.v1.QueryContainsBytesResponse: + type: object + properties: + contains: + type: boolean + description: >- + QueryContainsResponse is response type for the temporary + Query/ContainsBytes + + RPC method. + babylon.btclightclient.v1.QueryContainsResponse: + type: object + properties: + contains: + type: boolean + description: QueryContainsResponse is response type for the Query/Contains RPC method. + babylon.btclightclient.v1.QueryHashesResponse: + type: object + properties: + hashes: + type: array + items: + type: string + format: byte + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + description: QueryHashesResponse is response type for the Query/Hashes RPC method. + babylon.btclightclient.v1.QueryHeaderDepthResponse: + type: object + properties: + depth: + type: integer + format: int64 + title: >- + QueryMainChainDepthResponse is the response type for the + Query/MainChainDepth RPC + + it contains depth of the block in main chain + babylon.btclightclient.v1.QueryMainChainResponse: + type: object + properties: + headers: + type: array + items: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: integer + format: int64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a + + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + description: >- + QueryMainChainResponse is response type for the Query/MainChain RPC + method. + babylon.btclightclient.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + insert_headers_allow_list: + type: array + items: + type: string + title: >- + List of addresses which are allowed to insert headers to btc light + client + + if the list is empty, any address can insert headers + description: QueryParamsResponse is the response type for the Query/Params RPC method. + babylon.btclightclient.v1.QueryTipResponse: + type: object + properties: + header: + type: object + properties: + header_hex: + type: string + hash_hex: + type: string + height: + type: integer + format: int64 + work: + type: string + description: Work is the sdkmath.Uint as string. + description: >- + BTCHeaderInfoResponse is a structure that contains all relevant + information about a + + BTC header response + - Full header as string hex. + - Header hash for easy retrieval as string hex. + - Height of the header in the BTC chain. + - Total work spent on the header. This is the sum of the work corresponding + to the header Bits field + and the total work of the header. + description: QueryTipResponse is the response type for the Query/Tip RPC method. + babylon.epoching.v1.BondState: + type: string + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: |- + - CREATED: CREATED is when the validator/delegation has been created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + babylon.epoching.v1.DelegationLifecycle: + type: object + properties: + del_addr: + type: string + del_life: + type: array + items: + type: object + properties: + state: + type: string + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: >- + - CREATED: CREATED is when the validator/delegation has been + created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + val_addr: + type: string + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + title: >- + DelegationStateUpdate is the message that records a state update of + a + + delegation + title: |- + ValidatorLifecycle is a message that records the lifecycle of + a delegation + babylon.epoching.v1.DelegationStateUpdate: + type: object + properties: + state: + type: string + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: |- + - CREATED: CREATED is when the validator/delegation has been created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + val_addr: + type: string + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + title: |- + DelegationStateUpdate is the message that records a state update of a + delegation + babylon.epoching.v1.EpochResponse: + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: current_epoch_interval is the epoch interval at the time of this epoch + first_block_height: + type: string + format: uint64 + title: first_block_height is the height of the first block in this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. + + Babylon needs to remember the last header's time of each epoch to + complete + + unbonding validators/delegations when a previous epoch's checkpoint is + + finalised. The last_block_time field is nil in the epoch's beginning, + and + + is set upon the end of this epoch. + sealer_app_hash_hex: + type: string + description: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch as hex string. + sealer_block_hash: + type: string + description: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch as hex string. + title: EpochResponse is a structure that contains the metadata of an epoch + babylon.epoching.v1.Params: + type: object + properties: + epoch_interval: + type: string + format: uint64 + title: epoch_interval is the number of consecutive blocks to form an epoch + description: Params defines the parameters for the module. + babylon.epoching.v1.QueryCurrentEpochResponse: + type: object + properties: + current_epoch: + type: string + format: uint64 + title: current_epoch is the current epoch number + epoch_boundary: + type: string + format: uint64 + title: epoch_boundary is the height of this epoch's last block + title: >- + QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch + RPC + + method + babylon.epoching.v1.QueryDelegationLifecycleResponse: + type: object + properties: + del_life: + type: object + properties: + del_addr: + type: string + del_life: + type: array + items: + type: object + properties: + state: + type: string + enum: + - CREATED + - BONDED + - UNBONDING + - UNBONDED + - REMOVED + default: CREATED + description: >- + - CREATED: CREATED is when the validator/delegation has been + created + - BONDED: CREATED is when the validator/delegation has become bonded + - UNBONDING: CREATED is when the validator/delegation has become unbonding + - UNBONDED: CREATED is when the validator/delegation has become unbonded + - REMOVED: CREATED is when the validator/delegation has been removed + title: BondState is the bond state of a validator or delegation + val_addr: + type: string + amount: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + title: >- + DelegationStateUpdate is the message that records a state update + of a + + delegation + title: |- + ValidatorLifecycle is a message that records the lifecycle of + a delegation + title: |- + QueryDelegationLifecycleRequest is the response type for the + Query/DelegationLifecycle RPC method + babylon.epoching.v1.QueryEpochInfoResponse: + type: object + properties: + epoch: + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: >- + current_epoch_interval is the epoch interval at the time of this + epoch + first_block_height: + type: string + format: uint64 + title: first_block_height is the height of the first block in this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. + + Babylon needs to remember the last header's time of each epoch to + complete + + unbonding validators/delegations when a previous epoch's + checkpoint is + + finalised. The last_block_time field is nil in the epoch's + beginning, and + + is set upon the end of this epoch. + sealer_app_hash_hex: + type: string + description: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch as hex string. + sealer_block_hash: + type: string + description: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch as hex string. + title: EpochResponse is a structure that contains the metadata of an epoch + title: QueryEpochInfoRequest is the response type for the Query/EpochInfo method + babylon.epoching.v1.QueryEpochMsgsResponse: + type: object + properties: + msgs: + type: array + items: + type: object + properties: + tx_id: + type: string + description: tx_id is the ID of the tx that contains the message as hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the marshaled + message as hex. + block_height: + type: string + format: uint64 + title: block_height is the height when this msg is submitted to Babylon + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp when this msg is submitted to + Babylon + msg: + type: string + description: >- + msg is the actual message that is sent by a user and is queued + by the + + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the validator set + and is delayed + + to the end of an epoch + title: msgs is the list of messages queued in the current epoch + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + title: |- + QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC + method + babylon.epoching.v1.QueryEpochValSetResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + addr: + type: string + format: byte + title: addr is the validator's address (in sdk.ValAddress) + power: + type: string + format: int64 + title: power is the validator's voting power + title: Validator is a message that denotes a validator + total_voting_power: + type: string + format: int64 + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + title: |- + QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC + method + babylon.epoching.v1.QueryEpochsInfoResponse: + type: object + properties: + epochs: + type: array + items: + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: >- + current_epoch_interval is the epoch interval at the time of this + epoch + first_block_height: + type: string + format: uint64 + title: >- + first_block_height is the height of the first block in this + epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. + + Babylon needs to remember the last header's time of each epoch + to complete + + unbonding validators/delegations when a previous epoch's + checkpoint is + + finalised. The last_block_time field is nil in the epoch's + beginning, and + + is set upon the end of this epoch. + sealer_app_hash_hex: + type: string + description: >- + sealer is the last block of the sealed epoch + + sealer_app_hash points to the sealer but stored in the 1st + header + + of the next epoch as hex string. + sealer_block_hash: + type: string + description: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch as hex string. + title: EpochResponse is a structure that contains the metadata of an epoch + pagination: + title: pagination defines the pagination in the response + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + title: >- + QueryEpochsInfoResponse is the response type for the Query/EpochInfos + method + babylon.epoching.v1.QueryLatestEpochMsgsResponse: + type: object + properties: + latest_epoch_msgs: + type: array + items: + type: object + properties: + epoch_number: + type: string + format: uint64 + msgs: + type: array + items: + type: object + properties: + tx_id: + type: string + description: >- + tx_id is the ID of the tx that contains the message as + hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the + marshaled message as hex. + block_height: + type: string + format: uint64 + title: >- + block_height is the height when this msg is submitted to + Babylon + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp when this msg is submitted to + Babylon + msg: + type: string + description: >- + msg is the actual message that is sent by a user and is + queued by the + + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the + validator set and is delayed + + to the end of an epoch + title: >- + QueuedMessageList is a message that contains a list of + staking-related + + messages queued for an epoch + title: |- + latest_epoch_msgs is a list of QueuedMessageList + each QueuedMessageList has a field identifying the epoch number + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + 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; + } + title: |- + QueryLatestEpochMsgsResponse is the response type for the + Query/LatestEpochMsgs RPC method + babylon.epoching.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + epoch_interval: + type: string + format: uint64 + title: >- + epoch_interval is the number of consecutive blocks to form an + epoch + description: QueryParamsResponse is the response type for the Query/Params RPC method. + babylon.epoching.v1.QueryValidatorLifecycleResponse: + type: object + properties: + val_addr: + type: string + val_life: + type: array + items: + type: object + properties: + state_desc: + type: string + description: StateDesc defines the descriptive state. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + description: >- + ValStateUpdateResponse is a message response that records a state + update of a validator. + title: |- + QueryValidatorLifecycleResponse is the response type for the + Query/ValidatorLifecycle RPC method + babylon.epoching.v1.QueuedMessageList: + type: object + properties: + epoch_number: + type: string + format: uint64 + msgs: + type: array + items: + type: object + properties: + tx_id: + type: string + description: tx_id is the ID of the tx that contains the message as hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the marshaled + message as hex. + block_height: + type: string + format: uint64 + title: block_height is the height when this msg is submitted to Babylon + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp when this msg is submitted to + Babylon + msg: + type: string + description: >- + msg is the actual message that is sent by a user and is queued + by the + + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the validator set + and is delayed + + to the end of an epoch + title: |- + QueuedMessageList is a message that contains a list of staking-related + messages queued for an epoch + babylon.epoching.v1.QueuedMessageResponse: + type: object + properties: + tx_id: + type: string + description: tx_id is the ID of the tx that contains the message as hex. + msg_id: + type: string + description: >- + msg_id is the original message ID, i.e., hash of the marshaled message + as hex. + block_height: + type: string + format: uint64 + title: block_height is the height when this msg is submitted to Babylon + block_time: + type: string + format: date-time + title: block_time is the timestamp when this msg is submitted to Babylon + msg: + type: string + description: |- + msg is the actual message that is sent by a user and is queued by the + epoching module as string. + title: >- + QueuedMessageResponse is a message that can change the validator set and + is delayed + + to the end of an epoch + babylon.epoching.v1.ValStateUpdateResponse: + type: object + properties: + state_desc: + type: string + description: StateDesc defines the descriptive state. + block_height: + type: string + format: uint64 + block_time: + type: string + format: date-time + description: >- + ValStateUpdateResponse is a message response that records a state update + of a validator. + babylon.epoching.v1.Validator: + type: object + properties: + addr: + type: string + format: byte + title: addr is the validator's address (in sdk.ValAddress) + power: + type: string + format: int64 + title: power is the validator's voting power + title: Validator is a message that denotes a validator + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + babylon.btcstaking.v1.BTCDelegationResponse: + type: object + properties: + staker_addr: + type: string + description: staker_addr is the address to receive rewards from BTC delegation. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this BTC delegation + the PK follows encoding in BIP-340 spec + fp_btc_pk_list: + type: array + items: + type: string + format: byte + title: >- + fp_btc_pk_list is the list of BIP-340 PKs of the finality providers + that + + this BTC delegation delegates to + staking_time: + type: integer + format: int64 + title: >- + staking_time is the number of blocks for which the delegation is + locked on BTC chain + start_height: + type: integer + format: int64 + title: |- + start_height is the start BTC height of the BTC delegation + it is the start BTC height of the timelock + end_height: + type: integer + format: int64 + title: |- + end_height is the end height of the BTC delegation + it is the end BTC height of the timelock - w + total_sat: + type: string + format: uint64 + title: |- + total_sat is the total amount of BTC stakes in this delegation + quantified in satoshi + staking_tx_hex: + type: string + title: staking_tx_hex is the hex string of staking tx + slashing_tx_hex: + type: string + title: slashing_tx_hex is the hex string of slashing tx + delegator_slash_sig_hex: + type: string + description: |- + delegator_slash_sig_hex is the signature on the slashing tx + by the delegator (i.e., SK corresponding to btc_pk) as string hex. + It will be a part of the witness for the staking tx output. + covenant_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as the + public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each encrypted by + a restaked BTC finality provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures signed by the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_sigs is a list of adaptor signatures on the slashing tx + by each covenant member + It will be a part of the witness for the staking tx output. + staking_output_idx: + type: integer + format: int64 + title: >- + staking_output_idx is the index of the staking output in the staking + tx + active: + type: boolean + title: whether this delegation is active + status_desc: + type: string + description: descriptive status of current delegation. + unbonding_time: + type: integer + format: int64 + title: >- + unbonding_time used in unbonding output timelock path and in slashing + transactions + + change outputs + undelegation_response: + description: undelegation_response is the undelegation info of this delegation. + type: object + properties: + unbonding_tx_hex: + type: string + description: >- + unbonding_tx is the transaction which will transfer the funds from + staking + + output to unbonding output. Unbonding output will usually have + lower timelock + + than staking output. The unbonding tx as string hex. + covenant_unbonding_sig_list: + type: array + items: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: >- + SignatureInfo is a BIP-340 signature together with its signer's + BIP-340 PK + title: >- + covenant_unbonding_sig_list is the list of signatures on the + unbonding tx + + by covenant members + slashing_tx_hex: + type: string + title: slashingTxHex is the hex string of slashing tx + delegator_slashing_sig_hex: + type: string + description: |- + delegator_slashing_sig is the signature on the slashing tx + by the delegator (i.e., SK corresponding to btc_pk). + It will be a part of the witness for the unbonding tx output. + The delegator slashing sig as string hex. + covenant_slashing_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as + the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each encrypted + by a restaked BTC finality provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures signed by + the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_slashing_sigs is a list of adaptor signatures on the + unbonding slashing tx by each covenant member + It will be a part of the witness for the staking tx output. + delegator_unbonding_info_response: + title: >- + btc_undelegation_info contains all necessary info about the + transaction + + which spent the staking output + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent the staking + output. It is + + filled only if the spend_stake_tx_hex is different than the + unbonding_tx_hex + title: >- + BTCUndelegationResponse provides all necessary info about the + undeleagation + params_version: + type: integer + format: int64 + title: params version used to validate delegation + description: >- + BTCDelegationResponse is the client needed information from a + BTCDelegation with the current status based on parameters. + babylon.btcstaking.v1.BTCDelegationStatus: + type: string + enum: + - PENDING + - VERIFIED + - ACTIVE + - UNBONDED + - EXPIRED + - ANY + default: PENDING + description: >- + BTCDelegationStatus is the status of a delegation. + + There are two possible valid state transition paths for a BTC delegation: + + - PENDING -> VERIFIED -> ACTIVE -> UNBONDED -> EXPIRED + + - PENDING -> VERIFIED -> ACTIVE -> UNBONDED/EXPIRED + + and one invalid state transition path: + + - PENDING -> VERIFIED -> UNBONDED i.e the staker unbonded before + + activating delegation on Babylon chain. + + In valid transition paths, the delegation becomes UNBONDED when: + + - either the staking transaction timelock expires + + - or the staker requests early undelegation through MsgBTCUndelegate + message. + + - PENDING: PENDING defines a delegation that is waiting for covenant signatures. + - VERIFIED: VERIFIED defines a delegation that has covenant signatures but is not yet + included in the BTC chain. + - ACTIVE: ACTIVE defines a delegation that has voting power + - UNBONDED: UNBONDED defines a delegation no longer has voting power + by receiving unbonding tx with signatures from staker and covenant + committee + - EXPIRED: EXPIRED defines a delegation no longer has voting power + for reaching the end of staking transaction timelock + - ANY: ANY is any of the above status + babylon.btcstaking.v1.BTCDelegatorDelegationsResponse: + type: object + properties: + dels: + type: array + items: + type: object + properties: + staker_addr: + type: string + description: >- + staker_addr is the address to receive rewards from BTC + delegation. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this BTC delegation + the PK follows encoding in BIP-340 spec + fp_btc_pk_list: + type: array + items: + type: string + format: byte + title: >- + fp_btc_pk_list is the list of BIP-340 PKs of the finality + providers that + + this BTC delegation delegates to + staking_time: + type: integer + format: int64 + title: >- + staking_time is the number of blocks for which the delegation is + locked on BTC chain + start_height: + type: integer + format: int64 + title: |- + start_height is the start BTC height of the BTC delegation + it is the start BTC height of the timelock + end_height: + type: integer + format: int64 + title: |- + end_height is the end height of the BTC delegation + it is the end BTC height of the timelock - w + total_sat: + type: string + format: uint64 + title: |- + total_sat is the total amount of BTC stakes in this delegation + quantified in satoshi + staking_tx_hex: + type: string + title: staking_tx_hex is the hex string of staking tx + slashing_tx_hex: + type: string + title: slashing_tx_hex is the hex string of slashing tx + delegator_slash_sig_hex: + type: string + description: >- + delegator_slash_sig_hex is the signature on the slashing tx + + by the delegator (i.e., SK corresponding to btc_pk) as string + hex. + + It will be a part of the witness for the staking tx output. + covenant_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as + the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each + encrypted by a restaked BTC finality provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures signed + by the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_sigs is a list of adaptor signatures on the slashing tx + by each covenant member + It will be a part of the witness for the staking tx output. + staking_output_idx: + type: integer + format: int64 + title: >- + staking_output_idx is the index of the staking output in the + staking tx + active: + type: boolean + title: whether this delegation is active + status_desc: + type: string + description: descriptive status of current delegation. + unbonding_time: + type: integer + format: int64 + title: >- + unbonding_time used in unbonding output timelock path and in + slashing transactions + + change outputs + undelegation_response: + description: >- + undelegation_response is the undelegation info of this + delegation. + type: object + properties: + unbonding_tx_hex: + type: string + description: >- + unbonding_tx is the transaction which will transfer the + funds from staking + + output to unbonding output. Unbonding output will usually + have lower timelock + + than staking output. The unbonding tx as string hex. + covenant_unbonding_sig_list: + type: array + items: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: >- + SignatureInfo is a BIP-340 signature together with its + signer's BIP-340 PK + title: >- + covenant_unbonding_sig_list is the list of signatures on the + unbonding tx + + by covenant members + slashing_tx_hex: + type: string + title: slashingTxHex is the hex string of slashing tx + delegator_slashing_sig_hex: + type: string + description: >- + delegator_slashing_sig is the signature on the slashing tx + + by the delegator (i.e., SK corresponding to btc_pk). + + It will be a part of the witness for the unbonding tx + output. + + The delegator slashing sig as string hex. + covenant_slashing_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, + used as the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each + encrypted by a restaked BTC finality provider's public + key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures + signed by the + + covenant with different finality provider's public keys as + encryption keys + description: >- + covenant_slashing_sigs is a list of adaptor signatures on + the + + unbonding slashing tx by each covenant member + + It will be a part of the witness for the staking tx output. + delegator_unbonding_info_response: + title: >- + btc_undelegation_info contains all necessary info about the + transaction + + which spent the staking output + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent the + staking output. It is + + filled only if the spend_stake_tx_hex is different than + the unbonding_tx_hex + title: >- + BTCUndelegationResponse provides all necessary info about the + undeleagation + params_version: + type: integer + format: int64 + title: params version used to validate delegation + description: >- + BTCDelegationResponse is the client needed information from a + BTCDelegation with the current status based on parameters. + description: >- + BTCDelegatorDelegationsResponse is a collection of BTC delegations + responses from the same delegator. + babylon.btcstaking.v1.BTCSigType: + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + title: BTCSigType indicates the type of btc_sig in a pop + babylon.btcstaking.v1.BTCUndelegationResponse: + type: object + properties: + unbonding_tx_hex: + type: string + description: >- + unbonding_tx is the transaction which will transfer the funds from + staking + + output to unbonding output. Unbonding output will usually have lower + timelock + + than staking output. The unbonding tx as string hex. + covenant_unbonding_sig_list: + type: array + items: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: >- + SignatureInfo is a BIP-340 signature together with its signer's + BIP-340 PK + title: >- + covenant_unbonding_sig_list is the list of signatures on the unbonding + tx + + by covenant members + slashing_tx_hex: + type: string + title: slashingTxHex is the hex string of slashing tx + delegator_slashing_sig_hex: + type: string + description: |- + delegator_slashing_sig is the signature on the slashing tx + by the delegator (i.e., SK corresponding to btc_pk). + It will be a part of the witness for the unbonding tx output. + The delegator slashing sig as string hex. + covenant_slashing_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as the + public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each encrypted by + a restaked BTC finality provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures signed by the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_slashing_sigs is a list of adaptor signatures on the + unbonding slashing tx by each covenant member + It will be a part of the witness for the staking tx output. + delegator_unbonding_info_response: + title: >- + btc_undelegation_info contains all necessary info about the + transaction + + which spent the staking output + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent the staking + output. It is + + filled only if the spend_stake_tx_hex is different than the + unbonding_tx_hex + title: >- + BTCUndelegationResponse provides all necessary info about the + undeleagation + babylon.btcstaking.v1.CovenantAdaptorSignatures: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as the public + key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each encrypted by a + restaked BTC finality provider's public key + title: |- + CovenantAdaptorSignatures is a list adaptor signatures signed by the + covenant with different finality provider's public keys as encryption keys + babylon.btcstaking.v1.DelegatorUnbondingInfoResponse: + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent the staking output. + It is + + filled only if the spend_stake_tx_hex is different than the + unbonding_tx_hex + title: >- + DelegatorUnbondingInfoResponse provides all necessary info about + transaction + + which spent the staking output + babylon.btcstaking.v1.FinalityProviderResponse: + type: object + properties: + description: + description: description defines the description terms for the finality provider. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: commission defines the commission rate of the finality provider. + addr: + type: string + description: addr is the address to receive commission from delegations. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this finality provider + the PK follows encoding in BIP-340 spec + pop: + description: |- + pop is the proof of possession of the BTC_PK by the fp addr. + Essentially is the signature where the BTC SK sigs the fp addr. + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the BIP-340 + encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) + + the signature follows encoding in either BIP-340 spec or BIP-322 + spec + title: |- + ProofOfPossessionBTC is the proof of possession that a Babylon + address and a Bitcoin secp256k1 secret key are held by the same + person + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + jailed: + type: boolean + title: jailed defines whether the finality provider is jailed + highest_voted_height: + type: integer + format: int64 + title: |- + highest_voted_height is the highest height for which the + finality provider has voted + description: >- + FinalityProviderResponse defines a finality provider with voting power + information. + babylon.btcstaking.v1.Params: + type: object + properties: + covenant_pks: + type: array + items: + type: string + format: byte + title: |- + PARAMETERS COVERING STAKING + covenant_pks is the list of public keys held by the covenant committee + each PK follows encoding in BIP-340 spec on Bitcoin + covenant_quorum: + type: integer + format: int64 + title: >- + covenant_quorum is the minimum number of signatures needed for the + covenant + + multisignature + min_staking_value_sat: + type: string + format: int64 + title: >- + min_staking_value_sat is the minimum of satoshis locked in staking + output + max_staking_value_sat: + type: string + format: int64 + title: >- + max_staking_value_sat is the maximum of satoshis locked in staking + output + min_staking_time_blocks: + type: integer + format: int64 + title: >- + min_staking_time is the minimum lock time specified in staking output + script + max_staking_time_blocks: + type: integer + format: int64 + title: >- + max_staking_time_blocks is the maximum lock time time specified in + staking output script + slashing_pk_script: + type: string + format: byte + title: >- + PARAMETERS COVERING SLASHING + + slashing_pk_script is the pk_script expected in slashing output ie. + the first + + output of slashing transaction + min_slashing_tx_fee_sat: + type: string + format: int64 + title: |- + min_slashing_tx_fee_sat is the minimum amount of tx fee (quantified + in Satoshi) needed for the pre-signed slashing tx. It covers both: + staking slashing transaction and unbonding slashing transaction + slashing_rate: + type: string + title: >- + slashing_rate determines the portion of the staked amount to be + slashed, + + expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 + decimal + + places + unbonding_time_blocks: + type: integer + format: int64 + title: >- + PARAMETERS COVERING UNBONDING + + unbonding_time is the exact unbonding time required from unbonding + transaction + + it must be larger than `checkpoint_finalization_timeout` from + `btccheckpoint` module + unbonding_fee_sat: + type: string + format: int64 + title: unbonding_fee exact fee required for unbonding transaction + min_commission_rate: + type: string + title: >- + PARAMETERS COVERING FINALITY PROVIDERS + + min_commission_rate is the chain-wide minimum commission rate that a + finality provider + + can charge their delegators expressed as a decimal (e.g., 0.5 for + 50%). Maximal precion + + is 2 decimal places + delegation_creation_base_gas_fee: + type: string + format: uint64 + title: base gas fee for delegation creation + allow_list_expiration_height: + type: string + format: uint64 + title: >- + allow_list_expiration_height is the height at which the allow list + expires + + i.e all staking transactions are allowed to enter Babylon chain + afterwards + + setting it to 0 means allow list is disabled + btc_activation_height: + type: integer + format: int64 + title: >- + btc_activation_height is the btc height from which parameters are + activated (inclusive) + description: Params defines the parameters for the module. + babylon.btcstaking.v1.ProofOfPossessionBTC: + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) + + the signature follows encoding in either BIP-340 spec or BIP-322 spec + title: |- + ProofOfPossessionBTC is the proof of possession that a Babylon + address and a Bitcoin secp256k1 secret key are held by the same + person + babylon.btcstaking.v1.QueryBTCDelegationResponse: + type: object + properties: + btc_delegation: + description: >- + BTCDelegation represents the client needed information of an + BTCDelegation. + type: object + properties: + staker_addr: + type: string + description: staker_addr is the address to receive rewards from BTC delegation. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this BTC delegation + the PK follows encoding in BIP-340 spec + fp_btc_pk_list: + type: array + items: + type: string + format: byte + title: >- + fp_btc_pk_list is the list of BIP-340 PKs of the finality + providers that + + this BTC delegation delegates to + staking_time: + type: integer + format: int64 + title: >- + staking_time is the number of blocks for which the delegation is + locked on BTC chain + start_height: + type: integer + format: int64 + title: |- + start_height is the start BTC height of the BTC delegation + it is the start BTC height of the timelock + end_height: + type: integer + format: int64 + title: |- + end_height is the end height of the BTC delegation + it is the end BTC height of the timelock - w + total_sat: + type: string + format: uint64 + title: |- + total_sat is the total amount of BTC stakes in this delegation + quantified in satoshi + staking_tx_hex: + type: string + title: staking_tx_hex is the hex string of staking tx + slashing_tx_hex: + type: string + title: slashing_tx_hex is the hex string of slashing tx + delegator_slash_sig_hex: + type: string + description: |- + delegator_slash_sig_hex is the signature on the slashing tx + by the delegator (i.e., SK corresponding to btc_pk) as string hex. + It will be a part of the witness for the staking tx output. + covenant_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as + the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each encrypted + by a restaked BTC finality provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures signed by + the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_sigs is a list of adaptor signatures on the slashing tx + by each covenant member + It will be a part of the witness for the staking tx output. + staking_output_idx: + type: integer + format: int64 + title: >- + staking_output_idx is the index of the staking output in the + staking tx + active: + type: boolean + title: whether this delegation is active + status_desc: + type: string + description: descriptive status of current delegation. + unbonding_time: + type: integer + format: int64 + title: >- + unbonding_time used in unbonding output timelock path and in + slashing transactions + + change outputs + undelegation_response: + description: undelegation_response is the undelegation info of this delegation. + type: object + properties: + unbonding_tx_hex: + type: string + description: >- + unbonding_tx is the transaction which will transfer the funds + from staking + + output to unbonding output. Unbonding output will usually have + lower timelock + + than staking output. The unbonding tx as string hex. + covenant_unbonding_sig_list: + type: array + items: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: >- + SignatureInfo is a BIP-340 signature together with its + signer's BIP-340 PK + title: >- + covenant_unbonding_sig_list is the list of signatures on the + unbonding tx + + by covenant members + slashing_tx_hex: + type: string + title: slashingTxHex is the hex string of slashing tx + delegator_slashing_sig_hex: + type: string + description: |- + delegator_slashing_sig is the signature on the slashing tx + by the delegator (i.e., SK corresponding to btc_pk). + It will be a part of the witness for the unbonding tx output. + The delegator slashing sig as string hex. + covenant_slashing_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used + as the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each + encrypted by a restaked BTC finality provider's public + key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures + signed by the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_slashing_sigs is a list of adaptor signatures on the + unbonding slashing tx by each covenant member + It will be a part of the witness for the staking tx output. + delegator_unbonding_info_response: + title: >- + btc_undelegation_info contains all necessary info about the + transaction + + which spent the staking output + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent the + staking output. It is + + filled only if the spend_stake_tx_hex is different than + the unbonding_tx_hex + title: >- + BTCUndelegationResponse provides all necessary info about the + undeleagation + params_version: + type: integer + format: int64 + title: params version used to validate delegation + title: >- + QueryBTCDelegationResponse is response type matching + QueryBTCDelegationRequest + + and containing BTC delegation information + babylon.btcstaking.v1.QueryBTCDelegationsResponse: + type: object + properties: + btc_delegations: + type: array + items: + type: object + properties: + staker_addr: + type: string + description: >- + staker_addr is the address to receive rewards from BTC + delegation. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this BTC delegation + the PK follows encoding in BIP-340 spec + fp_btc_pk_list: + type: array + items: + type: string + format: byte + title: >- + fp_btc_pk_list is the list of BIP-340 PKs of the finality + providers that + + this BTC delegation delegates to + staking_time: + type: integer + format: int64 + title: >- + staking_time is the number of blocks for which the delegation is + locked on BTC chain + start_height: + type: integer + format: int64 + title: |- + start_height is the start BTC height of the BTC delegation + it is the start BTC height of the timelock + end_height: + type: integer + format: int64 + title: |- + end_height is the end height of the BTC delegation + it is the end BTC height of the timelock - w + total_sat: + type: string + format: uint64 + title: |- + total_sat is the total amount of BTC stakes in this delegation + quantified in satoshi + staking_tx_hex: + type: string + title: staking_tx_hex is the hex string of staking tx + slashing_tx_hex: + type: string + title: slashing_tx_hex is the hex string of slashing tx + delegator_slash_sig_hex: + type: string + description: >- + delegator_slash_sig_hex is the signature on the slashing tx + + by the delegator (i.e., SK corresponding to btc_pk) as string + hex. + + It will be a part of the witness for the staking tx output. + covenant_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, used as + the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each + encrypted by a restaked BTC finality provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures signed + by the + + covenant with different finality provider's public keys as + encryption keys + description: |- + covenant_sigs is a list of adaptor signatures on the slashing tx + by each covenant member + It will be a part of the witness for the staking tx output. + staking_output_idx: + type: integer + format: int64 + title: >- + staking_output_idx is the index of the staking output in the + staking tx + active: + type: boolean + title: whether this delegation is active + status_desc: + type: string + description: descriptive status of current delegation. + unbonding_time: + type: integer + format: int64 + title: >- + unbonding_time used in unbonding output timelock path and in + slashing transactions + + change outputs + undelegation_response: + description: >- + undelegation_response is the undelegation info of this + delegation. + type: object + properties: + unbonding_tx_hex: + type: string + description: >- + unbonding_tx is the transaction which will transfer the + funds from staking + + output to unbonding output. Unbonding output will usually + have lower timelock + + than staking output. The unbonding tx as string hex. + covenant_unbonding_sig_list: + type: array + items: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: >- + SignatureInfo is a BIP-340 signature together with its + signer's BIP-340 PK + title: >- + covenant_unbonding_sig_list is the list of signatures on the + unbonding tx + + by covenant members + slashing_tx_hex: + type: string + title: slashingTxHex is the hex string of slashing tx + delegator_slashing_sig_hex: + type: string + description: >- + delegator_slashing_sig is the signature on the slashing tx + + by the delegator (i.e., SK corresponding to btc_pk). + + It will be a part of the witness for the unbonding tx + output. + + The delegator slashing sig as string hex. + covenant_slashing_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, + used as the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each + encrypted by a restaked BTC finality provider's public + key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures + signed by the + + covenant with different finality provider's public keys as + encryption keys + description: >- + covenant_slashing_sigs is a list of adaptor signatures on + the + + unbonding slashing tx by each covenant member + + It will be a part of the witness for the staking tx output. + delegator_unbonding_info_response: + title: >- + btc_undelegation_info contains all necessary info about the + transaction + + which spent the staking output + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent the + staking output. It is + + filled only if the spend_stake_tx_hex is different than + the unbonding_tx_hex + title: >- + BTCUndelegationResponse provides all necessary info about the + undeleagation + params_version: + type: integer + format: int64 + title: params version used to validate delegation + description: >- + BTCDelegationResponse is the client needed information from a + BTCDelegation with the current status based on parameters. + title: >- + btc_delegations contains all the queried BTC delegations under the + given status + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryBTCDelegationsResponse is the response type for the + Query/BTCDelegations RPC method. + babylon.btcstaking.v1.QueryFinalityProviderDelegationsResponse: + type: object + properties: + btc_delegator_delegations: + type: array + items: + type: object + properties: + dels: + type: array + items: + type: object + properties: + staker_addr: + type: string + description: >- + staker_addr is the address to receive rewards from BTC + delegation. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this BTC delegation + the PK follows encoding in BIP-340 spec + fp_btc_pk_list: + type: array + items: + type: string + format: byte + title: >- + fp_btc_pk_list is the list of BIP-340 PKs of the finality + providers that + + this BTC delegation delegates to + staking_time: + type: integer + format: int64 + title: >- + staking_time is the number of blocks for which the + delegation is locked on BTC chain + start_height: + type: integer + format: int64 + title: |- + start_height is the start BTC height of the BTC delegation + it is the start BTC height of the timelock + end_height: + type: integer + format: int64 + title: |- + end_height is the end height of the BTC delegation + it is the end BTC height of the timelock - w + total_sat: + type: string + format: uint64 + title: >- + total_sat is the total amount of BTC stakes in this + delegation + + quantified in satoshi + staking_tx_hex: + type: string + title: staking_tx_hex is the hex string of staking tx + slashing_tx_hex: + type: string + title: slashing_tx_hex is the hex string of slashing tx + delegator_slash_sig_hex: + type: string + description: >- + delegator_slash_sig_hex is the signature on the slashing + tx + + by the delegator (i.e., SK corresponding to btc_pk) as + string hex. + + It will be a part of the witness for the staking tx + output. + covenant_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant emulator, + used as the public key of the adaptor signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, each + encrypted by a restaked BTC finality provider's + public key + title: >- + CovenantAdaptorSignatures is a list adaptor signatures + signed by the + + covenant with different finality provider's public keys + as encryption keys + description: >- + covenant_sigs is a list of adaptor signatures on the + slashing tx + + by each covenant member + + It will be a part of the witness for the staking tx + output. + staking_output_idx: + type: integer + format: int64 + title: >- + staking_output_idx is the index of the staking output in + the staking tx + active: + type: boolean + title: whether this delegation is active + status_desc: + type: string + description: descriptive status of current delegation. + unbonding_time: + type: integer + format: int64 + title: >- + unbonding_time used in unbonding output timelock path and + in slashing transactions + + change outputs + undelegation_response: + description: >- + undelegation_response is the undelegation info of this + delegation. + type: object + properties: + unbonding_tx_hex: + type: string + description: >- + unbonding_tx is the transaction which will transfer + the funds from staking + + output to unbonding output. Unbonding output will + usually have lower timelock + + than staking output. The unbonding tx as string hex. + covenant_unbonding_sig_list: + type: array + items: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: >- + SignatureInfo is a BIP-340 signature together with + its signer's BIP-340 PK + title: >- + covenant_unbonding_sig_list is the list of signatures + on the unbonding tx + + by covenant members + slashing_tx_hex: + type: string + title: slashingTxHex is the hex string of slashing tx + delegator_slashing_sig_hex: + type: string + description: >- + delegator_slashing_sig is the signature on the + slashing tx + + by the delegator (i.e., SK corresponding to btc_pk). + + It will be a part of the witness for the unbonding tx + output. + + The delegator slashing sig as string hex. + covenant_slashing_sigs: + type: array + items: + type: object + properties: + cov_pk: + type: string + format: byte + title: >- + cov_pk is the public key of the covenant + emulator, used as the public key of the adaptor + signature + adaptor_sigs: + type: array + items: + type: string + format: byte + title: >- + adaptor_sigs is a list of adaptor signatures, + each encrypted by a restaked BTC finality + provider's public key + title: >- + CovenantAdaptorSignatures is a list adaptor + signatures signed by the + + covenant with different finality provider's public + keys as encryption keys + description: >- + covenant_slashing_sigs is a list of adaptor signatures + on the + + unbonding slashing tx by each covenant member + + It will be a part of the witness for the staking tx + output. + delegator_unbonding_info_response: + title: >- + btc_undelegation_info contains all necessary info + about the transaction + + which spent the staking output + type: object + properties: + spend_stake_tx_hex: + type: string + title: >- + spend_stake_tx_hex is the transaction which spent + the staking output. It is + + filled only if the spend_stake_tx_hex is different + than the unbonding_tx_hex + title: >- + BTCUndelegationResponse provides all necessary info about + the undeleagation + params_version: + type: integer + format: int64 + title: params version used to validate delegation + description: >- + BTCDelegationResponse is the client needed information from a + BTCDelegation with the current status based on parameters. + description: >- + BTCDelegatorDelegationsResponse is a collection of BTC delegations + responses from the same delegator. + description: btc_delegator_delegations contains all the queried BTC delegations. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryFinalityProviderDelegationsResponse is the response type for the + Query/FinalityProviderDelegations RPC method. + babylon.btcstaking.v1.QueryFinalityProviderResponse: + type: object + properties: + finality_provider: + type: object + properties: + description: + description: >- + description defines the description terms for the finality + provider. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: commission defines the commission rate of the finality provider. + addr: + type: string + description: addr is the address to receive commission from delegations. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this finality provider + the PK follows encoding in BIP-340 spec + pop: + description: |- + pop is the proof of possession of the BTC_PK by the fp addr. + Essentially is the signature where the BTC SK sigs the fp addr. + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the BIP-340 + encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) + + the signature follows encoding in either BIP-340 spec or + BIP-322 spec + title: |- + ProofOfPossessionBTC is the proof of possession that a Babylon + address and a Bitcoin secp256k1 secret key are held by the same + person + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + jailed: + type: boolean + title: jailed defines whether the finality provider is jailed + highest_voted_height: + type: integer + format: int64 + title: |- + highest_voted_height is the highest height for which the + finality provider has voted + description: >- + FinalityProviderResponse defines a finality provider with voting power + information. + title: finality_provider contains the FinalityProvider + title: >- + QueryFinalityProviderResponse contains information about a finality + provider + babylon.btcstaking.v1.QueryFinalityProvidersResponse: + type: object + properties: + finality_providers: + type: array + items: + type: object + properties: + description: + description: >- + description defines the description terms for the finality + provider. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort + or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: commission defines the commission rate of the finality provider. + addr: + type: string + description: addr is the address to receive commission from delegations. + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this finality provider + the PK follows encoding in BIP-340 spec + pop: + description: |- + pop is the proof of possession of the BTC_PK by the fp addr. + Essentially is the signature where the BTC SK sigs the fp addr. + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the BIP-340 + encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) + + the signature follows encoding in either BIP-340 spec or + BIP-322 spec + title: |- + ProofOfPossessionBTC is the proof of possession that a Babylon + address and a Bitcoin secp256k1 secret key are held by the same + person + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + jailed: + type: boolean + title: jailed defines whether the finality provider is jailed + highest_voted_height: + type: integer + format: int64 + title: |- + highest_voted_height is the highest height for which the + finality provider has voted + description: >- + FinalityProviderResponse defines a finality provider with voting + power information. + title: finality_providers contains all the finality providers + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryFinalityProvidersResponse is the response type for the + Query/FinalityProviders RPC method. + babylon.btcstaking.v1.QueryParamsByBTCHeightResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + covenant_pks: + type: array + items: + type: string + format: byte + title: >- + PARAMETERS COVERING STAKING + + covenant_pks is the list of public keys held by the covenant + committee + + each PK follows encoding in BIP-340 spec on Bitcoin + covenant_quorum: + type: integer + format: int64 + title: >- + covenant_quorum is the minimum number of signatures needed for the + covenant + + multisignature + min_staking_value_sat: + type: string + format: int64 + title: >- + min_staking_value_sat is the minimum of satoshis locked in staking + output + max_staking_value_sat: + type: string + format: int64 + title: >- + max_staking_value_sat is the maximum of satoshis locked in staking + output + min_staking_time_blocks: + type: integer + format: int64 + title: >- + min_staking_time is the minimum lock time specified in staking + output script + max_staking_time_blocks: + type: integer + format: int64 + title: >- + max_staking_time_blocks is the maximum lock time time specified in + staking output script + slashing_pk_script: + type: string + format: byte + title: >- + PARAMETERS COVERING SLASHING + + slashing_pk_script is the pk_script expected in slashing output + ie. the first + + output of slashing transaction + min_slashing_tx_fee_sat: + type: string + format: int64 + title: >- + min_slashing_tx_fee_sat is the minimum amount of tx fee + (quantified + + in Satoshi) needed for the pre-signed slashing tx. It covers both: + + staking slashing transaction and unbonding slashing transaction + slashing_rate: + type: string + title: >- + slashing_rate determines the portion of the staked amount to be + slashed, + + expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 + decimal + + places + unbonding_time_blocks: + type: integer + format: int64 + title: >- + PARAMETERS COVERING UNBONDING + + unbonding_time is the exact unbonding time required from unbonding + transaction + + it must be larger than `checkpoint_finalization_timeout` from + `btccheckpoint` module + unbonding_fee_sat: + type: string + format: int64 + title: unbonding_fee exact fee required for unbonding transaction + min_commission_rate: + type: string + title: >- + PARAMETERS COVERING FINALITY PROVIDERS + + min_commission_rate is the chain-wide minimum commission rate that + a finality provider + + can charge their delegators expressed as a decimal (e.g., 0.5 for + 50%). Maximal precion + + is 2 decimal places + delegation_creation_base_gas_fee: + type: string + format: uint64 + title: base gas fee for delegation creation + allow_list_expiration_height: + type: string + format: uint64 + title: >- + allow_list_expiration_height is the height at which the allow list + expires + + i.e all staking transactions are allowed to enter Babylon chain + afterwards + + setting it to 0 means allow list is disabled + btc_activation_height: + type: integer + format: int64 + title: >- + btc_activation_height is the btc height from which parameters are + activated (inclusive) + version: + type: integer + format: int64 + title: version is the version of the params for the given BTC height + description: >- + QueryParamsByBTCHeightResponse is response type for the + Query/QueryParamsByBTCHeightResponse RPC method. + babylon.btcstaking.v1.QueryParamsByVersionResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + covenant_pks: + type: array + items: + type: string + format: byte + title: >- + PARAMETERS COVERING STAKING + + covenant_pks is the list of public keys held by the covenant + committee + + each PK follows encoding in BIP-340 spec on Bitcoin + covenant_quorum: + type: integer + format: int64 + title: >- + covenant_quorum is the minimum number of signatures needed for the + covenant + + multisignature + min_staking_value_sat: + type: string + format: int64 + title: >- + min_staking_value_sat is the minimum of satoshis locked in staking + output + max_staking_value_sat: + type: string + format: int64 + title: >- + max_staking_value_sat is the maximum of satoshis locked in staking + output + min_staking_time_blocks: + type: integer + format: int64 + title: >- + min_staking_time is the minimum lock time specified in staking + output script + max_staking_time_blocks: + type: integer + format: int64 + title: >- + max_staking_time_blocks is the maximum lock time time specified in + staking output script + slashing_pk_script: + type: string + format: byte + title: >- + PARAMETERS COVERING SLASHING + + slashing_pk_script is the pk_script expected in slashing output + ie. the first + + output of slashing transaction + min_slashing_tx_fee_sat: + type: string + format: int64 + title: >- + min_slashing_tx_fee_sat is the minimum amount of tx fee + (quantified + + in Satoshi) needed for the pre-signed slashing tx. It covers both: + + staking slashing transaction and unbonding slashing transaction + slashing_rate: + type: string + title: >- + slashing_rate determines the portion of the staked amount to be + slashed, + + expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 + decimal + + places + unbonding_time_blocks: + type: integer + format: int64 + title: >- + PARAMETERS COVERING UNBONDING + + unbonding_time is the exact unbonding time required from unbonding + transaction + + it must be larger than `checkpoint_finalization_timeout` from + `btccheckpoint` module + unbonding_fee_sat: + type: string + format: int64 + title: unbonding_fee exact fee required for unbonding transaction + min_commission_rate: + type: string + title: >- + PARAMETERS COVERING FINALITY PROVIDERS + + min_commission_rate is the chain-wide minimum commission rate that + a finality provider + + can charge their delegators expressed as a decimal (e.g., 0.5 for + 50%). Maximal precion + + is 2 decimal places + delegation_creation_base_gas_fee: + type: string + format: uint64 + title: base gas fee for delegation creation + allow_list_expiration_height: + type: string + format: uint64 + title: >- + allow_list_expiration_height is the height at which the allow list + expires + + i.e all staking transactions are allowed to enter Babylon chain + afterwards + + setting it to 0 means allow list is disabled + btc_activation_height: + type: integer + format: int64 + title: >- + btc_activation_height is the btc height from which parameters are + activated (inclusive) + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.btcstaking.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + covenant_pks: + type: array + items: + type: string + format: byte + title: >- + PARAMETERS COVERING STAKING + + covenant_pks is the list of public keys held by the covenant + committee + + each PK follows encoding in BIP-340 spec on Bitcoin + covenant_quorum: + type: integer + format: int64 + title: >- + covenant_quorum is the minimum number of signatures needed for the + covenant + + multisignature + min_staking_value_sat: + type: string + format: int64 + title: >- + min_staking_value_sat is the minimum of satoshis locked in staking + output + max_staking_value_sat: + type: string + format: int64 + title: >- + max_staking_value_sat is the maximum of satoshis locked in staking + output + min_staking_time_blocks: + type: integer + format: int64 + title: >- + min_staking_time is the minimum lock time specified in staking + output script + max_staking_time_blocks: + type: integer + format: int64 + title: >- + max_staking_time_blocks is the maximum lock time time specified in + staking output script + slashing_pk_script: + type: string + format: byte + title: >- + PARAMETERS COVERING SLASHING + + slashing_pk_script is the pk_script expected in slashing output + ie. the first + + output of slashing transaction + min_slashing_tx_fee_sat: + type: string + format: int64 + title: >- + min_slashing_tx_fee_sat is the minimum amount of tx fee + (quantified + + in Satoshi) needed for the pre-signed slashing tx. It covers both: + + staking slashing transaction and unbonding slashing transaction + slashing_rate: + type: string + title: >- + slashing_rate determines the portion of the staked amount to be + slashed, + + expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 + decimal + + places + unbonding_time_blocks: + type: integer + format: int64 + title: >- + PARAMETERS COVERING UNBONDING + + unbonding_time is the exact unbonding time required from unbonding + transaction + + it must be larger than `checkpoint_finalization_timeout` from + `btccheckpoint` module + unbonding_fee_sat: + type: string + format: int64 + title: unbonding_fee exact fee required for unbonding transaction + min_commission_rate: + type: string + title: >- + PARAMETERS COVERING FINALITY PROVIDERS + + min_commission_rate is the chain-wide minimum commission rate that + a finality provider + + can charge their delegators expressed as a decimal (e.g., 0.5 for + 50%). Maximal precion + + is 2 decimal places + delegation_creation_base_gas_fee: + type: string + format: uint64 + title: base gas fee for delegation creation + allow_list_expiration_height: + type: string + format: uint64 + title: >- + allow_list_expiration_height is the height at which the allow list + expires + + i.e all staking transactions are allowed to enter Babylon chain + afterwards + + setting it to 0 means allow list is disabled + btc_activation_height: + type: integer + format: int64 + title: >- + btc_activation_height is the btc height from which parameters are + activated (inclusive) + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.btcstaking.v1.SignatureInfo: + type: object + properties: + pk: + type: string + format: byte + sig: + type: string + format: byte + title: SignatureInfo is a BIP-340 signature together with its signer's BIP-340 PK + cosmos.staking.v1beta1.Description: + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + description: Description defines a validator description. + babylon.finality.v1.ActiveFinalityProvidersAtHeightResponse: + type: object + properties: + btc_pk_hex: + type: string + title: |- + btc_pk is the Bitcoin secp256k1 PK of thisfinality provider + the PK follows encoding in BIP-340 spec + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of this finality provider at the + given height + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + jailed: + type: boolean + title: jailed defines whether the finality provider is detected jailed + highest_voted_height: + type: integer + format: int64 + title: |- + highest_voted_height is the highest height for which the + finality provider has voted + description: >- + ActiveFinalityProvidersAtHeightResponse wraps the FinalityProvider with + metadata. + babylon.finality.v1.EvidenceResponse: + type: object + properties: + fp_btc_pk_hex: + type: string + title: >- + fp_btc_pk_hex is the BTC PK of the finality provider that casts this + vote + block_height: + type: string + format: uint64 + title: block_height is the height of the conflicting blocks + pub_rand: + type: string + format: byte + title: >- + pub_rand is the public randomness the finality provider has committed + to + canonical_app_hash: + type: string + format: byte + title: canonical_app_hash is the AppHash of the canonical block + fork_app_hash: + type: string + format: byte + title: fork_app_hash is the AppHash of the fork block + canonical_finality_sig: + type: string + format: byte + title: >- + canonical_finality_sig is the finality signature to the canonical + block + + where finality signature is an EOTS signature, i.e., + + the `s` in a Schnorr signature `(r, s)` + + `r` is the public randomness that is already committed by the finality + provider + fork_finality_sig: + type: string + format: byte + title: |- + fork_finality_sig is the finality signature to the fork block + where finality signature is an EOTS signature + title: >- + Evidence is the evidence that a finality provider has signed finality + + signatures with correct public randomness on two conflicting Babylon + headers + babylon.finality.v1.IndexedBlock: + type: object + properties: + height: + type: string + format: uint64 + title: height is the height of the block + app_hash: + type: string + format: byte + title: app_hash is the AppHash of the block + finalized: + type: boolean + title: |- + finalized indicates whether the IndexedBlock is finalised by 2/3 + finality providers or not + title: IndexedBlock is the necessary metadata and finalization status of a block + babylon.finality.v1.Params: + type: object + properties: + max_active_finality_providers: + type: integer + format: int64 + title: >- + max_active_finality_providers is the maximum number of active finality + providers in the BTC staking protocol + signed_blocks_window: + type: string + format: int64 + title: >- + signed_blocks_window defines the size of the sliding window for + tracking finality provider liveness + finality_sig_timeout: + type: string + format: int64 + title: >- + finality_sig_timeout defines how much time (in terms of blocks) + finality providers have to cast a finality + + vote before being judged as missing their voting turn on the given + block + min_signed_per_window: + type: string + format: byte + title: >- + min_signed_per_window defines the minimum number of blocks that a + finality provider is required to sign + + within the sliding window to avoid being jailed + min_pub_rand: + type: string + format: uint64 + title: |- + min_pub_rand is the minimum number of public randomness each + message should commit + jail_duration: + type: string + title: >- + jail_duration is the minimum period of time that a finality provider + remains jailed + finality_activation_height: + type: string + format: uint64 + description: >- + finality_activation_height is the babylon block height which the + finality module will + + start to accept finality voting and the minimum allowed value for the + public randomness + + commit start height. + description: Params defines the parameters for the module. + babylon.finality.v1.PubRandCommitResponse: + type: object + properties: + num_pub_rand: + type: string + format: uint64 + title: num_pub_rand is the number of committed public randomness + commitment: + type: string + format: byte + title: commitment is the value of the commitment + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number that the commit falls into + title: >- + PubRandCommitResponse is the response type for a public randomness + commitment + babylon.finality.v1.QueriedBlockStatus: + type: string + enum: + - NON_FINALIZED + - FINALIZED + - ANY + default: NON_FINALIZED + description: >- + QueriedBlockStatus is the status of blocks that the querier wants to + query. + + - NON_FINALIZED: NON_FINALIZED means the block is not finalised + - FINALIZED: FINALIZED means the block is finalized + - ANY: ANY means the block can be in any status + babylon.finality.v1.QueryActivatedHeightResponse: + type: object + properties: + height: + type: string + format: uint64 + description: >- + QueryActivatedHeightResponse is the response type for the + Query/ActivatedHeight RPC method. + babylon.finality.v1.QueryActiveFinalityProvidersAtHeightResponse: + type: object + properties: + finality_providers: + type: array + items: + type: object + properties: + btc_pk_hex: + type: string + title: |- + btc_pk is the Bitcoin secp256k1 PK of thisfinality provider + the PK follows encoding in BIP-340 spec + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of this finality provider at + the given height + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + jailed: + type: boolean + title: jailed defines whether the finality provider is detected jailed + highest_voted_height: + type: integer + format: int64 + title: |- + highest_voted_height is the highest height for which the + finality provider has voted + description: >- + ActiveFinalityProvidersAtHeightResponse wraps the FinalityProvider + with metadata. + description: finality_providers contains all the queried finality providersn. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: type: string format: byte description: |- @@ -10882,400 +20109,306 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - 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; - } - description: >- - QueryMainChainResponse is response type for the Query/MainChain RPC - method. - babylon.btclightclient.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - insert_headers_allow_list: - type: array - items: - type: string - title: >- - List of addresses which are allowed to insert headers to btc light - client - - if the list is empty, any address can insert headers - description: QueryParamsResponse is the response type for the Query/Params RPC method. - babylon.btclightclient.v1.QueryTipResponse: + description: |- + QueryActiveFinalityProvidersAtHeightResponse is the response type for the + Query/ActiveFinalityProvidersAtHeight RPC method. + babylon.finality.v1.QueryBlockResponse: type: object properties: - header: + block: type: object properties: - header_hex: - type: string - hash_hex: - type: string height: - type: integer - format: int64 - work: type: string - description: Work is the sdkmath.Uint as string. - description: >- - BTCHeaderInfoResponse is a structure that contains all relevant - information about a - - BTC header response - - Full header as string hex. - - Header hash for easy retrieval as string hex. - - Height of the header in the BTC chain. - - Total work spent on the header. This is the sum of the work corresponding - to the header Bits field - and the total work of the header. - description: QueryTipResponse is the response type for the Query/Tip RPC method. - babylon.epoching.v1.BondState: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED + format: uint64 + title: height is the height of the block + app_hash: + type: string + format: byte + title: app_hash is the AppHash of the block + finalized: + type: boolean + title: |- + finalized indicates whether the IndexedBlock is finalised by 2/3 + finality providers or not + title: >- + IndexedBlock is the necessary metadata and finalization status of a + block description: |- - - CREATED: CREATED is when the validator/delegation has been created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - babylon.epoching.v1.DelegationLifecycle: - type: object - properties: - del_addr: - type: string - del_life: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: >- - - CREATED: CREATED is when the validator/delegation has been - created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - val_addr: - type: string - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method - - signatures required by gogoproto. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - title: >- - DelegationStateUpdate is the message that records a state update of - a - - delegation - title: |- - ValidatorLifecycle is a message that records the lifecycle of - a delegation - babylon.epoching.v1.DelegationStateUpdate: + QueryBlockResponse is the response type for the + Query/Block RPC method. + babylon.finality.v1.QueryEvidenceResponse: type: object properties: - state: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: |- - - CREATED: CREATED is when the validator/delegation has been created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - val_addr: - type: string - amount: + evidence: type: object properties: - denom: + fp_btc_pk_hex: type: string - amount: + title: >- + fp_btc_pk_hex is the BTC PK of the finality provider that casts + this vote + block_height: type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - title: |- - DelegationStateUpdate is the message that records a state update of a - delegation - babylon.epoching.v1.EpochResponse: - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: current_epoch_interval is the epoch interval at the time of this epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. + format: uint64 + title: block_height is the height of the conflicting blocks + pub_rand: + type: string + format: byte + title: >- + pub_rand is the public randomness the finality provider has + committed to + canonical_app_hash: + type: string + format: byte + title: canonical_app_hash is the AppHash of the canonical block + fork_app_hash: + type: string + format: byte + title: fork_app_hash is the AppHash of the fork block + canonical_finality_sig: + type: string + format: byte + title: >- + canonical_finality_sig is the finality signature to the canonical + block - Babylon needs to remember the last header's time of each epoch to - complete + where finality signature is an EOTS signature, i.e., - unbonding validators/delegations when a previous epoch's checkpoint is + the `s` in a Schnorr signature `(r, s)` - finalised. The last_block_time field is nil in the epoch's beginning, - and + `r` is the public randomness that is already committed by the + finality provider + fork_finality_sig: + type: string + format: byte + title: |- + fork_finality_sig is the finality signature to the fork block + where finality signature is an EOTS signature + title: >- + Evidence is the evidence that a finality provider has signed finality - is set upon the end of this epoch. - sealer_app_hash_hex: - type: string - description: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch as hex string. - sealer_block_hash: - type: string - description: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch as hex string. - title: EpochResponse is a structure that contains the metadata of an epoch - babylon.epoching.v1.Params: + signatures with correct public randomness on two conflicting Babylon + headers + description: |- + QueryEvidenceResponse is the response type for the + Query/Evidence RPC method. + babylon.finality.v1.QueryFinalityProviderCurrentPowerResponse: type: object properties: - epoch_interval: + height: type: string format: uint64 - title: epoch_interval is the number of consecutive blocks to form an epoch - description: Params defines the parameters for the module. - babylon.epoching.v1.QueryCurrentEpochResponse: - type: object - properties: - current_epoch: + title: height is the current height + voting_power: type: string format: uint64 - title: current_epoch is the current epoch number - epoch_boundary: + title: voting_power is the voting power of the finality provider + description: |- + QueryFinalityProviderCurrentPowerResponse is the response type for the + Query/FinalityProviderCurrentPower RPC method. + babylon.finality.v1.QueryFinalityProviderPowerAtHeightResponse: + type: object + properties: + voting_power: type: string format: uint64 - title: epoch_boundary is the height of this epoch's last block - title: >- - QueryCurrentEpochResponse is the response type for the Query/CurrentEpoch - RPC - - method - babylon.epoching.v1.QueryDelegationLifecycleResponse: + title: voting_power is the voting power of the finality provider + description: |- + QueryFinalityProviderPowerAtHeightResponse is the response type for the + Query/FinalityProviderPowerAtHeight RPC method. + babylon.finality.v1.QueryListBlocksResponse: type: object properties: - del_life: + blocks: + type: array + items: + type: object + properties: + height: + type: string + format: uint64 + title: height is the height of the block + app_hash: + type: string + format: byte + title: app_hash is the AppHash of the block + finalized: + type: boolean + title: |- + finalized indicates whether the IndexedBlock is finalised by 2/3 + finality providers or not + title: >- + IndexedBlock is the necessary metadata and finalization status of a + block + title: blocks is the list of blocks at the given status + pagination: + description: pagination defines the pagination in the response. type: object properties: - del_addr: + next_key: type: string - del_life: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CREATED - - BONDED - - UNBONDING - - UNBONDED - - REMOVED - default: CREATED - description: >- - - CREATED: CREATED is when the validator/delegation has been - created - - BONDED: CREATED is when the validator/delegation has become bonded - - UNBONDING: CREATED is when the validator/delegation has become unbonding - - UNBONDED: CREATED is when the validator/delegation has become unbonded - - REMOVED: CREATED is when the validator/delegation has been removed - title: BondState is the bond state of a validator or delegation - val_addr: - type: string - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the custom - method + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - signatures required by gogoproto. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time + was set, its value is undefined otherwise + description: |- + QueryListBlocksResponse is the response type for the + Query/ListBlocks RPC method. + babylon.finality.v1.QueryListEvidencesResponse: + type: object + properties: + evidences: + type: array + items: + type: object + properties: + fp_btc_pk_hex: + type: string title: >- - DelegationStateUpdate is the message that records a state update - of a + fp_btc_pk_hex is the BTC PK of the finality provider that casts + this vote + block_height: + type: string + format: uint64 + title: block_height is the height of the conflicting blocks + pub_rand: + type: string + format: byte + title: >- + pub_rand is the public randomness the finality provider has + committed to + canonical_app_hash: + type: string + format: byte + title: canonical_app_hash is the AppHash of the canonical block + fork_app_hash: + type: string + format: byte + title: fork_app_hash is the AppHash of the fork block + canonical_finality_sig: + type: string + format: byte + title: >- + canonical_finality_sig is the finality signature to the + canonical block - delegation - title: |- - ValidatorLifecycle is a message that records the lifecycle of - a delegation - title: |- - QueryDelegationLifecycleRequest is the response type for the - Query/DelegationLifecycle RPC method - babylon.epoching.v1.QueryEpochInfoResponse: - type: object - properties: - epoch: + where finality signature is an EOTS signature, i.e., + + the `s` in a Schnorr signature `(r, s)` + + `r` is the public randomness that is already committed by the + finality provider + fork_finality_sig: + type: string + format: byte + title: |- + fork_finality_sig is the finality signature to the fork block + where finality signature is an EOTS signature + title: >- + Evidence is the evidence that a finality provider has signed + finality + + signatures with correct public randomness on two conflicting Babylon + headers + title: blocks is the list of evidences + pagination: + description: pagination defines the pagination in the response. type: object properties: - epoch_number: + next_key: type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: + format: byte + description: |- + 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: type: string format: uint64 title: >- - current_epoch_interval is the epoch interval at the time of this - epoch - first_block_height: - type: string - format: uint64 - title: first_block_height is the height of the first block in this epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch to - complete - - unbonding validators/delegations when a previous epoch's - checkpoint is - - finalised. The last_block_time field is nil in the epoch's - beginning, and + total is total number of results available if + PageRequest.count_total - is set upon the end of this epoch. - sealer_app_hash_hex: - type: string - description: |- - sealer is the last block of the sealed epoch - sealer_app_hash points to the sealer but stored in the 1st header - of the next epoch as hex string. - sealer_block_hash: - type: string - description: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch as hex string. - title: EpochResponse is a structure that contains the metadata of an epoch - title: QueryEpochInfoRequest is the response type for the Query/EpochInfo method - babylon.epoching.v1.QueryEpochMsgsResponse: + was set, its value is undefined otherwise + description: |- + QueryListEvidencesResponse is the response type for the + Query/ListEvidences RPC method. + babylon.finality.v1.QueryListPubRandCommitResponse: type: object properties: - msgs: - type: array - items: + pub_rand_commit_map: + type: object + additionalProperties: type: object properties: - tx_id: - type: string - description: tx_id is the ID of the tx that contains the message as hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the marshaled - message as hex. - block_height: + num_pub_rand: type: string format: uint64 - title: block_height is the height when this msg is submitted to Babylon - block_time: + title: num_pub_rand is the number of committed public randomness + commitment: type: string - format: date-time - title: >- - block_time is the timestamp when this msg is submitted to - Babylon - msg: + format: byte + title: commitment is the value of the commitment + epoch_num: type: string - description: >- - msg is the actual message that is sent by a user and is queued - by the - - epoching module as string. + format: uint64 + title: epoch_num defines the epoch number that the commit falls into title: >- - QueuedMessageResponse is a message that can change the validator set - and is delayed + PubRandCommitResponse is the response type for a public randomness + commitment + title: >- + pub_rand_commit_map is the map where the key is the start height and + the value - to the end of an epoch - title: msgs is the list of messages queued in the current epoch + is the public randomness commitment at this height for the given + finality provider pagination: - title: pagination defines the pagination in the response + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryListPubRandCommitResponse is the response type for the + Query/ListPubRandCommit RPC method. + babylon.finality.v1.QueryListPublicRandomnessResponse: + type: object + properties: + pub_rand_map: + type: object + additionalProperties: + type: string + format: byte + title: >- + pub_rand_map is the map where the key is the height and the value + + is the public randomness at this height for the given finality + provider + pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -11287,43 +20420,156 @@ definitions: there are no more results. total: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryListPublicRandomnessResponse is the response type for the + Query/ListPublicRandomness RPC method. + babylon.finality.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + max_active_finality_providers: + type: integer + format: int64 + title: >- + max_active_finality_providers is the maximum number of active + finality providers in the BTC staking protocol + signed_blocks_window: + type: string + format: int64 + title: >- + signed_blocks_window defines the size of the sliding window for + tracking finality provider liveness + finality_sig_timeout: + type: string + format: int64 + title: >- + finality_sig_timeout defines how much time (in terms of blocks) + finality providers have to cast a finality + + vote before being judged as missing their voting turn on the given + block + min_signed_per_window: + type: string + format: byte + title: >- + min_signed_per_window defines the minimum number of blocks that a + finality provider is required to sign + + within the sliding window to avoid being jailed + min_pub_rand: + type: string + format: uint64 + title: |- + min_pub_rand is the minimum number of public randomness each + message should commit + jail_duration: + type: string + title: >- + jail_duration is the minimum period of time that a finality + provider remains jailed + finality_activation_height: + type: string + format: uint64 + description: >- + finality_activation_height is the babylon block height which the + finality module will + + start to accept finality voting and the minimum allowed value for + the public randomness + + commit start height. + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.finality.v1.QuerySigningInfoResponse: + type: object + properties: + signing_info: + type: object + properties: + fp_btc_pk_hex: + type: string + title: >- + fp_btc_pk is the BTC PK of the finality provider that casts this + vote + start_height: + type: string + format: int64 + title: >- + start_height is the block height at which finality provider become + active + missed_blocks_counter: + type: string + format: int64 + description: >- + missed_blocks_counter defines a counter to avoid unnecessary array + reads. - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + description: >- + SigningInfoResponse defines the API response containing a finality + provider's signing info + + for monitoring their liveness activity. + title: >- + QuerySigningInfoResponse is the response type for the Query/SigningInfo + RPC - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: |- - QueryEpochMsgsResponse is the response type for the Query/EpochMsgs RPC method - babylon.epoching.v1.QueryEpochValSetResponse: + babylon.finality.v1.QuerySigningInfosResponse: type: object properties: - validators: + signing_infos: type: array items: type: object properties: - addr: + fp_btc_pk_hex: type: string - format: byte - title: addr is the validator's address (in sdk.ValAddress) - power: + title: >- + fp_btc_pk is the BTC PK of the finality provider that casts this + vote + start_height: type: string format: int64 - title: power is the validator's voting power - title: Validator is a message that denotes a validator - total_voting_power: - type: string - format: int64 + title: >- + start_height is the block height at which finality provider + become active + missed_blocks_counter: + type: string + format: int64 + description: >- + missed_blocks_counter defines a counter to avoid unnecessary + array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + description: >- + SigningInfoResponse defines the API response containing a finality + provider's signing info + + for monitoring their liveness activity. + title: info is the signing info of all finality providers with signing info pagination: type: object properties: @@ -11350,154 +20596,218 @@ definitions: repeated Bar results = 1; PageResponse page = 2; } - title: |- - QueryEpochValSetRequest is the response type for the Query/EpochValSet RPC + title: >- + QuerySigningInfosResponse is the response type for the Query/SigningInfos + RPC + method - babylon.epoching.v1.QueryEpochsInfoResponse: + babylon.finality.v1.QueryVotesAtHeightResponse: type: object properties: - epochs: + btc_pks: type: array items: - type: object - properties: - epoch_number: - type: string - format: uint64 - title: epoch_number is the number of this epoch - current_epoch_interval: - type: string - format: uint64 - title: >- - current_epoch_interval is the epoch interval at the time of this - epoch - first_block_height: - type: string - format: uint64 - title: >- - first_block_height is the height of the first block in this - epoch - last_block_time: - type: string - format: date-time - description: >- - last_block_time is the time of the last block in this epoch. - - Babylon needs to remember the last header's time of each epoch - to complete + type: string + format: byte + title: >- + btc_pk is the Bitcoin secp256k1 PK of finality providers who have + signed the block at given height. - unbonding validators/delegations when a previous epoch's - checkpoint is + the PK follows encoding in BIP-340 spec + description: |- + QueryVotesAtHeightResponse is the response type for the + Query/VotesAtHeight RPC method. + babylon.finality.v1.SigningInfoResponse: + type: object + properties: + fp_btc_pk_hex: + type: string + title: fp_btc_pk is the BTC PK of the finality provider that casts this vote + start_height: + type: string + format: int64 + title: >- + start_height is the block height at which finality provider become + active + missed_blocks_counter: + type: string + format: int64 + description: >- + missed_blocks_counter defines a counter to avoid unnecessary array + reads. - finalised. The last_block_time field is nil in the epoch's - beginning, and + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to liveness + downtime. + description: >- + SigningInfoResponse defines the API response containing a finality + provider's signing info - is set upon the end of this epoch. - sealer_app_hash_hex: - type: string - description: >- - sealer is the last block of the sealed epoch + for monitoring their liveness activity. + babylon.mint.v1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: + type: string + format: byte + description: AnnualProvisions is the current annual provisions. + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + babylon.mint.v1.QueryGenesisTimeResponse: + type: object + properties: + genesis_time: + type: string + format: date-time + description: GenesisTime is the timestamp associated with the first block. + description: >- + QueryGenesisTimeResponse is the response type for the Query/GenesisTime + RPC - sealer_app_hash points to the sealer but stored in the 1st - header + method. + babylon.mint.v1.QueryInflationRateResponse: + type: object + properties: + inflation_rate: + type: string + format: byte + description: InflationRate is the current inflation rate. + description: >- + QueryInflationRateResponse is the response type for the + Query/InflationRate - of the next epoch as hex string. - sealer_block_hash: - type: string - description: |- - sealer_block_hash is the hash of the sealer - the validator set has generated a BLS multisig on the hash, - i.e., hash of the last block in the epoch as hex string. - title: EpochResponse is a structure that contains the metadata of an epoch - pagination: - title: pagination defines the pagination in the response - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + RPC method. + babylon.monitor.v1.QueryEndedEpochBtcHeightResponse: + type: object + properties: + btc_light_client_height: + type: integer + format: int64 + title: height of btc light client when epoch ended + title: |- + QueryEndedEpochBtcHeightResponse defines a response type for + EndedEpochBtcHeight RPC method + babylon.monitor.v1.QueryReportedCheckpointBtcHeightResponse: + type: object + properties: + btc_light_client_height: + type: integer + format: int64 + title: height of btc light client when checkpoint is reported + title: |- + QueryReportedCheckpointBtcHeightResponse defines a response type for + ReportedCheckpointBtcHeight RPC method + babylon.checkpointing.v1.BlsPublicKeyListResponse: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key_hex: + type: string + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: voting_power is the voting power of the validator at the given epoch + title: >- + BlsPublicKeyListResponse couples validator address, voting power, and its + bls - was set, its value is undefined otherwise + public key + babylon.checkpointing.v1.CheckpointStateUpdateResponse: + type: object + properties: + state: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + CheckpointStatus is the status of a checkpoint. - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QueryEpochsInfoResponse is the response type for the Query/EpochInfos - method - babylon.epoching.v1.QueryLatestEpochMsgsResponse: + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: state defines the event of a state transition towards this state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 + title: >- + block_height is the height of the Babylon block that triggers the + state + + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that triggers the + state + + update + description: >- + CheckpointStateUpdateResponse defines a state transition on the + checkpoint. + babylon.checkpointing.v1.CheckpointStatus: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + babylon.checkpointing.v1.QueryBlsPublicKeyListResponse: type: object properties: - latest_epoch_msgs: + validator_with_bls_keys: type: array items: type: object properties: - epoch_number: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key_hex: + type: string + title: bls_pub_key is the BLS public key of the validator + voting_power: type: string format: uint64 - msgs: - type: array - items: - type: object - properties: - tx_id: - type: string - description: >- - tx_id is the ID of the tx that contains the message as - hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the - marshaled message as hex. - block_height: - type: string - format: uint64 - title: >- - block_height is the height when this msg is submitted to - Babylon - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp when this msg is submitted to - Babylon - msg: - type: string - description: >- - msg is the actual message that is sent by a user and is - queued by the - - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the - validator set and is delayed - - to the end of an epoch + title: >- + voting_power is the voting power of the validator at the given + epoch title: >- - QueuedMessageList is a message that contains a list of - staking-related + BlsPublicKeyListResponse couples validator address, voting power, + and its bls - messages queued for an epoch - title: |- - latest_epoch_msgs is a list of QueuedMessageList - each QueuedMessageList has a field identifying the epoch number + public key pagination: + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -11514,783 +20824,701 @@ definitions: total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - 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; - } - title: |- - QueryLatestEpochMsgsResponse is the response type for the - Query/LatestEpochMsgs RPC method - babylon.epoching.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - epoch_interval: - type: string - format: uint64 - title: >- - epoch_interval is the number of consecutive blocks to form an - epoch - description: QueryParamsResponse is the response type for the Query/Params RPC method. - babylon.epoching.v1.QueryValidatorLifecycleResponse: - type: object - properties: - val_addr: - type: string - val_life: - type: array - items: - type: object - properties: - state_desc: - type: string - description: StateDesc defines the descriptive state. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - description: >- - ValStateUpdateResponse is a message response that records a state - update of a validator. - title: |- - QueryValidatorLifecycleResponse is the response type for the - Query/ValidatorLifecycle RPC method - babylon.epoching.v1.QueuedMessageList: - type: object - properties: - epoch_number: - type: string - format: uint64 - msgs: - type: array - items: - type: object - properties: - tx_id: - type: string - description: tx_id is the ID of the tx that contains the message as hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the marshaled - message as hex. - block_height: - type: string - format: uint64 - title: block_height is the height when this msg is submitted to Babylon - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp when this msg is submitted to - Babylon - msg: - type: string - description: >- - msg is the actual message that is sent by a user and is queued - by the - - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the validator set - and is delayed - - to the end of an epoch - title: |- - QueuedMessageList is a message that contains a list of staking-related - messages queued for an epoch - babylon.epoching.v1.QueuedMessageResponse: - type: object - properties: - tx_id: - type: string - description: tx_id is the ID of the tx that contains the message as hex. - msg_id: - type: string - description: >- - msg_id is the original message ID, i.e., hash of the marshaled message - as hex. - block_height: - type: string - format: uint64 - title: block_height is the height when this msg is submitted to Babylon - block_time: - type: string - format: date-time - title: block_time is the timestamp when this msg is submitted to Babylon - msg: - type: string - description: |- - msg is the actual message that is sent by a user and is queued by the - epoching module as string. - title: >- - QueuedMessageResponse is a message that can change the validator set and - is delayed - - to the end of an epoch - babylon.epoching.v1.ValStateUpdateResponse: - type: object - properties: - state_desc: - type: string - description: StateDesc defines the descriptive state. - block_height: - type: string - format: uint64 - block_time: - type: string - format: date-time - description: >- - ValStateUpdateResponse is a message response that records a state update - of a validator. - babylon.epoching.v1.Validator: + was set, its value is undefined otherwise + description: |- + QueryBlsPublicKeyListResponse is the response type for the + Query/BlsPublicKeys RPC method. + babylon.checkpointing.v1.QueryEpochStatusResponse: type: object properties: - addr: - type: string - format: byte - title: addr is the validator's address (in sdk.ValAddress) - power: + status: type: string - format: int64 - title: power is the validator's voting power - title: Validator is a message that denotes a validator - cosmos.base.v1beta1.Coin: + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + description: |- + QueryEpochStatusResponse is the response type for the Query/EpochStatus + RPC method. + babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse: type: object properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + raw_checkpoint: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: |- + block_hash_hex defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS + multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - babylon.btcstaking.v1.BTCDelegationResponse: + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + description: |- + QueryLastCheckpointWithStatusResponse is the response type for the + Query/LastCheckpointWithStatus RPC method. + babylon.checkpointing.v1.QueryRawCheckpointListResponse: type: object properties: - staker_addr: - type: string - description: staker_addr is the address to receive rewards from BTC delegation. - btc_pk: - type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this BTC delegation - the PK follows encoding in BIP-340 spec - fp_btc_pk_list: - type: array - items: - type: string - format: byte - title: >- - fp_btc_pk_list is the list of BIP-340 PKs of the finality providers - that - - this BTC delegation delegates to - staking_time: - type: integer - format: int64 - title: >- - staking_time is the number of blocks for which the delegation is - locked on BTC chain - start_height: - type: integer - format: int64 - title: |- - start_height is the start BTC height of the BTC delegation - it is the start BTC height of the timelock - end_height: - type: integer - format: int64 - title: |- - end_height is the end height of the BTC delegation - it is the end BTC height of the timelock - w - total_sat: - type: string - format: uint64 - title: |- - total_sat is the total amount of BTC stakes in this delegation - quantified in satoshi - staking_tx_hex: - type: string - title: staking_tx_hex is the hex string of staking tx - slashing_tx_hex: - type: string - title: slashing_tx_hex is the hex string of slashing tx - delegator_slash_sig_hex: - type: string - description: |- - delegator_slash_sig_hex is the signature on the slashing tx - by the delegator (i.e., SK corresponding to btc_pk) as string hex. - It will be a part of the witness for the staking tx output. - covenant_sigs: + raw_checkpoints: type: array items: type: object properties: - cov_pk: + ckpt: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: >- + block_hash_hex defines the 'BlockID.Hash', which is the hash + of + + the block that individual BLS sigs are signed on as hex + string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the + BLS multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS + + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: + type: string + description: status_desc represents the description of status enum. + bls_aggr_pk: type: string format: byte + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 title: >- - cov_pk is the public key of the covenant emulator, used as the - public key of the adaptor signature - adaptor_sigs: + power_sum defines the accumulated voting power for the + checkpoint + lifecycle: type: array items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each encrypted by - a restaked BTC finality provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures signed by the + type: object + properties: + state: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: >- + state defines the event of a state transition towards this + state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 + title: >- + block_height is the height of the Babylon block that + triggers the state + + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that + triggers the state - covenant with different finality provider's public keys as - encryption keys - description: |- - covenant_sigs is a list of adaptor signatures on the slashing tx - by each covenant member - It will be a part of the witness for the staking tx output. - staking_output_idx: - type: integer - format: int64 - title: >- - staking_output_idx is the index of the staking output in the staking - tx - active: - type: boolean - title: whether this delegation is active - status_desc: - type: string - description: descriptive status of current delegation. - unbonding_time: - type: integer - format: int64 - title: >- - unbonding_time used in unbonding output timelock path and in slashing - transactions + update + description: >- + CheckpointStateUpdateResponse defines a state transition on + the checkpoint. + description: >- + lifecycle defines the lifecycle of this checkpoint, i.e., each + state - change outputs - undelegation_response: - description: undelegation_response is the undelegation info of this delegation. + transition and the time (in both timestamp and block height) of + this + + transition. + description: >- + RawCheckpointWithMetaResponse wraps the raw checkpoint with + metadata. + title: the order is going from the newest to oldest based on the epoch number + pagination: + description: pagination defines the pagination in the response. type: object properties: - unbonding_tx_hex: + next_key: type: string - description: >- - unbonding_tx is the transaction which will transfer the funds from - staking + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - output to unbonding output. Unbonding output will usually have - lower timelock + was set, its value is undefined otherwise + description: |- + QueryRawCheckpointListResponse is the response type for the + Query/RawCheckpoints RPC method. + babylon.checkpointing.v1.QueryRawCheckpointResponse: + type: object + properties: + raw_checkpoint: + type: object + properties: + ckpt: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: >- + block_hash_hex defines the 'BlockID.Hash', which is the hash + of - than staking output. The unbonding tx as string hex. - covenant_unbonding_sig_list: - type: array - items: - type: object - properties: - pk: - type: string - format: byte - sig: - type: string - format: byte - title: >- - SignatureInfo is a BIP-340 signature together with its signer's - BIP-340 PK - title: >- - covenant_unbonding_sig_list is the list of signatures on the - unbonding tx + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the + BLS multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - by covenant members - slashing_tx_hex: - type: string - title: slashingTxHex is the hex string of slashing tx - delegator_slashing_sig_hex: + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING description: |- - delegator_slashing_sig is the signature on the slashing tx - by the delegator (i.e., SK corresponding to btc_pk). - It will be a part of the witness for the unbonding tx output. - The delegator slashing sig as string hex. - covenant_slashing_sigs: + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: + type: string + description: status_desc represents the description of status enum. + bls_aggr_pk: + type: string + format: byte + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 + title: power_sum defines the accumulated voting power for the checkpoint + lifecycle: type: array items: type: object properties: - cov_pk: + state: type: string - format: byte + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. title: >- - cov_pk is the public key of the covenant emulator, used as - the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte + state defines the event of a state transition towards this + state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 title: >- - adaptor_sigs is a list of adaptor signatures, each encrypted - by a restaked BTC finality provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures signed by - the - - covenant with different finality provider's public keys as - encryption keys - description: |- - covenant_slashing_sigs is a list of adaptor signatures on the - unbonding slashing tx by each covenant member - It will be a part of the witness for the staking tx output. - delegator_unbonding_info_response: - title: >- - btc_undelegation_info contains all necessary info about the - transaction - - which spent the staking output - type: object - properties: - spend_stake_tx_hex: - type: string - title: >- - spend_stake_tx_hex is the transaction which spent the staking - output. It is - - filled only if the spend_stake_tx_hex is different than the - unbonding_tx_hex - title: >- - BTCUndelegationResponse provides all necessary info about the - undeleagation - params_version: - type: integer - format: int64 - title: params version used to validate delegation - description: >- - BTCDelegationResponse is the client needed information from a - BTCDelegation with the current status based on parameters. - babylon.btcstaking.v1.BTCDelegationStatus: - type: string - enum: - - PENDING - - VERIFIED - - ACTIVE - - UNBONDED - - EXPIRED - - ANY - default: PENDING - description: >- - BTCDelegationStatus is the status of a delegation. - - There are two possible valid state transition paths for a BTC delegation: - - - PENDING -> VERIFIED -> ACTIVE -> UNBONDED -> EXPIRED - - - PENDING -> VERIFIED -> ACTIVE -> UNBONDED/EXPIRED - - and one invalid state transition path: - - - PENDING -> VERIFIED -> UNBONDED i.e the staker unbonded before + block_height is the height of the Babylon block that + triggers the state - activating delegation on Babylon chain. + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that + triggers the state - In valid transition paths, the delegation becomes UNBONDED when: + update + description: >- + CheckpointStateUpdateResponse defines a state transition on the + checkpoint. + description: >- + lifecycle defines the lifecycle of this checkpoint, i.e., each + state - - either the staking transaction timelock expires + transition and the time (in both timestamp and block height) of + this - - or the staker requests early undelegation through MsgBTCUndelegate - message. + transition. + description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. + description: >- + QueryRawCheckpointResponse is the response type for the + Query/RawCheckpoint - - PENDING: PENDING defines a delegation that is waiting for covenant signatures. - - VERIFIED: VERIFIED defines a delegation that has covenant signatures but is not yet - included in the BTC chain. - - ACTIVE: ACTIVE defines a delegation that has voting power - - UNBONDED: UNBONDED defines a delegation no longer has voting power - by receiving unbonding tx with signatures from staker and covenant - committee - - EXPIRED: EXPIRED defines a delegation no longer has voting power - for reaching the end of staking transaction timelock - - ANY: ANY is any of the above status - babylon.btcstaking.v1.BTCDelegatorDelegationsResponse: + RPC method. + babylon.checkpointing.v1.QueryRawCheckpointsResponse: type: object properties: - dels: + raw_checkpoints: type: array items: type: object properties: - staker_addr: - type: string - description: >- - staker_addr is the address to receive rewards from BTC - delegation. - btc_pk: - type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this BTC delegation - the PK follows encoding in BIP-340 spec - fp_btc_pk_list: - type: array - items: - type: string - format: byte - title: >- - fp_btc_pk_list is the list of BIP-340 PKs of the finality - providers that - - this BTC delegation delegates to - staking_time: - type: integer - format: int64 - title: >- - staking_time is the number of blocks for which the delegation is - locked on BTC chain - start_height: - type: integer - format: int64 - title: |- - start_height is the start BTC height of the BTC delegation - it is the start BTC height of the timelock - end_height: - type: integer - format: int64 - title: |- - end_height is the end height of the BTC delegation - it is the end BTC height of the timelock - w - total_sat: - type: string - format: uint64 - title: |- - total_sat is the total amount of BTC stakes in this delegation - quantified in satoshi - staking_tx_hex: - type: string - title: staking_tx_hex is the hex string of staking tx - slashing_tx_hex: - type: string - title: slashing_tx_hex is the hex string of slashing tx - delegator_slash_sig_hex: - type: string - description: >- - delegator_slash_sig_hex is the signature on the slashing tx - - by the delegator (i.e., SK corresponding to btc_pk) as string - hex. - - It will be a part of the witness for the staking tx output. - covenant_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, used as - the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each - encrypted by a restaked BTC finality provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures signed - by the - - covenant with different finality provider's public keys as - encryption keys - description: |- - covenant_sigs is a list of adaptor signatures on the slashing tx - by each covenant member - It will be a part of the witness for the staking tx output. - staking_output_idx: - type: integer - format: int64 - title: >- - staking_output_idx is the index of the staking output in the - staking tx - active: - type: boolean - title: whether this delegation is active - status_desc: - type: string - description: descriptive status of current delegation. - unbonding_time: - type: integer - format: int64 - title: >- - unbonding_time used in unbonding output timelock path and in - slashing transactions - - change outputs - undelegation_response: - description: >- - undelegation_response is the undelegation info of this - delegation. + ckpt: type: object properties: - unbonding_tx_hex: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: type: string - description: >- - unbonding_tx is the transaction which will transfer the - funds from staking - - output to unbonding output. Unbonding output will usually - have lower timelock - - than staking output. The unbonding tx as string hex. - covenant_unbonding_sig_list: - type: array - items: - type: object - properties: - pk: - type: string - format: byte - sig: - type: string - format: byte - title: >- - SignatureInfo is a BIP-340 signature together with its - signer's BIP-340 PK title: >- - covenant_unbonding_sig_list is the list of signatures on the - unbonding tx + block_hash_hex defines the 'BlockID.Hash', which is the hash + of - by covenant members - slashing_tx_hex: + the block that individual BLS sigs are signed on as hex + string + bitmap: type: string - title: slashingTxHex is the hex string of slashing tx - delegator_slashing_sig_hex: + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the + BLS multi sig + bls_multi_sig: type: string - description: >- - delegator_slashing_sig is the signature on the slashing tx - - by the delegator (i.e., SK corresponding to btc_pk). + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - It will be a part of the witness for the unbonding tx - output. + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - The delegator slashing sig as string hex. - covenant_slashing_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, - used as the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each - encrypted by a restaked BTC finality provider's public - key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures - signed by the + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: + type: string + description: status_desc represents the description of status enum. + bls_aggr_pk: + type: string + format: byte + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 + title: >- + power_sum defines the accumulated voting power for the + checkpoint + lifecycle: + type: array + items: + type: object + properties: + state: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - covenant with different finality provider's public keys as - encryption keys - description: >- - covenant_slashing_sigs is a list of adaptor signatures on - the + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: >- + state defines the event of a state transition towards this + state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 + title: >- + block_height is the height of the Babylon block that + triggers the state - unbonding slashing tx by each covenant member + update + block_time: + type: string + format: date-time + title: >- + block_time is the timestamp in the Babylon block that + triggers the state - It will be a part of the witness for the staking tx output. - delegator_unbonding_info_response: - title: >- - btc_undelegation_info contains all necessary info about the - transaction + update + description: >- + CheckpointStateUpdateResponse defines a state transition on + the checkpoint. + description: >- + lifecycle defines the lifecycle of this checkpoint, i.e., each + state - which spent the staking output - type: object - properties: - spend_stake_tx_hex: - type: string - title: >- - spend_stake_tx_hex is the transaction which spent the - staking output. It is + transition and the time (in both timestamp and block height) of + this - filled only if the spend_stake_tx_hex is different than - the unbonding_tx_hex - title: >- - BTCUndelegationResponse provides all necessary info about the - undeleagation - params_version: - type: integer - format: int64 - title: params version used to validate delegation + transition. description: >- - BTCDelegationResponse is the client needed information from a - BTCDelegation with the current status based on parameters. - description: >- - BTCDelegatorDelegationsResponse is a collection of BTC delegations - responses from the same delegator. - babylon.btcstaking.v1.BTCSigType: - type: string - enum: - - BIP340 - - BIP322 - - ECDSA - default: BIP340 + RawCheckpointWithMetaResponse wraps the raw checkpoint with + metadata. + title: the order is going from the newest to oldest based on the epoch number + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - - BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding - - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding - - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding - ref: - https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 - title: BTCSigType indicates the type of btc_sig in a pop - babylon.btcstaking.v1.BTCUndelegationResponse: + QueryRawCheckpointsResponse is the response type for the + Query/RawCheckpoints + + RPC method. + babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse: type: object properties: - unbonding_tx_hex: + tip_epoch: type: string - description: >- - unbonding_tx is the transaction which will transfer the funds from - staking + format: uint64 + epoch_count: + type: string + format: uint64 + status_count: + type: object + additionalProperties: + type: string + format: uint64 + description: |- + QueryRecentEpochStatusCountResponse is the response type for the + Query/EpochStatusCount RPC method. + babylon.checkpointing.v1.RawCheckpointResponse: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: |- + block_hash_hex defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS multi + sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from individual + BLS - output to unbonding output. Unbonding output will usually have lower - timelock + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + babylon.checkpointing.v1.RawCheckpointWithMetaResponse: + type: object + properties: + ckpt: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash_hex: + type: string + title: |- + block_hash_hex defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on as hex string + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS + multi sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - than staking output. The unbonding tx as string hex. - covenant_unbonding_sig_list: - type: array - items: - type: object - properties: - pk: - type: string - format: byte - sig: - type: string - format: byte - title: >- - SignatureInfo is a BIP-340 signature together with its signer's - BIP-340 PK - title: >- - covenant_unbonding_sig_list is the list of signatures on the unbonding - tx + sigs + title: RawCheckpointResponse wraps the BLS multi sig with metadata + status: + type: string + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. - by covenant members - slashing_tx_hex: + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: status defines the status of the checkpoint + status_desc: type: string - title: slashingTxHex is the hex string of slashing tx - delegator_slashing_sig_hex: + description: status_desc represents the description of status enum. + bls_aggr_pk: type: string - description: |- - delegator_slashing_sig is the signature on the slashing tx - by the delegator (i.e., SK corresponding to btc_pk). - It will be a part of the witness for the unbonding tx output. - The delegator slashing sig as string hex. - covenant_slashing_sigs: + format: byte + title: bls_aggr_pk defines the aggregated BLS public key + power_sum: + type: string + format: uint64 + title: power_sum defines the accumulated voting power for the checkpoint + lifecycle: type: array items: type: object properties: - cov_pk: + state: type: string - format: byte + enum: + - CKPT_STATUS_ACCUMULATING + - CKPT_STATUS_SEALED + - CKPT_STATUS_SUBMITTED + - CKPT_STATUS_CONFIRMED + - CKPT_STATUS_FINALIZED + default: CKPT_STATUS_ACCUMULATING + description: |- + CheckpointStatus is the status of a checkpoint. + + - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. + - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. + - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. + - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. + - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + title: state defines the event of a state transition towards this state + status_desc: + type: string + description: status_desc represents the description of status enum. + block_height: + type: string + format: uint64 title: >- - cov_pk is the public key of the covenant emulator, used as the - public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte + block_height is the height of the Babylon block that triggers + the state + + update + block_time: + type: string + format: date-time title: >- - adaptor_sigs is a list of adaptor signatures, each encrypted by - a restaked BTC finality provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures signed by the + block_time is the timestamp in the Babylon block that triggers + the state - covenant with different finality provider's public keys as - encryption keys + update + description: >- + CheckpointStateUpdateResponse defines a state transition on the + checkpoint. description: |- - covenant_slashing_sigs is a list of adaptor signatures on the - unbonding slashing tx by each covenant member - It will be a part of the witness for the staking tx output. - delegator_unbonding_info_response: + lifecycle defines the lifecycle of this checkpoint, i.e., each state + transition and the time (in both timestamp and block height) of this + transition. + description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. + babylon.btcstkconsumer.v1.ConsumerRegister: + type: object + properties: + consumer_id: + type: string title: >- - btc_undelegation_info contains all necessary info about the - transaction + consumer_id is the ID of the consumer - which spent the staking output + - for Cosmos SDK chains, the consumer ID will be the IBC client ID + + - for ETH L2 chains, the consumer ID will be the chain ID of the ETH + L2 + chain + consumer_name: + type: string + title: consumer_name is the name of the consumer + consumer_description: + type: string + title: consumer_description is a description for the consumer (can be empty) + cosmos_consumer_metadata: type: object properties: - spend_stake_tx_hex: + channel_id: + type: string + title: channel_id defines the IBC channel ID for the consumer chain + title: CosmosConsumerMetadata is the metadata for the Cosmos integration + eth_l2_consumer_metadata: + type: object + properties: + finality_contract_address: type: string title: >- - spend_stake_tx_hex is the transaction which spent the staking - output. It is + finality_contract_address is the address of the finality contract + for - filled only if the spend_stake_tx_hex is different than the - unbonding_tx_hex - title: >- - BTCUndelegationResponse provides all necessary info about the - undeleagation - babylon.btcstaking.v1.CovenantAdaptorSignatures: + the ETH L2 integration + title: ETHL2ConsumerMetadata is the metadata for the ETH L2 integration + title: ConsumerRegister is the registration information of a consumer + babylon.btcstkconsumer.v1.CosmosConsumerMetadata: type: object properties: - cov_pk: + channel_id: type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, used as the public - key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each encrypted by a - restaked BTC finality provider's public key - title: |- - CovenantAdaptorSignatures is a list adaptor signatures signed by the - covenant with different finality provider's public keys as encryption keys - babylon.btcstaking.v1.DelegatorUnbondingInfoResponse: + title: channel_id defines the IBC channel ID for the consumer chain + title: CosmosConsumerMetadata is the metadata for the Cosmos integration + babylon.btcstkconsumer.v1.ETHL2ConsumerMetadata: type: object properties: - spend_stake_tx_hex: + finality_contract_address: type: string - title: >- - spend_stake_tx_hex is the transaction which spent the staking output. - It is - - filled only if the spend_stake_tx_hex is different than the - unbonding_tx_hex - title: >- - DelegatorUnbondingInfoResponse provides all necessary info about - transaction - - which spent the staking output - babylon.btcstaking.v1.FinalityProviderResponse: + title: |- + finality_contract_address is the address of the finality contract for + the ETH L2 integration + title: ETHL2ConsumerMetadata is the metadata for the ETH L2 integration + babylon.btcstkconsumer.v1.FinalityProviderResponse: type: object properties: description: @@ -12319,7 +21547,7 @@ definitions: description: commission defines the commission rate of the finality provider. addr: type: string - description: addr is the address to receive commission from delegations. + title: babylon_pk is the Babylon secp256k1 PK of this finality provider btc_pk: type: string format: byte @@ -12327,9 +21555,7 @@ definitions: btc_pk is the Bitcoin secp256k1 PK of this finality provider the PK follows encoding in BIP-340 spec pop: - description: |- - pop is the proof of possession of the BTC_PK by the fp addr. - Essentially is the signature where the BTC SK sigs the fp addr. + title: pop is the proof of possession of babylon_pk and btc_pk type: object properties: btc_sig_type: @@ -12353,634 +21579,360 @@ definitions: title: >- btc_sig is the signature generated via sign(sk_btc, babylon_staker_address) - - the signature follows encoding in either BIP-340 spec or BIP-322 - spec - title: |- - ProofOfPossessionBTC is the proof of possession that a Babylon - address and a Bitcoin secp256k1 secret key are held by the same - person - slashed_babylon_height: - type: string - format: uint64 - title: |- - slashed_babylon_height indicates the Babylon height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - slashed_btc_height: - type: integer - format: int64 - title: |- - slashed_btc_height indicates the BTC height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - height: - type: string - format: uint64 - title: height is the queried Babylon height - jailed: - type: boolean - title: jailed defines whether the finality provider is jailed - highest_voted_height: - type: integer - format: int64 - title: |- - highest_voted_height is the highest height for which the - finality provider has voted - description: >- - FinalityProviderResponse defines a finality provider with voting power - information. - babylon.btcstaking.v1.Params: - type: object - properties: - covenant_pks: - type: array - items: - type: string - format: byte - title: |- - PARAMETERS COVERING STAKING - covenant_pks is the list of public keys held by the covenant committee - each PK follows encoding in BIP-340 spec on Bitcoin - covenant_quorum: - type: integer - format: int64 - title: >- - covenant_quorum is the minimum number of signatures needed for the - covenant - - multisignature - min_staking_value_sat: - type: string - format: int64 - title: >- - min_staking_value_sat is the minimum of satoshis locked in staking - output - max_staking_value_sat: - type: string - format: int64 - title: >- - max_staking_value_sat is the maximum of satoshis locked in staking - output - min_staking_time_blocks: - type: integer - format: int64 - title: >- - min_staking_time is the minimum lock time specified in staking output - script - max_staking_time_blocks: - type: integer - format: int64 - title: >- - max_staking_time_blocks is the maximum lock time time specified in - staking output script - slashing_pk_script: - type: string - format: byte - title: >- - PARAMETERS COVERING SLASHING - - slashing_pk_script is the pk_script expected in slashing output ie. - the first - - output of slashing transaction - min_slashing_tx_fee_sat: - type: string - format: int64 - title: |- - min_slashing_tx_fee_sat is the minimum amount of tx fee (quantified - in Satoshi) needed for the pre-signed slashing tx. It covers both: - staking slashing transaction and unbonding slashing transaction - slashing_rate: - type: string - title: >- - slashing_rate determines the portion of the staked amount to be - slashed, - - expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 - decimal - - places - unbonding_time_blocks: - type: integer - format: int64 - title: >- - PARAMETERS COVERING UNBONDING - - unbonding_time is the exact unbonding time required from unbonding - transaction - - it must be larger than `checkpoint_finalization_timeout` from - `btccheckpoint` module - unbonding_fee_sat: - type: string - format: int64 - title: unbonding_fee exact fee required for unbonding transaction - min_commission_rate: - type: string - title: >- - PARAMETERS COVERING FINALITY PROVIDERS - - min_commission_rate is the chain-wide minimum commission rate that a - finality provider - - can charge their delegators expressed as a decimal (e.g., 0.5 for - 50%). Maximal precion - - is 2 decimal places - delegation_creation_base_gas_fee: - type: string - format: uint64 - title: base gas fee for delegation creation - allow_list_expiration_height: + + the signature follows encoding in either BIP-340 spec or BIP-322 + spec + slashed_babylon_height: type: string format: uint64 - title: >- - allow_list_expiration_height is the height at which the allow list - expires - - i.e all staking transactions are allowed to enter Babylon chain - afterwards - - setting it to 0 means allow list is disabled - btc_activation_height: + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: type: integer format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 title: >- - btc_activation_height is the btc height from which parameters are - activated (inclusive) - description: Params defines the parameters for the module. - babylon.btcstaking.v1.ProofOfPossessionBTC: + voting_power is the voting power of this finality provider at the + given height + consumer_id: + type: string + title: consumer_id is the consumer id this finality provider is registered to + description: >- + FinalityProviderResponse defines a finality provider with voting power + information. + babylon.btcstkconsumer.v1.Params: type: object properties: - btc_sig_type: - title: btc_sig_type indicates the type of btc_sig in the pop - type: string - enum: - - BIP340 - - BIP322 - - ECDSA - default: BIP340 + permissioned_integration: + type: boolean description: >- - - BIP340: BIP340 means the btc_sig will follow the BIP-340 encoding - - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding - - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding - ref: - https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 - btc_sig: - type: string - format: byte - title: >- - btc_sig is the signature generated via sign(sk_btc, - babylon_staker_address) + permissioned_integration is a flag to enable permissioned integration, + i.e., - the signature follows encoding in either BIP-340 spec or BIP-322 spec - title: |- - ProofOfPossessionBTC is the proof of possession that a Babylon - address and a Bitcoin secp256k1 secret key are held by the same - person - babylon.btcstaking.v1.QueryBTCDelegationResponse: + requiring governance proposal to approve new integrations. + description: Params defines the parameters for the module. + babylon.btcstkconsumer.v1.QueryConsumerRegistryListResponse: type: object properties: - btc_delegation: - description: >- - BTCDelegation represents the client needed information of an - BTCDelegation. + consumer_ids: + type: array + items: + type: string + title: consumer_ids are IDs of the consumers in ascending alphabetical order + pagination: + title: pagination defines the pagination in the response type: object properties: - staker_addr: - type: string - description: staker_addr is the address to receive rewards from BTC delegation. - btc_pk: - type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this BTC delegation - the PK follows encoding in BIP-340 spec - fp_btc_pk_list: - type: array - items: - type: string - format: byte - title: >- - fp_btc_pk_list is the list of BIP-340 PKs of the finality - providers that - - this BTC delegation delegates to - staking_time: - type: integer - format: int64 - title: >- - staking_time is the number of blocks for which the delegation is - locked on BTC chain - start_height: - type: integer - format: int64 - title: |- - start_height is the start BTC height of the BTC delegation - it is the start BTC height of the timelock - end_height: - type: integer - format: int64 - title: |- - end_height is the end height of the BTC delegation - it is the end BTC height of the timelock - w - total_sat: - type: string - format: uint64 - title: |- - total_sat is the total amount of BTC stakes in this delegation - quantified in satoshi - staking_tx_hex: - type: string - title: staking_tx_hex is the hex string of staking tx - slashing_tx_hex: - type: string - title: slashing_tx_hex is the hex string of slashing tx - delegator_slash_sig_hex: - type: string - description: |- - delegator_slash_sig_hex is the signature on the slashing tx - by the delegator (i.e., SK corresponding to btc_pk) as string hex. - It will be a part of the witness for the staking tx output. - covenant_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, used as - the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each encrypted - by a restaked BTC finality provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures signed by - the - - covenant with different finality provider's public keys as - encryption keys - description: |- - covenant_sigs is a list of adaptor signatures on the slashing tx - by each covenant member - It will be a part of the witness for the staking tx output. - staking_output_idx: - type: integer - format: int64 - title: >- - staking_output_idx is the index of the staking output in the - staking tx - active: - type: boolean - title: whether this delegation is active - status_desc: + next_key: type: string - description: descriptive status of current delegation. - unbonding_time: - type: integer - format: int64 - title: >- - unbonding_time used in unbonding output timelock path and in - slashing transactions - - change outputs - undelegation_response: - description: undelegation_response is the undelegation info of this delegation. - type: object - properties: - unbonding_tx_hex: - type: string - description: >- - unbonding_tx is the transaction which will transfer the funds - from staking - - output to unbonding output. Unbonding output will usually have - lower timelock - - than staking output. The unbonding tx as string hex. - covenant_unbonding_sig_list: - type: array - items: - type: object - properties: - pk: - type: string - format: byte - sig: - type: string - format: byte - title: >- - SignatureInfo is a BIP-340 signature together with its - signer's BIP-340 PK - title: >- - covenant_unbonding_sig_list is the list of signatures on the - unbonding tx - - by covenant members - slashing_tx_hex: - type: string - title: slashingTxHex is the hex string of slashing tx - delegator_slashing_sig_hex: - type: string - description: |- - delegator_slashing_sig is the signature on the slashing tx - by the delegator (i.e., SK corresponding to btc_pk). - It will be a part of the witness for the unbonding tx output. - The delegator slashing sig as string hex. - covenant_slashing_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, used - as the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each - encrypted by a restaked BTC finality provider's public - key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures - signed by the - - covenant with different finality provider's public keys as - encryption keys - description: |- - covenant_slashing_sigs is a list of adaptor signatures on the - unbonding slashing tx by each covenant member - It will be a part of the witness for the staking tx output. - delegator_unbonding_info_response: - title: >- - btc_undelegation_info contains all necessary info about the - transaction + format: byte + description: |- + 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: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - which spent the staking output - type: object - properties: - spend_stake_tx_hex: - type: string - title: >- - spend_stake_tx_hex is the transaction which spent the - staking output. It is + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - filled only if the spend_stake_tx_hex is different than - the unbonding_tx_hex - title: >- - BTCUndelegationResponse provides all necessary info about the - undeleagation - params_version: - type: integer - format: int64 - title: params version used to validate delegation + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } title: >- - QueryBTCDelegationResponse is response type matching - QueryBTCDelegationRequest - - and containing BTC delegation information - babylon.btcstaking.v1.QueryBTCDelegationsResponse: + QueryConsumerRegistryListResponse is response type for the + Query/ConsumerRegistryList RPC method + babylon.btcstkconsumer.v1.QueryConsumersRegistryResponse: type: object properties: - btc_delegations: + consumers_register: type: array items: type: object properties: - staker_addr: - type: string - description: >- - staker_addr is the address to receive rewards from BTC - delegation. - btc_pk: + consumer_id: type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this BTC delegation - the PK follows encoding in BIP-340 spec - fp_btc_pk_list: - type: array - items: - type: string - format: byte title: >- - fp_btc_pk_list is the list of BIP-340 PKs of the finality - providers that + consumer_id is the ID of the consumer - this BTC delegation delegates to - staking_time: - type: integer - format: int64 - title: >- - staking_time is the number of blocks for which the delegation is - locked on BTC chain - start_height: - type: integer - format: int64 - title: |- - start_height is the start BTC height of the BTC delegation - it is the start BTC height of the timelock - end_height: - type: integer - format: int64 - title: |- - end_height is the end height of the BTC delegation - it is the end BTC height of the timelock - w - total_sat: - type: string - format: uint64 - title: |- - total_sat is the total amount of BTC stakes in this delegation - quantified in satoshi - staking_tx_hex: - type: string - title: staking_tx_hex is the hex string of staking tx - slashing_tx_hex: + - for Cosmos SDK chains, the consumer ID will be the IBC client + ID + + - for ETH L2 chains, the consumer ID will be the chain ID of the + ETH L2 + chain + consumer_name: type: string - title: slashing_tx_hex is the hex string of slashing tx - delegator_slash_sig_hex: + title: consumer_name is the name of the consumer + consumer_description: type: string - description: >- - delegator_slash_sig_hex is the signature on the slashing tx - - by the delegator (i.e., SK corresponding to btc_pk) as string - hex. - - It will be a part of the witness for the staking tx output. - covenant_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, used as - the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each - encrypted by a restaked BTC finality provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures signed - by the - - covenant with different finality provider's public keys as - encryption keys - description: |- - covenant_sigs is a list of adaptor signatures on the slashing tx - by each covenant member - It will be a part of the witness for the staking tx output. - staking_output_idx: - type: integer - format: int64 title: >- - staking_output_idx is the index of the staking output in the - staking tx - active: - type: boolean - title: whether this delegation is active - status_desc: - type: string - description: descriptive status of current delegation. - unbonding_time: - type: integer - format: int64 + consumer_description is a description for the consumer (can be + empty) + cosmos_consumer_metadata: + type: object + properties: + channel_id: + type: string + title: channel_id defines the IBC channel ID for the consumer chain title: >- - unbonding_time used in unbonding output timelock path and in - slashing transactions + CosmosConsumerMetadata is the metadata for the Cosmos + integration + eth_l2_consumer_metadata: + type: object + properties: + finality_contract_address: + type: string + title: >- + finality_contract_address is the address of the finality + contract for - change outputs - undelegation_response: + the ETH L2 integration + title: ETHL2ConsumerMetadata is the metadata for the ETH L2 integration + title: ConsumerRegister is the registration information of a consumer + description: >- + QueryConsumersRegistryResponse is response type for the + Query/ConsumersRegistry RPC method. + babylon.btcstkconsumer.v1.QueryFinalityProviderConsumerResponse: + type: object + properties: + consumer_id: + type: string + title: >- + QueryFinalityProviderConsumerResponse returns the CZ finality provier + consumer id + babylon.btcstkconsumer.v1.QueryFinalityProviderResponse: + type: object + properties: + finality_provider: + title: finality_provider contains the FinalityProvider + type: object + properties: + description: + description: >- + description defines the description terms for the finality + provider. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: commission defines the commission rate of the finality provider. + addr: + type: string + title: babylon_pk is the Babylon secp256k1 PK of this finality provider + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this finality provider + the PK follows encoding in BIP-340 spec + pop: + title: pop is the proof of possession of babylon_pk and btc_pk + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 + description: >- + - BIP340: BIP340 means the btc_sig will follow the BIP-340 + encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte + title: >- + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) + + the signature follows encoding in either BIP-340 spec or + BIP-322 spec + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: + type: integer + format: int64 + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of this finality provider at the + given height + consumer_id: + type: string + title: >- + consumer_id is the consumer id this finality provider is + registered to + description: >- + FinalityProviderResponse defines a finality provider with voting power + information. + title: >- + QueryFinalityProviderResponse contains information about a finality + provider + babylon.btcstkconsumer.v1.QueryFinalityProvidersResponse: + type: object + properties: + finality_providers: + type: array + items: + type: object + properties: + description: description: >- - undelegation_response is the undelegation info of this - delegation. + description defines the description terms for the finality + provider. type: object properties: - unbonding_tx_hex: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: type: string description: >- - unbonding_tx is the transaction which will transfer the - funds from staking - - output to unbonding output. Unbonding output will usually - have lower timelock - - than staking output. The unbonding tx as string hex. - covenant_unbonding_sig_list: - type: array - items: - type: object - properties: - pk: - type: string - format: byte - sig: - type: string - format: byte - title: >- - SignatureInfo is a BIP-340 signature together with its - signer's BIP-340 PK - title: >- - covenant_unbonding_sig_list is the list of signatures on the - unbonding tx - - by covenant members - slashing_tx_hex: + identity defines an optional identity signature (ex. UPort + or Keybase). + website: type: string - title: slashingTxHex is the hex string of slashing tx - delegator_slashing_sig_hex: + description: website defines an optional website link. + security_contact: type: string description: >- - delegator_slashing_sig is the signature on the slashing tx - - by the delegator (i.e., SK corresponding to btc_pk). - - It will be a part of the witness for the unbonding tx - output. - - The delegator slashing sig as string hex. - covenant_slashing_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, - used as the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each - encrypted by a restaked BTC finality provider's public - key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures - signed by the - - covenant with different finality provider's public keys as - encryption keys + security_contact defines an optional email for security + contact. + details: + type: string + description: details define other optional details. + commission: + type: string + description: commission defines the commission rate of the finality provider. + addr: + type: string + title: babylon_pk is the Babylon secp256k1 PK of this finality provider + btc_pk: + type: string + format: byte + title: |- + btc_pk is the Bitcoin secp256k1 PK of this finality provider + the PK follows encoding in BIP-340 spec + pop: + title: pop is the proof of possession of babylon_pk and btc_pk + type: object + properties: + btc_sig_type: + title: btc_sig_type indicates the type of btc_sig in the pop + type: string + enum: + - BIP340 + - BIP322 + - ECDSA + default: BIP340 description: >- - covenant_slashing_sigs is a list of adaptor signatures on - the - - unbonding slashing tx by each covenant member - - It will be a part of the witness for the staking tx output. - delegator_unbonding_info_response: + - BIP340: BIP340 means the btc_sig will follow the BIP-340 + encoding + - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding + - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding + ref: + https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 + btc_sig: + type: string + format: byte title: >- - btc_undelegation_info contains all necessary info about the - transaction - - which spent the staking output - type: object - properties: - spend_stake_tx_hex: - type: string - title: >- - spend_stake_tx_hex is the transaction which spent the - staking output. It is + btc_sig is the signature generated via sign(sk_btc, + babylon_staker_address) - filled only if the spend_stake_tx_hex is different than - the unbonding_tx_hex - title: >- - BTCUndelegationResponse provides all necessary info about the - undeleagation - params_version: + the signature follows encoding in either BIP-340 spec or + BIP-322 spec + slashed_babylon_height: + type: string + format: uint64 + title: |- + slashed_babylon_height indicates the Babylon height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + slashed_btc_height: type: integer format: int64 - title: params version used to validate delegation + title: |- + slashed_btc_height indicates the BTC height when + the finality provider is slashed. + if it's 0 then the finality provider is not slashed + height: + type: string + format: uint64 + title: height is the queried Babylon height + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of this finality provider at + the given height + consumer_id: + type: string + title: >- + consumer_id is the consumer id this finality provider is + registered to description: >- - BTCDelegationResponse is the client needed information from a - BTCDelegation with the current status based on parameters. - title: >- - btc_delegations contains all the queried BTC delegations under the - given status + FinalityProviderResponse defines a finality provider with voting + power information. + title: finality_providers contains all the finality providers pagination: description: pagination defines the pagination in the response. type: object @@ -12994,1364 +21946,1527 @@ definitions: there are no more results. total: type: string - format: uint64 + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryFinalityProvidersResponse is the response type for the + Query/FinalityProviders RPC method. + babylon.btcstkconsumer.v1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + permissioned_integration: + type: boolean + description: >- + permissioned_integration is a flag to enable permissioned + integration, i.e., + + requiring governance proposal to approve new integrations. + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.incentive.BTCStakingGaugeResponse: + type: object + properties: + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: |- + coins that have been in the gauge + can have multiple coin denoms + description: >- + BTCStakingGaugeResponse is response type for the Query/BTCStakingGauge RPC + method. + babylon.incentive.Params: + type: object + properties: + btc_staking_portion: + type: string + title: >- + btc_staking_portion is the portion of rewards that goes to Finality + Providers/delegations + + NOTE: the portion of each Finality Provider/delegation is calculated + by using its voting + + power and finality provider's commission + title: >- + Params defines the parameters for the module, including portions of + rewards + + distributed to each type of stakeholder. Note that sum of the portions + should + + be strictly less than 1 so that the rest will go to Comet + validators/delegations + + adapted from + https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/proto/cosmos/distribution/v1beta1/distribution.proto + babylon.incentive.QueryBTCStakingGaugeResponse: + type: object + properties: + gauge: + title: gauge is the BTC staking gauge at the queried height + type: object + properties: + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the custom + method + + signatures required by gogoproto. + title: |- + coins that have been in the gauge + can have multiple coin denoms + description: >- + BTCStakingGaugeResponse is response type for the Query/BTCStakingGauge + RPC method. + description: >- + QueryBTCStakingGaugeResponse is response type for the + Query/BTCStakingGauge RPC method. + babylon.incentive.QueryDelegatorWithdrawAddressResponse: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + babylon.incentive.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + btc_staking_portion: + type: string title: >- - total is total number of results available if - PageRequest.count_total + btc_staking_portion is the portion of rewards that goes to + Finality Providers/delegations - was set, its value is undefined otherwise - description: |- - QueryBTCDelegationsResponse is the response type for the - Query/BTCDelegations RPC method. - babylon.btcstaking.v1.QueryFinalityProviderDelegationsResponse: + NOTE: the portion of each Finality Provider/delegation is + calculated by using its voting + + power and finality provider's commission + title: >- + Params defines the parameters for the module, including portions of + rewards + + distributed to each type of stakeholder. Note that sum of the portions + should + + be strictly less than 1 so that the rest will go to Comet + validators/delegations + + adapted from + https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/proto/cosmos/distribution/v1beta1/distribution.proto + description: QueryParamsResponse is response type for the Query/Params RPC method. + babylon.incentive.QueryRewardGaugesResponse: type: object properties: - btc_delegator_delegations: - type: array - items: + reward_gauges: + type: object + additionalProperties: type: object properties: - dels: + coins: type: array items: type: object properties: - staker_addr: - type: string - description: >- - staker_addr is the address to receive rewards from BTC - delegation. - btc_pk: - type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this BTC delegation - the PK follows encoding in BIP-340 spec - fp_btc_pk_list: - type: array - items: - type: string - format: byte - title: >- - fp_btc_pk_list is the list of BIP-340 PKs of the finality - providers that - - this BTC delegation delegates to - staking_time: - type: integer - format: int64 - title: >- - staking_time is the number of blocks for which the - delegation is locked on BTC chain - start_height: - type: integer - format: int64 - title: |- - start_height is the start BTC height of the BTC delegation - it is the start BTC height of the timelock - end_height: - type: integer - format: int64 - title: |- - end_height is the end height of the BTC delegation - it is the end BTC height of the timelock - w - total_sat: - type: string - format: uint64 - title: >- - total_sat is the total amount of BTC stakes in this - delegation - - quantified in satoshi - staking_tx_hex: - type: string - title: staking_tx_hex is the hex string of staking tx - slashing_tx_hex: + denom: type: string - title: slashing_tx_hex is the hex string of slashing tx - delegator_slash_sig_hex: + amount: type: string - description: >- - delegator_slash_sig_hex is the signature on the slashing - tx - - by the delegator (i.e., SK corresponding to btc_pk) as - string hex. - - It will be a part of the witness for the staking tx - output. - covenant_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant emulator, - used as the public key of the adaptor signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, each - encrypted by a restaked BTC finality provider's - public key - title: >- - CovenantAdaptorSignatures is a list adaptor signatures - signed by the + description: >- + Coin defines a token with a denomination and an amount. - covenant with different finality provider's public keys - as encryption keys - description: >- - covenant_sigs is a list of adaptor signatures on the - slashing tx - by each covenant member + NOTE: The amount field is an Int which implements the custom + method - It will be a part of the witness for the staking tx - output. - staking_output_idx: - type: integer - format: int64 - title: >- - staking_output_idx is the index of the staking output in - the staking tx - active: - type: boolean - title: whether this delegation is active - status_desc: + signatures required by gogoproto. + title: |- + coins are coins that have been in the gauge + Can have multiple coin denoms + withdrawn_coins: + type: array + items: + type: object + properties: + denom: type: string - description: descriptive status of current delegation. - unbonding_time: - type: integer - format: int64 - title: >- - unbonding_time used in unbonding output timelock path and - in slashing transactions - - change outputs - undelegation_response: - description: >- - undelegation_response is the undelegation info of this - delegation. - type: object - properties: - unbonding_tx_hex: - type: string - description: >- - unbonding_tx is the transaction which will transfer - the funds from staking + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - output to unbonding output. Unbonding output will - usually have lower timelock - than staking output. The unbonding tx as string hex. - covenant_unbonding_sig_list: - type: array - items: - type: object - properties: - pk: - type: string - format: byte - sig: - type: string - format: byte - title: >- - SignatureInfo is a BIP-340 signature together with - its signer's BIP-340 PK - title: >- - covenant_unbonding_sig_list is the list of signatures - on the unbonding tx + NOTE: The amount field is an Int which implements the custom + method - by covenant members - slashing_tx_hex: - type: string - title: slashingTxHex is the hex string of slashing tx - delegator_slashing_sig_hex: - type: string - description: >- - delegator_slashing_sig is the signature on the - slashing tx + signatures required by gogoproto. + title: >- + withdrawn_coins are coins that have been withdrawn by the + stakeholder already + title: >- + RewardGaugesResponse is an object that stores rewards distributed to + a BTC staking stakeholder + title: >- + reward_gauges is the map of reward gauges, where key is the + stakeholder type - by the delegator (i.e., SK corresponding to btc_pk). + and value is the reward gauge holding all rewards for the stakeholder + in that type + description: >- + QueryRewardGaugesResponse is response type for the Query/RewardGauges RPC + method. + babylon.incentive.RewardGaugesResponse: + type: object + properties: + coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - It will be a part of the witness for the unbonding tx - output. + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: |- + coins are coins that have been in the gauge + Can have multiple coin denoms + withdrawn_coins: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. - The delegator slashing sig as string hex. - covenant_slashing_sigs: - type: array - items: - type: object - properties: - cov_pk: - type: string - format: byte - title: >- - cov_pk is the public key of the covenant - emulator, used as the public key of the adaptor - signature - adaptor_sigs: - type: array - items: - type: string - format: byte - title: >- - adaptor_sigs is a list of adaptor signatures, - each encrypted by a restaked BTC finality - provider's public key - title: >- - CovenantAdaptorSignatures is a list adaptor - signatures signed by the + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: >- + withdrawn_coins are coins that have been withdrawn by the stakeholder + already + title: >- + RewardGaugesResponse is an object that stores rewards distributed to a BTC + staking stakeholder + babylon.btccheckpoint.v1.SubmissionKey: + type: object + properties: + key: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified by hash of + block in - covenant with different finality provider's public - keys as encryption keys - description: >- - covenant_slashing_sigs is a list of adaptor signatures - on the + which transaction was included and transaction index in the block + title: >- + Checkpoint can be composed from multiple transactions, so to identify + whole - unbonding slashing tx by each covenant member + submission we need list of transaction keys. - It will be a part of the witness for the staking tx - output. - delegator_unbonding_info_response: - title: >- - btc_undelegation_info contains all necessary info - about the transaction + Each submission can generally be identified by this list of (txIdx, - which spent the staking output - type: object - properties: - spend_stake_tx_hex: - type: string - title: >- - spend_stake_tx_hex is the transaction which spent - the staking output. It is + blockHash) tuples. Note: this could possibly be optimized as if + transactions - filled only if the spend_stake_tx_hex is different - than the unbonding_tx_hex - title: >- - BTCUndelegationResponse provides all necessary info about - the undeleagation - params_version: - type: integer - format: int64 - title: params version used to validate delegation - description: >- - BTCDelegationResponse is the client needed information from a - BTCDelegation with the current status based on parameters. - description: >- - BTCDelegatorDelegationsResponse is a collection of BTC delegations - responses from the same delegator. - description: btc_delegator_delegations contains all the queried BTC delegations. - pagination: - description: pagination defines the pagination in the response. + were in one block they would have the same block hash and different + indexes, + + but each blockhash is only 33 (1 byte for prefix encoding and 32 byte + hash), + + so there should be other strong arguments for this optimization + babylon.btccheckpoint.v1.TransactionInfo: + type: object + properties: + key: type: object properties: - next_key: + index: + type: integer + format: int64 + hash: type: string format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + title: >- + Each provided OP_RETURN transaction can be identified by hash of block + in - was set, its value is undefined otherwise - description: |- - QueryFinalityProviderDelegationsResponse is the response type for the - Query/FinalityProviderDelegations RPC method. - babylon.btcstaking.v1.QueryFinalityProviderResponse: + which transaction was included and transaction index in the block + description: |- + key is the position (txIdx, blockHash) of this tx on BTC blockchain + Although it is already a part of SubmissionKey, we store it here again + to make TransactionInfo self-contained. + For example, storing the key allows TransactionInfo to not relay on + the fact that TransactionInfo will be ordered in the same order as + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is included in the position in + `key` + + TODO: maybe it could use here better format as we already processed + and + + validated the proof? + title: |- + TransactionInfo is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + babylon.btccheckpoint.v1.TransactionKey: type: object properties: - finality_provider: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: |- + Each provided OP_RETURN transaction can be identified by hash of block in + which transaction was included and transaction index in the block + babylon.checkpointing.v1.RawCheckpoint: + type: object + properties: + epoch_num: + type: string + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash: + type: string + format: byte + title: |- + block_hash defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on + bitmap: + type: string + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS multi + sig + bls_multi_sig: + type: string + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from individual + BLS + + sigs + title: RawCheckpoint wraps the BLS multi sig with metadata + babylon.checkpointing.v1.ValidatorWithBlsKey: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: voting_power is the voting power of the validator at the given epoch + title: |- + ValidatorWithBlsKey couples validator address, voting power, and its bls + public key + babylon.epoching.v1.Epoch: + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: current_epoch_interval is the epoch interval at the time of this epoch + first_block_height: + type: string + format: uint64 + title: first_block_height is the height of the first block in this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. + + Babylon needs to remember the last header's time of each epoch to + complete + + unbonding validators/delegations when a previous epoch's checkpoint is + + finalised. The last_block_time field is nil in the epoch's beginning, + and + + is set upon the end of this epoch. + sealer_app_hash: + type: string + format: byte + title: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch + sealer_block_hash: + type: string + format: byte + title: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch + title: Epoch is a structure that contains the metadata of an epoch + babylon.zoneconcierge.v1.ChainInfo: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + latest_header: type: object properties: - description: - description: >- - description defines the description terms for the finality - provider. - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for security - contact. - details: - type: string - description: details define other optional details. - commission: - type: string - description: commission defines the commission rate of the finality provider. - addr: - type: string - description: addr is the address to receive commission from delegations. - btc_pk: - type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this finality provider - the PK follows encoding in BIP-340 spec - pop: - description: |- - pop is the proof of possession of the BTC_PK by the fp addr. - Essentially is the signature where the BTC SK sigs the fp addr. - type: object - properties: - btc_sig_type: - title: btc_sig_type indicates the type of btc_sig in the pop - type: string - enum: - - BIP340 - - BIP322 - - ECDSA - default: BIP340 - description: >- - - BIP340: BIP340 means the btc_sig will follow the BIP-340 - encoding - - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding - - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding - ref: - https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 - btc_sig: - type: string - format: byte - title: >- - btc_sig is the signature generated via sign(sk_btc, - babylon_staker_address) - - the signature follows encoding in either BIP-340 spec or - BIP-322 spec - title: |- - ProofOfPossessionBTC is the proof of possession that a Babylon - address and a Bitcoin secp256k1 secret key are held by the same - person - slashed_babylon_height: - type: string - format: uint64 - title: |- - slashed_babylon_height indicates the Babylon height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - slashed_btc_height: - type: integer - format: int64 - title: |- - slashed_btc_height indicates the BTC height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header height: type: string format: uint64 - title: height is the queried Babylon height - jailed: - type: boolean - title: jailed defines whether the finality provider is jailed - highest_voted_height: - type: integer - format: int64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the header on CZ + ledger + time: + type: string + format: date-time title: |- - highest_voted_height is the highest height for which the - finality provider has voted - description: >- - FinalityProviderResponse defines a finality provider with voting power - information. - title: finality_provider contains the FinalityProvider - title: >- - QueryFinalityProviderResponse contains information about a finality - provider - babylon.btcstaking.v1.QueryFinalityProvidersResponse: - type: object - properties: - finality_providers: - type: array - items: - type: object - properties: - description: - description: >- - description defines the description terms for the finality - provider. + time is the timestamp of this header on CZ ledger + it is needed for CZ to unbond all mature validators/delegations + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that includes + this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: type: object properties: - moniker: + consumer_id: type: string - description: moniker defines a human-readable name for the validator. - identity: + title: consumer_id is the unique ID of the consumer + hash: type: string - description: >- - identity defines an optional identity signature (ex. UPort - or Keybase). - website: + format: byte + title: hash is the hash of this header + height: type: string - description: website defines an optional website link. - security_contact: + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the header + on CZ ledger + time: type: string - description: >- - security_contact defines an optional email for security - contact. - details: + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: type: string - description: details define other optional details. - commission: - type: string - description: commission defines the commission rate of the finality provider. - addr: - type: string - description: addr is the address to receive commission from delegations. - btc_pk: - type: string - format: byte - title: |- - btc_pk is the Bitcoin secp256k1 PK of this finality provider - the PK follows encoding in BIP-340 spec - pop: - description: |- - pop is the proof of possession of the BTC_PK by the fp addr. - Essentially is the signature where the BTC SK sigs the fp addr. - type: object - properties: - btc_sig_type: - title: btc_sig_type indicates the type of btc_sig in the pop + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ + + header + babylon_header_height: type: string - enum: - - BIP340 - - BIP322 - - ECDSA - default: BIP340 - description: >- - - BIP340: BIP340 means the btc_sig will follow the BIP-340 - encoding - - BIP322: BIP322 means the btc_sig will follow the BIP-322 encoding - - ECDSA: ECDSA means the btc_sig will follow the ECDSA encoding - ref: - https://github.com/okx/js-wallet-sdk/blob/a57c2acbe6ce917c0aa4e951d96c4e562ad58444/packages/coin-bitcoin/src/BtcWallet.ts#L331 - btc_sig: + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: type: string format: byte title: >- - btc_sig is the signature generated via sign(sk_btc, - babylon_staker_address) + babylon_tx_hash is the hash of the tx that includes this + header - the signature follows encoding in either BIP-340 spec or - BIP-322 spec - title: |- - ProofOfPossessionBTC is the proof of possession that a Babylon - address and a Bitcoin secp256k1 secret key are held by the same - person - slashed_babylon_height: - type: string - format: uint64 - title: |- - slashed_babylon_height indicates the Babylon height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - slashed_btc_height: - type: integer - format: int64 - title: |- - slashed_btc_height indicates the BTC height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - height: - type: string - format: uint64 - title: height is the queried Babylon height - jailed: - type: boolean - title: jailed defines whether the finality provider is jailed - highest_voted_height: - type: integer - format: int64 - title: |- - highest_voted_height is the highest height for which the - finality provider has voted - description: >- - FinalityProviderResponse defines a finality provider with voting - power information. - title: finality_providers contains all the finality providers - pagination: - description: pagination defines the pagination in the response. + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the same + height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a valid quorum + + certificate. Such forks exist since Babylon considers CZs might have + + dishonest majority. Also note that the IBC-Go implementation will only + + consider the first header in a fork valid, since the subsequent + headers + + cannot be verified without knowing the validator set in the previous + header. + title: >- + latest_forks is the latest forks, formed as a series of IndexedHeader + (from + + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: |- + timestamped_headers_count is the number of timestamped headers in CZ's + canonical chain + title: ChainInfo is the information of a CZ + babylon.zoneconcierge.v1.FinalizedChainInfo: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + finalized_chain_info: type: object properties: - next_key: - type: string - format: byte - description: |- - 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: + consumer_id: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the header on + CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header - was set, its value is undefined otherwise - description: |- - QueryFinalityProvidersResponse is the response type for the - Query/FinalityProviders RPC method. - babylon.btcstaking.v1.QueryParamsByBTCHeightResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - covenant_pks: - type: array - items: - type: string - format: byte - title: >- - PARAMETERS COVERING STAKING + (babylon_block_height, babylon_tx_hash) jointly provides + the position of - covenant_pks is the list of public keys held by the covenant - committee + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the + same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same + height. - each PK follows encoding in BIP-340 spec on Bitcoin - covenant_quorum: - type: integer - format: int64 - title: >- - covenant_quorum is the minimum number of signatures needed for the - covenant + For example, assuming the following blockchain - multisignature - min_staking_value_sat: - type: string - format: int64 - title: >- - min_staking_value_sat is the minimum of satoshis locked in staking - output - max_staking_value_sat: - type: string - format: int64 - title: >- - max_staking_value_sat is the maximum of satoshis locked in staking - output - min_staking_time_blocks: - type: integer - format: int64 - title: >- - min_staking_time is the minimum lock time specified in staking - output script - max_staking_time_blocks: - type: integer - format: int64 - title: >- - max_staking_time_blocks is the maximum lock time time specified in - staking output script - slashing_pk_script: - type: string - format: byte - title: >- - PARAMETERS COVERING SLASHING + ``` - slashing_pk_script is the pk_script expected in slashing output - ie. the first + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` - output of slashing transaction - min_slashing_tx_fee_sat: - type: string - format: int64 - title: >- - min_slashing_tx_fee_sat is the minimum amount of tx fee - (quantified + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. - in Satoshi) needed for the pre-signed slashing tx. It covers both: - staking slashing transaction and unbonding slashing transaction - slashing_rate: - type: string - title: >- - slashing_rate determines the portion of the staked amount to be - slashed, + Note that each `IndexedHeader` in the fork should have a valid + quorum - expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 - decimal + certificate. Such forks exist since Babylon considers CZs might + have - places - unbonding_time_blocks: - type: integer - format: int64 + dishonest majority. Also note that the IBC-Go implementation will + only + + consider the first header in a fork valid, since the subsequent + headers + + cannot be verified without knowing the validator set in the + previous header. title: >- - PARAMETERS COVERING UNBONDING + latest_forks is the latest forks, formed as a series of + IndexedHeader (from - unbonding_time is the exact unbonding time required from unbonding - transaction + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: >- + timestamped_headers_count is the number of timestamped headers in + CZ's - it must be larger than `checkpoint_finalization_timeout` from - `btccheckpoint` module - unbonding_fee_sat: + canonical chain + title: ChainInfo is the information of a CZ + epoch_info: + title: epoch_info is the metadata of the last BTC-finalised epoch + type: object + properties: + epoch_number: type: string - format: int64 - title: unbonding_fee exact fee required for unbonding transaction - min_commission_rate: + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: type: string + format: uint64 title: >- - PARAMETERS COVERING FINALITY PROVIDERS + current_epoch_interval is the epoch interval at the time of this + epoch + first_block_height: + type: string + format: uint64 + title: first_block_height is the height of the first block in this epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. - min_commission_rate is the chain-wide minimum commission rate that - a finality provider + Babylon needs to remember the last header's time of each epoch to + complete - can charge their delegators expressed as a decimal (e.g., 0.5 for - 50%). Maximal precion + unbonding validators/delegations when a previous epoch's + checkpoint is - is 2 decimal places - delegation_creation_base_gas_fee: + finalised. The last_block_time field is nil in the epoch's + beginning, and + + is set upon the end of this epoch. + sealer_app_hash: type: string - format: uint64 - title: base gas fee for delegation creation - allow_list_expiration_height: + format: byte + title: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch + sealer_block_hash: + type: string + format: byte + title: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch + raw_checkpoint: + title: raw_checkpoint is the raw checkpoint of this epoch + type: object + properties: + epoch_num: type: string format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash: + type: string + format: byte + title: |- + block_hash defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on + bitmap: + type: string + format: byte title: >- - allow_list_expiration_height is the height at which the allow list - expires - - i.e all staking transactions are allowed to enter Babylon chain - afterwards - - setting it to 0 means allow list is disabled - btc_activation_height: - type: integer - format: int64 + bitmap defines the bitmap that indicates the signers of the BLS + multi sig + bls_multi_sig: + type: string + format: byte title: >- - btc_activation_height is the btc height from which parameters are - activated (inclusive) - version: - type: integer - format: int64 - title: version is the version of the params for the given BTC height - description: >- - QueryParamsByBTCHeightResponse is response type for the - Query/QueryParamsByBTCHeightResponse RPC method. - babylon.btcstaking.v1.QueryParamsByVersionResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. + bls_multi_sig defines the multi sig that is aggregated from + individual BLS + + sigs + btc_submission_key: + title: |- + btc_submission_key is position of two BTC txs that include the raw + checkpoint of this epoch type: object properties: - covenant_pks: + key: type: array items: - type: string - format: byte + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified by hash of + block in + + which transaction was included and transaction index in the + block + proof: + title: proof is the proof that the chain info is finalized + type: object + properties: + proof_cz_header_in_epoch: title: >- - PARAMETERS COVERING STAKING + proof_cz_header_in_epoch is the proof that the CZ header is + timestamped - covenant_pks is the list of public keys held by the covenant - committee + within a certain epoch + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root + + The data could be arbitrary format, providing nessecary data + + for example neighbouring node hash + proof_epoch_sealed: + title: proof_epoch_sealed is the proof that the epoch is sealed + type: object + properties: + validator_set: + type: array + items: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the validator at the + given epoch + title: >- + ValidatorWithBlsKey couples validator address, voting power, + and its bls + + public key + title: >- + validator_set is the validator set of the sealed epoch + + This validator set has generated a BLS multisig on `app_hash` + of + + the sealer header + proof_epoch_info: + title: >- + proof_epoch_info is the Merkle proof that the epoch's metadata + is committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root - each PK follows encoding in BIP-340 spec on Bitcoin - covenant_quorum: - type: integer - format: int64 - title: >- - covenant_quorum is the minimum number of signatures needed for the - covenant + The data could be arbitrary format, providing nessecary + data - multisignature - min_staking_value_sat: - type: string - format: int64 - title: >- - min_staking_value_sat is the minimum of satoshis locked in staking - output - max_staking_value_sat: - type: string - format: int64 - title: >- - max_staking_value_sat is the maximum of satoshis locked in staking - output - min_staking_time_blocks: - type: integer - format: int64 - title: >- - min_staking_time is the minimum lock time specified in staking - output script - max_staking_time_blocks: - type: integer - format: int64 - title: >- - max_staking_time_blocks is the maximum lock time time specified in - staking output script - slashing_pk_script: - type: string - format: byte - title: >- - PARAMETERS COVERING SLASHING + for example neighbouring node hash + proof_epoch_val_set: + title: >- + proof_epoch_info is the Merkle proof that the epoch's + validator set is - slashing_pk_script is the pk_script expected in slashing output - ie. the first + committed to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root - output of slashing transaction - min_slashing_tx_fee_sat: - type: string - format: int64 - title: >- - min_slashing_tx_fee_sat is the minimum amount of tx fee - (quantified + The data could be arbitrary format, providing nessecary + data - in Satoshi) needed for the pre-signed slashing tx. It covers both: + for example neighbouring node hash + proof_epoch_submitted: + type: array + items: + type: object + properties: + key: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified by + hash of block in - staking slashing transaction and unbonding slashing transaction - slashing_rate: - type: string - title: >- - slashing_rate determines the portion of the staked amount to be - slashed, + which transaction was included and transaction index in the + block + description: >- + key is the position (txIdx, blockHash) of this tx on BTC + blockchain - expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 - decimal + Although it is already a part of SubmissionKey, we store it + here again - places - unbonding_time_blocks: - type: integer - format: int64 - title: >- - PARAMETERS COVERING UNBONDING + to make TransactionInfo self-contained. - unbonding_time is the exact unbonding time required from unbonding - transaction + For example, storing the key allows TransactionInfo to not + relay on - it must be larger than `checkpoint_finalization_timeout` from - `btccheckpoint` module - unbonding_fee_sat: - type: string - format: int64 - title: unbonding_fee exact fee required for unbonding transaction - min_commission_rate: - type: string - title: >- - PARAMETERS COVERING FINALITY PROVIDERS + the fact that TransactionInfo will be ordered in the same + order as - min_commission_rate is the chain-wide minimum commission rate that - a finality provider + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` - can charge their delegators expressed as a decimal (e.g., 0.5 for - 50%). Maximal precion + TODO: maybe it could use here better format as we already + processed and - is 2 decimal places - delegation_creation_base_gas_fee: - type: string - format: uint64 - title: base gas fee for delegation creation - allow_list_expiration_height: - type: string - format: uint64 + validated the proof? + title: |- + TransactionInfo is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position title: >- - allow_list_expiration_height is the height at which the allow list - expires + proof_epoch_submitted is the proof that the epoch's checkpoint is + included - i.e all staking transactions are allowed to enter Babylon chain - afterwards + in BTC ledger It is the two TransactionInfo in the best (i.e., + earliest) - setting it to 0 means allow list is disabled - btc_activation_height: - type: integer - format: int64 - title: >- - btc_activation_height is the btc height from which parameters are - activated (inclusive) - description: QueryParamsResponse is response type for the Query/Params RPC method. - babylon.btcstaking.v1.QueryParamsResponse: + checkpoint submission + title: FinalizedChainInfo is the information of a CZ that is BTC-finalised + babylon.zoneconcierge.v1.Forks: type: object properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - covenant_pks: - type: array - items: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: type: string format: byte - title: >- - PARAMETERS COVERING STAKING - - covenant_pks is the list of public keys held by the covenant - committee - - each PK follows encoding in BIP-340 spec on Bitcoin - covenant_quorum: - type: integer - format: int64 - title: >- - covenant_quorum is the minimum number of signatures needed for the - covenant - - multisignature - min_staking_value_sat: - type: string - format: int64 - title: >- - min_staking_value_sat is the minimum of satoshis locked in staking - output - max_staking_value_sat: - type: string - format: int64 - title: >- - max_staking_value_sat is the maximum of satoshis locked in staking - output - min_staking_time_blocks: - type: integer - format: int64 - title: >- - min_staking_time is the minimum lock time specified in staking - output script - max_staking_time_blocks: - type: integer - format: int64 - title: >- - max_staking_time_blocks is the maximum lock time time specified in - staking output script - slashing_pk_script: - type: string - format: byte - title: >- - PARAMETERS COVERING SLASHING - - slashing_pk_script is the pk_script expected in slashing output - ie. the first + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger - output of slashing transaction - min_slashing_tx_fee_sat: - type: string - format: int64 - title: >- - min_slashing_tx_fee_sat is the minimum amount of tx fee - (quantified + (hash, height) jointly provides the position of the header on CZ + ledger + time: + type: string + format: date-time + title: |- + time is the timestamp of this header on CZ ledger + it is needed for CZ to unbond all mature validators/delegations + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ - in Satoshi) needed for the pre-signed slashing tx. It covers both: + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ - staking slashing transaction and unbonding slashing transaction - slashing_rate: - type: string - title: >- - slashing_rate determines the portion of the staked amount to be - slashed, + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this header - expressed as a decimal (e.g., 0.5 for 50%). Maximal precion is 2 - decimal + (babylon_block_height, babylon_tx_hash) jointly provides the + position of - places - unbonding_time_blocks: - type: integer - format: int64 - title: >- - PARAMETERS COVERING UNBONDING + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: blocks is the list of non-canonical indexed headers at the same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same height. - unbonding_time is the exact unbonding time required from unbonding - transaction + For example, assuming the following blockchain - it must be larger than `checkpoint_finalization_timeout` from - `btccheckpoint` module - unbonding_fee_sat: - type: string - format: int64 - title: unbonding_fee exact fee required for unbonding transaction - min_commission_rate: - type: string - title: >- - PARAMETERS COVERING FINALITY PROVIDERS + ``` - min_commission_rate is the chain-wide minimum commission rate that - a finality provider + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` - can charge their delegators expressed as a decimal (e.g., 0.5 for - 50%). Maximal precion + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. - is 2 decimal places - delegation_creation_base_gas_fee: - type: string - format: uint64 - title: base gas fee for delegation creation - allow_list_expiration_height: - type: string - format: uint64 - title: >- - allow_list_expiration_height is the height at which the allow list - expires - i.e all staking transactions are allowed to enter Babylon chain - afterwards + Note that each `IndexedHeader` in the fork should have a valid quorum - setting it to 0 means allow list is disabled - btc_activation_height: - type: integer - format: int64 - title: >- - btc_activation_height is the btc height from which parameters are - activated (inclusive) - description: QueryParamsResponse is response type for the Query/Params RPC method. - babylon.btcstaking.v1.SignatureInfo: + certificate. Such forks exist since Babylon considers CZs might have + + dishonest majority. Also note that the IBC-Go implementation will only + + consider the first header in a fork valid, since the subsequent headers + + cannot be verified without knowing the validator set in the previous + header. + babylon.zoneconcierge.v1.IndexedHeader: type: object properties: - pk: + consumer_id: type: string - format: byte - sig: + title: consumer_id is the unique ID of the consumer + hash: type: string format: byte - title: SignatureInfo is a BIP-340 signature together with its signer's BIP-340 PK - cosmos.staking.v1beta1.Description: - type: object - properties: - moniker: - type: string - description: moniker defines a human-readable name for the validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. UPort or - Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: security_contact defines an optional email for security contact. - details: - type: string - description: details define other optional details. - description: Description defines a validator description. - babylon.finality.v1.ActiveFinalityProvidersAtHeightResponse: - type: object - properties: - btc_pk_hex: - type: string - title: |- - btc_pk is the Bitcoin secp256k1 PK of thisfinality provider - the PK follows encoding in BIP-340 spec + title: hash is the hash of this header height: - type: string - format: uint64 - title: height is the queried Babylon height - voting_power: type: string format: uint64 title: >- - voting_power is the voting power of this finality provider at the - given height - slashed_babylon_height: + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the header on CZ + ledger + time: type: string - format: uint64 - title: |- - slashed_babylon_height indicates the Babylon height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - slashed_btc_height: - type: integer - format: int64 - title: |- - slashed_btc_height indicates the BTC height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - jailed: - type: boolean - title: jailed defines whether the finality provider is detected jailed - highest_voted_height: - type: integer - format: int64 + format: date-time title: |- - highest_voted_height is the highest height for which the - finality provider has voted - description: >- - ActiveFinalityProvidersAtHeightResponse wraps the FinalityProvider with - metadata. - babylon.finality.v1.EvidenceResponse: - type: object - properties: - fp_btc_pk_hex: + time is the timestamp of this header on CZ ledger + it is needed for CZ to unbond all mature validators/delegations + before this timestamp when this header is BTC-finalised + babylon_header_hash: type: string + format: byte title: >- - fp_btc_pk_hex is the BTC PK of the finality provider that casts this - vote - block_height: + babylon_header_hash is the hash of the babylon block that includes + this CZ + + header + babylon_header_height: type: string format: uint64 - title: block_height is the height of the conflicting blocks - pub_rand: - type: string - format: byte title: >- - pub_rand is the public randomness the finality provider has committed - to - canonical_app_hash: - type: string - format: byte - title: canonical_app_hash is the AppHash of the canonical block - fork_app_hash: + babylon_header_height is the height of the babylon block that includes + this CZ + + header + babylon_epoch: type: string - format: byte - title: fork_app_hash is the AppHash of the fork block - canonical_finality_sig: + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: type: string format: byte title: >- - canonical_finality_sig is the finality signature to the canonical - block - - where finality signature is an EOTS signature, i.e., + babylon_tx_hash is the hash of the tx that includes this header - the `s` in a Schnorr signature `(r, s)` - - `r` is the public randomness that is already committed by the finality - provider - fork_finality_sig: - type: string - format: byte - title: |- - fork_finality_sig is the finality signature to the fork block - where finality signature is an EOTS signature - title: >- - Evidence is the evidence that a finality provider has signed finality + (babylon_block_height, babylon_tx_hash) jointly provides the position + of - signatures with correct public randomness on two conflicting Babylon - headers - babylon.finality.v1.IndexedBlock: - type: object - properties: - height: - type: string - format: uint64 - title: height is the height of the block - app_hash: - type: string - format: byte - title: app_hash is the AppHash of the block - finalized: - type: boolean - title: |- - finalized indicates whether the IndexedBlock is finalised by 2/3 - finality providers or not - title: IndexedBlock is the necessary metadata and finalization status of a block - babylon.finality.v1.Params: + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + babylon.zoneconcierge.v1.Params: type: object properties: - max_active_finality_providers: + ibc_packet_timeout_seconds: type: integer format: int64 title: >- - max_active_finality_providers is the maximum number of active finality - providers in the BTC staking protocol - signed_blocks_window: - type: string - format: int64 - title: >- - signed_blocks_window defines the size of the sliding window for - tracking finality provider liveness - finality_sig_timeout: - type: string - format: int64 - title: >- - finality_sig_timeout defines how much time (in terms of blocks) - finality providers have to cast a finality - - vote before being judged as missing their voting turn on the given - block - min_signed_per_window: - type: string - format: byte - title: >- - min_signed_per_window defines the minimum number of blocks that a - finality provider is required to sign - - within the sliding window to avoid being jailed - min_pub_rand: - type: string - format: uint64 - title: |- - min_pub_rand is the minimum number of public randomness each - message should commit - jail_duration: - type: string - title: >- - jail_duration is the minimum period of time that a finality provider - remains jailed - finality_activation_height: - type: string - format: uint64 - description: >- - finality_activation_height is the babylon block height which the - finality module will - - start to accept finality voting and the minimum allowed value for the - public randomness + ibc_packet_timeout_seconds is the time period after which an + unrelayed - commit start height. + IBC packet becomes timeout, measured in seconds description: Params defines the parameters for the module. - babylon.finality.v1.PubRandCommitResponse: - type: object - properties: - num_pub_rand: - type: string - format: uint64 - title: num_pub_rand is the number of committed public randomness - commitment: - type: string - format: byte - title: commitment is the value of the commitment - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number that the commit falls into - title: >- - PubRandCommitResponse is the response type for a public randomness - commitment - babylon.finality.v1.QueriedBlockStatus: - type: string - enum: - - NON_FINALIZED - - FINALIZED - - ANY - default: NON_FINALIZED - description: >- - QueriedBlockStatus is the status of blocks that the querier wants to - query. - - - NON_FINALIZED: NON_FINALIZED means the block is not finalised - - FINALIZED: FINALIZED means the block is finalized - - ANY: ANY means the block can be in any status - babylon.finality.v1.QueryActivatedHeightResponse: - type: object - properties: - height: - type: string - format: uint64 - description: >- - QueryActivatedHeightResponse is the response type for the - Query/ActivatedHeight RPC method. - babylon.finality.v1.QueryActiveFinalityProvidersAtHeightResponse: + babylon.zoneconcierge.v1.ProofEpochSealed: type: object properties: - finality_providers: + validator_set: type: array items: type: object properties: - btc_pk_hex: - type: string - title: |- - btc_pk is the Bitcoin secp256k1 PK of thisfinality provider - the PK follows encoding in BIP-340 spec - height: + validator_address: type: string - format: uint64 - title: height is the queried Babylon height + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator voting_power: type: string format: uint64 title: >- - voting_power is the voting power of this finality provider at - the given height - slashed_babylon_height: - type: string - format: uint64 - title: |- - slashed_babylon_height indicates the Babylon height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - slashed_btc_height: - type: integer - format: int64 - title: |- - slashed_btc_height indicates the BTC height when - the finality provider is slashed. - if it's 0 then the finality provider is not slashed - jailed: - type: boolean - title: jailed defines whether the finality provider is detected jailed - highest_voted_height: - type: integer - format: int64 + voting_power is the voting power of the validator at the given + epoch + title: >- + ValidatorWithBlsKey couples validator address, voting power, and its + bls + + public key + title: |- + validator_set is the validator set of the sealed epoch + This validator set has generated a BLS multisig on `app_hash` of + the sealer header + proof_epoch_info: + title: >- + proof_epoch_info is the Merkle proof that the epoch's metadata is + committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte title: |- - highest_voted_height is the highest height for which the - finality provider has voted - description: >- - ActiveFinalityProvidersAtHeightResponse wraps the FinalityProvider - with metadata. - description: finality_providers contains all the queried finality providersn. - pagination: - description: pagination defines the pagination in the response. + ProofOp defines an operation used for calculating Merkle root + The data could be arbitrary format, providing nessecary data + for example neighbouring node hash + proof_epoch_val_set: + title: |- + proof_epoch_info is the Merkle proof that the epoch's validator set is + committed to `app_hash` of the sealer header type: object properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: |- + ProofOp defines an operation used for calculating Merkle root + The data could be arbitrary format, providing nessecary data + for example neighbouring node hash + title: >- + ProofEpochSealed is the proof that an epoch is sealed by the sealer + header, - was set, its value is undefined otherwise - description: |- - QueryActiveFinalityProvidersAtHeightResponse is the response type for the - Query/ActiveFinalityProvidersAtHeight RPC method. - babylon.finality.v1.QueryBlockResponse: + i.e., the 2nd header of the next epoch With the access of metadata + + - Metadata of this epoch, which includes the sealer header + + - Raw checkpoint of this epoch + + The verifier can perform the following verification rules: + + - The raw checkpoint's `app_hash` is same as in the sealer header + + - More than 2/3 (in voting power) validators in the validator set of this + + epoch have signed `app_hash` of the sealer header + + - The epoch metadata is committed to the `app_hash` of the sealer header + + - The validator set is committed to the `app_hash` of the sealer header + babylon.zoneconcierge.v1.ProofFinalizedChainInfo: type: object properties: - block: + proof_cz_header_in_epoch: + title: >- + proof_cz_header_in_epoch is the proof that the CZ header is + timestamped + + within a certain epoch type: object properties: - height: - type: string - format: uint64 - title: height is the height of the block - app_hash: - type: string - format: byte - title: app_hash is the AppHash of the block - finalized: - type: boolean - title: |- - finalized indicates whether the IndexedBlock is finalised by 2/3 - finality providers or not - title: >- - IndexedBlock is the necessary metadata and finalization status of a - block - description: |- - QueryBlockResponse is the response type for the - Query/Block RPC method. - babylon.finality.v1.QueryEvidenceResponse: - type: object - properties: - evidence: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: |- + ProofOp defines an operation used for calculating Merkle root + The data could be arbitrary format, providing nessecary data + for example neighbouring node hash + proof_epoch_sealed: + title: proof_epoch_sealed is the proof that the epoch is sealed type: object properties: - fp_btc_pk_hex: - type: string - title: >- - fp_btc_pk_hex is the BTC PK of the finality provider that casts - this vote - block_height: - type: string - format: uint64 - title: block_height is the height of the conflicting blocks - pub_rand: - type: string - format: byte + validator_set: + type: array + items: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the validator at the + given epoch + title: >- + ValidatorWithBlsKey couples validator address, voting power, and + its bls + + public key + title: |- + validator_set is the validator set of the sealed epoch + This validator set has generated a BLS multisig on `app_hash` of + the sealer header + proof_epoch_info: title: >- - pub_rand is the public randomness the finality provider has - committed to - canonical_app_hash: - type: string - format: byte - title: canonical_app_hash is the AppHash of the canonical block - fork_app_hash: - type: string - format: byte - title: fork_app_hash is the AppHash of the fork block - canonical_finality_sig: - type: string - format: byte + proof_epoch_info is the Merkle proof that the epoch's metadata is + committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root + + The data could be arbitrary format, providing nessecary data + + for example neighbouring node hash + proof_epoch_val_set: title: >- - canonical_finality_sig is the finality signature to the canonical - block + proof_epoch_info is the Merkle proof that the epoch's validator + set is - where finality signature is an EOTS signature, i.e., + committed to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root - the `s` in a Schnorr signature `(r, s)` + The data could be arbitrary format, providing nessecary data - `r` is the public randomness that is already committed by the - finality provider - fork_finality_sig: - type: string - format: byte - title: |- - fork_finality_sig is the finality signature to the fork block - where finality signature is an EOTS signature - title: >- - Evidence is the evidence that a finality provider has signed finality + for example neighbouring node hash + proof_epoch_submitted: + type: array + items: + type: object + properties: + key: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified by hash of + block in - signatures with correct public randomness on two conflicting Babylon - headers - description: |- - QueryEvidenceResponse is the response type for the - Query/Evidence RPC method. - babylon.finality.v1.QueryFinalityProviderCurrentPowerResponse: - type: object - properties: - height: - type: string - format: uint64 - title: height is the current height - voting_power: - type: string - format: uint64 - title: voting_power is the voting power of the finality provider - description: |- - QueryFinalityProviderCurrentPowerResponse is the response type for the - Query/FinalityProviderCurrentPower RPC method. - babylon.finality.v1.QueryFinalityProviderPowerAtHeightResponse: - type: object - properties: - voting_power: - type: string - format: uint64 - title: voting_power is the voting power of the finality provider - description: |- - QueryFinalityProviderPowerAtHeightResponse is the response type for the - Query/FinalityProviderPowerAtHeight RPC method. - babylon.finality.v1.QueryListBlocksResponse: + which transaction was included and transaction index in the + block + description: >- + key is the position (txIdx, blockHash) of this tx on BTC + blockchain + + Although it is already a part of SubmissionKey, we store it here + again + + to make TransactionInfo self-contained. + + For example, storing the key allows TransactionInfo to not relay + on + + the fact that TransactionInfo will be ordered in the same order + as + + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` + + TODO: maybe it could use here better format as we already + processed and + + validated the proof? + title: |- + TransactionInfo is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: >- + proof_epoch_submitted is the proof that the epoch's checkpoint is + included + + in BTC ledger It is the two TransactionInfo in the best (i.e., + earliest) + + checkpoint submission + title: |- + ProofFinalizedChainInfo is a set of proofs that attest a chain info is + BTC-finalised + babylon.zoneconcierge.v1.QueryChainListResponse: type: object properties: - blocks: + consumer_ids: type: array items: - type: object - properties: - height: - type: string - format: uint64 - title: height is the height of the block - app_hash: - type: string - format: byte - title: app_hash is the AppHash of the block - finalized: - type: boolean - title: |- - finalized indicates whether the IndexedBlock is finalised by 2/3 - finality providers or not - title: >- - IndexedBlock is the necessary metadata and finalization status of a - block - title: blocks is the list of blocks at the given status + type: string + title: consumer_ids are IDs of the chains in ascending alphabetical order pagination: - description: pagination defines the pagination in the response. + title: pagination defines the pagination in the response type: object properties: next_key: @@ -14369,652 +23484,1135 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: |- - QueryListBlocksResponse is the response type for the - Query/ListBlocks RPC method. - babylon.finality.v1.QueryListEvidencesResponse: + description: |- + 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; + } + title: QueryChainListResponse is response type for the Query/ChainList RPC method + babylon.zoneconcierge.v1.QueryChainsInfoResponse: type: object properties: - evidences: + chains_info: type: array items: type: object properties: - fp_btc_pk_hex: + consumer_id: type: string + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the header + on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes + this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the + same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same + height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a valid + quorum + + certificate. Such forks exist since Babylon considers CZs might + have + + dishonest majority. Also note that the IBC-Go implementation + will only + + consider the first header in a fork valid, since the subsequent + headers + + cannot be verified without knowing the validator set in the + previous header. title: >- - fp_btc_pk_hex is the BTC PK of the finality provider that casts - this vote - block_height: + latest_forks is the latest forks, formed as a series of + IndexedHeader (from + + low to high) + timestamped_headers_count: type: string format: uint64 - title: block_height is the height of the conflicting blocks - pub_rand: - type: string - format: byte title: >- - pub_rand is the public randomness the finality provider has - committed to - canonical_app_hash: - type: string - format: byte - title: canonical_app_hash is the AppHash of the canonical block - fork_app_hash: - type: string - format: byte - title: fork_app_hash is the AppHash of the fork block - canonical_finality_sig: + timestamped_headers_count is the number of timestamped headers + in CZ's + + canonical chain + title: ChainInfo is the information of a CZ + description: >- + QueryChainsInfoResponse is response type for the Query/ChainsInfo RPC + method. + babylon.zoneconcierge.v1.QueryEpochChainsInfoResponse: + type: object + properties: + chains_info: + type: array + items: + type: object + properties: + consumer_id: type: string - format: byte - title: >- - canonical_finality_sig is the finality signature to the - canonical block + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger - where finality signature is an EOTS signature, i.e., + (hash, height) jointly provides the position of the header + on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger - the `s` in a Schnorr signature `(r, s)` + it is needed for CZ to unbond all mature + validators/delegations - `r` is the public randomness that is already committed by the - finality provider - fork_finality_sig: - type: string - format: byte - title: |- - fork_finality_sig is the finality signature to the fork block - where finality signature is an EOTS signature - title: >- - Evidence is the evidence that a finality provider has signed - finality + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ - signatures with correct public randomness on two conflicting Babylon - headers - title: blocks is the list of evidences - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes + this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the + same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same + height. - was set, its value is undefined otherwise - description: |- - QueryListEvidencesResponse is the response type for the - Query/ListEvidences RPC method. - babylon.finality.v1.QueryListPubRandCommitResponse: - type: object - properties: - pub_rand_commit_map: - type: object - additionalProperties: - type: object - properties: - num_pub_rand: - type: string - format: uint64 - title: num_pub_rand is the number of committed public randomness - commitment: - type: string - format: byte - title: commitment is the value of the commitment - epoch_num: + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a valid + quorum + + certificate. Such forks exist since Babylon considers CZs might + have + + dishonest majority. Also note that the IBC-Go implementation + will only + + consider the first header in a fork valid, since the subsequent + headers + + cannot be verified without knowing the validator set in the + previous header. + title: >- + latest_forks is the latest forks, formed as a series of + IndexedHeader (from + + low to high) + timestamped_headers_count: type: string format: uint64 - title: epoch_num defines the epoch number that the commit falls into - title: >- - PubRandCommitResponse is the response type for a public randomness - commitment - title: >- - pub_rand_commit_map is the map where the key is the start height and - the value + title: >- + timestamped_headers_count is the number of timestamped headers + in CZ's - is the public randomness commitment at this height for the given - finality provider - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + canonical chain + title: ChainInfo is the information of a CZ + title: chain_info is the info of the CZ + description: >- + QueryEpochChainsInfoResponse is response type for the + Query/EpochChainsInfo RPC - was set, its value is undefined otherwise - description: |- - QueryListPubRandCommitResponse is the response type for the - Query/ListPubRandCommit RPC method. - babylon.finality.v1.QueryListPublicRandomnessResponse: + method. + babylon.zoneconcierge.v1.QueryFinalizedChainInfoUntilHeightResponse: type: object properties: - pub_rand_map: - type: object - additionalProperties: - type: string - format: byte - title: >- - pub_rand_map is the map where the key is the height and the value - - is the public randomness at this height for the given finality - provider - pagination: - description: pagination defines the pagination in the response. + finalized_chain_info: type: object properties: - next_key: - type: string - format: byte - description: |- - 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: + consumer_id: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger - was set, its value is undefined otherwise - description: |- - QueryListPublicRandomnessResponse is the response type for the - Query/ListPublicRandomness RPC method. - babylon.finality.v1.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - max_active_finality_providers: - type: integer - format: int64 - title: >- - max_active_finality_providers is the maximum number of active - finality providers in the BTC staking protocol - signed_blocks_window: - type: string - format: int64 - title: >- - signed_blocks_window defines the size of the sliding window for - tracking finality provider liveness - finality_sig_timeout: - type: string - format: int64 + (hash, height) jointly provides the position of the header on + CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides + the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the + same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same + height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a valid + quorum + + certificate. Such forks exist since Babylon considers CZs might + have + + dishonest majority. Also note that the IBC-Go implementation will + only + + consider the first header in a fork valid, since the subsequent + headers + + cannot be verified without knowing the validator set in the + previous header. title: >- - finality_sig_timeout defines how much time (in terms of blocks) - finality providers have to cast a finality + latest_forks is the latest forks, formed as a series of + IndexedHeader (from - vote before being judged as missing their voting turn on the given - block - min_signed_per_window: + low to high) + timestamped_headers_count: type: string - format: byte + format: uint64 title: >- - min_signed_per_window defines the minimum number of blocks that a - finality provider is required to sign + timestamped_headers_count is the number of timestamped headers in + CZ's - within the sliding window to avoid being jailed - min_pub_rand: + canonical chain + title: ChainInfo is the information of a CZ + epoch_info: + title: epoch_info is the metadata of the last BTC-finalised epoch + type: object + properties: + epoch_number: type: string format: uint64 - title: |- - min_pub_rand is the minimum number of public randomness each - message should commit - jail_duration: + title: epoch_number is the number of this epoch + current_epoch_interval: type: string + format: uint64 title: >- - jail_duration is the minimum period of time that a finality - provider remains jailed - finality_activation_height: + current_epoch_interval is the epoch interval at the time of this + epoch + first_block_height: type: string format: uint64 + title: first_block_height is the height of the first block in this epoch + last_block_time: + type: string + format: date-time description: >- - finality_activation_height is the babylon block height which the - finality module will + last_block_time is the time of the last block in this epoch. - start to accept finality voting and the minimum allowed value for - the public randomness + Babylon needs to remember the last header's time of each epoch to + complete - commit start height. - description: QueryParamsResponse is response type for the Query/Params RPC method. - babylon.finality.v1.QuerySigningInfoResponse: - type: object - properties: - signing_info: + unbonding validators/delegations when a previous epoch's + checkpoint is + + finalised. The last_block_time field is nil in the epoch's + beginning, and + + is set upon the end of this epoch. + sealer_app_hash: + type: string + format: byte + title: |- + sealer is the last block of the sealed epoch + sealer_app_hash points to the sealer but stored in the 1st header + of the next epoch + sealer_block_hash: + type: string + format: byte + title: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch + raw_checkpoint: + title: raw_checkpoint is the raw checkpoint of this epoch type: object properties: - fp_btc_pk_hex: + epoch_num: type: string - title: >- - fp_btc_pk is the BTC PK of the finality provider that casts this - vote - start_height: + format: uint64 + title: epoch_num defines the epoch number the raw checkpoint is for + block_hash: type: string - format: int64 - title: >- - start_height is the block height at which finality provider become - active - missed_blocks_counter: + format: byte + title: |- + block_hash defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on + bitmap: type: string - format: int64 - description: >- - missed_blocks_counter defines a counter to avoid unnecessary array - reads. - - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - jailed_until: + format: byte + title: >- + bitmap defines the bitmap that indicates the signers of the BLS + multi sig + bls_multi_sig: type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - description: >- - SigningInfoResponse defines the API response containing a finality - provider's signing info - - for monitoring their liveness activity. - title: >- - QuerySigningInfoResponse is the response type for the Query/SigningInfo - RPC + format: byte + title: >- + bls_multi_sig defines the multi sig that is aggregated from + individual BLS - method - babylon.finality.v1.QuerySigningInfosResponse: - type: object - properties: - signing_infos: - type: array - items: - type: object - properties: - fp_btc_pk_hex: - type: string - title: >- - fp_btc_pk is the BTC PK of the finality provider that casts this - vote - start_height: - type: string - format: int64 + sigs + btc_submission_key: + title: |- + btc_submission_key is position of two BTC txs that include the raw + checkpoint of this epoch + type: object + properties: + key: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte title: >- - start_height is the block height at which finality provider - become active - missed_blocks_counter: - type: string - format: int64 - description: >- - missed_blocks_counter defines a counter to avoid unnecessary - array reads. - - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - description: >- - SigningInfoResponse defines the API response containing a finality - provider's signing info + Each provided OP_RETURN transaction can be identified by hash of + block in - for monitoring their liveness activity. - title: info is the signing info of all finality providers with signing info - pagination: + which transaction was included and transaction index in the + block + proof: + title: proof is the proof that the chain info is finalized type: object properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 + proof_cz_header_in_epoch: title: >- - total is total number of results available if - PageRequest.count_total + proof_cz_header_in_epoch is the proof that the CZ header is + timestamped - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. + within a certain epoch + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QuerySigningInfosResponse is the response type for the Query/SigningInfos - RPC + The data could be arbitrary format, providing nessecary data - method - babylon.finality.v1.QueryVotesAtHeightResponse: - type: object - properties: - btc_pks: - type: array - items: - type: string - format: byte - title: >- - btc_pk is the Bitcoin secp256k1 PK of finality providers who have - signed the block at given height. + for example neighbouring node hash + proof_epoch_sealed: + title: proof_epoch_sealed is the proof that the epoch is sealed + type: object + properties: + validator_set: + type: array + items: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the validator at the + given epoch + title: >- + ValidatorWithBlsKey couples validator address, voting power, + and its bls - the PK follows encoding in BIP-340 spec - description: |- - QueryVotesAtHeightResponse is the response type for the - Query/VotesAtHeight RPC method. - babylon.finality.v1.SigningInfoResponse: - type: object - properties: - fp_btc_pk_hex: - type: string - title: fp_btc_pk is the BTC PK of the finality provider that casts this vote - start_height: - type: string - format: int64 - title: >- - start_height is the block height at which finality provider become - active - missed_blocks_counter: - type: string - format: int64 - description: >- - missed_blocks_counter defines a counter to avoid unnecessary array - reads. + public key + title: >- + validator_set is the validator set of the sealed epoch - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to liveness - downtime. - description: >- - SigningInfoResponse defines the API response containing a finality - provider's signing info + This validator set has generated a BLS multisig on `app_hash` + of - for monitoring their liveness activity. - babylon.mint.v1.QueryAnnualProvisionsResponse: - type: object - properties: - annual_provisions: - type: string - format: byte - description: AnnualProvisions is the current annual provisions. - description: |- - QueryAnnualProvisionsResponse is the response type for the - Query/AnnualProvisions RPC method. - babylon.mint.v1.QueryGenesisTimeResponse: - type: object - properties: - genesis_time: - type: string - format: date-time - description: GenesisTime is the timestamp associated with the first block. - description: >- - QueryGenesisTimeResponse is the response type for the Query/GenesisTime - RPC + the sealer header + proof_epoch_info: + title: >- + proof_epoch_info is the Merkle proof that the epoch's metadata + is committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root + + The data could be arbitrary format, providing nessecary + data + + for example neighbouring node hash + proof_epoch_val_set: + title: >- + proof_epoch_info is the Merkle proof that the epoch's + validator set is + + committed to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating Merkle + root + + The data could be arbitrary format, providing nessecary + data + + for example neighbouring node hash + proof_epoch_submitted: + type: array + items: + type: object + properties: + key: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified by + hash of block in - method. - babylon.mint.v1.QueryInflationRateResponse: - type: object - properties: - inflation_rate: - type: string - format: byte - description: InflationRate is the current inflation rate. - description: >- - QueryInflationRateResponse is the response type for the - Query/InflationRate + which transaction was included and transaction index in the + block + description: >- + key is the position (txIdx, blockHash) of this tx on BTC + blockchain - RPC method. - babylon.monitor.v1.QueryEndedEpochBtcHeightResponse: - type: object - properties: - btc_light_client_height: - type: integer - format: int64 - title: height of btc light client when epoch ended - title: |- - QueryEndedEpochBtcHeightResponse defines a response type for - EndedEpochBtcHeight RPC method - babylon.monitor.v1.QueryReportedCheckpointBtcHeightResponse: - type: object - properties: - btc_light_client_height: - type: integer - format: int64 - title: height of btc light client when checkpoint is reported - title: |- - QueryReportedCheckpointBtcHeightResponse defines a response type for - ReportedCheckpointBtcHeight RPC method - babylon.checkpointing.v1.BlsPublicKeyListResponse: - type: object - properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key_hex: - type: string - title: bls_pub_key is the BLS public key of the validator - voting_power: - type: string - format: uint64 - title: voting_power is the voting power of the validator at the given epoch - title: >- - BlsPublicKeyListResponse couples validator address, voting power, and its - bls + Although it is already a part of SubmissionKey, we store it + here again - public key - babylon.checkpointing.v1.CheckpointStateUpdateResponse: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + to make TransactionInfo self-contained. - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: state defines the event of a state transition towards this state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that triggers the - state + For example, storing the key allows TransactionInfo to not + relay on - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that triggers the - state + the fact that TransactionInfo will be ordered in the same + order as - update - description: >- - CheckpointStateUpdateResponse defines a state transition on the - checkpoint. - babylon.checkpointing.v1.CheckpointStatus: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is included in the + position in `key` - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - babylon.checkpointing.v1.QueryBlsPublicKeyListResponse: + TODO: maybe it could use here better format as we already + processed and + + validated the proof? + title: |- + TransactionInfo is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: >- + proof_epoch_submitted is the proof that the epoch's checkpoint is + included + + in BTC ledger It is the two TransactionInfo in the best (i.e., + earliest) + + checkpoint submission + description: |- + QueryFinalizedChainInfoUntilHeightResponse is response type for the + Query/FinalizedChainInfoUntilHeight RPC method. + babylon.zoneconcierge.v1.QueryFinalizedChainsInfoResponse: type: object properties: - validator_with_bls_keys: + finalized_chains_info: type: array items: type: object properties: - validator_address: - type: string - title: validator_address is the address of the validator - bls_pub_key_hex: - type: string - title: bls_pub_key is the BLS public key of the validator - voting_power: + consumer_id: type: string - format: uint64 - title: >- - voting_power is the voting power of the validator at the given - epoch - title: >- - BlsPublicKeyListResponse couples validator address, voting power, - and its bls + title: consumer_id is the ID of the consumer + finalized_chain_info: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the ID of the consumer + latest_header: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger - public key - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - description: |- - 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: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + (hash, height) jointly provides the position of the + header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block + that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block + that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on Babylon + ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this + header + + (babylon_block_height, babylon_tx_hash) jointly provides + the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + latest_forks: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger + + (hash, height) jointly provides the position of + the header on CZ ledger + time: + type: string + format: date-time + title: >- + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is + BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon + block that includes this CZ + + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon + block that includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: >- + epoch is the epoch number of this header on + Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that + includes this header + + (babylon_block_height, babylon_tx_hash) jointly + provides the position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at + the same height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the + same height. + + For example, assuming the following blockchain + + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in + struct `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a + valid quorum + + certificate. Such forks exist since Babylon considers CZs + might have + + dishonest majority. Also note that the IBC-Go implementation + will only + + consider the first header in a fork valid, since the + subsequent headers + + cannot be verified without knowing the validator set in the + previous header. + title: >- + latest_forks is the latest forks, formed as a series of + IndexedHeader (from + + low to high) + timestamped_headers_count: + type: string + format: uint64 + title: >- + timestamped_headers_count is the number of timestamped + headers in CZ's + + canonical chain + title: ChainInfo is the information of a CZ + epoch_info: + title: epoch_info is the metadata of the last BTC-finalised epoch + type: object + properties: + epoch_number: + type: string + format: uint64 + title: epoch_number is the number of this epoch + current_epoch_interval: + type: string + format: uint64 + title: >- + current_epoch_interval is the epoch interval at the time of + this epoch + first_block_height: + type: string + format: uint64 + title: >- + first_block_height is the height of the first block in this + epoch + last_block_time: + type: string + format: date-time + description: >- + last_block_time is the time of the last block in this epoch. - was set, its value is undefined otherwise - description: |- - QueryBlsPublicKeyListResponse is the response type for the - Query/BlsPublicKeys RPC method. - babylon.checkpointing.v1.QueryEpochStatusResponse: - type: object - properties: - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + Babylon needs to remember the last header's time of each + epoch to complete - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - description: |- - QueryEpochStatusResponse is the response type for the Query/EpochStatus - RPC method. - babylon.checkpointing.v1.QueryLastCheckpointWithStatusResponse: - type: object - properties: - raw_checkpoint: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: |- - block_hash_hex defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS - multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS + unbonding validators/delegations when a previous epoch's + checkpoint is - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - description: |- - QueryLastCheckpointWithStatusResponse is the response type for the - Query/LastCheckpointWithStatus RPC method. - babylon.checkpointing.v1.QueryRawCheckpointListResponse: - type: object - properties: - raw_checkpoints: - type: array - items: - type: object - properties: - ckpt: + finalised. The last_block_time field is nil in the epoch's + beginning, and + + is set upon the end of this epoch. + sealer_app_hash: + type: string + format: byte + title: >- + sealer is the last block of the sealed epoch + + sealer_app_hash points to the sealer but stored in the 1st + header + + of the next epoch + sealer_block_hash: + type: string + format: byte + title: |- + sealer_block_hash is the hash of the sealer + the validator set has generated a BLS multisig on the hash, + i.e., hash of the last block in the epoch + raw_checkpoint: + title: raw_checkpoint is the raw checkpoint of this epoch type: object properties: epoch_num: type: string format: uint64 title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: + block_hash: type: string - title: >- - block_hash_hex defines the 'BlockID.Hash', which is the hash - of - - the block that individual BLS sigs are signed on as hex - string + format: byte + title: |- + block_hash defines the 'BlockID.Hash', which is the hash of + the block that individual BLS sigs are signed on bitmap: type: string format: byte @@ -15029,374 +24627,511 @@ definitions: individual BLS sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: - type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: - type: string - format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 + btc_submission_key: title: >- - power_sum defines the accumulated voting power for the - checkpoint - lifecycle: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + btc_submission_key is position of two BTC txs that include the + raw - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: >- - state defines the event of a state transition towards this - state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 + checkpoint of this epoch + type: object + properties: + key: + type: array + items: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte title: >- - block_height is the height of the Babylon block that - triggers the state + Each provided OP_RETURN transaction can be identified by + hash of block in + + which transaction was included and transaction index in + the block + proof: + title: proof is the proof that the chain info is finalized + type: object + properties: + proof_cz_header_in_epoch: + title: >- + proof_cz_header_in_epoch is the proof that the CZ header is + timestamped + + within a certain epoch + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating + Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_sealed: + title: proof_epoch_sealed is the proof that the epoch is sealed + type: object + properties: + validator_set: + type: array + items: + type: object + properties: + validator_address: + type: string + title: validator_address is the address of the validator + bls_pub_key: + type: string + format: byte + title: bls_pub_key is the BLS public key of the validator + voting_power: + type: string + format: uint64 + title: >- + voting_power is the voting power of the validator + at the given epoch + title: >- + ValidatorWithBlsKey couples validator address, voting + power, and its bls + + public key + title: >- + validator_set is the validator set of the sealed epoch + + This validator set has generated a BLS multisig on + `app_hash` of + + the sealer header + proof_epoch_info: + title: >- + proof_epoch_info is the Merkle proof that the epoch's + metadata is committed + + to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating + Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_val_set: + title: >- + proof_epoch_info is the Merkle proof that the epoch's + validator set is + + committed to `app_hash` of the sealer header + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + title: >- + ProofOp defines an operation used for calculating + Merkle root + + The data could be arbitrary format, providing + nessecary data + + for example neighbouring node hash + proof_epoch_submitted: + type: array + items: + type: object + properties: + key: + type: object + properties: + index: + type: integer + format: int64 + hash: + type: string + format: byte + title: >- + Each provided OP_RETURN transaction can be identified + by hash of block in + + which transaction was included and transaction index + in the block + description: >- + key is the position (txIdx, blockHash) of this tx on + BTC blockchain + + Although it is already a part of SubmissionKey, we + store it here again + + to make TransactionInfo self-contained. + + For example, storing the key allows TransactionInfo to + not relay on + + the fact that TransactionInfo will be ordered in the + same order as + + TransactionKeys in SubmissionKey. + transaction: + type: string + format: byte + title: transaction is the full transaction in bytes + proof: + type: string + format: byte + title: >- + proof is the Merkle proof that this tx is included in + the position in `key` - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that - triggers the state + TODO: maybe it could use here better format as we + already processed and - update - description: >- - CheckpointStateUpdateResponse defines a state transition on - the checkpoint. - description: >- - lifecycle defines the lifecycle of this checkpoint, i.e., each - state + validated the proof? + title: |- + TransactionInfo is the info of a tx on Bitcoin, + including + - the position of the tx on BTC blockchain + - the full tx content + - the Merkle proof that this tx is on the above position + title: >- + proof_epoch_submitted is the proof that the epoch's + checkpoint is included - transition and the time (in both timestamp and block height) of - this + in BTC ledger It is the two TransactionInfo in the best + (i.e., earliest) - transition. - description: >- - RawCheckpointWithMetaResponse wraps the raw checkpoint with - metadata. - title: the order is going from the newest to oldest based on the epoch number - pagination: - description: pagination defines the pagination in the response. + checkpoint submission + title: FinalizedChainInfo is the information of a CZ that is BTC-finalised + description: |- + QueryFinalizedChainsInfoResponse is response type for the + Query/FinalizedChainsInfo RPC method. + babylon.zoneconcierge.v1.QueryHeaderResponse: + type: object + properties: + header: type: object properties: - next_key: + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: type: string format: byte - description: |- - 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: + title: hash is the hash of this header + height: type: string format: uint64 title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryRawCheckpointListResponse is the response type for the - Query/RawCheckpoints RPC method. - babylon.checkpointing.v1.QueryRawCheckpointResponse: - type: object - properties: - raw_checkpoint: - type: object - properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: >- - block_hash_hex defines the 'BlockID.Hash', which is the hash - of + height is the height of this header on CZ ledger - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the - BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS + (hash, height) jointly provides the position of the header on CZ + ledger + time: + type: string + format: date-time + title: |- + time is the timestamp of this header on CZ ledger + it is needed for CZ to unbond all mature validators/delegations + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that includes + this CZ - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: + header + babylon_header_height: type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: + header + babylon_epoch: type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: type: string format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 - title: power_sum defines the accumulated voting power for the checkpoint - lifecycle: + title: >- + babylon_tx_hash is the hash of the tx that includes this header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + fork_headers: + type: object + properties: + headers: type: array items: type: object properties: - state: + consumer_id: type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. + (hash, height) jointly provides the position of the header + on CZ ledger + time: + type: string + format: date-time title: >- - state defines the event of a state transition towards this - state - status_desc: + time is the timestamp of this header on CZ ledger + + it is needed for CZ to unbond all mature + validators/delegations + + before this timestamp when this header is BTC-finalised + babylon_header_hash: type: string - description: status_desc represents the description of status enum. - block_height: + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ + + header + babylon_header_height: type: string format: uint64 title: >- - block_height is the height of the Babylon block that - triggers the state + babylon_header_height is the height of the babylon block + that includes this CZ - update - block_time: + header + babylon_epoch: type: string - format: date-time + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte title: >- - block_time is the timestamp in the Babylon block that - triggers the state + babylon_tx_hash is the hash of the tx that includes this + header - update - description: >- - CheckpointStateUpdateResponse defines a state transition on the - checkpoint. - description: >- - lifecycle defines the lifecycle of this checkpoint, i.e., each - state + (babylon_block_height, babylon_tx_hash) jointly provides the + position of - transition and the time (in both timestamp and block height) of - this + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: >- + blocks is the list of non-canonical indexed headers at the same + height + description: >- + Forks is a list of non-canonical `IndexedHeader`s at the same height. - transition. - description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. - description: >- - QueryRawCheckpointResponse is the response type for the - Query/RawCheckpoint + For example, assuming the following blockchain - RPC method. - babylon.checkpointing.v1.QueryRawCheckpointsResponse: + ``` + + A <- B <- C <- D <- E + \ -- D1 + \ -- D2 + ``` + + Then the fork will be {[D1, D2]} where each item is in struct + `IndexedBlock`. + + + Note that each `IndexedHeader` in the fork should have a valid quorum + + certificate. Such forks exist since Babylon considers CZs might have + + dishonest majority. Also note that the IBC-Go implementation will only + + consider the first header in a fork valid, since the subsequent + headers + + cannot be verified without knowing the validator set in the previous + header. + description: QueryHeaderResponse is response type for the Query/Header RPC method. + babylon.zoneconcierge.v1.QueryListEpochHeadersResponse: type: object properties: - raw_checkpoints: + headers: type: array items: type: object properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: >- - block_hash_hex defines the 'BlockID.Hash', which is the hash - of + consumer_id: + type: string + title: consumer_id is the unique ID of the consumer + hash: + type: string + format: byte + title: hash is the hash of this header + height: + type: string + format: uint64 + title: >- + height is the height of this header on CZ ledger - the block that individual BLS sigs are signed on as hex - string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the - BLS multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS + (hash, height) jointly provides the position of the header on CZ + ledger + time: + type: string + format: date-time + title: |- + time is the timestamp of this header on CZ ledger + it is needed for CZ to unbond all mature validators/delegations + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: + header + babylon_header_height: type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ + + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this header + + (babylon_block_height, babylon_tx_hash) jointly provides the + position of + + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: headers is the list of headers + description: >- + QueryListEpochHeadersResponse is response type for the + Query/ListEpochHeaders - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: + RPC method. + babylon.zoneconcierge.v1.QueryListHeadersResponse: + type: object + properties: + headers: + type: array + items: + type: object + properties: + consumer_id: type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: + title: consumer_id is the unique ID of the consumer + hash: type: string format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: + title: hash is the hash of this header + height: type: string format: uint64 title: >- - power_sum defines the accumulated voting power for the - checkpoint - lifecycle: - type: array - items: - type: object - properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. + height is the height of this header on CZ ledger - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: >- - state defines the event of a state transition towards this - state - status_desc: - type: string - description: status_desc represents the description of status enum. - block_height: - type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that - triggers the state + (hash, height) jointly provides the position of the header on CZ + ledger + time: + type: string + format: date-time + title: |- + time is the timestamp of this header on CZ ledger + it is needed for CZ to unbond all mature validators/delegations + before this timestamp when this header is BTC-finalised + babylon_header_hash: + type: string + format: byte + title: >- + babylon_header_hash is the hash of the babylon block that + includes this CZ - update - block_time: - type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that - triggers the state + header + babylon_header_height: + type: string + format: uint64 + title: >- + babylon_header_height is the height of the babylon block that + includes this CZ - update - description: >- - CheckpointStateUpdateResponse defines a state transition on - the checkpoint. - description: >- - lifecycle defines the lifecycle of this checkpoint, i.e., each - state + header + babylon_epoch: + type: string + format: uint64 + title: epoch is the epoch number of this header on Babylon ledger + babylon_tx_hash: + type: string + format: byte + title: >- + babylon_tx_hash is the hash of the tx that includes this header - transition and the time (in both timestamp and block height) of - this + (babylon_block_height, babylon_tx_hash) jointly provides the + position of - transition. - description: >- - RawCheckpointWithMetaResponse wraps the raw checkpoint with - metadata. - title: the order is going from the newest to oldest based on the epoch number + the header on Babylon ledger + title: IndexedHeader is the metadata of a CZ header + title: headers is the list of headers pagination: - description: pagination defines the pagination in the response. + title: pagination defines the pagination in the response type: object properties: next_key: @@ -15414,161 +25149,66 @@ definitions: PageRequest.count_total was set, its value is undefined otherwise - description: >- - QueryRawCheckpointsResponse is the response type for the - Query/RawCheckpoints + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. - RPC method. - babylon.checkpointing.v1.QueryRecentEpochStatusCountResponse: + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + description: |- + QueryListHeadersResponse is response type for the Query/ListHeaders RPC + method. + babylon.zoneconcierge.v1.QueryParamsResponse: type: object properties: - tip_epoch: - type: string - format: uint64 - epoch_count: - type: string - format: uint64 - status_count: + params: + description: params holds all the parameters of this module. type: object - additionalProperties: - type: string - format: uint64 - description: |- - QueryRecentEpochStatusCountResponse is the response type for the - Query/EpochStatusCount RPC method. - babylon.checkpointing.v1.RawCheckpointResponse: + properties: + ibc_packet_timeout_seconds: + type: integer + format: int64 + title: >- + ibc_packet_timeout_seconds is the time period after which an + unrelayed + + IBC packet becomes timeout, measured in seconds + description: QueryParamsResponse is the response type for the Query/Params RPC method. + tendermint.crypto.ProofOp: type: object properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: + type: type: string - title: |- - block_hash_hex defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on as hex string - bitmap: + key: type: string format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS multi - sig - bls_multi_sig: + data: type: string format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from individual - BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - babylon.checkpointing.v1.RawCheckpointWithMetaResponse: + title: |- + ProofOp defines an operation used for calculating Merkle root + The data could be arbitrary format, providing nessecary data + for example neighbouring node hash + tendermint.crypto.ProofOps: type: object properties: - ckpt: - type: object - properties: - epoch_num: - type: string - format: uint64 - title: epoch_num defines the epoch number the raw checkpoint is for - block_hash_hex: - type: string - title: |- - block_hash_hex defines the 'BlockID.Hash', which is the hash of - the block that individual BLS sigs are signed on as hex string - bitmap: - type: string - format: byte - title: >- - bitmap defines the bitmap that indicates the signers of the BLS - multi sig - bls_multi_sig: - type: string - format: byte - title: >- - bls_multi_sig defines the multi sig that is aggregated from - individual BLS - - sigs - title: RawCheckpointResponse wraps the BLS multi sig with metadata - status: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: status defines the status of the checkpoint - status_desc: - type: string - description: status_desc represents the description of status enum. - bls_aggr_pk: - type: string - format: byte - title: bls_aggr_pk defines the aggregated BLS public key - power_sum: - type: string - format: uint64 - title: power_sum defines the accumulated voting power for the checkpoint - lifecycle: + ops: type: array items: type: object properties: - state: - type: string - enum: - - CKPT_STATUS_ACCUMULATING - - CKPT_STATUS_SEALED - - CKPT_STATUS_SUBMITTED - - CKPT_STATUS_CONFIRMED - - CKPT_STATUS_FINALIZED - default: CKPT_STATUS_ACCUMULATING - description: |- - CheckpointStatus is the status of a checkpoint. - - - CKPT_STATUS_ACCUMULATING: ACCUMULATING defines a checkpoint that is awaiting for BLS signatures. - - CKPT_STATUS_SEALED: SEALED defines a checkpoint that has accumulated sufficient BLS signatures. - - CKPT_STATUS_SUBMITTED: SUBMITTED defines a checkpoint that is included on BTC. - - CKPT_STATUS_CONFIRMED: CONFIRMED defines a checkpoint that is k-deep on BTC. - - CKPT_STATUS_FINALIZED: FINALIZED defines a checkpoint that is w-deep on BTC. - title: state defines the event of a state transition towards this state - status_desc: + type: type: string - description: status_desc represents the description of status enum. - block_height: + key: type: string - format: uint64 - title: >- - block_height is the height of the Babylon block that triggers - the state - - update - block_time: + format: byte + data: type: string - format: date-time - title: >- - block_time is the timestamp in the Babylon block that triggers - the state - - update - description: >- - CheckpointStateUpdateResponse defines a state transition on the - checkpoint. - description: |- - lifecycle defines the lifecycle of this checkpoint, i.e., each state - transition and the time (in both timestamp and block height) of this - transition. - description: RawCheckpointWithMetaResponse wraps the raw checkpoint with metadata. + format: byte + title: |- + ProofOp defines an operation used for calculating Merkle root + The data could be arbitrary format, providing nessecary data + for example neighbouring node hash + title: ProofOps is Merkle proof defined by the list of ProofOps diff --git a/proto/buf.lock b/proto/buf.lock index aad0e250..293b2c4f 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -24,8 +24,8 @@ deps: - remote: buf.build owner: cosmos repository: ibc - commit: f3cb7e9a10ab4cd5a402b9913f65e38d - digest: shake256:aaa8a2a46a3ab5cb4c54f9f14920bc472e5e5f93453fa250de49f15c76dce7f82faa5615afd341967797ead8052306db6b1e6327cb1d8d94345bf07a22f8aebd + commit: baf134b1c13a45e9903beeba3b2a92ec + digest: shake256:0069c2b35e359966bfe3f30ec98bc76180f277eb6fe722cdc6d20e68257d9b888db3b801c9fdc8ae1014439d786420f21ba2147d8fee7b1dc1dc748ff84e1fe4 - remote: buf.build owner: cosmos repository: ics23