diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 285627856b..b61e7c060d 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1,7 +1,7 @@ -swagger: '2.0' +swagger: "2.0" info: title: Cosmos SDK - Legacy REST and gRPC Gateway docs - description: 'A REST interface for state queries, legacy transactions' + description: "A REST interface for state queries, legacy transactions" version: 1.0.0 paths: /node_info: @@ -13,7 +13,7 @@ paths: produces: - application/json responses: - '200': + "200": description: Node status schema: type: object @@ -59,7 +59,7 @@ paths: type: string listen_addr: type: string - example: '192.168.56.1:26656' + example: "192.168.56.1:26656" version: description: Tendermint version type: string @@ -70,11 +70,11 @@ paths: properties: tx_index: type: string - example: 'on' + example: "on" rpc_address: type: string - example: 'tcp://0.0.0.0:26657' - '500': + example: "tcp://0.0.0.0:26657" + "500": description: Failed to query node status /syncing: get: @@ -85,14 +85,14 @@ paths: produces: - application/json responses: - '200': + "200": description: Node syncing status schema: type: object properties: syncing: type: boolean - '500': + "500": description: Server internal error /blocks/latest: get: @@ -102,7 +102,7 @@ paths: produces: - application/json responses: - '200': + "200": description: The latest block schema: type: object @@ -121,7 +121,7 @@ paths: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -209,7 +209,7 @@ paths: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -303,16 +303,16 @@ paths: type: string validator_index: type: string - example: '0' + example: "0" height: type: string - example: '0' + example: "0" round: type: string - example: '0' + example: "0" timestamp: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" type: type: number example: 2 @@ -335,9 +335,9 @@ paths: type: string example: >- 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== - '500': + "500": description: Server internal error - '/blocks/{height}': + "/blocks/{height}": get: summary: Get a block at a certain height tags: @@ -352,7 +352,7 @@ paths: type: number x-example: 1 responses: - '200': + "200": description: The block at a specific height schema: type: object @@ -371,7 +371,7 @@ paths: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -459,7 +459,7 @@ paths: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -553,16 +553,16 @@ paths: type: string validator_index: type: string - example: '0' + example: "0" height: type: string - example: '0' + example: "0" round: type: string - example: '0' + example: "0" timestamp: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" type: type: number example: 2 @@ -585,11 +585,11 @@ paths: type: string example: >- 7uTC74QlknqYWEwg7Vn6M8Om7FuZ0EO4bjvuj6rwH1mTUJrRuMMZvAAqT9VjNgP0RA/TDp6u/92AqrZfXJSpBQ== - '400': + "400": description: Invalid height - '404': + "404": description: Request block height doesn't - '500': + "500": description: Server internal error /validatorsets/latest: get: @@ -599,7 +599,7 @@ paths: produces: - application/json responses: - '200': + "200": description: The validator set at the latest block height schema: type: object @@ -621,13 +621,13 @@ paths: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf voting_power: type: string - example: '1000' + example: "1000" proposer_priority: type: string - example: '1000' - '500': + example: "1000" + "500": description: Server internal error - '/validatorsets/{height}': + "/validatorsets/{height}": get: summary: Get a validator set a certain height tags: @@ -642,7 +642,7 @@ paths: type: number x-example: 1 responses: - '200': + "200": description: The validator set at a specific block height schema: type: object @@ -664,17 +664,17 @@ paths: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf voting_power: type: string - example: '1000' + example: "1000" proposer_priority: type: string - example: '1000' - '400': + example: "1000" + "400": description: Invalid height - '404': + "404": description: Block at height not available - '500': + "500": description: Server internal error - '/txs/{hash}': + "/txs/{hash}": get: deprecated: true summary: Get a Tx by hash @@ -691,7 +691,7 @@ paths: type: string x-example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B responses: - '200': + "200": description: Tx with the provided hash schema: type: object @@ -725,7 +725,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -746,10 +746,10 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" result: type: object properties: @@ -757,10 +757,10 @@ paths: type: string gas_wanted: type: string - example: '200000' + example: "200000" gas_used: type: string - example: '26354' + example: "26354" tags: type: array items: @@ -770,7 +770,7 @@ paths: type: string value: type: string - '500': + "500": description: Internal Server Error /txs: get: @@ -819,7 +819,7 @@ paths: description: transactions on blocks with height less than or equal this value x-example: 800000 responses: - '200': + "200": description: All txs matching the provided events schema: type: object @@ -873,7 +873,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -894,10 +894,10 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" result: type: object properties: @@ -905,10 +905,10 @@ paths: type: string gas_wanted: type: string - example: '200000' + example: "200000" gas_used: type: string - example: '26354' + example: "26354" tags: type: array items: @@ -918,9 +918,9 @@ paths: type: string value: type: string - '400': + "400": description: Invalid search events - '500': + "500": description: Internal Server Error post: tags: @@ -964,7 +964,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -985,15 +985,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" mode: type: string example: block responses: - '200': + "200": description: Tx broadcasting result schema: type: object @@ -1030,8 +1030,8 @@ paths: gas_wanted: 10000 info: info tags: - - '' - - '' + - "" + - "" deliver_tx: type: object properties: @@ -1064,14 +1064,14 @@ paths: gas_wanted: 10000 info: info tags: - - '' - - '' + - "" + - "" hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 height: type: integer - '500': + "500": description: Internal Server Error /txs/encode: post: @@ -1116,7 +1116,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -1137,12 +1137,12 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" responses: - '200': + "200": description: The tx was successfully decoded and re-encoded schema: type: object @@ -1150,9 +1150,9 @@ paths: tx: type: string example: The base64-encoded Amino-serialized bytes for the tx - '400': + "400": description: The tx was malformated - '500': + "500": description: Server internal error /txs/decode: post: @@ -1180,7 +1180,7 @@ paths: example: >- SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM responses: - '200': + "200": description: The tx was successfully decoded schema: type: object @@ -1204,7 +1204,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -1225,15 +1225,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: The tx was malformated - '500': + "500": description: Server internal error - '/bank/balances/{address}': + "/bank/balances/{address}": get: deprecated: true summary: Get the account balances @@ -1249,7 +1249,7 @@ paths: type: string x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - '200': + "200": description: Account balances schema: type: array @@ -1261,10 +1261,10 @@ paths: example: stake amount: type: string - example: '50' - '500': + example: "50" + "500": description: Server internal error - '/bank/accounts/{address}/transfers': + "/bank/accounts/{address}/transfers": post: deprecated: true summary: Send coins from one account to another @@ -1303,16 +1303,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -1323,7 +1323,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -1340,9 +1340,9 @@ paths: example: stake amount: type: string - example: '50' + example: "50" responses: - '202': + "202": description: Tx was succesfully generated schema: type: object @@ -1366,7 +1366,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -1387,15 +1387,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid request - '500': + "500": description: Server internal error - '/auth/accounts/{address}': + "/auth/accounts/{address}": get: deprecated: true summary: Get the account information on blockchain @@ -1411,7 +1411,7 @@ paths: type: string x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - '200': + "200": description: Account information on the blockchain schema: type: object @@ -1435,7 +1435,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" public_key: type: object properties: @@ -1445,9 +1445,9 @@ paths: type: string sequence: type: string - '500': + "500": description: Server internel error - '/staking/delegators/{delegatorAddr}/delegations': + "/staking/delegators/{delegatorAddr}/delegations": parameters: - in: path name: delegatorAddr @@ -1463,7 +1463,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -1484,10 +1484,10 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid delegator address - '500': + "500": description: Internal Server Error post: summary: Submit delegation @@ -1513,16 +1513,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -1533,7 +1533,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -1556,7 +1556,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" tags: - Staking consumes: @@ -1564,7 +1564,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -1588,7 +1588,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -1609,17 +1609,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid delegator address or delegation request body - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}': + "/staking/delegators/{delegatorAddr}/delegations/{validatorAddr}": parameters: - in: path name: delegatorAddr @@ -1641,7 +1641,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -1660,12 +1660,12 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid delegator address or validator address - '500': + "500": description: Internal Server Error - '/staking/delegators/{delegatorAddr}/unbonding_delegations': + "/staking/delegators/{delegatorAddr}/unbonding_delegations": parameters: - in: path name: delegatorAddr @@ -1681,7 +1681,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -1700,9 +1700,9 @@ paths: type: integer min_time: type: integer - '400': + "400": description: Invalid delegator address - '500': + "500": description: Internal Server Error post: summary: Submit an unbonding delegation @@ -1728,16 +1728,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -1748,7 +1748,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -1765,7 +1765,7 @@ paths: example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l shares: type: string - example: '100' + example: "100" tags: - Staking consumes: @@ -1773,7 +1773,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -1797,7 +1797,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -1818,17 +1818,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid delegator address or unbonding delegation request body - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}': + "/staking/delegators/{delegatorAddr}/unbonding_delegations/{validatorAddr}": parameters: - in: path name: delegatorAddr @@ -1850,7 +1850,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -1872,9 +1872,9 @@ paths: type: string min_time: type: string - '400': + "400": description: Invalid delegator address or validator address - '500': + "500": description: Internal Server Error /staking/redelegations: parameters: @@ -1901,15 +1901,15 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array items: - $ref: '#/definitions/Redelegation' - '500': + $ref: "#/definitions/Redelegation" + "500": description: Internal Server Error - '/staking/delegators/{delegatorAddr}/redelegations': + "/staking/delegators/{delegatorAddr}/redelegations": parameters: - in: path name: delegatorAddr @@ -1942,16 +1942,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -1962,7 +1962,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -1983,7 +1983,7 @@ paths: example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l shares: type: string - example: '100' + example: "100" tags: - Staking consumes: @@ -1991,7 +1991,7 @@ paths: produces: - application/json responses: - '200': + "200": description: Tx was succesfully generated schema: type: object @@ -2015,7 +2015,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -2036,15 +2036,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid delegator address or redelegation request body - '500': + "500": description: Internal Server Error - '/staking/delegators/{delegatorAddr}/validators': + "/staking/delegators/{delegatorAddr}/validators": parameters: - in: path name: delegatorAddr @@ -2060,7 +2060,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -2098,36 +2098,36 @@ paths: type: string bond_height: type: string - example: '0' + example: "0" bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: '0' + example: "0" unbonding_time: type: string - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" commission: type: object properties: rate: type: string - example: '0' + example: "0" max_rate: type: string - example: '0' + example: "0" max_change_rate: type: string - example: '0' + example: "0" update_time: type: string - example: '1970-01-01T00:00:00Z' - '400': + example: "1970-01-01T00:00:00Z" + "400": description: Invalid delegator address - '500': + "500": description: Internal Server Error - '/staking/delegators/{delegatorAddr}/validators/{validatorAddr}': + "/staking/delegators/{delegatorAddr}/validators/{validatorAddr}": parameters: - in: path name: delegatorAddr @@ -2149,7 +2149,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -2185,34 +2185,34 @@ paths: type: string bond_height: type: string - example: '0' + example: "0" bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: '0' + example: "0" unbonding_time: type: string - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" commission: type: object properties: rate: type: string - example: '0' + example: "0" max_rate: type: string - example: '0' + example: "0" max_change_rate: type: string - example: '0' + example: "0" update_time: type: string - example: '1970-01-01T00:00:00Z' - '400': + example: "1970-01-01T00:00:00Z" + "400": description: Invalid delegator address or validator address - '500': + "500": description: Internal Server Error /staking/validators: get: @@ -2243,7 +2243,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -2281,34 +2281,34 @@ paths: type: string bond_height: type: string - example: '0' + example: "0" bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: '0' + example: "0" unbonding_time: type: string - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" commission: type: object properties: rate: type: string - example: '0' + example: "0" max_rate: type: string - example: '0' + example: "0" max_change_rate: type: string - example: '0' + example: "0" update_time: type: string - example: '1970-01-01T00:00:00Z' - '500': + example: "1970-01-01T00:00:00Z" + "500": description: Internal Server Error - '/staking/validators/{validatorAddr}': + "/staking/validators/{validatorAddr}": parameters: - in: path name: validatorAddr @@ -2324,7 +2324,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -2360,36 +2360,36 @@ paths: type: string bond_height: type: string - example: '0' + example: "0" bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: '0' + example: "0" unbonding_time: type: string - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" commission: type: object properties: rate: type: string - example: '0' + example: "0" max_rate: type: string - example: '0' + example: "0" max_change_rate: type: string - example: '0' + example: "0" update_time: type: string - example: '1970-01-01T00:00:00Z' - '400': + example: "1970-01-01T00:00:00Z" + "400": description: Invalid validator address - '500': + "500": description: Internal Server Error - '/staking/validators/{validatorAddr}/delegations': + "/staking/validators/{validatorAddr}/delegations": parameters: - in: path name: validatorAddr @@ -2405,7 +2405,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -2426,12 +2426,12 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid validator address - '500': + "500": description: Internal Server Error - '/staking/validators/{validatorAddr}/unbonding_delegations': + "/staking/validators/{validatorAddr}/unbonding_delegations": parameters: - in: path name: validatorAddr @@ -2447,7 +2447,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -2466,9 +2466,9 @@ paths: type: integer min_time: type: integer - '400': + "400": description: Invalid validator address - '500': + "500": description: Internal Server Error /staking/pool: get: @@ -2479,7 +2479,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -2496,7 +2496,7 @@ paths: type: string prev_bonded_shares: type: string - '500': + "500": description: Internal Server Error /staking/parameters: get: @@ -2507,7 +2507,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -2526,7 +2526,7 @@ paths: type: integer bond_denom: type: string - '500': + "500": description: Internal Server Error /slashing/signing_infos: get: @@ -2551,7 +2551,7 @@ paths: required: true x-example: 5 responses: - '200': + "200": description: OK schema: type: array @@ -2566,11 +2566,11 @@ paths: type: string missed_blocks_counter: type: string - '400': + "400": description: Invalid validator public key for one of the validators - '500': + "500": description: Internal Server Error - '/slashing/validators/{validatorAddr}/unjail': + "/slashing/validators/{validatorAddr}/unjail": post: deprecated: true summary: Unjail a jailed validator @@ -2588,7 +2588,7 @@ paths: required: true in: path x-example: cosmosvaloper16xyempempp92x9hyzz9wrgf94r6j9h5f2w4n2l - - description: '' + - description: "" name: UnjailBody in: body required: true @@ -2617,7 +2617,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -2638,12 +2638,12 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" responses: - '200': + "200": description: Tx was succesfully generated schema: type: object @@ -2667,7 +2667,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -2688,13 +2688,13 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid validator address or base_req - '500': + "500": description: Internal Server Error /slashing/parameters: get: @@ -2705,7 +2705,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -2724,7 +2724,7 @@ paths: type: string slash_fraction_downtime: type: string - '500': + "500": description: Internal Server Error /gov/proposals: post: @@ -2762,16 +2762,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -2782,7 +2782,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -2810,9 +2810,9 @@ paths: example: stake amount: type: string - example: '50' + example: "50" responses: - '200': + "200": description: Tx was succesfully generated schema: type: object @@ -2836,7 +2836,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -2857,13 +2857,13 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid proposal body - '500': + "500": description: Internal Server Error get: deprecated: true @@ -2892,7 +2892,7 @@ paths: required: false type: string responses: - '200': + "200": description: OK schema: type: array @@ -2912,18 +2912,18 @@ paths: final_tally_result: type: object properties: - 'yes': + "yes": type: string - example: '0.0000000000' + example: "0.0000000000" abstain: type: string - example: '0.0000000000' - 'no': + example: "0.0000000000" + "no": type: string - example: '0.0000000000' + example: "0.0000000000" no_with_veto: type: string - example: '0.0000000000' + example: "0.0000000000" submit_time: type: string total_deposit: @@ -2936,12 +2936,12 @@ paths: example: stake amount: type: string - example: '50' + example: "50" voting_start_time: type: string - '400': + "400": description: Invalid query parameters - '500': + "500": description: Internal Server Error /gov/proposals/param_change: post: @@ -2979,16 +2979,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -2999,7 +2999,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -3026,7 +3026,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" changes: type: array items: @@ -3040,11 +3040,11 @@ paths: example: MaxValidators subkey: type: string - example: '' + example: "" value: type: object responses: - '200': + "200": description: The transaction was succesfully generated schema: type: object @@ -3068,7 +3068,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -3089,15 +3089,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid proposal body - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}': + "/gov/proposals/{proposalId}": get: deprecated: true summary: Query a proposal @@ -3111,9 +3111,9 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" responses: - '200': + "200": description: OK schema: type: object @@ -3131,18 +3131,18 @@ paths: final_tally_result: type: object properties: - 'yes': + "yes": type: string - example: '0.0000000000' + example: "0.0000000000" abstain: type: string - example: '0.0000000000' - 'no': + example: "0.0000000000" + "no": type: string - example: '0.0000000000' + example: "0.0000000000" no_with_veto: type: string - example: '0.0000000000' + example: "0.0000000000" submit_time: type: string total_deposit: @@ -3155,14 +3155,14 @@ paths: example: stake amount: type: string - example: '50' + example: "50" voting_start_time: type: string - '400': + "400": description: Invalid proposal id - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}/proposer': + "/gov/proposals/{proposalId}/proposer": get: deprecated: true summary: Query proposer @@ -3176,9 +3176,9 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" responses: - '200': + "200": description: OK schema: type: object @@ -3187,11 +3187,11 @@ paths: type: string proposer: type: string - '400': + "400": description: Invalid proposal ID - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}/deposits': + "/gov/proposals/{proposalId}/deposits": get: deprecated: true summary: Query deposits @@ -3205,9 +3205,9 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" responses: - '200': + "200": description: OK schema: type: array @@ -3224,16 +3224,16 @@ paths: example: stake amount: type: string - example: '50' + example: "50" proposal_id: type: string depositor: type: string description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': + "400": description: Invalid proposal id - '500': + "500": description: Internal Server Error post: deprecated: true @@ -3251,8 +3251,8 @@ paths: name: proposalId required: true in: path - x-example: '2' - - description: '' + x-example: "2" + - description: "" name: post_deposit_body in: body required: true @@ -3274,16 +3274,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -3294,7 +3294,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -3315,9 +3315,9 @@ paths: example: stake amount: type: string - example: '50' + example: "50" responses: - '200': + "200": description: OK schema: type: object @@ -3341,7 +3341,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -3362,17 +3362,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid proposal id or deposit body - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}/deposits/{depositor}': + "/gov/proposals/{proposalId}/deposits/{depositor}": get: deprecated: true summary: Query deposit @@ -3387,7 +3387,7 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" - type: string description: Bech32 depositor address name: depositor @@ -3395,7 +3395,7 @@ paths: in: path x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - '200': + "200": description: OK schema: type: object @@ -3410,20 +3410,20 @@ paths: example: stake amount: type: string - example: '50' + example: "50" proposal_id: type: string depositor: type: string description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': + "400": description: Invalid proposal id or depositor address - '404': + "404": description: Found no deposit - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}/votes': + "/gov/proposals/{proposalId}/votes": get: deprecated: true summary: Query voters @@ -3438,9 +3438,9 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" responses: - '200': + "200": description: OK schema: type: array @@ -3453,9 +3453,9 @@ paths: type: string option: type: string - '400': + "400": description: Invalid proposal id - '500': + "500": description: Internal Server Error post: deprecated: true @@ -3473,7 +3473,7 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" - description: >- valid value of `"option"` field can be `"yes"`, `"no"`, `"no_with_veto"` and `"abstain"` @@ -3498,16 +3498,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -3518,7 +3518,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -3531,9 +3531,9 @@ paths: example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 option: type: string - example: 'yes' + example: "yes" responses: - '200': + "200": description: OK schema: type: object @@ -3557,7 +3557,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -3578,17 +3578,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid proposal id or vote body - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}/votes/{voter}': + "/gov/proposals/{proposalId}/votes/{voter}": get: deprecated: true summary: Query vote @@ -3603,7 +3603,7 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" - type: string description: Bech32 voter address name: voter @@ -3611,7 +3611,7 @@ paths: in: path x-example: cosmos16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv responses: - '200': + "200": description: OK schema: type: object @@ -3622,13 +3622,13 @@ paths: type: string option: type: string - '400': + "400": description: Invalid proposal id or voter address - '404': + "404": description: Found no vote - '500': + "500": description: Internal Server Error - '/gov/proposals/{proposalId}/tally': + "/gov/proposals/{proposalId}/tally": get: deprecated: true summary: Get a proposal's tally result at the current time @@ -3646,28 +3646,28 @@ paths: name: proposalId required: true in: path - x-example: '2' + x-example: "2" responses: - '200': + "200": description: OK schema: type: object properties: - 'yes': + "yes": type: string - example: '0.0000000000' + example: "0.0000000000" abstain: type: string - example: '0.0000000000' - 'no': + example: "0.0000000000" + "no": type: string - example: '0.0000000000' + example: "0.0000000000" no_with_veto: type: string - example: '0.0000000000' - '400': + example: "0.0000000000" + "400": description: Invalid proposal id - '500': + "500": description: Internal Server Error /gov/parameters/deposit: get: @@ -3681,7 +3681,7 @@ paths: tags: - Governance responses: - '200': + "200": description: OK schema: type: object @@ -3696,15 +3696,15 @@ paths: example: stake amount: type: string - example: '50' + example: "50" max_deposit_period: type: string - example: '86400000000000' - '400': + example: "86400000000000" + "400": description: is not a valid query request path - '404': + "404": description: Found no deposit parameters - '500': + "500": description: Internal Server Error /gov/parameters/tallying: get: @@ -3716,24 +3716,24 @@ paths: tags: - Governance responses: - '200': + "200": description: OK schema: properties: threshold: type: string - example: '0.5000000000' + example: "0.5000000000" veto: type: string - example: '0.3340000000' + example: "0.3340000000" governance_penalty: type: string - example: '0.0100000000' - '400': + example: "0.0100000000" + "400": description: is not a valid query request path - '404': + "404": description: Found no tally parameters - '500': + "500": description: Internal Server Error /gov/parameters/voting: get: @@ -3747,20 +3747,20 @@ paths: tags: - Governance responses: - '200': + "200": description: OK schema: properties: voting_period: type: string - example: '86400000000000' - '400': + example: "86400000000000" + "400": description: is not a valid query request path - '404': + "404": description: Found no voting parameters - '500': + "500": description: Internal Server Error - '/distribution/delegators/{delegatorAddr}/rewards': + "/distribution/delegators/{delegatorAddr}/rewards": parameters: - in: path name: delegatorAddr @@ -3779,7 +3779,7 @@ paths: tags: - Distribution responses: - '200': + "200": description: OK schema: type: object @@ -3803,7 +3803,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" total: type: array items: @@ -3814,10 +3814,10 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid delegator address - '500': + "500": description: Internal Server Error post: deprecated: true @@ -3849,16 +3849,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -3869,7 +3869,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -3877,7 +3877,7 @@ paths: Estimate gas for a transaction (cannot be used in conjunction with generate_only) responses: - '200': + "200": description: OK schema: type: object @@ -3901,7 +3901,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -3922,17 +3922,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid delegator address - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}': + "/distribution/delegators/{delegatorAddr}/rewards/{validatorAddr}": parameters: - in: path name: delegatorAddr @@ -3955,7 +3955,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -3967,10 +3967,10 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid delegator address - '500': + "500": description: Internal Server Error post: deprecated: true @@ -4002,16 +4002,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -4022,7 +4022,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -4030,7 +4030,7 @@ paths: Estimate gas for a transaction (cannot be used in conjunction with generate_only) responses: - '200': + "200": description: OK schema: type: object @@ -4054,7 +4054,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -4075,17 +4075,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid delegator address or delegation body - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/distribution/delegators/{delegatorAddr}/withdraw_address': + "/distribution/delegators/{delegatorAddr}/withdraw_address": parameters: - in: path name: delegatorAddr @@ -4104,15 +4104,15 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: string description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 - '400': + "400": description: Invalid delegator address - '500': + "500": description: Internal Server Error post: deprecated: true @@ -4144,16 +4144,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -4164,7 +4164,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -4176,7 +4176,7 @@ paths: description: bech32 encoded address example: cosmos1depk54cuajgkzea6zpgkq36tnjwdzv4afc3d27 responses: - '200': + "200": description: OK schema: type: object @@ -4200,7 +4200,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -4221,17 +4221,17 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid delegator or withdraw address - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error - '/distribution/validators/{validatorAddr}': + "/distribution/validators/{validatorAddr}": parameters: - in: path name: validatorAddr @@ -4248,7 +4248,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -4267,7 +4267,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" val_commission: type: array items: @@ -4278,12 +4278,12 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid validator address - '500': + "500": description: Internal Server Error - '/distribution/validators/{validatorAddr}/outstanding_rewards': + "/distribution/validators/{validatorAddr}/outstanding_rewards": parameters: - in: path name: validatorAddr @@ -4299,7 +4299,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -4311,10 +4311,10 @@ paths: example: stake amount: type: string - example: '50' - '500': + example: "50" + "500": description: Internal Server Error - '/distribution/validators/{validatorAddr}/rewards': + "/distribution/validators/{validatorAddr}/rewards": parameters: - in: path name: validatorAddr @@ -4331,7 +4331,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -4343,10 +4343,10 @@ paths: example: stake amount: type: string - example: '50' - '400': + example: "50" + "400": description: Invalid validator address - '500': + "500": description: Internal Server Error post: deprecated: true @@ -4378,16 +4378,16 @@ paths: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -4398,7 +4398,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -4406,7 +4406,7 @@ paths: Estimate gas for a transaction (cannot be used in conjunction with generate_only) responses: - '200': + "200": description: OK schema: type: object @@ -4430,7 +4430,7 @@ paths: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -4451,15 +4451,15 @@ paths: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' - '400': + example: "0" + "400": description: Invalid validator address - '401': + "401": description: Key password is wrong - '500': + "500": description: Internal Server Error /distribution/community_pool: get: @@ -4470,7 +4470,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: array @@ -4482,8 +4482,8 @@ paths: example: stake amount: type: string - example: '50' - '500': + example: "50" + "500": description: Internal Server Error /distribution/parameters: get: @@ -4494,7 +4494,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: properties: @@ -4504,7 +4504,7 @@ paths: type: string community_tax: type: string - '500': + "500": description: Internal Server Error /minting/parameters: get: @@ -4515,7 +4515,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: properties: @@ -4531,7 +4531,7 @@ paths: type: string blocks_per_year: type: string - '500': + "500": description: Internal Server Error /minting/inflation: get: @@ -4542,11 +4542,11 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: string - '500': + "500": description: Internal Server Error /minting/annual-provisions: get: @@ -4557,11 +4557,11 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: string - '500': + "500": description: Internal Server Error /supply/total: get: @@ -4572,7 +4572,7 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: object @@ -4587,10 +4587,10 @@ paths: example: stake amount: type: string - example: '50' - '500': + example: "50" + "500": description: Internal Server Error - '/supply/total/{denomination}': + "/supply/total/{denomination}": parameters: - in: path name: denomination @@ -4606,20 +4606,20 @@ paths: produces: - application/json responses: - '200': + "200": description: OK schema: type: string - '400': + "400": description: Invalid coin denomination - '500': + "500": description: Internal Server Error - '/cosmos/auth/v1beta1/accounts/{address}': + "/cosmos/auth/v1beta1/accounts/{address}": get: summary: Account returns account details based on address. operationId: Account responses: - '200': + "200": description: A successful response. schema: type: object @@ -4896,7 +4896,7 @@ paths: summary: Params queries all parameters. operationId: AuthParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -5114,12 +5114,12 @@ paths: } tags: - Query - '/cosmos/bank/v1beta1/balances/{address}': + "/cosmos/bank/v1beta1/balances/{address}": get: summary: AllBalances queries the balance of all coins for a single account. operationId: AllBalances responses: - '200': + "200": description: A successful response. schema: type: object @@ -5242,12 +5242,12 @@ paths: format: boolean tags: - Query - '/cosmos/bank/v1beta1/balances/{address}/{denom}': + "/cosmos/bank/v1beta1/balances/{address}/{denom}": get: summary: Balance queries the balance of a single coin for a single account. operationId: Balance responses: - '200': + "200": description: A successful response. schema: type: object @@ -5303,7 +5303,7 @@ paths: summary: Params queries the parameters of x/bank module. operationId: BankParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -5362,7 +5362,7 @@ paths: summary: TotalSupply queries the total supply of all coins. operationId: TotalSupply responses: - '200': + "200": description: A successful response. schema: type: object @@ -5414,12 +5414,12 @@ paths: format: byte tags: - Query - '/cosmos/bank/v1beta1/supply/{denom}': + "/cosmos/bank/v1beta1/supply/{denom}": get: summary: SupplyOf queries the supply of a single coin. operationId: SupplyOf responses: - '200': + "200": description: A successful response. schema: type: object @@ -5470,7 +5470,7 @@ paths: summary: CommunityPool queries the community pool coins. operationId: CommunityPool responses: - '200': + "200": description: A successful response. schema: type: object @@ -5523,14 +5523,14 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': + "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards": get: summary: |- DelegationTotalRewards queries the total rewards accrued by a each validator. operationId: DelegationTotalRewards responses: - '200': + "200": description: A successful response. schema: type: object @@ -5616,12 +5616,12 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': - get: + ? "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}" + : get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: DelegationRewards responses: - '200': + "200": description: A successful response. schema: type: object @@ -5683,12 +5683,12 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': + "/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators": get: summary: DelegatorValidators queries the validators of a delegator. operationId: DelegatorValidators responses: - '200': + "200": description: A successful response. schema: type: object @@ -5733,12 +5733,12 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': - get: + ? "/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address" + : get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: DelegatorWithdrawAddress responses: - '200': + "200": description: A successful response. schema: type: object @@ -5784,7 +5784,7 @@ paths: summary: Params queries params of the distribution module. operationId: DistributionParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -5829,12 +5829,12 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': + "/cosmos/distribution/v1beta1/validators/{validator_address}/commission": get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: ValidatorCommission responses: - '200': + "200": description: A successful response. schema: type: object @@ -5894,12 +5894,12 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': - get: + ? "/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards" + : get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: ValidatorOutstandingRewards responses: - '200': + "200": description: A successful response. schema: type: object @@ -5966,12 +5966,12 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': + "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes": get: summary: ValidatorSlashes queries slash events of a validator. operationId: ValidatorSlashes responses: - '200': + "200": description: A successful response. schema: type: object @@ -6116,7 +6116,7 @@ paths: summary: AllEvidence queries all evidence. operationId: AllEvidence responses: - '200': + "200": description: A successful response. schema: type: object @@ -6561,12 +6561,12 @@ paths: format: boolean tags: - Query - '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': + "/cosmos/evidence/v1beta1/evidence/{evidence_hash}": get: summary: Evidence queries evidence based on evidence hash. operationId: Evidence responses: - '200': + "200": description: A successful response. schema: type: object @@ -6839,12 +6839,12 @@ paths: format: byte tags: - Query - '/cosmos/gov/v1beta1/params/{params_type}': + "/cosmos/gov/v1beta1/params/{params_type}": get: summary: Params queries all parameters of the gov module. operationId: GovParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -7117,7 +7117,7 @@ paths: summary: Proposals queries all proposals based on given status. operationId: Proposals responses: - '200': + "200": description: A successful response. schema: type: object @@ -7335,11 +7335,11 @@ paths: final_tally_result: type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -7677,12 +7677,12 @@ paths: format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}': + "/cosmos/gov/v1beta1/proposals/{proposal_id}": get: summary: Proposal queries proposal details based on ProposalID. operationId: Proposal responses: - '200': + "200": description: A successful response. schema: type: object @@ -7896,11 +7896,11 @@ paths: final_tally_result: type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -8140,12 +8140,12 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': + "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits": get: summary: Deposits queries all deposits of a single proposal. operationId: Deposits responses: - '200': + "200": description: A successful response. schema: type: object @@ -8449,14 +8449,14 @@ paths: format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': + "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}": get: summary: >- Deposit queries single deposit information based proposalID, depositAddr. operationId: Deposit responses: - '200': + "200": description: A successful response. schema: type: object @@ -8693,12 +8693,12 @@ paths: type: string tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': + "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally": get: summary: TallyResult queries the tally of a proposal vote. operationId: TallyResult responses: - '200': + "200": description: A successful response. schema: type: object @@ -8707,11 +8707,11 @@ paths: description: tally defines the requested tally. type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -8916,12 +8916,12 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes": get: summary: Votes queries votes of a given proposal. operationId: Votes responses: - '200': + "200": description: A successful response. schema: type: object @@ -9226,12 +9226,12 @@ paths: format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': + "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}": get: - summary: 'Vote queries voted information based on proposalID, voterAddr.' + summary: "Vote queries voted information based on proposalID, voterAddr." operationId: Vote responses: - '200': + "200": description: A successful response. schema: type: object @@ -9474,7 +9474,7 @@ paths: summary: AnnualProvisions current minting annual provisions value. operationId: AnnualProvisions responses: - '200': + "200": description: A successful response. schema: type: object @@ -9517,7 +9517,7 @@ paths: summary: Inflation returns the current minting inflation value. operationId: Inflation responses: - '200': + "200": description: A successful response. schema: type: object @@ -9560,7 +9560,7 @@ paths: summary: Params returns the total set of minting parameters. operationId: MintParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -9622,7 +9622,7 @@ paths: key. operationId: Params responses: - '200': + "200": description: A successful response. schema: type: object @@ -9680,7 +9680,7 @@ paths: summary: Params queries the parameters of slashing module operationId: SlashingParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -9737,7 +9737,7 @@ paths: summary: SigningInfos queries signing info of all validators operationId: SigningInfos responses: - '200': + "200": description: A successful response. schema: type: object @@ -9887,12 +9887,12 @@ paths: format: boolean tags: - Query - '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': + "/cosmos/slashing/v1beta1/signing_infos/{cons_address}": get: summary: SigningInfo queries the signing info of given cons address operationId: SigningInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -9973,14 +9973,14 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/delegations/{delegator_addr}': + "/cosmos/staking/v1beta1/delegations/{delegator_addr}": get: summary: >- DelegatorDelegations queries all delegations of a given delegator address. operationId: DelegatorDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -10129,12 +10129,12 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': + "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations": get: summary: Redelegations queries redelegations of given address. operationId: Redelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -10326,7 +10326,7 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': + "/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations": get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a @@ -10335,7 +10335,7 @@ paths: delegator address. operationId: DelegatorUnbondingDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -10472,14 +10472,14 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': + "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators": get: summary: |- DelegatorValidators queries all validators info for given delegator address. operationId: StakingDelegatorValidators responses: - '200': + "200": description: A successful response. schema: type: object @@ -10670,14 +10670,14 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': - get: + ? "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}" + : get: summary: |- DelegatorValidator queries validator info for given delegator validator pair. operationId: DelegatorValidator responses: - '200': + "200": description: A successful response. schema: type: object @@ -10783,12 +10783,12 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/historical_info/{height}': + "/cosmos/staking/v1beta1/historical_info/{height}": get: summary: HistoricalInfo queries the historical info for given height. operationId: HistoricalInfo responses: - '200': + "200": description: A successful response. schema: type: object @@ -11002,7 +11002,7 @@ paths: summary: Parameters queries the staking parameters. operationId: StakingParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -11056,7 +11056,7 @@ paths: summary: Pool queries the pool info. operationId: Pool responses: - '200': + "200": description: A successful response. schema: type: object @@ -11099,7 +11099,7 @@ paths: summary: Validators queries all validators that match the given status. operationId: Validators responses: - '200': + "200": description: A successful response. schema: type: object @@ -11290,12 +11290,12 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}': + "/cosmos/staking/v1beta1/validators/{validator_addr}": get: summary: Validator queries validator info for given validator address. operationId: Validator responses: - '200': + "200": description: A successful response. schema: type: object @@ -11396,12 +11396,12 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': + "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations": get: summary: ValidatorDelegations queries delegate info for given validator. operationId: ValidatorDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -11547,12 +11547,12 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': - get: + ? "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}" + : get: summary: Delegation queries delegate info for given validator delegator pair. operationId: Delegation responses: - '200': + "200": description: A successful response. schema: type: object @@ -11633,14 +11633,14 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': - get: + ? "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation" + : get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator pair. operationId: UnbondingDelegation responses: - '200': + "200": description: A successful response. schema: type: object @@ -11711,14 +11711,14 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + "/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations": get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a validator. operationId: ValidatorUnbondingDelegations responses: - '200': + "200": description: A successful response. schema: type: object @@ -11855,12 +11855,12 @@ paths: format: boolean tags: - Query - '/cosmos/upgrade/v1beta1/applied_plan/{name}': + "/cosmos/upgrade/v1beta1/applied_plan/{name}": get: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: AppliedPlan responses: - '200': + "200": description: A successful response. schema: type: object @@ -11909,7 +11909,7 @@ paths: summary: CurrentPlan queries the current upgrade plan. operationId: CurrentPlan responses: - '200': + "200": description: A successful response. schema: type: object @@ -11996,7 +11996,7 @@ paths: summary: Channels queries all the IBC channels of a chain. operationId: Channels responses: - '200': + "200": description: A successful response. schema: type: object @@ -12113,17 +12113,17 @@ paths: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -12131,10 +12131,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. @@ -12377,12 +12377,12 @@ paths: format: boolean tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}': + "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}": get: summary: Channel queries an IBC Channel. operationId: Channel responses: - '200': + "200": description: A successful response. schema: type: object @@ -12472,17 +12472,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -12490,10 +12490,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. @@ -12704,7 +12704,7 @@ paths: type: string tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state': + "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state": get: summary: >- ChannelClientState queries for the client state for the channel @@ -12713,7 +12713,7 @@ paths: with the provided channel identifiers. operationId: ChannelClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -12917,17 +12917,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -12935,10 +12935,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -13144,14 +13144,14 @@ paths: type: string tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}': - get: + ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/{version_number}/height/{version_height}" + : get: summary: |- ChannelConsensusState queries for the consensus state for the channel associated with the provided channel identifiers. operationId: ChannelConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -13342,17 +13342,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -13360,10 +13360,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -13567,28 +13567,28 @@ paths: in: path required: true type: string - - name: epoch_number - description: epoch number of the consensus state + - name: version_number + description: version number of the consensus state in: path required: true type: string format: uint64 - - name: epoch_height - description: epoch height of the consensus state + - name: version_height + description: version height of the consensus state in: path required: true type: string format: uint64 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence': + "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence": get: summary: >- NextSequenceReceive returns the next receive sequence for a given channel. operationId: NextSequenceReceive responses: - '200': + "200": description: A successful response. schema: type: object @@ -13608,17 +13608,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -13626,10 +13626,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method @@ -13835,12 +13835,12 @@ paths: type: string tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': - get: + ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}" + : get: summary: PacketAcknowledgement queries a stored packet acknowledgement hash. operationId: PacketAcknowledgement responses: - '200': + "200": description: A successful response. schema: type: object @@ -13860,17 +13860,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -13878,10 +13878,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: >- QueryPacketAcknowledgementResponse defines the client query response for a @@ -14098,8 +14098,8 @@ paths: format: uint64 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments': - get: + ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments" + : get: summary: >- PacketCommitments returns the all the packet commitments hashes associated @@ -14107,7 +14107,7 @@ paths: with a channel. operationId: PacketCommitments responses: - '200': + "200": description: A successful response. schema: type: object @@ -14168,17 +14168,17 @@ paths: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -14186,10 +14186,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method @@ -14442,8 +14442,8 @@ paths: format: boolean tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets': - get: + ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets" + : get: summary: >- UnreceivedPackets returns all the unrelayed IBC packets associated with a @@ -14451,7 +14451,7 @@ paths: channel and sequences. operationId: UnreceivedPackets responses: - '200': + "200": description: A successful response. schema: type: object @@ -14466,17 +14466,17 @@ paths: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -14484,10 +14484,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method @@ -14703,8 +14703,8 @@ paths: minItems: 1 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unrelayed_acks': - get: + ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unrelayed_acks" + : get: summary: >- UnrelayedAcks returns all the unrelayed IBC acknowledgements associated with a @@ -14712,7 +14712,7 @@ paths: channel and sequences. operationId: UnrelayedAcks responses: - '200': + "200": description: A successful response. schema: type: object @@ -14727,17 +14727,17 @@ paths: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -14745,10 +14745,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryUnrelayedAcksResponse is the response type for the Query/UnrelayedAcks RPC method @@ -14964,12 +14964,12 @@ paths: minItems: 1 tags: - Query - '/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}': - get: + ? "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}" + : get: summary: PacketCommitment queries a stored packet commitment hash. operationId: PacketCommitment responses: - '200': + "200": description: A successful response. schema: type: object @@ -14989,17 +14989,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -15007,10 +15007,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet @@ -15227,14 +15227,14 @@ paths: format: uint64 tags: - Query - '/ibc/channel/v1beta1/connections/{connection}/channels': + "/ibc/channel/v1beta1/connections/{connection}/channels": get: summary: |- ConnectionChannels queries all the channels associated with a connection end. operationId: ConnectionChannels responses: - '200': + "200": description: A successful response. schema: type: object @@ -15351,17 +15351,17 @@ paths: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -15369,10 +15369,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method @@ -15625,7 +15625,7 @@ paths: summary: ClientStates queries all the IBC light clients of a chain. operationId: ClientStates responses: - '200': + "200": description: A successful response. schema: type: object @@ -16094,12 +16094,12 @@ paths: format: boolean tags: - Query - '/ibc/client/v1beta1/client_states/{client_id}': + "/ibc/client/v1beta1/client_states/{client_id}": get: summary: ClientState queries an IBC light client. operationId: ClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -16287,17 +16287,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -16305,10 +16305,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryClientStateResponse is the response type for the Query/ClientState RPC @@ -16514,14 +16514,14 @@ paths: type: string tags: - Query - '/ibc/client/v1beta1/consensus_states/{client_id}': + "/ibc/client/v1beta1/consensus_states/{client_id}": get: summary: |- ConsensusStates queries all the consensus state associated with a given client. operationId: ConsensusStates responses: - '200': + "200": description: A successful response. schema: type: object @@ -16535,17 +16535,17 @@ paths: title: consensus state height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height - while keeping epoch + Normally the VersionHeight is incremented at each height + while keeping version number the same However some consensus algorithms may choose to reset the @@ -16553,10 +16553,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets + be monitonically increasing even as the VersionHeight gets reset consensus_state: title: consensus state @@ -17015,8 +17015,8 @@ paths: format: boolean tags: - Query - '/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/height/{epoch_height}': - get: + ? "/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/height/{version_height}" + : get: summary: >- ConsensusState queries a consensus state associated with a client state at @@ -17024,7 +17024,7 @@ paths: a given height. operationId: ConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -17214,17 +17214,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -17232,10 +17232,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -17436,14 +17436,14 @@ paths: in: path required: true type: string - - name: epoch_number - description: consensus state epoch number + - name: version_number + description: consensus state version number in: path required: true type: string format: uint64 - - name: epoch_height - description: consensus state epoch height + - name: version_height + description: consensus state version height in: path required: true type: string @@ -17460,14 +17460,14 @@ paths: format: boolean tags: - Query - '/ibc/connection/v1beta1/client_connections/{client_id}': + "/ibc/connection/v1beta1/client_connections/{client_id}": get: summary: |- ClientConnections queries the connection paths associated with a client state. operationId: ClientConnections responses: - '200': + "200": description: A successful response. schema: type: object @@ -17488,17 +17488,17 @@ paths: title: height at which the proof was generated type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -17506,10 +17506,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method @@ -17715,7 +17715,7 @@ paths: summary: Connections queries all the IBC connections of a chain. operationId: Connections responses: - '200': + "200": description: A successful response. schema: type: object @@ -17812,17 +17812,17 @@ paths: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -17830,10 +17830,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryConnectionsResponse is the response type for the Query/Connections RPC @@ -18078,12 +18078,12 @@ paths: format: boolean tags: - Query - '/ibc/connection/v1beta1/connections/{connection_id}': + "/ibc/connection/v1beta1/connections/{connection_id}": get: summary: Connection queries an IBC connection end. operationId: Connection responses: - '200': + "200": description: A successful response. schema: type: object @@ -18157,17 +18157,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -18175,10 +18175,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryConnectionResponse is the response type for the Query/Connection RPC @@ -18384,14 +18384,14 @@ paths: type: string tags: - Query - '/ibc/connection/v1beta1/connections/{connection_id}/client_state': + "/ibc/connection/v1beta1/connections/{connection_id}/client_state": get: summary: |- ConnectionClientState queries the client state associated with the connection. operationId: ConnectionClientState responses: - '200': + "200": description: A successful response. schema: type: object @@ -18595,17 +18595,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -18613,10 +18613,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method @@ -18817,14 +18817,14 @@ paths: type: string tags: - Query - '/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}': - get: + ? "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/version/{version_number}/height/{version_height}" + : get: summary: |- ConnectionConsensusState queries the consensus state associated with the connection. operationId: ConnectionConsensusState responses: - '200': + "200": description: A successful response. schema: type: object @@ -19015,17 +19015,17 @@ paths: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -19033,10 +19033,10 @@ paths: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method @@ -19235,12 +19235,12 @@ paths: in: path required: true type: string - - name: epoch_number + - name: version_number in: path required: true type: string format: uint64 - - name: epoch_height + - name: version_height in: path required: true type: string @@ -19252,7 +19252,7 @@ paths: summary: DenomTraces queries all denomination traces. operationId: DenomTraces responses: - '200': + "200": description: A successful response. schema: type: object @@ -19540,12 +19540,12 @@ paths: format: boolean tags: - Query - '/ibc_transfer/v1beta1/denom_traces/{hash}': + "/ibc_transfer/v1beta1/denom_traces/{hash}": get: summary: DenomTrace queries a denomination trace information. operationId: DenomTrace responses: - '200': + "200": description: A successful response. schema: type: object @@ -19773,7 +19773,7 @@ paths: summary: Params queries all parameters of the ibc-transfer module. operationId: IBCTransferParams responses: - '200': + "200": description: A successful response. schema: type: object @@ -20028,8 +20028,8 @@ definitions: gas_wanted: 10000 info: info tags: - - '' - - '' + - "" + - "" DeliverTxResult: type: object properties: @@ -20062,8 +20062,8 @@ definitions: gas_wanted: 10000 info: info tags: - - '' - - '' + - "" + - "" BroadcastTxCommitResult: type: object properties: @@ -20099,8 +20099,8 @@ definitions: gas_wanted: 10000 info: info tags: - - '' - - '' + - "" + - "" deliver_tx: type: object properties: @@ -20133,8 +20133,8 @@ definitions: gas_wanted: 10000 info: info tags: - - '' - - '' + - "" + - "" hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 @@ -20165,7 +20165,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" Hash: type: string example: EE5F3404034C524501629B56E0DDC38FAD651F04 @@ -20200,7 +20200,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -20221,10 +20221,10 @@ definitions: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" result: type: object properties: @@ -20232,10 +20232,10 @@ definitions: type: string gas_wanted: type: string - example: '200000' + example: "200000" gas_used: type: string - example: '26354' + example: "26354" tags: type: array items: @@ -20296,7 +20296,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -20317,10 +20317,10 @@ definitions: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" result: type: object properties: @@ -20328,10 +20328,10 @@ definitions: type: string gas_wanted: type: string - example: '200000' + example: "200000" gas_used: type: string - example: '26354' + example: "26354" tags: type: array items: @@ -20363,7 +20363,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" memo: type: string signature: @@ -20384,10 +20384,10 @@ definitions: example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '0' + example: "0" BlockID: type: object properties: @@ -20414,7 +20414,7 @@ definitions: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -20487,7 +20487,7 @@ definitions: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -20581,16 +20581,16 @@ definitions: type: string validator_index: type: string - example: '0' + example: "0" height: type: string - example: '0' + example: "0" round: type: string - example: '0' + example: "0" timestamp: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" type: type: number example: 2 @@ -20630,7 +20630,7 @@ definitions: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -20718,7 +20718,7 @@ definitions: example: 1 time: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" num_txs: type: number example: 0 @@ -20812,16 +20812,16 @@ definitions: type: string validator_index: type: string - example: '0' + example: "0" height: type: string - example: '0' + example: "0" round: type: string - example: '0' + example: "0" timestamp: type: string - example: '2017-12-30T05:53:09.287+01:00' + example: "2017-12-30T05:53:09.287+01:00" type: type: number example: 2 @@ -20861,7 +20861,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" DelegatorTotalRewards: type: object properties: @@ -20884,7 +20884,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" total: type: array items: @@ -20895,7 +20895,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" BaseReq: type: object properties: @@ -20911,16 +20911,16 @@ definitions: example: Cosmos-Hub account_number: type: string - example: '0' + example: "0" sequence: type: string - example: '1' + example: "1" gas: type: string - example: '200000' + example: "200000" gas_adjustment: type: string - example: '1.2' + example: "1.2" fees: type: array items: @@ -20931,7 +20931,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" simulate: type: boolean example: false @@ -20951,10 +20951,10 @@ definitions: cosmosvalconspub1zcjduepq0vu2zgkgk49efa0nqwzndanq5m4c7pa3u4apz4g2r9gspqg6g9cs3k9cuf voting_power: type: string - example: '1000' + example: "1000" proposer_priority: type: string - example: '1000' + example: "1000" TextProposal: type: object properties: @@ -20971,18 +20971,18 @@ definitions: final_tally_result: type: object properties: - 'yes': + "yes": type: string - example: '0.0000000000' + example: "0.0000000000" abstain: type: string - example: '0.0000000000' - 'no': + example: "0.0000000000" + "no": type: string - example: '0.0000000000' + example: "0.0000000000" no_with_veto: type: string - example: '0.0000000000' + example: "0.0000000000" submit_time: type: string total_deposit: @@ -20995,7 +20995,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" voting_start_time: type: string Proposer: @@ -21018,7 +21018,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" proposal_id: type: string depositor: @@ -21028,18 +21028,18 @@ definitions: TallyResult: type: object properties: - 'yes': + "yes": type: string - example: '0.0000000000' + example: "0.0000000000" abstain: type: string - example: '0.0000000000' - 'no': + example: "0.0000000000" + "no": type: string - example: '0.0000000000' + example: "0.0000000000" no_with_veto: type: string - example: '0.0000000000' + example: "0.0000000000" Vote: type: object properties: @@ -21083,31 +21083,31 @@ definitions: type: string bond_height: type: string - example: '0' + example: "0" bond_intra_tx_counter: type: integer example: 0 unbonding_height: type: string - example: '0' + example: "0" unbonding_time: type: string - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" commission: type: object properties: rate: type: string - example: '0' + example: "0" max_rate: type: string - example: '0' + example: "0" max_change_rate: type: string - example: '0' + example: "0" update_time: type: string - example: '1970-01-01T00:00:00Z' + example: "1970-01-01T00:00:00Z" Delegation: type: object properties: @@ -21125,7 +21125,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" UnbondingDelegationPair: type: object properties: @@ -21184,7 +21184,7 @@ definitions: entries: type: array items: - $ref: '#/definitions/Redelegation' + $ref: "#/definitions/Redelegation" RedelegationEntry: type: object properties: @@ -21215,7 +21215,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" val_commission: type: array items: @@ -21226,7 +21226,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" PublicKey: type: object properties: @@ -21256,7 +21256,7 @@ definitions: example: MaxValidators subkey: type: string - example: '' + example: "" value: type: object Supply: @@ -21272,7 +21272,7 @@ definitions: example: stake amount: type: string - example: '50' + example: "50" cosmos.auth.v1beta1.Params: type: object properties: @@ -22778,11 +22778,11 @@ definitions: final_tally_result: type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -23190,11 +23190,11 @@ definitions: final_tally_result: type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -23439,11 +23439,11 @@ definitions: final_tally_result: type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -23506,11 +23506,11 @@ definitions: description: tally defines the requested tally. type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -23627,11 +23627,11 @@ definitions: cosmos.gov.v1beta1.TallyResult: type: object properties: - 'yes': + "yes": type: string abstain: type: string - 'no': + "no": type: string no_with_veto: type: string @@ -25806,7 +25806,7 @@ definitions: this channel will travel version: type: string - title: 'opaque channel version, which is agreed upon during the handshake' + title: "opaque channel version, which is agreed upon during the handshake" description: |- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of @@ -25881,7 +25881,7 @@ definitions: this channel will travel version: type: string - title: 'opaque channel version, which is agreed upon during the handshake' + title: "opaque channel version, which is agreed upon during the handshake" port_id: type: string title: port identifier @@ -26116,17 +26116,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26134,10 +26134,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -26318,17 +26318,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26336,10 +26336,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method @@ -26407,7 +26407,7 @@ definitions: this channel will travel version: type: string - title: 'opaque channel version, which is agreed upon during the handshake' + title: "opaque channel version, which is agreed upon during the handshake" description: >- Channel defines pipeline for exactly-once packet delivery between specific @@ -26426,17 +26426,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26444,10 +26444,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryChannelResponse is the response type for the Query/Channel RPC method. @@ -26563,17 +26563,17 @@ definitions: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26581,10 +26581,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryChannelsResponse is the response type for the Query/Channels RPC method. @@ -26696,17 +26696,17 @@ definitions: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26714,10 +26714,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method @@ -26739,17 +26739,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26757,10 +26757,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method @@ -26782,17 +26782,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26800,10 +26800,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryPacketAcknowledgementResponse defines the client query response for a packet which also includes a proof, its path and the height form which the @@ -26826,17 +26826,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26844,10 +26844,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: >- QueryPacketCommitmentResponse defines the client query response for a packet @@ -26913,17 +26913,17 @@ definitions: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26931,10 +26931,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method @@ -26951,17 +26951,17 @@ definitions: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -26969,10 +26969,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method @@ -26989,17 +26989,17 @@ definitions: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -27007,10 +27007,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryUnrelayedAcksResponse is the response type for the Query/UnrelayedAcks RPC method @@ -27037,26 +27037,26 @@ definitions: ibc.client.Height: type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping epoch + Normally the VersionHeight is incremented at each height while keeping version number the same However some consensus algorithms may choose to reset the height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height continues + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: >- Height is a monotonically increasing data type @@ -27240,17 +27240,17 @@ definitions: title: consensus state height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -27258,10 +27258,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset consensus_state: title: consensus state type: object @@ -27599,17 +27599,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -27617,10 +27617,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryClientStateResponse is the response type for the Query/ClientState RPC @@ -28022,17 +28022,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -28040,10 +28040,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: >- QueryConsensusStateResponse is the response type for the Query/ConsensusState @@ -28061,17 +28061,17 @@ definitions: title: consensus state height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while - keeping epoch + Normally the VersionHeight is incremented at each height while + keeping version number the same However some consensus algorithms may choose to reset the @@ -28079,10 +28079,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset consensus_state: title: consensus state type: object @@ -28453,17 +28453,17 @@ definitions: title: height at which the proof was generated type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -28471,10 +28471,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method @@ -28668,17 +28668,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -28686,10 +28686,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method @@ -28870,17 +28870,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -28888,10 +28888,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset title: |- QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method @@ -28967,17 +28967,17 @@ definitions: title: height at which the proof was retrieved type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -28985,10 +28985,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryConnectionResponse is the response type for the Query/Connection RPC @@ -29087,17 +29087,17 @@ definitions: title: query block height type: object properties: - epoch_number: + version_number: type: string format: uint64 - title: the epoch that the client is currently on - epoch_height: + title: the version that the client is currently on + version_height: type: string format: uint64 - title: the height within the given epoch + title: the height within the given version description: >- - Normally the EpochHeight is incremented at each height while keeping - epoch + Normally the VersionHeight is incremented at each height while keeping + version number the same However some consensus algorithms may choose to reset the @@ -29105,10 +29105,10 @@ definitions: height in certain conditions e.g. hard forks, state-machine breaking changes - In these cases, the epoch number is incremented so that height + In these cases, the version number is incremented so that height continues to - be monitonically increasing even as the EpochHeight gets reset + be monitonically increasing even as the VersionHeight gets reset description: >- QueryConnectionsResponse is the response type for the Query/Connections RPC diff --git a/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md b/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md index d3ffd34d85..dc34bbf33e 100644 --- a/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md +++ b/docs/architecture/adr-026-ibc-client-recovery-mechanisms.md @@ -3,7 +3,7 @@ ## Changelog - 2020/06/23: Initial version -- 2020/08/06: Revisions per review & to reference epoch +- 2020/08/06: Revisions per review & to reference version ## Status diff --git a/proto/ibc/channel/query.proto b/proto/ibc/channel/query.proto index 39e0bf035e..50648b595b 100644 --- a/proto/ibc/channel/query.proto +++ b/proto/ibc/channel/query.proto @@ -37,8 +37,8 @@ service Query { // ChannelConsensusState queries for the consensus state for the channel // associated with the provided channel identifiers. rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/epoch/" - "{epoch_number}/height/{epoch_height}"; + option (google.api.http).get = "/ibc/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/version/" + "{version_number}/height/{version_height}"; } // PacketCommitment queries a stored packet commitment hash. @@ -165,10 +165,10 @@ message QueryChannelConsensusStateRequest { string port_id = 1; // channel unique identifier string channel_id = 2; - // epoch number of the consensus state - uint64 epoch_number = 3; - // epoch height of the consensus state - uint64 epoch_height = 4; + // version number of the consensus state + uint64 version_number = 3; + // version height of the consensus state + uint64 version_height = 4; } // QueryChannelClientStateResponse is the Response type for the diff --git a/proto/ibc/client/client.proto b/proto/ibc/client/client.proto index f91ce9af2e..2fdf008d6a 100644 --- a/proto/ibc/client/client.proto +++ b/proto/ibc/client/client.proto @@ -108,17 +108,17 @@ message MsgSubmitMisbehaviour { // that can be compared against another Height for the purposes of updating and // freezing clients // -// Normally the EpochHeight is incremented at each height while keeping epoch +// Normally the VersionHeight is incremented at each height while keeping version // number the same However some consensus algorithms may choose to reset the // height in certain conditions e.g. hard forks, state-machine breaking changes -// In these cases, the epoch number is incremented so that height continues to -// be monitonically increasing even as the EpochHeight gets reset +// In these cases, the version number is incremented so that height continues to +// be monitonically increasing even as the VersionHeight gets reset message Height { option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - // the epoch that the client is currently on - uint64 epoch_number = 1 [(gogoproto.moretags) = "yaml:\"epoch_number\""]; - // the height within the given epoch - uint64 epoch_height = 2 [(gogoproto.moretags) = "yaml:\"epoch_height\""]; + // the version that the client is currently on + uint64 version_number = 1 [(gogoproto.moretags) = "yaml:\"version_number\""]; + // the height within the given version + uint64 version_height = 2 [(gogoproto.moretags) = "yaml:\"version_height\""]; } diff --git a/proto/ibc/client/query.proto b/proto/ibc/client/query.proto index 41897adbec..4e52a0af9c 100644 --- a/proto/ibc/client/query.proto +++ b/proto/ibc/client/query.proto @@ -24,8 +24,8 @@ service Query { // ConsensusState queries a consensus state associated with a client state at // a given height. rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/epoch/{epoch_number}/" - "height/{epoch_height}"; + option (google.api.http).get = "/ibc/client/v1beta1/consensus_states/{client_id}/version/{version_number}/" + "height/{version_height}"; } // ConsensusStates queries all the consensus state associated with a given @@ -78,10 +78,10 @@ message QueryClientStatesResponse { message QueryConsensusStateRequest { // client identifier string client_id = 1; - // consensus state epoch number - uint64 epoch_number = 2; - // consensus state epoch height - uint64 epoch_height = 3; + // consensus state version number + uint64 version_number = 2; + // consensus state version height + uint64 version_height = 3; // latest_height overrrides the height field and queries the latest stored // ConsensusState bool latest_height = 4; diff --git a/proto/ibc/connection/query.proto b/proto/ibc/connection/query.proto index ba4b9b3e44..4c4e4da20e 100644 --- a/proto/ibc/connection/query.proto +++ b/proto/ibc/connection/query.proto @@ -38,7 +38,7 @@ service Query { // connection. rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/" - "epoch/{epoch_number}/height/{epoch_height}"; + "version/{version_number}/height/{version_height}"; } } @@ -124,9 +124,9 @@ message QueryConnectionClientStateResponse { // Query/ConnectionConsensusState RPC method message QueryConnectionConsensusStateRequest { // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - uint64 epoch_number = 2; - uint64 epoch_height = 3; + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + uint64 version_number = 2; + uint64 version_height = 3; } // QueryConnectionConsensusStateResponse is the response type for the diff --git a/x/ibc-transfer/client/cli/tx.go b/x/ibc-transfer/client/cli/tx.go index 7f59fe28d0..37b0d4b8cd 100644 --- a/x/ibc-transfer/client/cli/tx.go +++ b/x/ibc-transfer/client/cli/tx.go @@ -85,8 +85,8 @@ to the counterparty channel. Any timeout set to 0 is disabled.`), if !timeoutHeight.IsZero() { absoluteHeight := height - absoluteHeight.EpochNumber += timeoutHeight.EpochNumber - absoluteHeight.EpochHeight += timeoutHeight.EpochHeight + absoluteHeight.VersionNumber += timeoutHeight.VersionNumber + absoluteHeight.VersionHeight += timeoutHeight.VersionHeight timeoutHeight = absoluteHeight } diff --git a/x/ibc-transfer/types/msgs_test.go b/x/ibc-transfer/types/msgs_test.go index 972f36a640..05678fe2f2 100644 --- a/x/ibc-transfer/types/msgs_test.go +++ b/x/ibc-transfer/types/msgs_test.go @@ -90,7 +90,7 @@ func TestMsgTransferGetSignBytes(t *testing.T) { msg := NewMsgTransfer(validPort, validChannel, coin, addr1, addr2, clienttypes.NewHeight(0, 110), 10) res := msg.GetSignBytes() - expected := fmt.Sprintf(`{"receiver":"cosmos1w3jhxarpv3j8yvs7f9y7g","sender":"%s","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"110","epoch_number":"0"},"timeout_timestamp":"10","token":{"amount":"100","denom":"atom"}}`, addr1.String()) + expected := fmt.Sprintf(`{"receiver":"cosmos1w3jhxarpv3j8yvs7f9y7g","sender":"%s","source_channel":"testchannel","source_port":"testportid","timeout_height":{"version_height":"110","version_number":"0"},"timeout_timestamp":"10","token":{"amount":"100","denom":"atom"}}`, addr1.String()) require.Equal(t, expected, string(res)) } diff --git a/x/ibc/02-client/client/utils/utils.go b/x/ibc/02-client/client/utils/utils.go index 37c126122c..d6d40e9ce4 100644 --- a/x/ibc/02-client/client/utils/utils.go +++ b/x/ibc/02-client/client/utils/utils.go @@ -77,10 +77,10 @@ func QueryConsensusState( queryClient := types.NewQueryClient(clientCtx) req := &types.QueryConsensusStateRequest{ - ClientId: clientID, - EpochNumber: height.GetEpochNumber(), - EpochHeight: height.GetEpochHeight(), - LatestHeight: latestHeight, + ClientId: clientID, + VersionNumber: height.GetEpochNumber(), + VersionHeight: height.GetEpochHeight(), + LatestHeight: latestHeight, } return queryClient.ConsensusState(context.Background(), req) diff --git a/x/ibc/02-client/genesis.go b/x/ibc/02-client/genesis.go index 4b409de952..eba0653622 100644 --- a/x/ibc/02-client/genesis.go +++ b/x/ibc/02-client/genesis.go @@ -44,9 +44,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) { } // client id is always "localhost" - epoch := types.ParseChainID(ctx.ChainID()) + version := types.ParseChainID(ctx.ChainID()) clientState := localhosttypes.NewClientState( - ctx.ChainID(), types.NewHeight(epoch, uint64(ctx.BlockHeight())), + ctx.ChainID(), types.NewHeight(version, uint64(ctx.BlockHeight())), ) if err := k.CreateClient(ctx, exported.Localhost, clientState, nil); err != nil { diff --git a/x/ibc/02-client/keeper/client_test.go b/x/ibc/02-client/keeper/client_test.go index e8c47c315f..e658c8652f 100644 --- a/x/ibc/02-client/keeper/client_test.go +++ b/x/ibc/02-client/keeper/client_test.go @@ -148,7 +148,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { }, false}, {"valid past update before client was frozen", func() error { clientState = ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false) - clientState.FrozenHeight = types.NewHeight(0, testClientHeight.EpochHeight-1) + clientState.FrozenHeight = types.NewHeight(0, testClientHeight.VersionHeight-1) err := suite.keeper.CreateClient(suite.ctx, testClientID, clientState, suite.consensusState) suite.Require().NoError(err) diff --git a/x/ibc/02-client/keeper/grpc_query.go b/x/ibc/02-client/keeper/grpc_query.go index 915df07bed..2514d6f499 100644 --- a/x/ibc/02-client/keeper/grpc_query.go +++ b/x/ibc/02-client/keeper/grpc_query.go @@ -108,11 +108,11 @@ func (q Keeper) ConsensusState(c context.Context, req *types.QueryConsensusState found bool ) - height := types.NewHeight(req.EpochNumber, req.EpochHeight) + height := types.NewHeight(req.VersionNumber, req.VersionHeight) if req.LatestHeight { consensusState, found = q.GetLatestClientConsensusState(ctx, req.ClientId) } else { - if req.EpochHeight == 0 { + if req.VersionHeight == 0 { return nil, status.Error(codes.InvalidArgument, "consensus state height cannot be 0") } diff --git a/x/ibc/02-client/keeper/grpc_query_test.go b/x/ibc/02-client/keeper/grpc_query_test.go index ce94ca25f0..6ea6925604 100644 --- a/x/ibc/02-client/keeper/grpc_query_test.go +++ b/x/ibc/02-client/keeper/grpc_query_test.go @@ -188,10 +188,10 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { "invalid height", func() { req = &types.QueryConsensusStateRequest{ - ClientId: testClientID, - EpochNumber: 0, - EpochHeight: 0, - LatestHeight: false, + ClientId: testClientID, + VersionNumber: 0, + VersionHeight: 0, + LatestHeight: false, } }, false, @@ -240,9 +240,9 @@ func (suite *KeeperTestSuite) TestQueryConsensusState() { suite.Require().NoError(err) req = &types.QueryConsensusStateRequest{ - ClientId: testClientID, - EpochNumber: 0, - EpochHeight: height, + ClientId: testClientID, + VersionNumber: 0, + VersionHeight: height, } }, true, diff --git a/x/ibc/02-client/keeper/keeper.go b/x/ibc/02-client/keeper/keeper.go index 35283e6c83..4660a69148 100644 --- a/x/ibc/02-client/keeper/keeper.go +++ b/x/ibc/02-client/keeper/keeper.go @@ -157,7 +157,7 @@ func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, clientID string) // GetClientConsensusStateLTE will get the latest ConsensusState of a particular client at the latest height // less than or equal to the given height -// It will only search for heights within the same epoch +// It will only search for heights within the same version func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, maxHeight exported.Height) (exported.ConsensusState, bool) { h := maxHeight ok := true @@ -173,18 +173,18 @@ func (k Keeper) GetClientConsensusStateLTE(ctx sdk.Context, clientID string, max // GetSelfConsensusState introspects the (self) past historical info at a given height // and returns the expected consensus state at that height. -// For now, can only retrieve self consensus states for the current epoch +// For now, can only retrieve self consensus states for the current version func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, bool) { selfHeight, ok := height.(types.Height) if !ok { return nil, false } - // check that height epoch matches chainID epoch - epoch := types.ParseChainID(ctx.ChainID()) - if epoch != height.GetEpochNumber() { + // check that height version matches chainID version + version := types.ParseChainID(ctx.ChainID()) + if version != height.GetEpochNumber() { return nil, false } - histInfo, found := k.stakingKeeper.GetHistoricalInfo(ctx, int64(selfHeight.EpochHeight)) + histInfo, found := k.stakingKeeper.GetHistoricalInfo(ctx, int64(selfHeight.VersionHeight)) if !found { return nil, false } @@ -199,7 +199,7 @@ func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) ( // ValidateSelfClient validates the client parameters for a client of the running chain // This function is only used to validate the client state the counterparty stores for this chain -// Client must be in same epoch as the executing chain +// Client must be in same version as the executing chain func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error { tmClient, ok := clientState.(*ibctmtypes.ClientState) if !ok { @@ -216,15 +216,15 @@ func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientS ctx.ChainID(), tmClient.ChainId) } - epoch := types.ParseChainID(ctx.ChainID()) + version := types.ParseChainID(ctx.ChainID()) - // client must be in the same epoch as executing chain - if tmClient.LatestHeight.EpochNumber != epoch { - return sdkerrors.Wrapf(types.ErrInvalidClient, "client is not in the same epoch as the chain. expected epoch: %d, got: %d", - tmClient.LatestHeight.EpochNumber, epoch) + // client must be in the same version as executing chain + if tmClient.LatestHeight.VersionNumber != version { + return sdkerrors.Wrapf(types.ErrInvalidClient, "client is not in the same version as the chain. expected version: %d, got: %d", + tmClient.LatestHeight.VersionNumber, version) } - selfHeight := types.NewHeight(epoch, uint64(ctx.BlockHeight())) + selfHeight := types.NewHeight(version, uint64(ctx.BlockHeight())) if tmClient.LatestHeight.GT(selfHeight) { return sdkerrors.Wrapf(types.ErrInvalidClient, "client has LatestHeight %d greater than chain height %d", tmClient.LatestHeight, ctx.BlockHeight()) diff --git a/x/ibc/02-client/keeper/keeper_test.go b/x/ibc/02-client/keeper/keeper_test.go index 9ea62b92d9..9ce4bceca2 100644 --- a/x/ibc/02-client/keeper/keeper_test.go +++ b/x/ibc/02-client/keeper/keeper_test.go @@ -173,11 +173,11 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }, { "invalid client height", - ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.EpochHeight+10), commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false), + ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, types.NewHeight(0, testClientHeight.VersionHeight+10), commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false), false, }, { - "invalid client epoch", + "invalid client version", ibctmtypes.NewClientState(testChainIDEpoch1, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeightEpoch1, commitmenttypes.GetSDKSpecs(), &ibctesting.UpgradePath, false, false), false, }, diff --git a/x/ibc/02-client/types/client.pb.go b/x/ibc/02-client/types/client.pb.go index 0af624ec46..29e7087885 100644 --- a/x/ibc/02-client/types/client.pb.go +++ b/x/ibc/02-client/types/client.pb.go @@ -449,16 +449,16 @@ var xxx_messageInfo_MsgSubmitMisbehaviour proto.InternalMessageInfo // that can be compared against another Height for the purposes of updating and // freezing clients // -// Normally the EpochHeight is incremented at each height while keeping epoch +// Normally the VersionHeight is incremented at each height while keeping version // number the same However some consensus algorithms may choose to reset the // height in certain conditions e.g. hard forks, state-machine breaking changes -// In these cases, the epoch number is incremented so that height continues to -// be monitonically increasing even as the EpochHeight gets reset +// In these cases, the version number is incremented so that height continues to +// be monitonically increasing even as the VersionHeight gets reset type Height struct { - // the epoch that the client is currently on - EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty" yaml:"epoch_number"` - // the height within the given epoch - EpochHeight uint64 `protobuf:"varint,2,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty" yaml:"epoch_height"` + // the version that the client is currently on + VersionNumber uint64 `protobuf:"varint,1,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty" yaml:"version_number"` + // the height within the given version + VersionHeight uint64 `protobuf:"varint,2,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty" yaml:"version_height"` } func (m *Height) Reset() { *m = Height{} } @@ -508,50 +508,50 @@ func init() { func init() { proto.RegisterFile("ibc/client/client.proto", fileDescriptor_226f80e576f20abd) } var fileDescriptor_226f80e576f20abd = []byte{ - // 675 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3d, 0x6f, 0xd3, 0x4e, - 0x1c, 0xce, 0x25, 0xf9, 0x47, 0xcd, 0x25, 0x7f, 0x5a, 0x99, 0xa4, 0x4d, 0x3b, 0xc4, 0xd1, 0x89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 0xcc, 0xa7, 0xc2, 0x9a, 0xd6, 0xaa, 0x67, 0xb9, 0x78, 0x79, 0xad, 0x8c, 0x9e, 0xd5, 0xca, - 0xb9, 0x12, 0xcc, 0xe7, 0x43, 0xbd, 0xd0, 0x7f, 0x72, 0x74, 0xd2, 0x06, 0xc7, 0x27, 0x6d, 0xf0, - 0xf3, 0xa4, 0x0d, 0x3e, 0x9c, 0xb6, 0x0b, 0xc7, 0xa7, 0xed, 0xc2, 0x8f, 0xd3, 0x76, 0xe1, 0x55, - 0xd7, 0x27, 0x7c, 0x10, 0x3b, 0x86, 0x4b, 0x47, 0xa6, 0x4b, 0xd9, 0x88, 0x32, 0xf5, 0xd9, 0x60, - 0xde, 0x6b, 0xf3, 0xad, 0x99, 0xfe, 0x21, 0x37, 0xbb, 0x1b, 0xea, 0x27, 0xc9, 0xc7, 0x21, 0x66, - 0x4e, 0x45, 0x10, 0x73, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xba, 0xc4, 0xe6, 0x7d, 0x3f, - 0x07, 0x00, 0x00, + // 679 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xce, 0x25, 0x21, 0x6a, 0x2e, 0xe9, 0x87, 0x4c, 0xd2, 0xa6, 0x1d, 0xe2, 0xe8, 0xc4, 0xd0, + 0x81, 0xda, 0x25, 0x2c, 0x28, 0x12, 0x12, 0xa4, 0x0b, 0x95, 0x28, 0xaa, 0x5c, 0x21, 0x3e, 0x96, + 0xca, 0x1f, 0x57, 0xe7, 0x44, 0xe2, 0xb3, 0x7c, 0xe7, 0x8a, 0xfc, 0x03, 0x46, 0x24, 0x10, 0x62, + 0x60, 0xe8, 0xc4, 0x3f, 0x60, 0xe3, 0x07, 0x74, 0xec, 0xc8, 0x64, 0xa1, 0x76, 0x61, 0x62, 0xc8, + 0x2f,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x75, 0xdb, 0x27, 0xbc, 0x17, 0x3b, 0x86, 0x4b, 0x07, 0xa6, 0x4b, 0xd9, 0x80, + 0x32, 0xf5, 0xd9, 0x60, 0xde, 0x1b, 0xf3, 0xad, 0x99, 0xfe, 0x2d, 0x37, 0xdb, 0x1b, 0xea, 0x87, + 0xc9, 0x87, 0x21, 0x66, 0x4e, 0x49, 0x88, 0x74, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, + 0xaf, 0x5c, 0x74, 0x4b, 0x07, 0x00, 0x00, } func (m *IdentifiedClientState) Marshal() (dAtA []byte, err error) { @@ -976,13 +976,13 @@ func (m *Height) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.EpochHeight != 0 { - i = encodeVarintClient(dAtA, i, uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + i = encodeVarintClient(dAtA, i, uint64(m.VersionHeight)) i-- dAtA[i] = 0x10 } - if m.EpochNumber != 0 { - i = encodeVarintClient(dAtA, i, uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + i = encodeVarintClient(dAtA, i, uint64(m.VersionNumber)) i-- dAtA[i] = 0x8 } @@ -1174,11 +1174,11 @@ func (m *Height) Size() (n int) { } var l int _ = l - if m.EpochNumber != 0 { - n += 1 + sovClient(uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + n += 1 + sovClient(uint64(m.VersionNumber)) } - if m.EpochHeight != 0 { - n += 1 + sovClient(uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + n += 1 + sovClient(uint64(m.VersionHeight)) } return n } @@ -2449,9 +2449,9 @@ func (m *Height) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType) } - m.EpochNumber = 0 + m.VersionNumber = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowClient @@ -2461,16 +2461,16 @@ func (m *Height) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift + m.VersionNumber |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType) } - m.EpochHeight = 0 + m.VersionHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowClient @@ -2480,7 +2480,7 @@ func (m *Height) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochHeight |= uint64(b&0x7F) << shift + m.VersionHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/ibc/02-client/types/height.go b/x/ibc/02-client/types/height.go index 953859a649..bc22abe3f4 100644 --- a/x/ibc/02-client/types/height.go +++ b/x/ibc/02-client/types/height.go @@ -24,21 +24,21 @@ func ZeroHeight() Height { } // NewHeight is a constructor for the IBC height type -func NewHeight(epochNumber, epochHeight uint64) Height { +func NewHeight(versionNumber, versionHeight uint64) Height { return Height{ - EpochNumber: epochNumber, - EpochHeight: epochHeight, + VersionNumber: versionNumber, + VersionHeight: versionHeight, } } -// GetEpochNumber returns the epoch-number of the height +// GetEpochNumber returns the version-number of the height func (h Height) GetEpochNumber() uint64 { - return h.EpochNumber + return h.VersionNumber } -// GetEpochHeight returns the epoch-height of the height +// GetEpochHeight returns the version-height of the height func (h Height) GetEpochHeight() uint64 { - return h.EpochHeight + return h.VersionHeight } // Compare implements a method to compare two heights. When comparing two heights a, b @@ -47,18 +47,18 @@ func (h Height) GetEpochHeight() uint64 { // 0 if a = b // 1 if a > b // -// It first compares based on epoch numbers, whichever has the higher epoch number is the higher height -// If epoch number is the same, then the epoch height is compared +// It first compares based on version numbers, whichever has the higher version number is the higher height +// If version number is the same, then the version height is compared func (h Height) Compare(other exported.Height) int64 { height, ok := other.(Height) if !ok { panic(fmt.Sprintf("cannot compare against invalid height type: %T. expected height type: %T", other, h)) } var cmp int64 - if h.EpochNumber != height.EpochNumber { - cmp = int64(h.EpochNumber) - int64(height.EpochNumber) + if h.VersionNumber != height.VersionNumber { + cmp = int64(h.VersionNumber) - int64(height.VersionNumber) } else { - cmp = int64(h.EpochHeight) - int64(height.EpochHeight) + cmp = int64(h.VersionHeight) - int64(height.VersionHeight) } if cmp < 0 { return -1 @@ -97,27 +97,27 @@ func (h Height) EQ(other exported.Height) bool { // String returns a string representation of Height func (h Height) String() string { - return fmt.Sprintf("%d-%d", h.EpochNumber, h.EpochHeight) + return fmt.Sprintf("%d-%d", h.VersionNumber, h.VersionHeight) } -// Decrement will return a new height with the EpochHeight decremented -// If the EpochHeight is already at lowest value (1), then false success flag is returend +// Decrement will return a new height with the VersionHeight decremented +// If the VersionHeight is already at lowest value (1), then false success flag is returend func (h Height) Decrement() (decremented exported.Height, success bool) { - if h.EpochHeight == 0 { + if h.VersionHeight == 0 { return Height{}, false } - return NewHeight(h.EpochNumber, h.EpochHeight-1), true + return NewHeight(h.VersionNumber, h.VersionHeight-1), true } -// Increment will return a height with the same epoch number but an -// incremented epoch height +// Increment will return a height with the same version number but an +// incremented version height func (h Height) Increment() Height { - return NewHeight(h.EpochNumber, h.EpochHeight+1) + return NewHeight(h.VersionNumber, h.VersionHeight+1) } -// IsZero returns true if height epoch and epoch-height are both 0 +// IsZero returns true if height version and version-height are both 0 func (h Height) IsZero() bool { - return h.EpochNumber == 0 && h.EpochHeight == 0 + return h.VersionNumber == 0 && h.VersionHeight == 0 } // MustParseHeight will attempt to parse a string representation of a height and panic if @@ -136,55 +136,55 @@ func MustParseHeight(heightStr string) Height { func ParseHeight(heightStr string) (Height, error) { splitStr := strings.Split(heightStr, "-") if len(splitStr) != 2 { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {epoch}-{height}. Got: %s", heightStr) + return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "expected height string format: {version}-{height}. Got: %s", heightStr) } - epochNumber, err := strconv.ParseUint(splitStr[0], 10, 64) + versionNumber, err := strconv.ParseUint(splitStr[0], 10, 64) if err != nil { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid epoch number. parse err: %s", err) + return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version number. parse err: %s", err) } - epochHeight, err := strconv.ParseUint(splitStr[1], 10, 64) + versionHeight, err := strconv.ParseUint(splitStr[1], 10, 64) if err != nil { - return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid epoch height. parse err: %s", err) + return Height{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "invalid version height. parse err: %s", err) } - return NewHeight(epochNumber, epochHeight), nil + return NewHeight(versionNumber, versionHeight), nil } -// SetEpochNumber takes a chainID in valid epoch format and swaps the epoch number -// in the chainID with the given epoch number. -func SetEpochNumber(chainID string, epoch uint64) (string, error) { +// SetEpochNumber takes a chainID in valid version format and swaps the version number +// in the chainID with the given version number. +func SetEpochNumber(chainID string, version uint64) (string, error) { if !IsEpochFormat(chainID) { return "", sdkerrors.Wrapf( - sdkerrors.ErrInvalidChainID, "chainID is not in epoch format: %s", chainID, + sdkerrors.ErrInvalidChainID, "chainID is not in version format: %s", chainID, ) } splitStr := strings.Split(chainID, "-") - // swap out epoch number with given epoch - splitStr[len(splitStr)-1] = strconv.Itoa(int(epoch)) + // swap out version number with given version + splitStr[len(splitStr)-1] = strconv.Itoa(int(version)) return strings.Join(splitStr, "-"), nil } -// ParseChainID is a utility function that returns an epoch number from the given ChainID. +// ParseChainID is a utility function that returns an version number from the given ChainID. // ParseChainID attempts to parse a chain id in the format: `{chainID}-{version}` // and return the epochnumber as a uint64. -// If the chainID is not in the expected format, a default epoch value of 0 is returned. +// If the chainID is not in the expected format, a default version value of 0 is returned. func ParseChainID(chainID string) uint64 { if !IsEpochFormat(chainID) { - // chainID is not in epoch format, return 0 as default + // chainID is not in version format, return 0 as default return 0 } splitStr := strings.Split(chainID, "-") - epoch, err := strconv.ParseUint(splitStr[len(splitStr)-1], 10, 64) + version, err := strconv.ParseUint(splitStr[len(splitStr)-1], 10, 64) // sanity check: error should always be nil since regex only allows numbers in last element if err != nil { panic(fmt.Sprintf("regex allowed non-number value as last split element for chainID: %s", chainID)) } - return epoch + return version } // GetSelfHeight is a utility function that returns self height given context // Epoch number is retrieved from ctx.ChainID() func GetSelfHeight(ctx sdk.Context) Height { - epoch := ParseChainID(ctx.ChainID()) - return NewHeight(epoch, uint64(ctx.BlockHeight())) + version := ParseChainID(ctx.ChainID()) + return NewHeight(version, uint64(ctx.BlockHeight())) } diff --git a/x/ibc/02-client/types/height_test.go b/x/ibc/02-client/types/height_test.go index 29e68bd212..22d099bd90 100644 --- a/x/ibc/02-client/types/height_test.go +++ b/x/ibc/02-client/types/height_test.go @@ -19,10 +19,10 @@ func TestCompareHeights(t *testing.T) { height2 types.Height compareSign int64 }{ - {"epoch number 1 is lesser", types.NewHeight(1, 3), types.NewHeight(3, 4), -1}, - {"epoch number 1 is greater", types.NewHeight(7, 5), types.NewHeight(4, 5), 1}, - {"epoch height 1 is lesser", types.NewHeight(3, 4), types.NewHeight(3, 9), -1}, - {"epoch height 1 is greater", types.NewHeight(3, 8), types.NewHeight(3, 3), 1}, + {"version number 1 is lesser", types.NewHeight(1, 3), types.NewHeight(3, 4), -1}, + {"version number 1 is greater", types.NewHeight(7, 5), types.NewHeight(4, 5), 1}, + {"version height 1 is lesser", types.NewHeight(3, 4), types.NewHeight(3, 9), -1}, + {"version height 1 is greater", types.NewHeight(3, 8), types.NewHeight(3, 3), 1}, {"height is equal", types.NewHeight(4, 4), types.NewHeight(4, 4), 0}, } @@ -63,11 +63,11 @@ func TestString(t *testing.T) { _, err := types.ParseHeight("height") require.Error(t, err, "invalid height string passed") - _, err = types.ParseHeight("epoch-10") - require.Error(t, err, "invalid epoch string passed") + _, err = types.ParseHeight("version-10") + require.Error(t, err, "invalid version string passed") _, err = types.ParseHeight("3-height") - require.Error(t, err, "invalid epoch-height string passed") + require.Error(t, err, "invalid version-height string passed") height := types.NewHeight(3, 4) recovered, err := types.ParseHeight(height.String()) @@ -97,7 +97,7 @@ func (suite *TypesTestSuite) TestMustParseHeight() { func TestParseChainID(t *testing.T) { cases := []struct { chainID string - epoch uint64 + version uint64 formatted bool }{ {"gaiamainnet-3", 3, true}, @@ -113,8 +113,8 @@ func TestParseChainID(t *testing.T) { for i, tc := range cases { require.Equal(t, tc.formatted, types.IsEpochFormat(tc.chainID), "case %d does not match expected format", i) - epoch := types.ParseChainID(tc.chainID) - require.Equal(t, tc.epoch, epoch, "case %d returns incorrect epoch", i) + version := types.ParseChainID(tc.chainID) + require.Equal(t, tc.version, version, "case %d returns incorrect version", i) } } @@ -122,25 +122,25 @@ func TestParseChainID(t *testing.T) { func TestSetEpochNumber(t *testing.T) { // Test SetEpochNumber chainID, err := types.SetEpochNumber("gaiamainnet", 3) - require.Error(t, err, "invalid epoch format passed SetEpochNumber") - require.Equal(t, "", chainID, "invalid epoch format returned non-empty string on SetEpochNumber") + require.Error(t, err, "invalid version format passed SetEpochNumber") + require.Equal(t, "", chainID, "invalid version format returned non-empty string on SetEpochNumber") chainID = "gaiamainnet-3" chainID, err = types.SetEpochNumber(chainID, 4) - require.NoError(t, err, "valid epoch format failed SetEpochNumber") - require.Equal(t, "gaiamainnet-4", chainID, "valid epoch format returned incorrect string on SetEpochNumber") + require.NoError(t, err, "valid version format failed SetEpochNumber") + require.Equal(t, "gaiamainnet-4", chainID, "valid version format returned incorrect string on SetEpochNumber") } func (suite *TypesTestSuite) TestSelfHeight() { ctx := suite.chainA.GetContext() - // Test default epoch + // Test default version ctx = ctx.WithChainID("gaiamainnet") ctx = ctx.WithBlockHeight(10) height := types.GetSelfHeight(ctx) suite.Require().Equal(types.NewHeight(0, 10), height, "default self height failed") - // Test successful epoch format + // Test successful version format ctx = ctx.WithChainID("gaiamainnet-3") ctx = ctx.WithBlockHeight(18) height = types.GetSelfHeight(ctx) diff --git a/x/ibc/02-client/types/query.pb.go b/x/ibc/02-client/types/query.pb.go index 6cb01a452f..ffd938999f 100644 --- a/x/ibc/02-client/types/query.pb.go +++ b/x/ibc/02-client/types/query.pb.go @@ -262,10 +262,10 @@ func (m *QueryClientStatesResponse) GetPagination() *query.PageResponse { type QueryConsensusStateRequest struct { // client identifier ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // consensus state epoch number - EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - // consensus state epoch height - EpochHeight uint64 `protobuf:"varint,3,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"` + // consensus state version number + VersionNumber uint64 `protobuf:"varint,2,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"` + // consensus state version height + VersionHeight uint64 `protobuf:"varint,3,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty"` // latest_height overrrides the height field and queries the latest stored // ConsensusState LatestHeight bool `protobuf:"varint,4,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty"` @@ -311,16 +311,16 @@ func (m *QueryConsensusStateRequest) GetClientId() string { return "" } -func (m *QueryConsensusStateRequest) GetEpochNumber() uint64 { +func (m *QueryConsensusStateRequest) GetVersionNumber() uint64 { if m != nil { - return m.EpochNumber + return m.VersionNumber } return 0 } -func (m *QueryConsensusStateRequest) GetEpochHeight() uint64 { +func (m *QueryConsensusStateRequest) GetVersionHeight() uint64 { if m != nil { - return m.EpochHeight + return m.VersionHeight } return 0 } @@ -532,54 +532,54 @@ func init() { func init() { proto.RegisterFile("ibc/client/query.proto", fileDescriptor_320a7d3a97b17345) } var fileDescriptor_320a7d3a97b17345 = []byte{ - // 748 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0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0xeb, 0x4b, 0x5a, 0x2b, 0x57, 0xe0, 0xd0, 0xfd, 0x16, 0x92, 0x5b, 0xa2, 0xc6, 0x03, 0xee, 0x70, - 0x62, 0x93, 0xf5, 0x26, 0x61, 0x1c, 0x8d, 0xc0, 0x5e, 0x59, 0x79, 0x39, 0xac, 0x97, 0xc0, 0x18, - 0xa8, 0xf6, 0xda, 0x3d, 0xd2, 0xb0, 0x58, 0xaf, 0x7c, 0x02, 0xb0, 0x74, 0x34, 0x91, 0xc5, 0x34, - 0x62, 0x04, 0x5d, 0x85, 0x86, 0xca, 0x64, 0x2d, 0xbb, 0x48, 0x2e, 0xd6, 0x06, 0x2d, 0x89, 0xcf, - 0x4a, 0xa0, 0x5b, 0x37, 0xa3, 0x0d, 0xbb, 0xe8, 0xb5, 0x2f, 0x40, 0x83, 0xb0, 0x3b, 0x6e, 0x50, - 0xba, 0x52, 0xea, 0x18, 0x03, 0x55, 0xc3, 0x96, 0x07, 0x74, 0x16, 0x42, 0xf1, 0xb1, 0x1c, 0x3b, - 0x3c, 0x28, 0x75, 0x0a, 0x24, 0xbd, 0xc2, 0xb2, 0xe4, 0xf0, 0x00, 0x5d, 0x87, 0x86, 0x74, 0x07, - 0x24, 0xf4, 0x03, 0x5e, 0xea, 0x12, 0xd5, 0x90, 0xd5, 0x66, 0xde, 0xba, 0x23, 0x3c, 0xf3, 0x5d, - 0x3b, 0xdf, 0xcf, 0x15, 0xec, 0xa2, 0x88, 0x96, 0xa6, 0x8a, 0x7b, 0xb4, 0x0d, 0x96, 0x10, 0xb0, - 0x00, 0x61, 0x5b, 0x17, 0xd5, 0xc4, 0x94, 0x25, 0x45, 0xb4, 0x5a, 0x22, 0x5a, 0x52, 0x69, 0x25, - 0xa2, 0xb5, 0xe4, 0xf8, 0x09, 0x79, 0xb6, 0x96, 0x59, 0xf9, 0x00, 0xe0, 0x70, 0x46, 0x11, 0x45, - 0xd6, 0x02, 0xec, 0xd3, 0xc9, 0x62, 0x25, 0x30, 0xd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28, 0xb5, 0x6e, 0x08, 0x00, 0x00, + // 747 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4d, 0x4f, 0x13, 0x4f, + 0x18, 0xef, 0xf0, 0xf2, 0x0f, 0x4c, 0x0b, 0xfc, 0x33, 0x21, 0x52, 0x16, 0xac, 0x50, 0xde, 0xaa, + 0x09, 0x3b, 0x50, 0xe3, 0x4b, 0x62, 0x3c, 0x88, 0x09, 0x4a, 0x62, 0x0c, 0xae, 0x31, 0x26, 0x5e, + 0xc8, 0xee, 0x76, 0xd8, 0x4e, 0x84, 0x9d, 0xa5, 0x33, 0x25, 0x12, 0xc2, 0x85, 0x83, 0x57, 0x8d, + 0xde, 0xfd, 0x04, 0x7e, 0x06, 0x6f, 0x26, 0x1c, 0x8c, 0x21, 0xf1, 0xe2, 0xc9, 0x18, 0xf0, 0x83, + 0x98, 0xce, 0xcc, 0xd2, 0xd9, 0xb2, 0xb2, 0x68, 0x4c, 0x3c, 0x75, 0xe7, 0x79, 0x99, 0xe7, 0xf7, + 0xfc, 0x7e, 0xcf, 0x3c, 0x29, 0xbc, 0x40, 0x3d, 0x1f, 0xfb, 0x1b, 0x94, 0x84, 0x02, 0x6f, 0x35, + 0x49, 0x63, 0xc7, 0x8e, 0x1a, 0x4c, 0x30, 0x04, 0xa9, 0xe7, 0xdb, 0xca, 0x6e, 0x5d, 0xf1, 0x19, + 0xdf, 0x64, 0x1c, 0x7b, 0x2e, 0x27, 0x2a, 0x08, 0x6f, 0x2f, 0x7a, 0x44, 0xb8, 0x8b, 0x38, 0x72, + 0x03, 0x1a, 0xba, 0x82, 0xb2, 0x50, 0xe5, 0x59, 0x23, 0xc6, 0x7d, 0xea, 0x47, 0x3b, 0x46, 0x03, + 0xc6, 0x82, 0x0d, 0x82, 0xe5, 0xc9, 0x6b, 0xae, 0x63, 0x37, 0xd4, 0xb5, 0xac, 0x71, 0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, 0x75, 0x5e, 0x17, 0x13, 0x3b, 0x11, 0xe1, 0xde, 0x7f, 0x72, 0x71, 0x5d, 0xfd, 0x19, 0x00, + 0x00, 0xff, 0xff, 0x96, 0x0d, 0x83, 0x67, 0x7c, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -985,13 +985,13 @@ func (m *QueryConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, err i-- dAtA[i] = 0x20 } - if m.EpochHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.VersionHeight)) i-- dAtA[i] = 0x18 } - if m.EpochNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.VersionNumber)) i-- dAtA[i] = 0x10 } @@ -1244,11 +1244,11 @@ func (m *QueryConsensusStateRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.EpochNumber != 0 { - n += 1 + sovQuery(uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + n += 1 + sovQuery(uint64(m.VersionNumber)) } - if m.EpochHeight != 0 { - n += 1 + sovQuery(uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + n += 1 + sovQuery(uint64(m.VersionHeight)) } if m.LatestHeight { n += 2 @@ -1869,9 +1869,9 @@ func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType) } - m.EpochNumber = 0 + m.VersionNumber = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1881,16 +1881,16 @@ func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift + m.VersionNumber |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType) } - m.EpochHeight = 0 + m.VersionHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1900,7 +1900,7 @@ func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochHeight |= uint64(b&0x7F) << shift + m.VersionHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/ibc/02-client/types/query.pb.gw.go b/x/ibc/02-client/types/query.pb.gw.go index 85d7a07e39..eaa93745f4 100644 --- a/x/ibc/02-client/types/query.pb.gw.go +++ b/x/ibc/02-client/types/query.pb.gw.go @@ -122,7 +122,7 @@ func local_request_Query_ClientStates_0(ctx context.Context, marshaler runtime.M } var ( - filter_Query_ConsensusState_0 = &utilities.DoubleArray{Encoding: map[string]int{"client_id": 0, "epoch_number": 1, "epoch_height": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} + filter_Query_ConsensusState_0 = &utilities.DoubleArray{Encoding: map[string]int{"client_id": 0, "version_number": 1, "version_height": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}} ) func request_Query_ConsensusState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,26 +147,26 @@ func request_Query_ConsensusState_0(ctx context.Context, marshaler runtime.Marsh return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client_id", err) } - val, ok = pathParams["epoch_number"] + val, ok = pathParams["version_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number") } - protoReq.EpochNumber, err = runtime.Uint64(val) + protoReq.VersionNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err) } - val, ok = pathParams["epoch_height"] + val, ok = pathParams["version_height"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height") } - protoReq.EpochHeight, err = runtime.Uint64(val) + protoReq.VersionHeight, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err) } if err := req.ParseForm(); err != nil { @@ -203,26 +203,26 @@ func local_request_Query_ConsensusState_0(ctx context.Context, marshaler runtime return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "client_id", err) } - val, ok = pathParams["epoch_number"] + val, ok = pathParams["version_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number") } - protoReq.EpochNumber, err = runtime.Uint64(val) + protoReq.VersionNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err) } - val, ok = pathParams["epoch_height"] + val, ok = pathParams["version_height"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height") } - protoReq.EpochHeight, err = runtime.Uint64(val) + protoReq.VersionHeight, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err) } if err := req.ParseForm(); err != nil { @@ -524,7 +524,7 @@ var ( pattern_Query_ClientStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ibc", "client", "v1beta1", "client_states"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id", "epoch", "epoch_number", "height", "epoch_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_ConsensusStates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ibc", "client", "v1beta1", "consensus_states", "client_id"}, "", runtime.AssumeColonVerbOpt(true))) ) diff --git a/x/ibc/03-connection/client/cli/query.go b/x/ibc/03-connection/client/cli/query.go index 8d062381e7..4a6af2b78b 100644 --- a/x/ibc/03-connection/client/cli/query.go +++ b/x/ibc/03-connection/client/cli/query.go @@ -79,7 +79,7 @@ func GetCmdQueryConnection() *cobra.Command { return err } - clientCtx = clientCtx.WithHeight(int64(connRes.ProofHeight.EpochHeight)) + clientCtx = clientCtx.WithHeight(int64(connRes.ProofHeight.VersionHeight)) return clientCtx.PrintOutput(connRes) }, } @@ -113,7 +113,7 @@ func GetCmdQueryClientConnections() *cobra.Command { return err } - clientCtx = clientCtx.WithHeight(int64(connPathsRes.ProofHeight.EpochHeight)) + clientCtx = clientCtx.WithHeight(int64(connPathsRes.ProofHeight.VersionHeight)) return clientCtx.PrintOutput(connPathsRes) }, } diff --git a/x/ibc/03-connection/client/utils/utils.go b/x/ibc/03-connection/client/utils/utils.go index 49db5c3041..986c8c43fa 100644 --- a/x/ibc/03-connection/client/utils/utils.go +++ b/x/ibc/03-connection/client/utils/utils.go @@ -143,9 +143,9 @@ func QueryConnectionConsensusState( queryClient := types.NewQueryClient(clientCtx) req := &types.QueryConnectionConsensusStateRequest{ - ConnectionId: connectionID, - EpochNumber: height.EpochNumber, - EpochHeight: height.EpochHeight, + ConnectionId: connectionID, + VersionNumber: height.VersionNumber, + VersionHeight: height.VersionHeight, } res, err := queryClient.ConnectionConsensusState(context.Background(), req) diff --git a/x/ibc/03-connection/keeper/grpc_query.go b/x/ibc/03-connection/keeper/grpc_query.go index 227383c436..d35e96303e 100644 --- a/x/ibc/03-connection/keeper/grpc_query.go +++ b/x/ibc/03-connection/keeper/grpc_query.go @@ -160,7 +160,7 @@ func (q Keeper) ConnectionConsensusState(c context.Context, req *types.QueryConn ) } - height := clienttypes.NewHeight(req.EpochNumber, req.EpochHeight) + height := clienttypes.NewHeight(req.VersionNumber, req.VersionHeight) consensusState, found := q.clientKeeper.GetClientConsensusState(ctx, connection.ClientId, height) if !found { return nil, status.Error( diff --git a/x/ibc/03-connection/keeper/grpc_query_test.go b/x/ibc/03-connection/keeper/grpc_query_test.go index 5703ca865b..9625483ee9 100644 --- a/x/ibc/03-connection/keeper/grpc_query_test.go +++ b/x/ibc/03-connection/keeper/grpc_query_test.go @@ -338,9 +338,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { "invalid connection ID", func() { req = &types.QueryConnectionConsensusStateRequest{ - ConnectionId: "", - EpochNumber: 0, - EpochHeight: 1, + ConnectionId: "", + VersionNumber: 0, + VersionHeight: 1, } }, false, @@ -349,9 +349,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { "connection not found", func() { req = &types.QueryConnectionConsensusStateRequest{ - ConnectionId: "test-connection-id", - EpochNumber: 0, - EpochHeight: 1, + ConnectionId: "test-connection-id", + VersionNumber: 0, + VersionHeight: 1, } }, false, @@ -362,9 +362,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { _, _, connA, _, _, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) req = &types.QueryConnectionConsensusStateRequest{ - ConnectionId: connA.ID, - EpochNumber: 0, - EpochHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height + ConnectionId: connA.ID, + VersionNumber: 0, + VersionHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height } }, false, }, @@ -379,9 +379,9 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { expClientID = clientA req = &types.QueryConnectionConsensusStateRequest{ - ConnectionId: connA.ID, - EpochNumber: clientState.GetLatestHeight().GetEpochNumber(), - EpochHeight: clientState.GetLatestHeight().GetEpochHeight(), + ConnectionId: connA.ID, + VersionNumber: clientState.GetLatestHeight().GetEpochNumber(), + VersionHeight: clientState.GetLatestHeight().GetEpochHeight(), } }, true, diff --git a/x/ibc/03-connection/types/query.pb.go b/x/ibc/03-connection/types/query.pb.go index 79e1e53741..34958a5fb0 100644 --- a/x/ibc/03-connection/types/query.pb.go +++ b/x/ibc/03-connection/types/query.pb.go @@ -511,9 +511,9 @@ func (m *QueryConnectionClientStateResponse) GetProofHeight() types.Height { // Query/ConnectionConsensusState RPC method type QueryConnectionConsensusStateRequest struct { // connection identifier - ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` - EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - EpochHeight uint64 `protobuf:"varint,3,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"` + ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` + VersionNumber uint64 `protobuf:"varint,2,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"` + VersionHeight uint64 `protobuf:"varint,3,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty"` } func (m *QueryConnectionConsensusStateRequest) Reset() { *m = QueryConnectionConsensusStateRequest{} } @@ -556,16 +556,16 @@ func (m *QueryConnectionConsensusStateRequest) GetConnectionId() string { return "" } -func (m *QueryConnectionConsensusStateRequest) GetEpochNumber() uint64 { +func (m *QueryConnectionConsensusStateRequest) GetVersionNumber() uint64 { if m != nil { - return m.EpochNumber + return m.VersionNumber } return 0 } -func (m *QueryConnectionConsensusStateRequest) GetEpochHeight() uint64 { +func (m *QueryConnectionConsensusStateRequest) GetVersionHeight() uint64 { if m != nil { - return m.EpochHeight + return m.VersionHeight } return 0 } @@ -669,63 +669,63 @@ func init() { func init() { proto.RegisterFile("ibc/connection/query.proto", fileDescriptor_5ee60d8b08ce3606) } var fileDescriptor_5ee60d8b08ce3606 = []byte{ - // 891 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0xce, 0x24, 0xe9, 0x42, 0x5e, 0xc2, 0x02, 0xa3, 0x2c, 0x35, 0x86, 0xa6, 0xad, 0xf7, 0x57, - 0x00, 0xd5, 0xb3, 0x4d, 0xd9, 0x15, 0x62, 0x29, 0x82, 0x20, 0x4a, 0x7b, 0x41, 0xc5, 0x9c, 0xe0, - 0x12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0x94, 0x79, 0x37, 0x15, 0xbf, 0x99, 0x07, 0x6d, 0x96, - 0x0d, 0xa9, 0x8f, 0xaf, 0x58, 0x25, 0x39, 0x1d, 0x72, 0x4e, 0x3e, 0xf6, 0xae, 0xc5, 0x29, 0x6b, - 0x24, 0x84, 0x3b, 0x12, 0x39, 0x4a, 0xfb, 0xd9, 0x98, 0x88, 0x6b, 0x1d, 0xaf, 0x8a, 0xb7, 0x71, - 0x7b, 0xf7, 0xf8, 0xac, 0x81, 0x4e, 0xce, 0x1a, 0xe8, 0xf7, 0xb3, 0x06, 0xfa, 0xe6, 0xbc, 0x51, - 0x38, 0x39, 0x6f, 0x14, 0x7e, 0x3d, 0x6f, 0x14, 0x3e, 0x7f, 0xe2, 0xb8, 0x61, 0x6f, 0x68, 0xe9, - 0x36, 0xeb, 0x13, 0xf9, 0x3f, 0x56, 0xfc, 0xac, 0x05, 0xdd, 0x2f, 0xc8, 0x97, 0x1c, 0xe7, 0xa3, - 0x8d, 0xb5, 0x14, 0xd4, 0x70, 0xe4, 0xd3, 0xc0, 0xba, 0xc5, 0x7d, 0x6b, 0xe3, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x06, 0x48, 0xe9, 0x03, 0x3f, 0x0b, 0x00, 0x00, + // 890 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x4f, 0x33, 0x45, + 0x18, 0xee, 0xb4, 0x05, 0xed, 0x5b, 0x40, 0x9d, 0x14, 0x59, 0x57, 0x29, 0xb0, 0xfc, 0xaa, 0x1a, + 0x76, 0xa0, 0x08, 0x31, 0x22, 0x46, 0x6b, 0x44, 0xb8, 0x18, 0x5c, 0x4f, 0x7a, 0x21, 0xbb, 0xed, + 0xb0, 0xdd, 0x48, 0x77, 0x4b, 0x67, 0x4b, 0x6c, 0xb0, 0x17, 0x13, 0x8f, 0x26, 0x26, 0xde, 0xf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0x61, 0xff, 0x41, 0x9c, 0xe2, 0x46, + 0x42, 0xa4, 0x27, 0x91, 0xf3, 0xb8, 0xb3, 0x75, 0x89, 0xb8, 0xda, 0xe1, 0xba, 0x78, 0xef, 0x56, + 0x0e, 0x2f, 0xae, 0x8b, 0xe8, 0xf2, 0xba, 0x88, 0xfe, 0xb9, 0x2e, 0xa2, 0x1f, 0x6f, 0x8a, 0xa9, + 0xcb, 0x9b, 0x62, 0xea, 0xaf, 0x9b, 0x62, 0xea, 0xab, 0x6d, 0xdb, 0xf1, 0xeb, 0x6d, 0x4b, 0xaf, + 0x7a, 0x0d, 0x22, 0xff, 0xd5, 0x8a, 0x9f, 0x35, 0x56, 0xfb, 0x9a, 0x7c, 0xc3, 0xd1, 0xae, 0x6f, + 0xae, 0x45, 0x00, 0xfb, 0x9d, 0x26, 0x65, 0xd6, 0x38, 0x77, 0xaf, 0xcd, 0xa7, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x5a, 0x9a, 0x2c, 0x5d, 0x4d, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1346,13 +1346,13 @@ func (m *QueryConnectionConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - if m.EpochHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.VersionHeight)) i-- dAtA[i] = 0x18 } - if m.EpochNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.VersionNumber)) i-- dAtA[i] = 0x10 } @@ -1597,11 +1597,11 @@ func (m *QueryConnectionConsensusStateRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.EpochNumber != 0 { - n += 1 + sovQuery(uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + n += 1 + sovQuery(uint64(m.VersionNumber)) } - if m.EpochHeight != 0 { - n += 1 + sovQuery(uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + n += 1 + sovQuery(uint64(m.VersionHeight)) } return n } @@ -2762,9 +2762,9 @@ func (m *QueryConnectionConsensusStateRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType) } - m.EpochNumber = 0 + m.VersionNumber = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2774,16 +2774,16 @@ func (m *QueryConnectionConsensusStateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift + m.VersionNumber |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType) } - m.EpochHeight = 0 + m.VersionHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2793,7 +2793,7 @@ func (m *QueryConnectionConsensusStateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochHeight |= uint64(b&0x7F) << shift + m.VersionHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/ibc/03-connection/types/query.pb.gw.go b/x/ibc/03-connection/types/query.pb.gw.go index 54c52c6353..e797b30395 100644 --- a/x/ibc/03-connection/types/query.pb.gw.go +++ b/x/ibc/03-connection/types/query.pb.gw.go @@ -251,26 +251,26 @@ func request_Query_ConnectionConsensusState_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "connection_id", err) } - val, ok = pathParams["epoch_number"] + val, ok = pathParams["version_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number") } - protoReq.EpochNumber, err = runtime.Uint64(val) + protoReq.VersionNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err) } - val, ok = pathParams["epoch_height"] + val, ok = pathParams["version_height"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height") } - protoReq.EpochHeight, err = runtime.Uint64(val) + protoReq.VersionHeight, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err) } msg, err := client.ConnectionConsensusState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -300,26 +300,26 @@ func local_request_Query_ConnectionConsensusState_0(ctx context.Context, marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "connection_id", err) } - val, ok = pathParams["epoch_number"] + val, ok = pathParams["version_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number") } - protoReq.EpochNumber, err = runtime.Uint64(val) + protoReq.VersionNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err) } - val, ok = pathParams["epoch_height"] + val, ok = pathParams["version_height"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height") } - protoReq.EpochHeight, err = runtime.Uint64(val) + protoReq.VersionHeight, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err) } msg, err := server.ConnectionConsensusState(ctx, &protoReq) @@ -586,7 +586,7 @@ var ( pattern_Query_ConnectionClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ConnectionConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "consensus_state", "epoch", "epoch_number", "height", "epoch_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ConnectionConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9}, []string{"ibc", "connection", "v1beta1", "connections", "connection_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/x/ibc/04-channel/client/cli/query.go b/x/ibc/04-channel/client/cli/query.go index bc900d88a3..eede564208 100644 --- a/x/ibc/04-channel/client/cli/query.go +++ b/x/ibc/04-channel/client/cli/query.go @@ -381,7 +381,7 @@ func GetCmdQueryNextSequenceReceive() *cobra.Command { return err } - clientCtx = clientCtx.WithHeight(int64(sequenceRes.ProofHeight.EpochHeight)) + clientCtx = clientCtx.WithHeight(int64(sequenceRes.ProofHeight.VersionHeight)) return clientCtx.PrintOutput(sequenceRes) }, } diff --git a/x/ibc/04-channel/client/utils/utils.go b/x/ibc/04-channel/client/utils/utils.go index 975b723505..734dc33470 100644 --- a/x/ibc/04-channel/client/utils/utils.go +++ b/x/ibc/04-channel/client/utils/utils.go @@ -140,10 +140,10 @@ func QueryChannelConsensusState( queryClient := types.NewQueryClient(clientCtx) req := &types.QueryChannelConsensusStateRequest{ - PortId: portID, - ChannelId: channelID, - EpochNumber: height.EpochNumber, - EpochHeight: height.EpochHeight, + PortId: portID, + ChannelId: channelID, + VersionNumber: height.VersionNumber, + VersionHeight: height.VersionHeight, } res, err := queryClient.ChannelConsensusState(context.Background(), req) diff --git a/x/ibc/04-channel/keeper/grpc_query.go b/x/ibc/04-channel/keeper/grpc_query.go index faa51fee8f..e62af86be1 100644 --- a/x/ibc/04-channel/keeper/grpc_query.go +++ b/x/ibc/04-channel/keeper/grpc_query.go @@ -201,7 +201,7 @@ func (q Keeper) ChannelConsensusState(c context.Context, req *types.QueryChannel ) } - consHeight := clienttypes.NewHeight(req.EpochNumber, req.EpochHeight) + consHeight := clienttypes.NewHeight(req.VersionNumber, req.VersionHeight) consensusState, found := q.clientKeeper.GetClientConsensusState(ctx, connection.ClientId, consHeight) if !found { return nil, status.Error( diff --git a/x/ibc/04-channel/keeper/grpc_query_test.go b/x/ibc/04-channel/keeper/grpc_query_test.go index 14d2187e97..333a31a188 100644 --- a/x/ibc/04-channel/keeper/grpc_query_test.go +++ b/x/ibc/04-channel/keeper/grpc_query_test.go @@ -437,10 +437,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { "invalid port ID", func() { req = &types.QueryChannelConsensusStateRequest{ - PortId: "", - ChannelId: "test-channel-id", - EpochNumber: 0, - EpochHeight: 1, + PortId: "", + ChannelId: "test-channel-id", + VersionNumber: 0, + VersionHeight: 1, } }, false, @@ -449,10 +449,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { "invalid channel ID", func() { req = &types.QueryChannelConsensusStateRequest{ - PortId: "test-port-id", - ChannelId: "", - EpochNumber: 0, - EpochHeight: 1, + PortId: "test-port-id", + ChannelId: "", + VersionNumber: 0, + VersionHeight: 1, } }, false, @@ -461,10 +461,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { "channel not found", func() { req = &types.QueryChannelConsensusStateRequest{ - PortId: "test-port-id", - ChannelId: "test-channel-id", - EpochNumber: 0, - EpochHeight: 1, + PortId: "test-port-id", + ChannelId: "test-channel-id", + VersionNumber: 0, + VersionHeight: 1, } }, false, @@ -482,10 +482,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel) req = &types.QueryChannelConsensusStateRequest{ - PortId: channelA.PortID, - ChannelId: channelA.ID, - EpochNumber: 0, - EpochHeight: 1, + PortId: channelA.PortID, + ChannelId: channelA.ID, + VersionNumber: 0, + VersionHeight: 1, } }, false, }, @@ -495,10 +495,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { _, _, _, _, channelA, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) req = &types.QueryChannelConsensusStateRequest{ - PortId: channelA.PortID, - ChannelId: channelA.ID, - EpochNumber: 0, - EpochHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height + PortId: channelA.PortID, + ChannelId: channelA.ID, + VersionNumber: 0, + VersionHeight: uint64(suite.chainA.GetContext().BlockHeight()), // use current height } }, false, }, @@ -516,10 +516,10 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { expClientID = clientA req = &types.QueryChannelConsensusStateRequest{ - PortId: channelA.PortID, - ChannelId: channelA.ID, - EpochNumber: clientState.GetLatestHeight().GetEpochNumber(), - EpochHeight: clientState.GetLatestHeight().GetEpochHeight(), + PortId: channelA.PortID, + ChannelId: channelA.ID, + VersionNumber: clientState.GetLatestHeight().GetEpochNumber(), + VersionHeight: clientState.GetLatestHeight().GetEpochHeight(), } }, true, diff --git a/x/ibc/04-channel/types/msgs_test.go b/x/ibc/04-channel/types/msgs_test.go index 7290441301..8421a77bcd 100644 --- a/x/ibc/04-channel/types/msgs_test.go +++ b/x/ibc/04-channel/types/msgs_test.go @@ -416,7 +416,7 @@ func (suite *TypesTestSuite) TestMsgRecvPacketGetSignBytes() { res := msg.GetSignBytes() expected := fmt.Sprintf( - `{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":{"epoch_height":"100","epoch_number":"0"},"timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":{"epoch_height":"1","epoch_number":"0"},"signer":"%s"}`, + `{"packet":{"data":%s,"destination_channel":"testcpchannel","destination_port":"testcpport","sequence":"1","source_channel":"testchannel","source_port":"testportid","timeout_height":{"version_height":"100","version_number":"0"},"timeout_timestamp":"100"},"proof":"Co0BCi4KCmljczIzOmlhdmwSA0tFWRobChkKA0tFWRIFVkFMVUUaCwgBGAEgASoDAAICClsKDGljczIzOnNpbXBsZRIMaWF2bFN0b3JlS2V5Gj0KOwoMaWF2bFN0b3JlS2V5EiAcIiDXSHQRSvh/Wa07MYpTK0B4XtbaXtzxBED76xk0WhoJCAEYASABKgEA","proof_height":{"version_height":"1","version_number":"0"},"signer":"%s"}`, string(msg.GetDataSignBytes()), addr1.String(), ) diff --git a/x/ibc/04-channel/types/query.pb.go b/x/ibc/04-channel/types/query.pb.go index aa0fd811f3..a44538d591 100644 --- a/x/ibc/04-channel/types/query.pb.go +++ b/x/ibc/04-channel/types/query.pb.go @@ -530,10 +530,10 @@ type QueryChannelConsensusStateRequest struct { PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` // channel unique identifier ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - // epoch number of the consensus state - EpochNumber uint64 `protobuf:"varint,3,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - // epoch height of the consensus state - EpochHeight uint64 `protobuf:"varint,4,opt,name=epoch_height,json=epochHeight,proto3" json:"epoch_height,omitempty"` + // version number of the consensus state + VersionNumber uint64 `protobuf:"varint,3,opt,name=version_number,json=versionNumber,proto3" json:"version_number,omitempty"` + // version height of the consensus state + VersionHeight uint64 `protobuf:"varint,4,opt,name=version_height,json=versionHeight,proto3" json:"version_height,omitempty"` } func (m *QueryChannelConsensusStateRequest) Reset() { *m = QueryChannelConsensusStateRequest{} } @@ -583,16 +583,16 @@ func (m *QueryChannelConsensusStateRequest) GetChannelId() string { return "" } -func (m *QueryChannelConsensusStateRequest) GetEpochNumber() uint64 { +func (m *QueryChannelConsensusStateRequest) GetVersionNumber() uint64 { if m != nil { - return m.EpochNumber + return m.VersionNumber } return 0 } -func (m *QueryChannelConsensusStateRequest) GetEpochHeight() uint64 { +func (m *QueryChannelConsensusStateRequest) GetVersionHeight() uint64 { if m != nil { - return m.EpochHeight + return m.VersionHeight } return 0 } @@ -1489,92 +1489,92 @@ func init() { func init() { proto.RegisterFile("ibc/channel/query.proto", fileDescriptor_2150995751d4f15a) } var fileDescriptor_2150995751d4f15a = []byte{ - // 1345 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x1b, 0xc5, - 0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f, - 0xa6, 0xb2, 0xa6, 0x15, 0x08, 0x5f, 0x9b, 0x09, 0xac, 0x94, 0x7f, 0x42, 0x30, 0xda, 0x90, 0x80, - 0x6b, 0x73, 0x15, 0xfa, 0x39, 0x6d, 0x67, 0x1c, 0xcd, 0x24, 0xe6, 0x52, 0x0b, 0xe9, 0x90, 0x38, - 0x2b, 0x79, 0x62, 0xba, 0xc6, 0xa6, 0x41, 0xf2, 0x42, 0x26, 0x3f, 0x1e, 0x5f, 0x0f, 0xa1, 0xeb, - 0xa6, 0xe8, 0xce, 0x1f, 0x89, 0x8e, 0x25, 0x0e, 0xc2, 0xc3, 0x97, 0xa0, 0x97, 0xab, 0x96, 0x38, - 0x42, 0x35, 0x1e, 0x27, 0x7f, 0x8e, 0x20, 0xcd, 0x08, 0x59, 0xa6, 0x49, 0x74, 0x6f, 0x97, 0x46, - 0xed, 0xd2, 0x00, 0xba, 0x3f, 0xc9, 0x3b, 0x29, 0x30, 0xd2, 0xa0, 0x6d, 0xf7, 0xb1, 0xb5, 0x7d, - 0x8e, 0x60, 0x3a, 0x16, 0xca, 0x7f, 0x5b, 0xe5, 0xbb, 0x42, 0x64, 0x86, 0x65, 0x99, 0x86, 0xae, - 0xbb, 0x9a, 0x4b, 0x3a, 0x7d, 0x56, 0xff, 0xf0, 0x45, 0x8b, 0xd8, 0x9a, 0x8b, 0xb6, 0x01, 0x63, - 0x86, 0xaf, 0x4b, 0x96, 0xe1, 0xcc, 0x3a, 0x5e, 0x08, 0x7f, 0x12, 0x66, 0x83, 0x04, 0x02, 0x12, - 0x06, 0xf6, 0x1a, 0x35, 0xa2, 0x86, 0x4f, 0xe1, 0x09, 0xff, 0x1a, 0xc1, 0x6c, 0x88, 0xb0, 0x47, - 0xd1, 0x74, 0xaa, 0xce, 0x49, 0xc8, 0x89, 0x67, 0x61, 0x90, 0xd8, 0x96, 0x5e, 0xcc, 0x9a, 0xd5, - 0x72, 0x8e, 0x54, 0x28, 0xf6, 0x64, 0x26, 0x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xe6, 0x14, 0xdd, 0x2a, 0xab, 0xfc, 0x7f, 0x6f, 0xf6, 0x33, 0xef, 0xe4, 0xb7, - 0xd4, 0x1d, 0x8a, 0xe0, 0xd2, 0x1b, 0xf3, 0x02, 0x84, 0xbb, 0x6b, 0x13, 0x27, 0xd7, 0x4b, 0xff, - 0xb3, 0xb8, 0xf2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0x33, 0x85, 0xa4, 0x69, 0x17, 0x00, - 0x00, + // 1350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4f, 0x6c, 0x1b, 0xc5, + 0x17, 0xce, 0xc4, 0x6e, 0x9b, 0xbc, 0xf4, 0xcf, 0xaf, 0xd3, 0x44, 0x4d, 0xb7, 0x89, 0x93, 0xac, + 0xd4, 0x36, 0xbf, 0x96, 0xec, 0xb6, 0x29, 0x42, 0xa8, 0x40, 0xa5, 0x24, 0x12, 0x6d, 0x90, 0xd2, + 0xa6, 0x8e, 0x2a, 0x35, 0x3d, 0x60, 0xd6, 0xeb, 0x89, 0xbd, 0x8a, 0xbd, 0xbb, 0xf5, 0xae, 0xd3, + 0x84, 0x60, 0x84, 0xca, 0x01, 0x8e, 0x88, 0x1e, 0xb8, 0xc1, 0x99, 0x13, 0xe2, 0xc6, 0xb1, 0x12, + 0x1c, 0x22, 0x21, 0xa1, 0x4a, 0xbd, 0xf4, 0x04, 0x28, 0x81, 0x2b, 0x07, 0x0e, 0x1c, 0x11, 0xda, + 0x99, 0xb7, 0xeb, 0x5d, 0x7b, 0xd7, 0x31, 0x71, 0xda, 0x88, 0x93, 0xbd, 0x33, 0x6f, 0xe6, 0x7d, + 0xdf, 0xf7, 0xde, 0x8c, 0xbf, 0x35, 0x9c, 0x36, 0xf2, 0xba, 0xaa, 0x97, 0x34, 0xd3, 0x64, 0x65, + 0xf5, 0x41, 0x8d, 0x55, 0x37,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 0x25, 0x57, 0x73, 0x59, 0xb7, 0x67, 0xf5, 0x8f, 0x40, 0xb4, 0x98, 0xad, 0x51, 0xb4, 0x65, + 0x38, 0x6d, 0x04, 0xba, 0xe4, 0x04, 0xce, 0x9c, 0xe3, 0x85, 0xe0, 0x49, 0x98, 0x08, 0x13, 0x08, + 0x49, 0x18, 0xda, 0x6b, 0xc8, 0x88, 0x1b, 0x3e, 0x80, 0x13, 0xfe, 0x35, 0x81, 0x89, 0x08, 0x61, + 0x8f, 0xa2, 0xe9, 0xd4, 0x9c, 0xfd, 0x90, 0x93, 0x9e, 0x83, 0xe3, 0x6b, 0xac, 0xea, 0x18, 0x96, + 0x99, 0x33, 0x6b, 0x95, 0x3c, 0xab, 0x72, 0xf4, 0xe9, 0xec, 0x31, 0x1c, 0xbd, 0xc5, 0x07, 0xc3, + 0x61, 0x21, 0x0e, 0x8d, 0x30, 0xc4, 0xfa, 0x27, 0x01, 0xb9, 0x1d, 0x56, 0xac, 0xcf, 0x5b, 0x70, + 0x42, 0xf7, 0x67, 0x22, 0x75, 0x19, 0x54, 0xc4, 0x2f, 0x81, 0xe2, 0xff, 0x12, 0x28, 0x33, 0xe6, + 0x46, 0xf6, 0xb8, 0x1e, 0xd9, 0x86, 0x9e, 0x85, 0x7e, 0xac, 0x69, 0xc0, 0xa8, 0x4f, 0x0c, 0xcc, + 0x17, 0x1a, 0x05, 0x4a, 0x25, 0x17, 0x28, 0xbd, 0x5b, 0x81, 0x0e, 0xfd, 0x9b, 0x02, 0x55, 0x61, + 0x84, 0x73, 0x5e, 0xd4, 0xf4, 0x55, 0xe6, 0xce, 0x59, 0x95, 0x8a, 0xe1, 0x56, 0x98, 0xe9, 0x76, + 0x5b, 0x1a, 0x09, 0xfa, 0x1c, 0x6f, 0x0b, 0x53, 0x67, 0x58, 0x94, 0xe0, 0x59, 0xfe, 0x96, 0xc0, + 0x68, 0x42, 0x52, 0xd4, 0x98, 0x5f, 0x62, 0xfe, 0x28, 0x4f, 0x7c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, 0x35, 0x0e, 0xc9, 0x3e, + 0x12, 0x64, 0x3f, 0xa0, 0xef, 0xbf, 0x6c, 0xae, 0x1c, 0x0b, 0xaf, 0x35, 0xfd, 0x81, 0xc0, 0xa9, + 0x18, 0x7f, 0x42, 0x63, 0xae, 0xf8, 0x64, 0x8b, 0x24, 0x4d, 0x75, 0x18, 0x8d, 0xcc, 0x17, 0x39, + 0xf1, 0x77, 0xe8, 0xcd, 0x2e, 0x88, 0x47, 0x5c, 0xd3, 0xec, 0xc2, 0xd6, 0x76, 0x86, 0x3c, 0xdd, + 0xce, 0x90, 0x5f, 0xb7, 0x33, 0xe4, 0xb3, 0x9d, 0x4c, 0xcf, 0xd3, 0x9d, 0x4c, 0xcf, 0xf3, 0x9d, + 0x4c, 0xcf, 0xfd, 0xab, 0x45, 0xc3, 0x2d, 0xd5, 0xf2, 0x8a, 0x6e, 0x55, 0x54, 0xfc, 0x1b, 0x5c, + 0x7c, 0x4c, 0x39, 0x85, 0x55, 0x75, 0x9d, 0x23, 0xb8, 0xfc, 0xea, 0x94, 0x0f, 0xc2, 0xdd, 0xb0, + 0x99, 0x93, 0x3f, 0xcc, 0xff, 0xba, 0xb8, 0xfa, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xf5, + 0x71, 0x68, 0x78, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2458,13 +2458,13 @@ func (m *QueryChannelConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (i _ = i var l int _ = l - if m.EpochHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.VersionHeight)) i-- dAtA[i] = 0x20 } - if m.EpochNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.VersionNumber)) i-- dAtA[i] = 0x18 } @@ -3329,11 +3329,11 @@ func (m *QueryChannelConsensusStateRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.EpochNumber != 0 { - n += 1 + sovQuery(uint64(m.EpochNumber)) + if m.VersionNumber != 0 { + n += 1 + sovQuery(uint64(m.VersionNumber)) } - if m.EpochHeight != 0 { - n += 1 + sovQuery(uint64(m.EpochHeight)) + if m.VersionHeight != 0 { + n += 1 + sovQuery(uint64(m.VersionHeight)) } return n } @@ -4849,9 +4849,9 @@ func (m *QueryChannelConsensusStateRequest) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionNumber", wireType) } - m.EpochNumber = 0 + m.VersionNumber = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4861,16 +4861,16 @@ func (m *QueryChannelConsensusStateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift + m.VersionNumber |= uint64(b&0x7F) << shift if b < 0x80 { break } } case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochHeight", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionHeight", wireType) } - m.EpochHeight = 0 + m.VersionHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4880,7 +4880,7 @@ func (m *QueryChannelConsensusStateRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.EpochHeight |= uint64(b&0x7F) << shift + m.VersionHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } diff --git a/x/ibc/04-channel/types/query.pb.gw.go b/x/ibc/04-channel/types/query.pb.gw.go index 9155e761f5..ace0d28a5f 100644 --- a/x/ibc/04-channel/types/query.pb.gw.go +++ b/x/ibc/04-channel/types/query.pb.gw.go @@ -324,26 +324,26 @@ func request_Query_ChannelConsensusState_0(ctx context.Context, marshaler runtim return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } - val, ok = pathParams["epoch_number"] + val, ok = pathParams["version_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number") } - protoReq.EpochNumber, err = runtime.Uint64(val) + protoReq.VersionNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err) } - val, ok = pathParams["epoch_height"] + val, ok = pathParams["version_height"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height") } - protoReq.EpochHeight, err = runtime.Uint64(val) + protoReq.VersionHeight, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err) } msg, err := client.ChannelConsensusState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -384,26 +384,26 @@ func local_request_Query_ChannelConsensusState_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) } - val, ok = pathParams["epoch_number"] + val, ok = pathParams["version_number"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_number") } - protoReq.EpochNumber, err = runtime.Uint64(val) + protoReq.VersionNumber, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_number", err) } - val, ok = pathParams["epoch_height"] + val, ok = pathParams["version_height"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_height") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_height") } - protoReq.EpochHeight, err = runtime.Uint64(val) + protoReq.VersionHeight, err = runtime.Uint64(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_height", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_height", err) } msg, err := server.ChannelConsensusState(ctx, &protoReq) @@ -1472,7 +1472,7 @@ var ( pattern_Query_ChannelClientState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "client_state"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ChannelConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "consensus_state", "epoch", "epoch_number", "height", "epoch_height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ChannelConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "consensus_state", "version", "version_number", "height", "version_height"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_PacketCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8}, []string{"ibc", "channel", "v1beta1", "channels", "channel_id", "ports", "port_id", "packet_commitments", "sequence"}, "", runtime.AssumeColonVerbOpt(true))) diff --git a/x/ibc/client/query.go b/x/ibc/client/query.go index 961f8fac88..1f1c7e649d 100644 --- a/x/ibc/client/query.go +++ b/x/ibc/client/query.go @@ -56,6 +56,6 @@ func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, return nil, nil, clienttypes.Height{}, err } - epoch := clienttypes.ParseChainID(clientCtx.ChainID) - return res.Value, proofBz, clienttypes.NewHeight(epoch, uint64(res.Height)+1), nil + version := clienttypes.ParseChainID(clientCtx.ChainID) + return res.Value, proofBz, clienttypes.NewHeight(version, uint64(res.Height)+1), nil } diff --git a/x/ibc/light-clients/06-solomachine/types/client_state.go b/x/ibc/light-clients/06-solomachine/types/client_state.go index 54dc52da17..a26dc1f5d4 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state.go @@ -396,10 +396,10 @@ func produceVerificationArgs( prefix exported.Prefix, proof []byte, ) (signing.SignatureData, uint64, uint64, error) { - if epoch := height.GetEpochNumber(); epoch != 0 { - return nil, 0, 0, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "epoch must be 0 for solomachine, got epoch-number: %d", epoch) + if version := height.GetEpochNumber(); version != 0 { + return nil, 0, 0, sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "version must be 0 for solomachine, got version-number: %d", version) } - // sequence is encoded in the epoch height of height struct + // sequence is encoded in the version height of height struct sequence := height.GetEpochHeight() if cs.IsFrozen() { return nil, 0, 0, clienttypes.ErrClientFrozen diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/07-tendermint/types/client_state.go index afbe3bf930..5c43d45706 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state.go @@ -95,8 +95,8 @@ func (cs ClientState) Validate() error { if cs.MaxClockDrift == 0 { return sdkerrors.Wrap(ErrInvalidMaxClockDrift, "max clock drift cannot be zero") } - if cs.LatestHeight.EpochHeight == 0 { - return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "tendermint epoch height cannot be zero") + if cs.LatestHeight.VersionHeight == 0 { + return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "tendermint version height cannot be zero") } if cs.TrustingPeriod >= cs.UnbondingPeriod { return sdkerrors.Wrapf( diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/07-tendermint/types/client_state_test.go index d17142d4ce..9a6eb8d603 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/07-tendermint/types/client_state_test.go @@ -136,7 +136,7 @@ func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { }, { name: "client is frozen", - clientState: &types.ClientState{LatestHeight: height, FrozenHeight: clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-1)}, + clientState: &types.ClientState{LatestHeight: height, FrozenHeight: clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1)}, consensusState: types.ConsensusState{ Root: commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), }, diff --git a/x/ibc/light-clients/07-tendermint/types/header.go b/x/ibc/light-clients/07-tendermint/types/header.go index 4dc7088aa1..a441d5afd4 100644 --- a/x/ibc/light-clients/07-tendermint/types/header.go +++ b/x/ibc/light-clients/07-tendermint/types/header.go @@ -34,8 +34,8 @@ func (h Header) GetHeight() exported.Height { if h.Header == nil { return clienttypes.ZeroHeight() } - epoch := clienttypes.ParseChainID(h.Header.ChainID) - return clienttypes.NewHeight(epoch, uint64(h.Header.Height)) + version := clienttypes.ParseChainID(h.Header.ChainID) + return clienttypes.NewHeight(version, uint64(h.Header.Height)) } // GetTime returns the current block timestamp. It returns a zero time if diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go index 7f229a961a..e4461b3fa4 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour.go @@ -73,11 +73,11 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if misbehaviour.Header2 == nil { return sdkerrors.Wrap(ErrInvalidHeader, "misbehaviour Header2 cannot be nil") } - if misbehaviour.Header1.TrustedHeight.EpochHeight == 0 { - return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header1 cannot have zero epoch height") + if misbehaviour.Header1.TrustedHeight.VersionHeight == 0 { + return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header1 cannot have zero version height") } - if misbehaviour.Header2.TrustedHeight.EpochHeight == 0 { - return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header2 cannot have zero epoch height") + if misbehaviour.Header2.TrustedHeight.VersionHeight == 0 { + return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "misbehaviour Header2 cannot have zero version height") } if misbehaviour.Header1.TrustedValidators == nil { return sdkerrors.Wrap(ErrInvalidValidatorSet, "trusted validator set in Header1 cannot be empty") diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go index b6b3af3e00..7bc2efbddd 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -56,14 +56,14 @@ func (cs ClientState) CheckMisbehaviourAndUpdateState( ageDuration := ctx.BlockTime().Sub(infractionTime) var ageBlocks int64 - if tmMisbehaviour.GetHeight().GetEpochNumber() == cs.LatestHeight.EpochNumber { - // if the misbehaviour is in the same epoch as the client then + if tmMisbehaviour.GetHeight().GetEpochNumber() == cs.LatestHeight.VersionNumber { + // if the misbehaviour is in the same version as the client then // perform expiry check using block height in addition to time infractionHeight := tmMisbehaviour.GetHeight().GetEpochHeight() - ageBlocks = int64(cs.LatestHeight.EpochHeight - infractionHeight) + ageBlocks = int64(cs.LatestHeight.VersionHeight - infractionHeight) } else { - // if the misbehaviour is from a different epoch, then the epoch-height - // of misbehaviour has no correlation with the current epoch-height + // if the misbehaviour is from a different version, then the version-height + // of misbehaviour has no correlation with the current version-height // so we disable the block check by setting ageBlocks to 0 and only // rely on the time expiry check with ageDuration ageBlocks = 0 @@ -142,7 +142,7 @@ func checkMisbehaviourHeader( } chainID := clientState.GetChainID() - // If chainID is in epoch format, then set epoch number of chainID with the epoch number + // If chainID is in version format, then set version number of chainID with the version number // of the misbehaviour header if clienttypes.IsEpochFormat(chainID) { chainID, _ = clienttypes.SetEpochNumber(chainID, header.GetHeight().GetEpochNumber()) diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go index ed9d87bb91..00fa175019 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -36,9 +36,9 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { altSigners := []tmtypes.PrivValidator{altPrivVal} - epochHeight := int64(height.EpochHeight) - heightMinus1 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-1) - heightMinus3 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-3) + versionHeight := int64(height.VersionHeight) + heightMinus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1) + heightMinus3 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-3) testCases := []struct { name string @@ -100,7 +100,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { true, }, { - "valid misbehaviour at a previous epoch", + "valid misbehaviour at a previous version", types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, @@ -116,7 +116,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { true, }, { - "valid misbehaviour at a future epoch", + "valid misbehaviour at a future version", types.NewClientState(chainIDEpoch0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), &upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, @@ -132,7 +132,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { true, }, { - "valid misbehaviour with trusted heights at a previous epoch", + "valid misbehaviour with trusted heights at a previous version", types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, @@ -272,7 +272,7 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { }, { "rejected misbehaviour due to expired block duration", - types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(0, uint64(epochHeight+simapp.DefaultConsensusParams.Evidence.MaxAgeNumBlocks+1)), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false), + types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(0, uint64(versionHeight+simapp.DefaultConsensusParams.Evidence.MaxAgeNumBlocks+1)), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go index a361d9c19e..9e2c741b21 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go +++ b/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go @@ -15,7 +15,7 @@ import ( func (suite *TendermintTestSuite) TestMisbehaviour() { signers := []tmtypes.PrivValidator{suite.privVal} - heightMinus1 := clienttypes.NewHeight(0, height.EpochHeight-1) + heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1) misbehaviour := &types.Misbehaviour{ Header1: suite.header, @@ -34,9 +34,9 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) - epochHeight := int64(height.EpochHeight) + versionHeight := int64(height.VersionHeight) - altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), epochHeight) + altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), versionHeight) // Create bothValSet with both suite validator and altVal bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) @@ -51,7 +51,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { altSigners := []tmtypes.PrivValidator{altPrivVal} - heightMinus1 := clienttypes.NewHeight(0, height.EpochHeight-1) + heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1) testCases := []struct { name string @@ -86,7 +86,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "valid misbehaviour with different trusted headers", &types.Misbehaviour{ Header1: suite.header, - Header2: types.CreateTestHeader(chainID, height, clienttypes.NewHeight(0, height.EpochHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers), + Header2: types.CreateTestHeader(chainID, height, clienttypes.NewHeight(0, height.VersionHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers), ChainId: chainID, ClientId: clientID, }, diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go b/x/ibc/light-clients/07-tendermint/types/tendermint_test.go index e56d70f577..031ca1270d 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go +++ b/x/ibc/light-clients/07-tendermint/types/tendermint_test.go @@ -23,8 +23,8 @@ import ( const ( chainID = "gaia" - chainIDEpoch0 = "gaia-epoch-0" - chainIDEpoch1 = "gaia-epoch-1" + chainIDEpoch0 = "gaia-version-0" + chainIDEpoch1 = "gaia-version-1" clientID = "gaiamainnet" trustingPeriod time.Duration = time.Hour * 24 * 7 * 2 ubdPeriod time.Duration = time.Hour * 24 * 7 * 3 @@ -81,7 +81,7 @@ func (suite *TendermintTestSuite) SetupTest() { pubKey, err := suite.privVal.GetPubKey() suite.Require().NoError(err) - heightMinus1 := clienttypes.NewHeight(0, height.EpochHeight-1) + heightMinus1 := clienttypes.NewHeight(0, height.VersionHeight-1) val := tmtypes.NewValidator(pubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), 10) suite.valSet = tmtypes.NewValidatorSet([]*tmtypes.Validator{val}) diff --git a/x/ibc/light-clients/07-tendermint/types/test_utils.go b/x/ibc/light-clients/07-tendermint/types/test_utils.go index 5c5da86077..0e204153af 100644 --- a/x/ibc/light-clients/07-tendermint/types/test_utils.go +++ b/x/ibc/light-clients/07-tendermint/types/test_utils.go @@ -31,7 +31,7 @@ func CreateTestHeader(chainID string, height, trustedHeight clienttypes.Height, trustedVals *tmproto.ValidatorSet ) vsetHash := tmValSet.Hash() - blockHeight := int64(height.EpochHeight) + blockHeight := int64(height.VersionHeight) tmHeader := tmtypes.Header{ Version: tmprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2}, ChainID: chainID, diff --git a/x/ibc/light-clients/07-tendermint/types/update.go b/x/ibc/light-clients/07-tendermint/types/update.go index c67f026a60..b2de7bab7d 100644 --- a/x/ibc/light-clients/07-tendermint/types/update.go +++ b/x/ibc/light-clients/07-tendermint/types/update.go @@ -22,7 +22,7 @@ import ( // - the client or header provided are not parseable to tendermint types // - the header is invalid // - header height is less than or equal to the trusted header height -// - header epoch is not equal to trusted header epoch +// - header version is not equal to trusted header version // - header valset commit verification fails // - header timestamp is past the trusting period in relation to the consensus state // - header timestamp is less than or equal to the consensus state timestamp @@ -33,8 +33,8 @@ import ( // If we are updating to a past height, a consensus state is created for that height to be persisted in client store // If we are updating to a future height, the consensus state is created and the client state is updated to reflect // the new latest height -// UpdateClient must only be used to update within a single epoch, thus header epoch number and trusted height's epoch -// number must be the same. To update to a new epoch, use a separate upgrade path +// UpdateClient must only be used to update within a single version, thus header version number and trusted height's version +// number must be the same. To update to a new version, use a separate upgrade path // Tendermint client validity checking uses the bisection algorithm described // in the [Tendermint spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md). func (cs ClientState) CheckHeaderAndUpdateState( @@ -94,13 +94,13 @@ func checkValidity( return err } - // UpdateClient only accepts updates with a header at the same epoch + // UpdateClient only accepts updates with a header at the same version // as the trusted consensus state - if header.GetHeight().GetEpochNumber() != header.TrustedHeight.EpochNumber { + if header.GetHeight().GetEpochNumber() != header.TrustedHeight.VersionNumber { return sdkerrors.Wrapf( ErrInvalidHeaderHeight, - "header height epoch %d does not match trusted header epoch %d", - header.GetHeight().GetEpochNumber(), header.TrustedHeight.EpochNumber, + "header height version %d does not match trusted header version %d", + header.GetHeight().GetEpochNumber(), header.TrustedHeight.VersionNumber, ) } @@ -128,12 +128,12 @@ func checkValidity( } chainID := clientState.GetChainID() - // If chainID is in epoch format, then set epoch number of chainID with the epoch number + // If chainID is in version format, then set version number of chainID with the version number // of the header we are verifying - // This is useful if the update is at a previous epoch rather than an update to the latest epoch + // This is useful if the update is at a previous version rather than an update to the latest version // of the client. - // The chainID must be set correctly for the previous epoch before attempting verification. - // Updates for previous epochs are not supported if the chainID is not in epoch format. + // The chainID must be set correctly for the previous version before attempting verification. + // Updates for previous epochs are not supported if the chainID is not in version format. if clienttypes.IsEpochFormat(chainID) { chainID, _ = clienttypes.SetEpochNumber(chainID, header.GetHeight().GetEpochNumber()) } @@ -142,7 +142,7 @@ func checkValidity( // Only Height, Time, and NextValidatorsHash are necessary for verification trustedHeader := tmtypes.Header{ ChainID: chainID, - Height: int64(header.TrustedHeight.EpochHeight), + Height: int64(header.TrustedHeight.VersionHeight), Time: consState.Timestamp, NextValidatorsHash: consState.NextValidatorsHash, } diff --git a/x/ibc/light-clients/07-tendermint/types/update_test.go b/x/ibc/light-clients/07-tendermint/types/update_test.go index 9f6e3e5171..1a3351cce4 100644 --- a/x/ibc/light-clients/07-tendermint/types/update_test.go +++ b/x/ibc/light-clients/07-tendermint/types/update_test.go @@ -26,15 +26,15 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) - epochHeight := int64(height.EpochHeight) + versionHeight := int64(height.VersionHeight) // create modified heights to use for test-cases - heightPlus1 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight+1) - heightMinus1 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-1) - heightMinus3 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight-3) - heightPlus5 := clienttypes.NewHeight(height.EpochNumber, height.EpochHeight+5) + heightPlus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight+1) + heightMinus1 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-1) + heightMinus3 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight-3) + heightPlus5 := clienttypes.NewHeight(height.VersionNumber, height.VersionHeight+5) - altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), epochHeight) + altVal := tmtypes.NewValidator(altPubKey.(cryptotypes.IntoTmPubKey).AsTmPubKey(), versionHeight) // Create bothValSet with both suite validator and altVal. Would be valid update bothValSet := tmtypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) @@ -96,7 +96,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { expPass: true, }, { - name: "successful update for a previous epoch", + name: "successful update for a previous version", setup: func() { clientState = types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), &upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) @@ -116,7 +116,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { expPass: false, }, { - name: "unsuccessful update to a future epoch", + name: "unsuccessful update to a future version", setup: func() { clientState = types.NewClientState(chainIDEpoch0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), &upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) @@ -126,7 +126,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { expPass: false, }, { - name: "unsuccessful update: header height epoch and trusted height epoch mismatch", + name: "unsuccessful update: header height version and trusted height version mismatch", setup: func() { clientState = types.NewClientState(chainIDEpoch1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), &upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) @@ -213,7 +213,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = types.CreateTestHeader(chainID, heightPlus1, height, suite.headerTime, suite.valSet, suite.valSet, signers) // cause new header to fail validatebasic by changing commit height to mismatch header height - newHeader.SignedHeader.Commit.Height = epochHeight - 1 + newHeader.SignedHeader.Commit.Height = versionHeight - 1 currentTime = suite.now }, expPass: false, diff --git a/x/ibc/light-clients/09-localhost/types/client_state.go b/x/ibc/light-clients/09-localhost/types/client_state.go index ca09a423fe..250091957e 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state.go +++ b/x/ibc/light-clients/09-localhost/types/client_state.go @@ -58,8 +58,8 @@ func (cs ClientState) Validate() error { if strings.TrimSpace(cs.ChainId) == "" { return sdkerrors.Wrap(sdkerrors.ErrInvalidChainID, "chain id cannot be blank") } - if cs.Height.EpochHeight == 0 { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "local epoch height cannot be zero") + if cs.Height.VersionHeight == 0 { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidHeight, "local version height cannot be zero") } return nil } @@ -80,8 +80,8 @@ func (cs *ClientState) CheckHeaderAndUpdateState( ) (exported.ClientState, exported.ConsensusState, error) { // use the chain ID from context since the localhost client is from the running chain (i.e self). cs.ChainId = ctx.ChainID() - epoch := clienttypes.ParseChainID(cs.ChainId) - cs.Height = clienttypes.NewHeight(epoch, uint64(ctx.BlockHeight())) + version := clienttypes.ParseChainID(cs.ChainId) + cs.Height = clienttypes.NewHeight(version, uint64(ctx.BlockHeight())) return cs, nil, nil } diff --git a/x/ibc/spec/01_concepts.md b/x/ibc/spec/01_concepts.md index 79bc6d3fcf..8ced5fb0de 100644 --- a/x/ibc/spec/01_concepts.md +++ b/x/ibc/spec/01_concepts.md @@ -13,44 +13,50 @@ IBC Client Heights are represented by the struct: ```go type Height struct { - EpochNumber uint64 - EpochHeight uint64 + VersionNumber uint64 + VersionHeight uint64 +} ``` -The `EpochNumber` represents the epoch of the chain that the height is representing. -An epoch typically represents a continuous, monotonically increasing range of block-heights. -The `EpochHeight` represents the height of the chain within the given epoch. +The `VersionNumber` represents the version of the chain that the height is representing. +An version typically represents a continuous, monotonically increasing range of block-heights. +The `VersionHeight` represents the height of the chain within the given version. -On any reset of the `EpochHeight`, for example, when hard-forking a Tendermint chain, -the `EpochNumber` will get incremented. This allows IBC clients to distinguish between a -block-height `n` of a previous version of the chain (at epoch `p`) and block-height `n` of the current -version of the chain (at epoch `e`). +On any reset of the `VersionHeight`, for example, when hard-forking a Tendermint chain, +the `VersionNumber` will get incremented. This allows IBC clients to distinguish between a +block-height `n` of a previous version of the chain (at version `p`) and block-height `n` of the current +version of the chain (at version `e`). -`Heights` that share the same epoch number can be compared by simply comparing their respective `EpochHeights`. -Heights that do not share the same epoch number will only be compared using their respective `EpochNumbers`. -Thus a height `h` with epoch number `e+1` will always be greater than a height `g` with epoch number `e`, -**REGARDLESS** of the difference in epoch heights. +`Heights` that share the same version number can be compared by simply comparing their respective `EpochHeights`. +Heights that do not share the same version number will only be compared using their respective `EpochNumbers`. +Thus a height `h` with version number `e+1` will always be greater than a height `g` with version number `e`, +**REGARDLESS** of the difference in version heights. -Ex: `Height{EpochNumber: 3, EpochHeight: 0} > Height{EpochNumber: 2, EpochHeight: 100000000000}` +Ex: -When a Tendermint chain is running a particular version, relayers can simply submit headers and proofs with the epoch number -given by the chain's chainID, and the epoch height given by the Tendermint block height. When a chain updates using a hard-fork -and resets its block-height, it is responsible for updating its chain-id to increment the epoch number. -IBC Tendermint clients then verifies the epoch number against their `ChainId` and treat the `EpochHeight` as the Tendermint block-height. +```go +Height{VersionNumber: 3, VersionHeight: 0} > Height{VersionNumber: 2, VersionHeight: 100000000000} +``` + +When a Tendermint chain is running a particular version, relayers can simply submit headers and proofs with the version number +given by the chain's chainID, and the version height given by the Tendermint block height. When a chain updates using a hard-fork +and resets its block-height, it is responsible for updating its chain-id to increment the version number. +IBC Tendermint clients then verifies the version number against their `ChainId` and treat the `VersionHeight` as the Tendermint block-height. Tendermint chains wishing to use epochs to maintain persistent IBC connections even across height-resetting upgrades must format their chain-ids -in the following manner: `{chainID}-{version}`. On any height-resetting upgrade, the chainID **MUST** be updated with a higher epoch number +in the following manner: `{chainID}-{version_number}`. On any height-resetting upgrade, the chainID **MUST** be updated with a higher version number than the previous value. Ex: -Before upgrade ChainID: `gaiamainnet-3` -After upgrade ChainID: `gaiamainnet-4` -Clients that do not require epochs, such as the solo-machine client, simply hardcode `0` into the epoch number whenever they -need to return an IBC height when implementing IBC interfaces and use the `EpochHeight` exclusively. +- Before upgrade ChainID: `gaiamainnet-3` +- After upgrade ChainID: `gaiamainnet-4` -Other client-types may implement their own logic to verify the IBC Heights that relayers provide in their Update, Misbehavior, and -Verify functions respectively. +Clients that do not require epochs, such as the solo-machine client, simply hardcode `0` into the version number whenever they +need to return an IBC height when implementing IBC interfaces and use the `VersionHeight` exclusively. + +Other client-types may implement their own logic to verify the IBC Heights that relayers provide in their `Update`, `Misbehavior`, and +`Verify` functions respectively. The IBC interfaces expect an `ibcexported.Height` interface, however all clients should use the concrete implementation provided in `02-client/types` and reproduced above. diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index a196e80365..2673ad7398 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -191,12 +191,12 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof) require.NoError(chain.t, err) - epoch := clienttypes.ParseChainID(chain.ChainID) + version := clienttypes.ParseChainID(chain.ChainID) // proof height + 1 is returned as the proof created corresponds to the height the proof // was created in the IAVL tree. Tendermint and subsequently the clients that rely on it // have heights 1 above the IAVL tree. Thus we return proof height + 1 - return proof, clienttypes.NewHeight(epoch, uint64(res.Height)+1) + return proof, clienttypes.NewHeight(version, uint64(res.Height)+1) } // QueryUpgradeProof performs an abci query with the given key and returns the proto encoded merkle proof @@ -216,12 +216,12 @@ func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, cl proof, err := chain.App.AppCodec().MarshalBinaryBare(&merkleProof) require.NoError(chain.t, err) - epoch := clienttypes.ParseChainID(chain.ChainID) + version := clienttypes.ParseChainID(chain.ChainID) // proof height + 1 is returned as the proof created corresponds to the height the proof // was created in the IAVL tree. Tendermint and subsequently the clients that rely on it // have heights 1 above the IAVL tree. Thus we return proof height + 1 - return proof, clienttypes.NewHeight(epoch, uint64(res.Height+1)) + return proof, clienttypes.NewHeight(version, uint64(res.Height+1)) } // QueryClientStateProof performs and abci query for a client state @@ -482,13 +482,13 @@ func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, c // since the last trusted validators for a header at height h // is the NextValidators at h+1 committed to in header h by // NextValidatorsHash - tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.EpochHeight + 1)) + tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.VersionHeight + 1)) if !ok { return nil, sdkerrors.Wrapf(ibctmtypes.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight) } } // inject trusted fields into last header - // for now assume epoch number is 0 + // for now assume version number is 0 header.TrustedHeight = trustedHeight trustedVals, err := tmTrustedVals.ToProto() diff --git a/x/ibc/testing/solomachine.go b/x/ibc/testing/solomachine.go index 04f5fddc3a..08fb9378a5 100644 --- a/x/ibc/testing/solomachine.go +++ b/x/ibc/testing/solomachine.go @@ -102,7 +102,7 @@ func (solo *Solomachine) ConsensusState() *solomachinetypes.ConsensusState { } } -// GetHeight returns an exported.Height with Sequence as EpochHeight +// GetHeight returns an exported.Height with Sequence as VersionHeight func (solo *Solomachine) GetHeight() exported.Height { return clienttypes.NewHeight(0, solo.Sequence) }