From 8c788e2d4d96049bd4659355a079140de296f504 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 9 Mar 2023 12:17:33 +0900 Subject: [PATCH 1/4] Fix ibc message type --- docs/ibc/proto-docs.md | 26 +-- .../99-ostracon/types/ostracon.pb.go | 148 +++++++++--------- .../lightclients/ostracon/v1/ostracon.proto | 2 +- 3 files changed, 88 insertions(+), 88 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 4261f07a09c..2001146cbd5 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -225,11 +225,11 @@ - [ClientState](#ibc.lightclients.localhost.v1.ClientState) - [ibc/lightclients/ostracon/v1/ostracon.proto](#ibc/lightclients/ostracon/v1/ostracon.proto) - - [ClientState](#ibc.lightclients.ostracon.v1.ClientState) - - [ConsensusState](#ibc.lightclients.ostracon.v1.ConsensusState) - - [Fraction](#ibc.lightclients.ostracon.v1.Fraction) - - [Header](#ibc.lightclients.ostracon.v1.Header) - - [Misbehaviour](#ibc.lightclients.ostracon.v1.Misbehaviour) + - [ClientState](#ibc.lightclients.tendermint.v1.ClientState) + - [ConsensusState](#ibc.lightclients.tendermint.v1.ConsensusState) + - [Fraction](#ibc.lightclients.tendermint.v1.Fraction) + - [Header](#ibc.lightclients.tendermint.v1.Header) + - [Misbehaviour](#ibc.lightclients.tendermint.v1.Misbehaviour) - [ibc/lightclients/solomachine/v1/solomachine.proto](#ibc/lightclients/solomachine/v1/solomachine.proto) - [ChannelStateData](#ibc.lightclients.solomachine.v1.ChannelStateData) @@ -3369,7 +3369,7 @@ access to keys outside the client prefix. - + ### ClientState ClientState from Ostracon tracks the current validator set, latest height, @@ -3379,7 +3379,7 @@ and a possible frozen height. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `chain_id` | [string](#string) | | | -| `trust_level` | [Fraction](#ibc.lightclients.ostracon.v1.Fraction) | | | +| `trust_level` | [Fraction](#ibc.lightclients.tendermint.v1.Fraction) | | | | `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | | `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | | `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | @@ -3395,7 +3395,7 @@ and a possible frozen height. - + ### ConsensusState ConsensusState defines the consensus state from Ostracon. @@ -3412,7 +3412,7 @@ ConsensusState defines the consensus state from Ostracon. - + ### Fraction Fraction defines the protobuf message type for tmmath.Fraction that only @@ -3429,7 +3429,7 @@ supports positive values. - + ### Header Header defines the Ostracon client consensus Header. @@ -3458,7 +3458,7 @@ trusted validator set at the TrustedHeight. - + ### Misbehaviour Misbehaviour is a wrapper over two conflicting Headers @@ -3468,8 +3468,8 @@ that implements Misbehaviour interface expected by ICS-02 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `client_id` | [string](#string) | | **Deprecated.** ClientID is deprecated | -| `header_1` | [Header](#ibc.lightclients.ostracon.v1.Header) | | | -| `header_2` | [Header](#ibc.lightclients.ostracon.v1.Header) | | | +| `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | +| `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | diff --git a/modules/light-clients/99-ostracon/types/ostracon.pb.go b/modules/light-clients/99-ostracon/types/ostracon.pb.go index 36408229bf0..26240f7a3b8 100644 --- a/modules/light-clients/99-ostracon/types/ostracon.pb.go +++ b/modules/light-clients/99-ostracon/types/ostracon.pb.go @@ -311,11 +311,11 @@ func (m *Fraction) GetDenominator() uint64 { } func init() { - proto.RegisterType((*ClientState)(nil), "ibc.lightclients.ostracon.v1.ClientState") - proto.RegisterType((*ConsensusState)(nil), "ibc.lightclients.ostracon.v1.ConsensusState") - proto.RegisterType((*Misbehaviour)(nil), "ibc.lightclients.ostracon.v1.Misbehaviour") - proto.RegisterType((*Header)(nil), "ibc.lightclients.ostracon.v1.Header") - proto.RegisterType((*Fraction)(nil), "ibc.lightclients.ostracon.v1.Fraction") + proto.RegisterType((*ClientState)(nil), "ibc.lightclients.tendermint.v1.ClientState") + proto.RegisterType((*ConsensusState)(nil), "ibc.lightclients.tendermint.v1.ConsensusState") + proto.RegisterType((*Misbehaviour)(nil), "ibc.lightclients.tendermint.v1.Misbehaviour") + proto.RegisterType((*Header)(nil), "ibc.lightclients.tendermint.v1.Header") + proto.RegisterType((*Fraction)(nil), "ibc.lightclients.tendermint.v1.Fraction") } func init() { @@ -323,75 +323,75 @@ func init() { } var fileDescriptor_049a55681d0db341 = []byte{ - // 1085 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, - 0x17, 0x6f, 0xda, 0x7e, 0xdb, 0x64, 0x92, 0x6e, 0xfb, 0x35, 0xa5, 0x9b, 0x96, 0x6c, 0x1c, 0x19, - 0x54, 0x2a, 0xb1, 0xb5, 0x95, 0xf4, 0xb4, 0x15, 0x97, 0x75, 0x17, 0xd4, 0x22, 0x56, 0x54, 0x2e, - 0x70, 0x00, 0x21, 0x33, 0xb1, 0x27, 0xc9, 0x68, 0x6d, 0x8f, 0xe5, 0x19, 0x87, 0x96, 0x1b, 0x37, - 0x24, 0x2e, 0x7b, 0x44, 0x88, 0x03, 0x7f, 0xce, 0x1e, 0x7b, 0xe4, 0x64, 0x50, 0x7b, 0xe3, 0x98, - 0x23, 0x27, 0x34, 0x3f, 0xfc, 0xa3, 0xd9, 0xee, 0x56, 0xbd, 0x44, 0xf3, 0xde, 0xfb, 0xbc, 0xcf, - 0xc7, 0xf3, 0xe6, 0xcd, 0x9b, 0x80, 0x8f, 0xf0, 0xd0, 0xb3, 0x02, 0x3c, 0x9e, 0x30, 0x2f, 0xc0, - 0x28, 0x62, 0xd4, 0x22, 0x94, 0x25, 0xd0, 0x23, 0x91, 0x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0xe7, 0x2f, 0x16, 0x1e, - 0x7a, 0xfb, 0x63, 0x62, 0x4d, 0x0f, 0xac, 0x90, 0xf8, 0x69, 0x80, 0xa8, 0xfc, 0xd3, 0xb5, 0x9f, - 0xff, 0xeb, 0x7a, 0xf2, 0x64, 0xbf, 0xb8, 0x7b, 0x62, 0x9f, 0xc3, 0x15, 0x31, 0x44, 0x0e, 0xfe, - 0x0b, 0x00, 0x00, 0xff, 0xff, 0x52, 0xbf, 0x32, 0x98, 0xa2, 0x09, 0x00, 0x00, + // 1081 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x26, 0xe9, 0x76, 0x31, 0x4b, 0x37, 0x2d, 0xdd, 0x38, 0x32, 0x52, + 0x89, 0xc4, 0xd6, 0x56, 0xd2, 0xd3, 0x56, 0x5c, 0xd6, 0x5d, 0x50, 0x8b, 0x58, 0x51, 0xb9, 0xc0, + 0x01, 0x84, 0xcc, 0xc4, 0x9e, 0xc4, 0xa3, 0xb5, 0x3d, 0x96, 0x67, 0x1c, 0x5a, 0x6e, 0xdc, 0xb8, + 0xb1, 0x47, 0x84, 0x38, 0xf0, 0xe7, 0xec, 0xb1, 0x47, 0x4e, 0x06, 0xb5, 0x57, 0x4e, 0x39, 0x72, + 0x42, 0xf3, 0xc3, 0x3f, 0x9a, 0xed, 0x52, 0x2d, 0x97, 0x68, 0xde, 0x7b, 0xdf, 0xfb, 0x3e, 0xcf, + 0x9b, 0x37, 0x6f, 0x02, 0x3e, 0xc4, 0x63, 0xcf, 0x0a, 0xf1, 0x34, 0x60, 0x5e, 0x88, 0x51, 0xcc, + 0xa8, 0x45, 0x28, 0x4b, 0xa1, 0x47, 0x62, 0x6b, 0x36, 0x2c, 0xd7, 0x66, 0x92, 0x12, 0x46, 0xb4, + 0x1e, 0x1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 0xed, 0x5b, 0x11, 0xf1, 0xb3, 0x10, 0x51, 0xf9, 0xe7, 0x6b, 0xaf, 0xf8, 0xf7, 0xf5, 0xf8, + 0xf1, 0x5e, 0x79, 0xff, 0xc4, 0x3e, 0xc7, 0x77, 0xc4, 0x20, 0xd9, 0xff, 0x37, 0x00, 0x00, 0xff, + 0xff, 0x8e, 0xeb, 0x49, 0xfe, 0xaa, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/proto/ibc/lightclients/ostracon/v1/ostracon.proto b/proto/ibc/lightclients/ostracon/v1/ostracon.proto index aef8a6611f2..4b2d28b7bfb 100644 --- a/proto/ibc/lightclients/ostracon/v1/ostracon.proto +++ b/proto/ibc/lightclients/ostracon/v1/ostracon.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ibc.lightclients.ostracon.v1; +package ibc.lightclients.tendermint.v1; option go_package = "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types"; From b699f0d59c0e0c7fd1ad60dd23d1986dfa984a75 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 9 Mar 2023 12:22:22 +0900 Subject: [PATCH 2/4] Tidy up code --- README.md | 2 +- SECURITY.md | 2 +- docs/ibc/proto-docs.md | 260 +++++------ modules/core/02-client/abci.go | 2 +- modules/core/02-client/abci_test.go | 2 +- modules/core/02-client/client/utils/utils.go | 2 +- modules/core/02-client/keeper/client_test.go | 2 +- .../core/02-client/keeper/grpc_query_test.go | 2 +- modules/core/02-client/keeper/keeper.go | 2 +- modules/core/02-client/keeper/keeper_test.go | 6 +- .../core/02-client/keeper/proposal_test.go | 2 +- modules/core/02-client/legacy/v100/genesis.go | 4 +- .../02-client/legacy/v100/genesis_test.go | 2 +- modules/core/02-client/legacy/v100/store.go | 6 +- .../core/02-client/legacy/v100/store_test.go | 2 +- .../core/02-client/proposal_handler_test.go | 2 +- .../core/02-client/simulation/decoder_test.go | 2 +- modules/core/02-client/types/codec_test.go | 2 +- modules/core/02-client/types/encoding_test.go | 2 +- modules/core/02-client/types/genesis_test.go | 30 +- modules/core/02-client/types/msgs_test.go | 2 +- modules/core/02-client/types/params.go | 4 +- modules/core/02-client/types/params_test.go | 2 +- modules/core/02-client/types/proposal_test.go | 2 +- .../03-connection/keeper/handshake_test.go | 2 +- .../core/03-connection/keeper/verify_test.go | 2 +- modules/core/03-connection/types/msgs_test.go | 2 +- modules/core/04-channel/keeper/packet_test.go | 2 +- modules/core/ante/ante_test.go | 2 +- modules/core/exported/client.go | 4 +- modules/core/genesis_test.go | 12 +- modules/core/keeper/msg_server_test.go | 2 +- modules/core/simulation/decoder_test.go | 2 +- modules/core/types/codec.go | 2 +- .../06-solomachine/types/client_state_test.go | 2 +- .../types/misbehaviour_handle_test.go | 2 +- .../types/proposal_handle_test.go | 2 +- .../06-solomachine/types/update_test.go | 2 +- .../{99-ostracon => 07-tendermint}/doc.go | 0 .../{99-ostracon => 07-tendermint}/module.go | 2 +- .../types/client_state.go | 16 +- .../types/client_state_test.go | 26 +- .../types/codec.go | 2 +- .../types/consensus_state.go | 6 +- .../types/consensus_state_test.go | 6 +- .../types/errors.go | 4 +- .../types/fraction.go | 2 +- .../types/genesis.go | 0 .../types/genesis_test.go | 4 +- .../types/header.go | 16 +- .../types/header_test.go | 16 +- .../types/misbehaviour.go | 8 +- .../types/misbehaviour_handle.go | 4 +- .../types/misbehaviour_handle_test.go | 6 +- .../types/misbehaviour_test.go | 8 +- .../types/proposal_handle.go | 0 .../types/proposal_handle_test.go | 8 +- .../types/store.go | 16 +- .../types/store_test.go | 12 +- .../types/tendermint.pb.go} | 418 +++++++++--------- .../types/tendermint_test.go} | 14 +- .../types/update.go | 16 +- .../types/update_test.go | 50 +-- .../types/upgrade.go | 14 +- .../types/upgrade_test.go | 4 +- .../09-localhost/types/client_state_test.go | 2 +- .../v1/tendermint.proto} | 2 +- testing/chain.go | 6 +- testing/config.go | 4 +- testing/endpoint.go | 6 +- testing/values.go | 4 +- 71 files changed, 544 insertions(+), 544 deletions(-) rename modules/light-clients/{99-ostracon => 07-tendermint}/doc.go (100%) rename modules/light-clients/{99-ostracon => 07-tendermint}/module.go (62%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/client_state.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/client_state_test.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/codec.go (89%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/consensus_state.go (92%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/consensus_state_test.go (90%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/errors.go (94%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/fraction.go (88%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/genesis.go (100%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/genesis_test.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/header.go (81%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/header_test.go (76%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/misbehaviour.go (95%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/misbehaviour_handle.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/misbehaviour_handle_test.go (99%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/misbehaviour_test.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/proposal_handle.go (100%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/proposal_handle_test.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/store.go (97%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/store_test.go (96%) rename modules/light-clients/{99-ostracon/types/ostracon.pb.go => 07-tendermint/types/tendermint.pb.go} (76%) rename modules/light-clients/{99-ostracon/types/ostracon_test.go => 07-tendermint/types/tendermint_test.go} (87%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/update.go (94%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/update_test.go (95%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/upgrade.go (92%) rename modules/light-clients/{99-ostracon => 07-tendermint}/types/upgrade_test.go (99%) rename proto/ibc/lightclients/{ostracon/v1/ostracon.proto => tendermint/v1/tendermint.proto} (99%) diff --git a/README.md b/README.md index f4d18ec52fe..abd0b2ac6f8 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ The Inter-Blockchain Communication protocol (IBC) allows blockchains to talk to 3.1 [ICS 06 Solo Machine](https://github.com/line/ibc-go/tree/main/modules/light-clients/06-solomachine) - 3.2 [ICS 99 Ostracon](https://github.com/line/ibc-go/tree/main/modules/light-clients/99-ostracon) + 3.2 [ICS 07 Tendermint](https://github.com/line/ibc-go/tree/main/modules/light-clients/07-tendermint) Note: The localhost client is currently non-functional. diff --git a/SECURITY.md b/SECURITY.md index f7066161b05..d3eeeb7c83d 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -29,4 +29,4 @@ in for the IBC Golang repository. Please refer to the corresponding repositories ### Light Clients -- [`99-ostracon`](https://github.com/line/ibc-go/tree/main/modules/light-clients/99-ostracon) +- [`07-tendermint`](https://github.com/line/ibc-go/tree/main/modules/light-clients/07-tendermint) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 2001146cbd5..76e79ad3ce2 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -224,13 +224,6 @@ - [ibc/lightclients/localhost/v1/localhost.proto](#ibc/lightclients/localhost/v1/localhost.proto) - [ClientState](#ibc.lightclients.localhost.v1.ClientState) -- [ibc/lightclients/ostracon/v1/ostracon.proto](#ibc/lightclients/ostracon/v1/ostracon.proto) - - [ClientState](#ibc.lightclients.tendermint.v1.ClientState) - - [ConsensusState](#ibc.lightclients.tendermint.v1.ConsensusState) - - [Fraction](#ibc.lightclients.tendermint.v1.Fraction) - - [Header](#ibc.lightclients.tendermint.v1.Header) - - [Misbehaviour](#ibc.lightclients.tendermint.v1.Misbehaviour) - - [ibc/lightclients/solomachine/v1/solomachine.proto](#ibc/lightclients/solomachine/v1/solomachine.proto) - [ChannelStateData](#ibc.lightclients.solomachine.v1.ChannelStateData) - [ClientState](#ibc.lightclients.solomachine.v1.ClientState) @@ -271,6 +264,13 @@ - [DataType](#ibc.lightclients.solomachine.v2.DataType) +- [ibc/lightclients/tendermint/v1/tendermint.proto](#ibc/lightclients/tendermint/v1/tendermint.proto) + - [ClientState](#ibc.lightclients.tendermint.v1.ClientState) + - [ConsensusState](#ibc.lightclients.tendermint.v1.ConsensusState) + - [Fraction](#ibc.lightclients.tendermint.v1.Fraction) + - [Header](#ibc.lightclients.tendermint.v1.Header) + - [Misbehaviour](#ibc.lightclients.tendermint.v1.Misbehaviour) + - [Scalar Value Types](#scalar-value-types) @@ -3352,129 +3352,6 @@ access to keys outside the client prefix. - - - - - - - - - - - -

Top

- -## ibc/lightclients/ostracon/v1/ostracon.proto - - - - - -### ClientState -ClientState from Ostracon tracks the current validator set, latest height, -and a possible frozen height. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [string](#string) | | | -| `trust_level` | [Fraction](#ibc.lightclients.tendermint.v1.Fraction) | | | -| `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | -| `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | -| `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | -| `frozen_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Block height when the client was frozen due to a misbehaviour | -| `latest_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Latest height the client was updated to | -| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | Proof specifications used in verifying counterparty state | -| `upgrade_path` | [string](#string) | repeated | Path at which next upgraded client will be committed. Each element corresponds to the key for a single CommitmentProof in the chained proof. NOTE: ClientState must stored under `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using the default upgrade module, upgrade_path should be []string{"upgrade", "upgradedIBCState"}` | -| `allow_update_after_expiry` | [bool](#bool) | | **Deprecated.** allow_update_after_expiry is deprecated | -| `allow_update_after_misbehaviour` | [bool](#bool) | | **Deprecated.** allow_update_after_misbehaviour is deprecated | - - - - - - - - -### ConsensusState -ConsensusState defines the consensus state from Ostracon. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp that corresponds to the block height in which the ConsensusState was stored. | -| `root` | [ibc.core.commitment.v1.MerkleRoot](#ibc.core.commitment.v1.MerkleRoot) | | commitment root (i.e app hash) | -| `next_validators_hash` | [bytes](#bytes) | | | - - - - - - - - -### Fraction -Fraction defines the protobuf message type for tmmath.Fraction that only -supports positive values. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `numerator` | [uint64](#uint64) | | | -| `denominator` | [uint64](#uint64) | | | - - - - - - - - -### Header -Header defines the Ostracon client consensus Header. -It encapsulates all the information necessary to update from a trusted -Ostracon ConsensusState. The inclusion of TrustedHeight and -TrustedValidators allows this update to process correctly, so long as the -ConsensusState for the TrustedHeight exists, this removes race conditions -among relayers The SignedHeader and ValidatorSet are the new untrusted update -fields for the client. The TrustedHeight is the height of a stored -ConsensusState on the client that will be used to verify the new untrusted -header. The Trusted ConsensusState must be within the unbonding period of -current time in order to correctly verify, and the TrustedValidators must -hash to TrustedConsensusState.NextValidatorsHash since that is the last -trusted validator set at the TrustedHeight. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signed_header` | [tendermint.types.SignedHeader](#tendermint.types.SignedHeader) | | | -| `validator_set` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | -| `trusted_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `trusted_validators` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | - - - - - - - - -### Misbehaviour -Misbehaviour is a wrapper over two conflicting Headers -that implements Misbehaviour interface expected by ICS-02 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | **Deprecated.** ClientID is deprecated | -| `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | -| `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | - - - - - @@ -4121,6 +3998,129 @@ to preserve uniqueness of different data sign byte encodings. + +

Top

+ +## ibc/lightclients/tendermint/v1/tendermint.proto + + + + + +### ClientState +ClientState from Ostracon tracks the current validator set, latest height, +and a possible frozen height. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [string](#string) | | | +| `trust_level` | [Fraction](#ibc.lightclients.tendermint.v1.Fraction) | | | +| `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | +| `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | +| `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | +| `frozen_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Block height when the client was frozen due to a misbehaviour | +| `latest_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Latest height the client was updated to | +| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | Proof specifications used in verifying counterparty state | +| `upgrade_path` | [string](#string) | repeated | Path at which next upgraded client will be committed. Each element corresponds to the key for a single CommitmentProof in the chained proof. NOTE: ClientState must stored under `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using the default upgrade module, upgrade_path should be []string{"upgrade", "upgradedIBCState"}` | +| `allow_update_after_expiry` | [bool](#bool) | | **Deprecated.** allow_update_after_expiry is deprecated | +| `allow_update_after_misbehaviour` | [bool](#bool) | | **Deprecated.** allow_update_after_misbehaviour is deprecated | + + + + + + + + +### ConsensusState +ConsensusState defines the consensus state from Ostracon. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp that corresponds to the block height in which the ConsensusState was stored. | +| `root` | [ibc.core.commitment.v1.MerkleRoot](#ibc.core.commitment.v1.MerkleRoot) | | commitment root (i.e app hash) | +| `next_validators_hash` | [bytes](#bytes) | | | + + + + + + + + +### Fraction +Fraction defines the protobuf message type for tmmath.Fraction that only +supports positive values. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `numerator` | [uint64](#uint64) | | | +| `denominator` | [uint64](#uint64) | | | + + + + + + + + +### Header +Header defines the Ostracon client consensus Header. +It encapsulates all the information necessary to update from a trusted +Ostracon ConsensusState. The inclusion of TrustedHeight and +TrustedValidators allows this update to process correctly, so long as the +ConsensusState for the TrustedHeight exists, this removes race conditions +among relayers The SignedHeader and ValidatorSet are the new untrusted update +fields for the client. The TrustedHeight is the height of a stored +ConsensusState on the client that will be used to verify the new untrusted +header. The Trusted ConsensusState must be within the unbonding period of +current time in order to correctly verify, and the TrustedValidators must +hash to TrustedConsensusState.NextValidatorsHash since that is the last +trusted validator set at the TrustedHeight. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signed_header` | [tendermint.types.SignedHeader](#tendermint.types.SignedHeader) | | | +| `validator_set` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | +| `trusted_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `trusted_validators` | [tendermint.types.ValidatorSet](#tendermint.types.ValidatorSet) | | | + + + + + + + + +### Misbehaviour +Misbehaviour is a wrapper over two conflicting Headers +that implements Misbehaviour interface expected by ICS-02 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | **Deprecated.** ClientID is deprecated | +| `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | +| `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | + + + + + + + + + + + + + + + ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | diff --git a/modules/core/02-client/abci.go b/modules/core/02-client/abci.go index f783ef1139d..5c53836b8e2 100644 --- a/modules/core/02-client/abci.go +++ b/modules/core/02-client/abci.go @@ -5,7 +5,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/keeper" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // BeginBlocker updates an existing localhost client with the latest block height. diff --git a/modules/core/02-client/abci_test.go b/modules/core/02-client/abci_test.go index 0a9d9240d63..4116721b7a8 100644 --- a/modules/core/02-client/abci_test.go +++ b/modules/core/02-client/abci_test.go @@ -12,8 +12,8 @@ import ( client "github.com/line/ibc-go/v3/modules/core/02-client" "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/exported" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/client/utils/utils.go b/modules/core/02-client/client/utils/utils.go index db235b8002f..b9b740a261a 100644 --- a/modules/core/02-client/client/utils/utils.go +++ b/modules/core/02-client/client/utils/utils.go @@ -13,7 +13,7 @@ import ( host "github.com/line/ibc-go/v3/modules/core/24-host" ibcclient "github.com/line/ibc-go/v3/modules/core/client" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // QueryClientState returns a client state. If prove is true, it performs an ABCI store query diff --git a/modules/core/02-client/keeper/client_test.go b/modules/core/02-client/keeper/client_test.go index 9c99f540b4f..e82f9e5a408 100644 --- a/modules/core/02-client/keeper/client_test.go +++ b/modules/core/02-client/keeper/client_test.go @@ -12,8 +12,8 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" ) diff --git a/modules/core/02-client/keeper/grpc_query_test.go b/modules/core/02-client/keeper/grpc_query_test.go index 6d1c558273c..4a870f73cd5 100644 --- a/modules/core/02-client/keeper/grpc_query_test.go +++ b/modules/core/02-client/keeper/grpc_query_test.go @@ -11,7 +11,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index 987a319b2c4..35e5b67cb21 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -18,7 +18,7 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // Keeper represents a type that grants read and write permissions to any client diff --git a/modules/core/02-client/keeper/keeper_test.go b/modules/core/02-client/keeper/keeper_test.go index 1ce72174237..580f2863423 100644 --- a/modules/core/02-client/keeper/keeper_test.go +++ b/modules/core/02-client/keeper/keeper_test.go @@ -20,8 +20,8 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" "github.com/line/ibc-go/v3/testing/simapp" @@ -264,7 +264,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisClients() { func (suite KeeperTestSuite) TestGetAllGenesisMetadata() { expectedGenMetadata := []types.IdentifiedGenesisMetadata{ types.NewIdentifiedGenesisMetadata( - "99-ostracon-1", + "07-tendermint-1", []types.GenesisMetadata{ types.NewGenesisMetadata(ibcoctypes.ProcessedTimeKey(types.NewHeight(0, 1)), []byte("foo")), types.NewGenesisMetadata(ibcoctypes.ProcessedTimeKey(types.NewHeight(0, 2)), []byte("bar")), @@ -281,7 +281,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisMetadata() { } genClients := []types.IdentifiedClientState{ - types.NewIdentifiedClientState("99-ostracon-1", &ibcoctypes.ClientState{}), types.NewIdentifiedClientState("clientB", &ibcoctypes.ClientState{}), + types.NewIdentifiedClientState("07-tendermint-1", &ibcoctypes.ClientState{}), types.NewIdentifiedClientState("clientB", &ibcoctypes.ClientState{}), types.NewIdentifiedClientState("clientC", &ibcoctypes.ClientState{}), types.NewIdentifiedClientState("clientD", &localhosttypes.ClientState{}), } diff --git a/modules/core/02-client/keeper/proposal_test.go b/modules/core/02-client/keeper/proposal_test.go index 5f9f8eb271b..cec816423f4 100644 --- a/modules/core/02-client/keeper/proposal_test.go +++ b/modules/core/02-client/keeper/proposal_test.go @@ -6,7 +6,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/legacy/v100/genesis.go b/modules/core/02-client/legacy/v100/genesis.go index 06a9a776f6a..0ba27a9eda7 100644 --- a/modules/core/02-client/legacy/v100/genesis.go +++ b/modules/core/02-client/legacy/v100/genesis.go @@ -10,7 +10,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // MigrateGenesis accepts exported v1.0.0 IBC client genesis file and migrates it to: @@ -65,7 +65,7 @@ func MigrateGenesis(cdc codec.BinaryCodec, clientGenState *types.GenesisState, g // remove all consensus states for the solo machine // do not add to new clientsConsensus - case exported.Ostracon: + case exported.Tendermint: // only add non expired consensus states to new clientsConsensus tmClientState, ok := client.ClientState.GetCachedValue().(*ibcoctypes.ClientState) if !ok { diff --git a/modules/core/02-client/legacy/v100/genesis_test.go b/modules/core/02-client/legacy/v100/genesis_test.go index 4e84658db9a..09ab0bb81a9 100644 --- a/modules/core/02-client/legacy/v100/genesis_test.go +++ b/modules/core/02-client/legacy/v100/genesis_test.go @@ -14,7 +14,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" "github.com/line/ibc-go/v3/testing/simapp" ) diff --git a/modules/core/02-client/legacy/v100/store.go b/modules/core/02-client/legacy/v100/store.go index 8954e355ab1..875895049bc 100644 --- a/modules/core/02-client/legacy/v100/store.go +++ b/modules/core/02-client/legacy/v100/store.go @@ -14,7 +14,7 @@ import ( host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" smtypes "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // MigrateStore performs in-place store migrations from SDK v0.40 of the IBC module to v1.0.0 of ibc-go. @@ -81,7 +81,7 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) pruneSolomachineConsensusStates(clientStore) - case exported.Ostracon: + case exported.Tendermint: var clientState exported.ClientState if err := cdc.UnmarshalInterface(bz, &clientState); err != nil { return sdkerrors.Wrap(err, "failed to unmarshal client state bytes into ostracon client state") @@ -89,7 +89,7 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) tmClientState, ok := clientState.(*ibcoctypes.ClientState) if !ok { - return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "client state is not ostracon even though client id contains 99-ostracon") + return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "client state is not ostracon even though client id contains 07-tendermint") } // add iteration keys so pruning will be successful diff --git a/modules/core/02-client/legacy/v100/store_test.go b/modules/core/02-client/legacy/v100/store_test.go index 5213ff5f6c9..2998299059a 100644 --- a/modules/core/02-client/legacy/v100/store_test.go +++ b/modules/core/02-client/legacy/v100/store_test.go @@ -10,7 +10,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/proposal_handler_test.go b/modules/core/02-client/proposal_handler_test.go index ee119707e7a..8004866cf70 100644 --- a/modules/core/02-client/proposal_handler_test.go +++ b/modules/core/02-client/proposal_handler_test.go @@ -7,7 +7,7 @@ import ( client "github.com/line/ibc-go/v3/modules/core/02-client" clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/simulation/decoder_test.go b/modules/core/02-client/simulation/decoder_test.go index 817048aadd0..76f38182ad2 100644 --- a/modules/core/02-client/simulation/decoder_test.go +++ b/modules/core/02-client/simulation/decoder_test.go @@ -11,7 +11,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/simulation" "github.com/line/ibc-go/v3/modules/core/02-client/types" host "github.com/line/ibc-go/v3/modules/core/24-host" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" "github.com/line/ibc-go/v3/testing/simapp" ) diff --git a/modules/core/02-client/types/codec_test.go b/modules/core/02-client/types/codec_test.go index cefef152000..a612e161730 100644 --- a/modules/core/02-client/types/codec_test.go +++ b/modules/core/02-client/types/codec_test.go @@ -6,8 +6,8 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/types/encoding_test.go b/modules/core/02-client/types/encoding_test.go index d0c174c17a1..f683141d9f9 100644 --- a/modules/core/02-client/types/encoding_test.go +++ b/modules/core/02-client/types/encoding_test.go @@ -2,7 +2,7 @@ package types_test import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) func (suite *TypesTestSuite) TestMarshalHeader() { diff --git a/modules/core/02-client/types/genesis_test.go b/modules/core/02-client/types/genesis_test.go index 19bcf4b7857..4e420325247 100644 --- a/modules/core/02-client/types/genesis_test.go +++ b/modules/core/02-client/types/genesis_test.go @@ -9,16 +9,16 @@ import ( "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" ) const ( chainID = "chainID" - tmClientID0 = "99-ostracon-0" - tmClientID1 = "99-ostracon-1" + tmClientID0 = "07-tendermint-0" + tmClientID1 = "07-tendermint-1" invalidClientID = "myclient-0" clientID = tmClientID0 @@ -101,7 +101,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - types.NewParams(exported.Ostracon, exported.Localhost), + types.NewParams(exported.Tendermint, exported.Localhost), false, 2, ), @@ -132,7 +132,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), false, 0, ), @@ -149,7 +149,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, nil, nil, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), false, 0, ), @@ -180,7 +180,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), false, 0, ), @@ -211,7 +211,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), false, 0, ), @@ -242,7 +242,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), false, 0, ), @@ -312,7 +312,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - types.NewParams(exported.Ostracon, exported.Localhost), + types.NewParams(exported.Tendermint, exported.Localhost), false, 0, ), @@ -348,7 +348,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), false, 0, ), @@ -440,7 +440,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon), + types.NewParams(exported.Tendermint), true, 2, ), @@ -471,7 +471,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon, exported.Localhost), + types.NewParams(exported.Tendermint, exported.Localhost), false, 0, ), @@ -502,7 +502,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon, exported.Localhost), + types.NewParams(exported.Tendermint, exported.Localhost), false, 5, ), @@ -530,7 +530,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Ostracon, exported.Localhost), + types.NewParams(exported.Tendermint, exported.Localhost), false, 5, ), diff --git a/modules/core/02-client/types/msgs_test.go b/modules/core/02-client/types/msgs_test.go index 89843a9756d..e39df3c1b30 100644 --- a/modules/core/02-client/types/msgs_test.go +++ b/modules/core/02-client/types/msgs_test.go @@ -11,7 +11,7 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" solomachinetypes "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/02-client/types/params.go b/modules/core/02-client/types/params.go index 8d33cd9c5c1..38a100eb283 100644 --- a/modules/core/02-client/types/params.go +++ b/modules/core/02-client/types/params.go @@ -10,8 +10,8 @@ import ( ) var ( - // DefaultAllowedClients are "06-solomachine" and "99-ostracon" - DefaultAllowedClients = []string{exported.Solomachine, exported.Ostracon} + // DefaultAllowedClients are "06-solomachine" and "07-tendermint" + DefaultAllowedClients = []string{exported.Solomachine, exported.Tendermint} // KeyAllowedClients is store's key for AllowedClients Params KeyAllowedClients = []byte("AllowedClients") diff --git a/modules/core/02-client/types/params_test.go b/modules/core/02-client/types/params_test.go index 9e63c225b1c..2fbe757f22a 100644 --- a/modules/core/02-client/types/params_test.go +++ b/modules/core/02-client/types/params_test.go @@ -15,7 +15,7 @@ func TestValidateParams(t *testing.T) { expPass bool }{ {"default params", DefaultParams(), true}, - {"custom params", NewParams(exported.Ostracon), true}, + {"custom params", NewParams(exported.Tendermint), true}, {"blank client", NewParams(" "), false}, } diff --git a/modules/core/02-client/types/proposal_test.go b/modules/core/02-client/types/proposal_test.go index ccfaf998f56..abc0b47ffff 100644 --- a/modules/core/02-client/types/proposal_test.go +++ b/modules/core/02-client/types/proposal_test.go @@ -9,7 +9,7 @@ import ( upgradetypes "github.com/line/lbm-sdk/x/upgrade/types" "github.com/line/ibc-go/v3/modules/core/02-client/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/03-connection/keeper/handshake_test.go b/modules/core/03-connection/keeper/handshake_test.go index 70a1cd2e5d0..a3bb8bab78c 100644 --- a/modules/core/03-connection/keeper/handshake_test.go +++ b/modules/core/03-connection/keeper/handshake_test.go @@ -7,7 +7,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/03-connection/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/core/03-connection/keeper/verify_test.go b/modules/core/03-connection/keeper/verify_test.go index af708f7fe95..e6a6e489929 100644 --- a/modules/core/03-connection/keeper/verify_test.go +++ b/modules/core/03-connection/keeper/verify_test.go @@ -9,7 +9,7 @@ import ( channeltypes "github.com/line/ibc-go/v3/modules/core/04-channel/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibcmock "github.com/line/ibc-go/v3/testing/mock" ) diff --git a/modules/core/03-connection/types/msgs_test.go b/modules/core/03-connection/types/msgs_test.go index e334290d9dc..25f522f9e74 100644 --- a/modules/core/03-connection/types/msgs_test.go +++ b/modules/core/03-connection/types/msgs_test.go @@ -17,7 +17,7 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/03-connection/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" "github.com/line/ibc-go/v3/testing/simapp" ) diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index 979593b3c4d..49720e95d90 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -12,7 +12,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/04-channel/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibcmock "github.com/line/ibc-go/v3/testing/mock" ) diff --git a/modules/core/ante/ante_test.go b/modules/core/ante/ante_test.go index 38973ce5216..d26f60ab7da 100644 --- a/modules/core/ante/ante_test.go +++ b/modules/core/ante/ante_test.go @@ -156,7 +156,7 @@ func (suite *AnteTestSuite) createUpdateClientMessage() sdk.Msg { var header exported.Header switch endpoint.ClientConfig.GetClientType() { - case exported.Ostracon: + case exported.Tendermint: header, _ = endpoint.Chain.ConstructUpdateOCClientHeader(endpoint.Counterparty.Chain, endpoint.ClientID) default: diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index 4025a554e45..f6d100d147a 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -16,8 +16,8 @@ const ( // Solomachine is used to indicate that the light client is a solo machine. Solomachine string = "06-solomachine" - // Ostracon is used to indicate that the client uses the Ostracon Consensus Algorithm. - Ostracon string = "99-ostracon" + // Tendermint is used to indicate that the client uses the Tendermint or Ostracon Consensus Algorithm. + Tendermint string = "07-tendermint" // Localhost is the client type for a localhost client. It is also used as the clientID // for the localhost client. diff --git a/modules/core/genesis_test.go b/modules/core/genesis_test.go index 7fb2ba2e1e3..41f06f575ed 100644 --- a/modules/core/genesis_test.go +++ b/modules/core/genesis_test.go @@ -16,17 +16,17 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/core/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ibctesting "github.com/line/ibc-go/v3/testing" "github.com/line/ibc-go/v3/testing/simapp" ) const ( connectionID = "connection-0" - clientID = "99-ostracon-0" + clientID = "07-tendermint-0" connectionID2 = "connection-1" - clientID2 = "99-ostracon-1" + clientID2 = "07-tendermint-1" localhostID = exported.Localhost + "-1" port1 = "firstport" @@ -106,7 +106,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, ), }, - clienttypes.NewParams(exported.Ostracon, exported.Localhost), + clienttypes.NewParams(exported.Tendermint, exported.Localhost), true, 2, ), @@ -174,7 +174,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, ), }, - clienttypes.NewParams(exported.Ostracon), + clienttypes.NewParams(exported.Tendermint), false, 2, ), @@ -270,7 +270,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { }, ), }, - clienttypes.NewParams(exported.Ostracon, exported.Localhost), + clienttypes.NewParams(exported.Tendermint, exported.Localhost), true, 0, ), diff --git a/modules/core/keeper/msg_server_test.go b/modules/core/keeper/msg_server_test.go index c918b0d49e8..bf9d532d797 100644 --- a/modules/core/keeper/msg_server_test.go +++ b/modules/core/keeper/msg_server_test.go @@ -10,7 +10,7 @@ import ( host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/core/keeper" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibcmock "github.com/line/ibc-go/v3/testing/mock" ) diff --git a/modules/core/simulation/decoder_test.go b/modules/core/simulation/decoder_test.go index 7ce80ed0029..1cc84efec29 100644 --- a/modules/core/simulation/decoder_test.go +++ b/modules/core/simulation/decoder_test.go @@ -12,7 +12,7 @@ import ( channeltypes "github.com/line/ibc-go/v3/modules/core/04-channel/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/simulation" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" "github.com/line/ibc-go/v3/testing/simapp" ) diff --git a/modules/core/types/codec.go b/modules/core/types/codec.go index da174a60930..f4fd673218d 100644 --- a/modules/core/types/codec.go +++ b/modules/core/types/codec.go @@ -8,8 +8,8 @@ import ( channeltypes "github.com/line/ibc-go/v3/modules/core/04-channel/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" solomachinetypes "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" localhosttypes "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ) // RegisterInterfaces registers x/ibc interfaces into protobuf Any. diff --git a/modules/light-clients/06-solomachine/types/client_state_test.go b/modules/light-clients/06-solomachine/types/client_state_test.go index 88b279f1074..dbf5d05c931 100644 --- a/modules/light-clients/06-solomachine/types/client_state_test.go +++ b/modules/light-clients/06-solomachine/types/client_state_test.go @@ -7,7 +7,7 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/light-clients/06-solomachine/types/misbehaviour_handle_test.go b/modules/light-clients/06-solomachine/types/misbehaviour_handle_test.go index 4db9407484b..5235ca35029 100644 --- a/modules/light-clients/06-solomachine/types/misbehaviour_handle_test.go +++ b/modules/light-clients/06-solomachine/types/misbehaviour_handle_test.go @@ -3,7 +3,7 @@ package types_test import ( "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/light-clients/06-solomachine/types/proposal_handle_test.go b/modules/light-clients/06-solomachine/types/proposal_handle_test.go index 30a7775f278..5132ab75d14 100644 --- a/modules/light-clients/06-solomachine/types/proposal_handle_test.go +++ b/modules/light-clients/06-solomachine/types/proposal_handle_test.go @@ -3,7 +3,7 @@ package types_test import ( "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/light-clients/06-solomachine/types/update_test.go b/modules/light-clients/06-solomachine/types/update_test.go index 7703f6bf861..484681d184d 100644 --- a/modules/light-clients/06-solomachine/types/update_test.go +++ b/modules/light-clients/06-solomachine/types/update_test.go @@ -6,7 +6,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) diff --git a/modules/light-clients/99-ostracon/doc.go b/modules/light-clients/07-tendermint/doc.go similarity index 100% rename from modules/light-clients/99-ostracon/doc.go rename to modules/light-clients/07-tendermint/doc.go diff --git a/modules/light-clients/99-ostracon/module.go b/modules/light-clients/07-tendermint/module.go similarity index 62% rename from modules/light-clients/99-ostracon/module.go rename to modules/light-clients/07-tendermint/module.go index d6b32da189b..cdfd37ca03b 100644 --- a/modules/light-clients/99-ostracon/module.go +++ b/modules/light-clients/07-tendermint/module.go @@ -1,7 +1,7 @@ package ostracon import ( - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // Name returns the IBC client name diff --git a/modules/light-clients/99-ostracon/types/client_state.go b/modules/light-clients/07-tendermint/types/client_state.go similarity index 97% rename from modules/light-clients/99-ostracon/types/client_state.go rename to modules/light-clients/07-tendermint/types/client_state.go index 9f325fa3e66..afaf94429d1 100644 --- a/modules/light-clients/99-ostracon/types/client_state.go +++ b/modules/light-clients/07-tendermint/types/client_state.go @@ -48,9 +48,9 @@ func (cs ClientState) GetChainID() string { return cs.ChainId } -// ClientType is ostracon. +// ClientType is tendermint. func (cs ClientState) ClientType() string { - return exported.Ostracon + return exported.Tendermint } // GetLatestHeight returns latest block height. @@ -58,7 +58,7 @@ func (cs ClientState) GetLatestHeight() exported.Height { return cs.LatestHeight } -// Status returns the status of the ostracon client. +// Status returns the status of the tendermint client. // The client may be: // - Active: FrozenHeight is zero and client is not expired // - Frozen: Frozen Height is not zero @@ -105,8 +105,8 @@ func (cs ClientState) Validate() error { // NOTE: the value of octypes.MaxChainIDLen may change in the future. // If this occurs, the code here must account for potential difference - // between the ostracon version being run by the counterparty chain - // and the ostracon version used by this light client. + // between the tendermint version being run by the counterparty chain + // and the tendermint version used by this light client. // https://github.com/cosmos/ibc-go/issues/177 if len(cs.ChainId) > octypes.MaxChainIDLen { return sdkerrors.Wrapf(ErrInvalidChainID, "chainID is too long; got: %d, max: %d", len(cs.ChainId), octypes.MaxChainIDLen) @@ -131,7 +131,7 @@ func (cs ClientState) Validate() error { "latest height revision number must match chain id revision number (%d != %d)", cs.LatestHeight.RevisionNumber, clienttypes.ParseChainID(cs.ChainId)) } if cs.LatestHeight.RevisionHeight == 0 { - return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "ostracon client's latest height revision height cannot be zero") + return sdkerrors.Wrapf(ErrInvalidHeaderHeight, "tendermint client's latest height revision height cannot be zero") } if cs.TrustingPeriod >= cs.UnbondingPeriod { return sdkerrors.Wrapf( @@ -178,7 +178,7 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { } } -// Initialize will check that initial consensus state is a Ostracon consensus state +// Initialize will check that initial consensus state is a Tendermint consensus state // and will store ProcessedTime for initial consensus state as ctx.BlockTime() func (cs ClientState) Initialize(ctx sdk.Context, _ codec.BinaryCodec, clientStore sdk.KVStore, consState exported.ConsensusState) error { if _, ok := consState.(*ConsensusState); !ok { @@ -230,7 +230,7 @@ func (cs ClientState) VerifyClientState( } // VerifyClientConsensusState verifies a proof of the consensus state of the -// Ostracon client stored on the target machine. +// Tendermint client stored on the target machine. func (cs ClientState) VerifyClientConsensusState( store sdk.KVStore, cdc codec.BinaryCodec, diff --git a/modules/light-clients/99-ostracon/types/client_state_test.go b/modules/light-clients/07-tendermint/types/client_state_test.go similarity index 97% rename from modules/light-clients/99-ostracon/types/client_state_test.go rename to modules/light-clients/07-tendermint/types/client_state_test.go index e4acb859c74..2454264736b 100644 --- a/modules/light-clients/99-ostracon/types/client_state_test.go +++ b/modules/light-clients/07-tendermint/types/client_state_test.go @@ -10,7 +10,7 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibcmock "github.com/line/ibc-go/v3/testing/mock" ) @@ -29,7 +29,7 @@ const ( var invalidProof = []byte("invalid proof") -func (suite *OstraconTestSuite) TestStatus() { +func (suite *TendermintTestSuite) TestStatus() { var ( path *ibctesting.Path clientState *types.ClientState @@ -69,7 +69,7 @@ func (suite *OstraconTestSuite) TestStatus() { } } -func (suite *OstraconTestSuite) TestValidate() { +func (suite *TendermintTestSuite) TestValidate() { testCases := []struct { name string clientState *types.ClientState @@ -91,7 +91,7 @@ func (suite *OstraconTestSuite) TestValidate() { expPass: false, }, { - // NOTE: if this test fails, the code must account for the change in chainID length across ostracon versions! + // NOTE: if this test fails, the code must account for the change in chainID length across tendermint versions! // Do not only fix the test, fix the code! // https://github.com/cosmos/ibc-go/issues/177 name: "valid chainID - chainID validation failed for chainID of length 50! ", @@ -99,7 +99,7 @@ func (suite *OstraconTestSuite) TestValidate() { expPass: true, }, { - // NOTE: if this test fails, the code must account for the change in chainID length across ostracon versions! + // NOTE: if this test fails, the code must account for the change in chainID length across tendermint versions! // Do not only fix the test, fix the code! // https://github.com/cosmos/ibc-go/issues/177 name: "invalid chainID - chainID validation did not fail for chainID of length 51! ", @@ -163,7 +163,7 @@ func (suite *OstraconTestSuite) TestValidate() { } } -func (suite *OstraconTestSuite) TestInitialize() { +func (suite *TendermintTestSuite) TestInitialize() { testCases := []struct { name string consensusState exported.ConsensusState @@ -198,7 +198,7 @@ func (suite *OstraconTestSuite) TestInitialize() { } } -func (suite *OstraconTestSuite) TestVerifyClientConsensusState() { +func (suite *TendermintTestSuite) TestVerifyClientConsensusState() { testCases := []struct { name string clientState *types.ClientState @@ -265,7 +265,7 @@ func (suite *OstraconTestSuite) TestVerifyClientConsensusState() { // test verification of the connection on chainB being represented in the // light client on chainA -func (suite *OstraconTestSuite) TestVerifyConnectionState() { +func (suite *TendermintTestSuite) TestVerifyConnectionState() { var ( clientState *types.ClientState proof []byte @@ -339,7 +339,7 @@ func (suite *OstraconTestSuite) TestVerifyConnectionState() { // test verification of the channel on chainB being represented in the light // client on chainA -func (suite *OstraconTestSuite) TestVerifyChannelState() { +func (suite *TendermintTestSuite) TestVerifyChannelState() { var ( clientState *types.ClientState proof []byte @@ -414,7 +414,7 @@ func (suite *OstraconTestSuite) TestVerifyChannelState() { // test verification of the packet commitment on chainB being represented // in the light client on chainA. A send from chainB to chainA is simulated. -func (suite *OstraconTestSuite) TestVerifyPacketCommitment() { +func (suite *TendermintTestSuite) TestVerifyPacketCommitment() { var ( clientState *types.ClientState proof []byte @@ -528,7 +528,7 @@ func (suite *OstraconTestSuite) TestVerifyPacketCommitment() { // test verification of the acknowledgement on chainB being represented // in the light client on chainA. A send and ack from chainA to chainB // is simulated. -func (suite *OstraconTestSuite) TestVerifyPacketAcknowledgement() { +func (suite *TendermintTestSuite) TestVerifyPacketAcknowledgement() { var ( clientState *types.ClientState proof []byte @@ -647,7 +647,7 @@ func (suite *OstraconTestSuite) TestVerifyPacketAcknowledgement() { // test verification of the absent acknowledgement on chainB being represented // in the light client on chainA. A send from chainB to chainA is simulated, but // no receive. -func (suite *OstraconTestSuite) TestVerifyPacketReceiptAbsence() { +func (suite *TendermintTestSuite) TestVerifyPacketReceiptAbsence() { var ( clientState *types.ClientState proof []byte @@ -762,7 +762,7 @@ func (suite *OstraconTestSuite) TestVerifyPacketReceiptAbsence() { // test verification of the next receive sequence on chainB being represented // in the light client on chainA. A send and receive from chainB to chainA is // simulated. -func (suite *OstraconTestSuite) TestVerifyNextSeqRecv() { +func (suite *TendermintTestSuite) TestVerifyNextSeqRecv() { var ( clientState *types.ClientState proof []byte diff --git a/modules/light-clients/99-ostracon/types/codec.go b/modules/light-clients/07-tendermint/types/codec.go similarity index 89% rename from modules/light-clients/99-ostracon/types/codec.go rename to modules/light-clients/07-tendermint/types/codec.go index 23ff1c8f6cd..c197d14a7cf 100644 --- a/modules/light-clients/99-ostracon/types/codec.go +++ b/modules/light-clients/07-tendermint/types/codec.go @@ -6,7 +6,7 @@ import ( "github.com/line/ibc-go/v3/modules/core/exported" ) -// RegisterInterfaces registers the ostracon concrete client-related +// RegisterInterfaces registers the tendermint concrete client-related // implementations and interfaces. func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( diff --git a/modules/light-clients/99-ostracon/types/consensus_state.go b/modules/light-clients/07-tendermint/types/consensus_state.go similarity index 92% rename from modules/light-clients/99-ostracon/types/consensus_state.go rename to modules/light-clients/07-tendermint/types/consensus_state.go index c91d3a57569..75e448c680d 100644 --- a/modules/light-clients/99-ostracon/types/consensus_state.go +++ b/modules/light-clients/07-tendermint/types/consensus_state.go @@ -26,9 +26,9 @@ func NewConsensusState( } } -// ClientType returns Ostracon +// ClientType returns Tendermint func (ConsensusState) ClientType() string { - return exported.Ostracon + return exported.Tendermint } // GetRoot returns the commitment Root for the specific @@ -41,7 +41,7 @@ func (cs ConsensusState) GetTimestamp() uint64 { return uint64(cs.Timestamp.UnixNano()) } -// ValidateBasic defines a basic validation for the ostracon consensus state. +// ValidateBasic defines a basic validation for the tendermint consensus state. // NOTE: ProcessedTimestamp may be zero if this is an initial consensus state passed in by relayer // as opposed to a consensus state constructed by the chain. func (cs ConsensusState) ValidateBasic() error { diff --git a/modules/light-clients/99-ostracon/types/consensus_state_test.go b/modules/light-clients/07-tendermint/types/consensus_state_test.go similarity index 90% rename from modules/light-clients/99-ostracon/types/consensus_state_test.go rename to modules/light-clients/07-tendermint/types/consensus_state_test.go index 4590d7148ad..f0c91e12666 100644 --- a/modules/light-clients/99-ostracon/types/consensus_state_test.go +++ b/modules/light-clients/07-tendermint/types/consensus_state_test.go @@ -5,10 +5,10 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) -func (suite *OstraconTestSuite) TestConsensusStateValidateBasic() { +func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { testCases := []struct { msg string consensusState *types.ConsensusState @@ -75,7 +75,7 @@ func (suite *OstraconTestSuite) TestConsensusStateValidateBasic() { tc := tc // check just to increase coverage - suite.Require().Equal(exported.Ostracon, tc.consensusState.ClientType()) + suite.Require().Equal(exported.Tendermint, tc.consensusState.ClientType()) suite.Require().Equal(tc.consensusState.GetRoot(), tc.consensusState.Root) err := tc.consensusState.ValidateBasic() diff --git a/modules/light-clients/99-ostracon/types/errors.go b/modules/light-clients/07-tendermint/types/errors.go similarity index 94% rename from modules/light-clients/99-ostracon/types/errors.go rename to modules/light-clients/07-tendermint/types/errors.go index 2be76ee678d..0aa631daade 100644 --- a/modules/light-clients/99-ostracon/types/errors.go +++ b/modules/light-clients/07-tendermint/types/errors.go @@ -5,10 +5,10 @@ import ( ) const ( - SubModuleName = "ostracon-client" + SubModuleName = "tendermint-client" ) -// IBC ostracon client sentinel errors +// IBC tendermint client sentinel errors var ( ErrInvalidChainID = sdkerrors.Register(SubModuleName, 2, "invalid chain-id") ErrInvalidTrustingPeriod = sdkerrors.Register(SubModuleName, 3, "invalid trusting period") diff --git a/modules/light-clients/99-ostracon/types/fraction.go b/modules/light-clients/07-tendermint/types/fraction.go similarity index 88% rename from modules/light-clients/99-ostracon/types/fraction.go rename to modules/light-clients/07-tendermint/types/fraction.go index aab6cbb3ed1..6706b3dca8b 100644 --- a/modules/light-clients/99-ostracon/types/fraction.go +++ b/modules/light-clients/07-tendermint/types/fraction.go @@ -5,7 +5,7 @@ import ( "github.com/line/ostracon/light" ) -// DefaultTrustLevel is the ostracon light client default trust level +// DefaultTrustLevel is the tendermint light client default trust level var DefaultTrustLevel = NewFractionFromOc(light.DefaultTrustLevel) // NewFractionFromOc returns a new Fraction instance from a ocmath.Fraction diff --git a/modules/light-clients/99-ostracon/types/genesis.go b/modules/light-clients/07-tendermint/types/genesis.go similarity index 100% rename from modules/light-clients/99-ostracon/types/genesis.go rename to modules/light-clients/07-tendermint/types/genesis.go diff --git a/modules/light-clients/99-ostracon/types/genesis_test.go b/modules/light-clients/07-tendermint/types/genesis_test.go similarity index 97% rename from modules/light-clients/99-ostracon/types/genesis_test.go rename to modules/light-clients/07-tendermint/types/genesis_test.go index 30bcc103664..7a9c5a2d40c 100644 --- a/modules/light-clients/99-ostracon/types/genesis_test.go +++ b/modules/light-clients/07-tendermint/types/genesis_test.go @@ -4,14 +4,14 @@ import ( sdk "github.com/line/lbm-sdk/types" clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) // expected export ordering: // processed height and processed time per height // then all iteration keys -func (suite *OstraconTestSuite) TestExportMetadata() { +func (suite *TendermintTestSuite) TestExportMetadata() { // test intializing client and exporting metadata path := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path) diff --git a/modules/light-clients/99-ostracon/types/header.go b/modules/light-clients/07-tendermint/types/header.go similarity index 81% rename from modules/light-clients/99-ostracon/types/header.go rename to modules/light-clients/07-tendermint/types/header.go index 96f26061a96..45796d34451 100644 --- a/modules/light-clients/99-ostracon/types/header.go +++ b/modules/light-clients/07-tendermint/types/header.go @@ -23,12 +23,12 @@ func (h Header) ConsensusState() *ConsensusState { } } -// ClientType defines that the Header is a Ostracon consensus algorithm +// ClientType defines that the Header is a Tendermint consensus algorithm func (h Header) ClientType() string { - return exported.Ostracon + return exported.Tendermint } -// GetHeight returns the current height. It returns 0 if the ostracon +// GetHeight returns the current height. It returns 0 if the tendermint // header is nil. // NOTE: the header.Header is checked to be non nil in ValidateBasic. func (h Header) GetHeight() exported.Height { @@ -37,7 +37,7 @@ func (h Header) GetHeight() exported.Height { } // GetTime returns the current block timestamp. It returns a zero time if -// the ostracon header is nil. +// the tendermint header is nil. // NOTE: the header.Header is checked to be non nil in ValidateBasic. func (h Header) GetTime() time.Time { return h.Header.Time @@ -49,14 +49,14 @@ func (h Header) GetTime() time.Time { // with MsgCreateClient func (h Header) ValidateBasic() error { if h.SignedHeader == nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "ostracon signed header cannot be nil") + return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "tendermint signed header cannot be nil") } if h.Header == nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "ostracon header cannot be nil") + return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "tendermint header cannot be nil") } tmSignedHeader, err := octypes.SignedHeaderFromProto(h.SignedHeader) if err != nil { - return sdkerrors.Wrap(err, "header is not a ostracon header") + return sdkerrors.Wrap(err, "header is not a tendermint header") } if err := tmSignedHeader.ValidateBasic(h.Header.GetChainID()); err != nil { return sdkerrors.Wrap(err, "header failed basic validation") @@ -73,7 +73,7 @@ func (h Header) ValidateBasic() error { } tmValset, err := octypes.ValidatorSetFromProto(h.ValidatorSet) if err != nil { - return sdkerrors.Wrap(err, "validator set is not ostracon validator set") + return sdkerrors.Wrap(err, "validator set is not tendermint validator set") } if !bytes.Equal(h.Header.ValidatorsHash, tmValset.Hash()) { return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "validator set does not match hash") diff --git a/modules/light-clients/99-ostracon/types/header_test.go b/modules/light-clients/07-tendermint/types/header_test.go similarity index 76% rename from modules/light-clients/99-ostracon/types/header_test.go rename to modules/light-clients/07-tendermint/types/header_test.go index 70074547ca3..ee933bdb1c1 100644 --- a/modules/light-clients/99-ostracon/types/header_test.go +++ b/modules/light-clients/07-tendermint/types/header_test.go @@ -3,24 +3,24 @@ package types_test import ( "time" - "github.com/tendermint/tendermint/proto/tendermint/crypto" + tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) -func (suite *OstraconTestSuite) TestGetHeight() { +func (suite *TendermintTestSuite) TestGetHeight() { header := suite.chainA.LastHeader suite.Require().NotEqual(uint64(0), header.GetHeight()) } -func (suite *OstraconTestSuite) TestGetTime() { +func (suite *TendermintTestSuite) TestGetTime() { header := suite.chainA.LastHeader suite.Require().NotEqual(time.Time{}, header.GetTime()) } -func (suite *OstraconTestSuite) TestHeaderValidateBasic() { +func (suite *TendermintTestSuite) TestHeaderValidateBasic() { var header *types.Header testCases := []struct { name string @@ -37,7 +37,7 @@ func (suite *OstraconTestSuite) TestHeaderValidateBasic() { {"SignedHeaderFromProto failed", func() { header.SignedHeader.Commit.Height = -1 }, false}, - {"signed header failed ostracon ValidateBasic", func() { + {"signed header failed tendermint ValidateBasic", func() { header = suite.chainA.LastHeader header.SignedHeader.Commit = nil }, false}, @@ -48,7 +48,7 @@ func (suite *OstraconTestSuite) TestHeaderValidateBasic() { header.ValidatorSet = nil }, false}, {"ValidatorSetFromProto failed", func() { - header.ValidatorSet.Validators[0].PubKey = crypto.PublicKey{} + header.ValidatorSet.Validators[0].PubKey = tmprotocrypto.PublicKey{} }, false}, {"header validator hash does not equal hash of validator set", func() { // use chainB's randomly generated validator set @@ -56,7 +56,7 @@ func (suite *OstraconTestSuite) TestHeaderValidateBasic() { }, false}, } - suite.Require().Equal(exported.Ostracon, suite.header.ClientType()) + suite.Require().Equal(exported.Tendermint, suite.header.ClientType()) for _, tc := range testCases { tc := tc diff --git a/modules/light-clients/99-ostracon/types/misbehaviour.go b/modules/light-clients/07-tendermint/types/misbehaviour.go similarity index 95% rename from modules/light-clients/99-ostracon/types/misbehaviour.go rename to modules/light-clients/07-tendermint/types/misbehaviour.go index 7c8c6a20e75..031f4a50d8c 100644 --- a/modules/light-clients/99-ostracon/types/misbehaviour.go +++ b/modules/light-clients/07-tendermint/types/misbehaviour.go @@ -27,9 +27,9 @@ func NewMisbehaviour(clientID string, header1, header2 *Header) *Misbehaviour { } } -// ClientType is Ostracon light client +// ClientType is Tendermint light client func (misbehaviour Misbehaviour) ClientType() string { - return exported.Ostracon + return exported.Tendermint } // GetClientID returns the ID of the client that committed a misbehaviour. @@ -118,11 +118,11 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { func validCommit(chainID string, blockID octypes.BlockID, commit *tmproto.Commit, valSet *tmproto.ValidatorSet) (err error) { tmCommit, err := octypes.CommitFromProto(commit) if err != nil { - return sdkerrors.Wrap(err, "commit is not ostracon commit type") + return sdkerrors.Wrap(err, "commit is not tendermint commit type") } tmValset, err := octypes.ValidatorSetFromProto(valSet) if err != nil { - return sdkerrors.Wrap(err, "validator set is not ostracon validator set type") + return sdkerrors.Wrap(err, "validator set is not tendermint validator set type") } if err := tmValset.VerifyCommitLight(chainID, blockID, tmCommit.Height, tmCommit); err != nil { diff --git a/modules/light-clients/99-ostracon/types/misbehaviour_handle.go b/modules/light-clients/07-tendermint/types/misbehaviour_handle.go similarity index 97% rename from modules/light-clients/99-ostracon/types/misbehaviour_handle.go rename to modules/light-clients/07-tendermint/types/misbehaviour_handle.go index 67a9b57db19..bc2c0a378ea 100644 --- a/modules/light-clients/99-ostracon/types/misbehaviour_handle.go +++ b/modules/light-clients/07-tendermint/types/misbehaviour_handle.go @@ -103,12 +103,12 @@ func checkMisbehaviourHeader( ) error { tmTrustedValset, err := octypes.ValidatorSetFromProto(header.TrustedValidators) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set is not ostracon validator set type") + return sdkerrors.Wrap(err, "trusted validator set is not tendermint validator set type") } tmCommit, err := octypes.CommitFromProto(header.Commit) if err != nil { - return sdkerrors.Wrap(err, "commit is not ostracon commit type") + return sdkerrors.Wrap(err, "commit is not tendermint commit type") } // check the trusted fields for the header against ConsensusState diff --git a/modules/light-clients/99-ostracon/types/misbehaviour_handle_test.go b/modules/light-clients/07-tendermint/types/misbehaviour_handle_test.go similarity index 99% rename from modules/light-clients/99-ostracon/types/misbehaviour_handle_test.go rename to modules/light-clients/07-tendermint/types/misbehaviour_handle_test.go index 80838c7746c..44b39bcd443 100644 --- a/modules/light-clients/99-ostracon/types/misbehaviour_handle_test.go +++ b/modules/light-clients/07-tendermint/types/misbehaviour_handle_test.go @@ -10,12 +10,12 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" ) -func (suite *OstraconTestSuite) TestCheckMisbehaviourAndUpdateState() { +func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { altPrivVal := ibctestingmock.NewPV() altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) @@ -290,7 +290,7 @@ func (suite *OstraconTestSuite) TestCheckMisbehaviourAndUpdateState() { false, }, { - "invalid ostracon misbehaviour", + "invalid tendermint misbehaviour", types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false), types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, diff --git a/modules/light-clients/99-ostracon/types/misbehaviour_test.go b/modules/light-clients/07-tendermint/types/misbehaviour_test.go similarity index 97% rename from modules/light-clients/99-ostracon/types/misbehaviour_test.go rename to modules/light-clients/07-tendermint/types/misbehaviour_test.go index 075db6c55fe..6b9982dc558 100644 --- a/modules/light-clients/99-ostracon/types/misbehaviour_test.go +++ b/modules/light-clients/07-tendermint/types/misbehaviour_test.go @@ -10,12 +10,12 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" ) -func (suite *OstraconTestSuite) TestMisbehaviour() { +func (suite *TendermintTestSuite) TestMisbehaviour() { signers := []octypes.PrivValidator{suite.privVal} heightMinus1 := clienttypes.NewHeight(0, height.RevisionHeight-1) @@ -25,11 +25,11 @@ func (suite *OstraconTestSuite) TestMisbehaviour() { ClientId: clientID, } - suite.Require().Equal(exported.Ostracon, misbehaviour.ClientType()) + suite.Require().Equal(exported.Tendermint, misbehaviour.ClientType()) suite.Require().Equal(clientID, misbehaviour.GetClientID()) } -func (suite *OstraconTestSuite) TestMisbehaviourValidateBasic() { +func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { altPrivVal := ibctestingmock.NewPV() altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) diff --git a/modules/light-clients/99-ostracon/types/proposal_handle.go b/modules/light-clients/07-tendermint/types/proposal_handle.go similarity index 100% rename from modules/light-clients/99-ostracon/types/proposal_handle.go rename to modules/light-clients/07-tendermint/types/proposal_handle.go diff --git a/modules/light-clients/99-ostracon/types/proposal_handle_test.go b/modules/light-clients/07-tendermint/types/proposal_handle_test.go similarity index 97% rename from modules/light-clients/99-ostracon/types/proposal_handle_test.go rename to modules/light-clients/07-tendermint/types/proposal_handle_test.go index 454abdcbafa..3ebd3616ebe 100644 --- a/modules/light-clients/99-ostracon/types/proposal_handle_test.go +++ b/modules/light-clients/07-tendermint/types/proposal_handle_test.go @@ -5,13 +5,13 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) var frozenHeight = clienttypes.NewHeight(0, 1) -func (suite *OstraconTestSuite) TestCheckSubstituteUpdateStateBasic() { +func (suite *TendermintTestSuite) TestCheckSubstituteUpdateStateBasic() { var ( substituteClientState exported.ClientState substitutePath *ibctesting.Path @@ -68,7 +68,7 @@ func (suite *OstraconTestSuite) TestCheckSubstituteUpdateStateBasic() { // to expire clients, time needs to be fast forwarded on both chainA and chainB. // this is to prevent headers from failing when attempting to update later. -func (suite *OstraconTestSuite) TestCheckSubstituteAndUpdateState() { +func (suite *TendermintTestSuite) TestCheckSubstituteAndUpdateState() { testCases := []struct { name string FreezeClient bool @@ -202,7 +202,7 @@ func (suite *OstraconTestSuite) TestCheckSubstituteAndUpdateState() { } } -func (suite *OstraconTestSuite) TestIsMatchingClientState() { +func (suite *TendermintTestSuite) TestIsMatchingClientState() { var ( subjectPath, substitutePath *ibctesting.Path subjectClientState, substituteClientState *types.ClientState diff --git a/modules/light-clients/99-ostracon/types/store.go b/modules/light-clients/07-tendermint/types/store.go similarity index 97% rename from modules/light-clients/99-ostracon/types/store.go rename to modules/light-clients/07-tendermint/types/store.go index 61b1d44325f..94ca0a2e9b3 100644 --- a/modules/light-clients/99-ostracon/types/store.go +++ b/modules/light-clients/07-tendermint/types/store.go @@ -125,7 +125,7 @@ func ProcessedTimeKey(height exported.Height) []byte { } // SetProcessedTime stores the time at which a header was processed and the corresponding consensus state was created. -// This is useful when validating whether a packet has reached the time specified delay period in the ostracon client's +// This is useful when validating whether a packet has reached the time specified delay period in the tendermint client's // verification functions func SetProcessedTime(clientStore sdk.KVStore, height exported.Height, timeNs uint64) { key := ProcessedTimeKey(height) @@ -133,7 +133,7 @@ func SetProcessedTime(clientStore sdk.KVStore, height exported.Height, timeNs ui clientStore.Set(key, val) } -// GetProcessedTime gets the time (in nanoseconds) at which this chain received and processed a ostracon header. +// GetProcessedTime gets the time (in nanoseconds) at which this chain received and processed a tendermint header. // This is used to validate that a received packet has passed the time delay period. func GetProcessedTime(clientStore sdk.KVStore, height exported.Height) (uint64, bool) { key := ProcessedTimeKey(height) @@ -156,7 +156,7 @@ func ProcessedHeightKey(height exported.Height) []byte { } // SetProcessedHeight stores the height at which a header was processed and the corresponding consensus state was created. -// This is useful when validating whether a packet has reached the specified block delay period in the ostracon client's +// This is useful when validating whether a packet has reached the specified block delay period in the tendermint client's // verification functions func SetProcessedHeight(clientStore sdk.KVStore, consHeight, processedHeight exported.Height) { key := ProcessedHeightKey(consHeight) @@ -164,7 +164,7 @@ func SetProcessedHeight(clientStore sdk.KVStore, consHeight, processedHeight exp clientStore.Set(key, val) } -// GetProcessedHeight gets the height at which this chain received and processed a ostracon header. +// GetProcessedHeight gets the height at which this chain received and processed a tendermint header. // This is used to validate that a received packet has passed the block delay period. func GetProcessedHeight(clientStore sdk.KVStore, height exported.Height) (exported.Height, bool) { key := ProcessedHeightKey(height) @@ -261,7 +261,7 @@ func GetNextConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, heigh csKey := iterator.Value() - return getOcConsensusState(clientStore, cdc, csKey) + return getTmConsensusState(clientStore, cdc, csKey) } // GetPreviousConsensusState returns the highest consensus state that is lower than the given height. @@ -278,7 +278,7 @@ func GetPreviousConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, h csKey := iterator.Value() - return getOcConsensusState(clientStore, cdc, csKey) + return getTmConsensusState(clientStore, cdc, csKey) } // PruneAllExpiredConsensusStates iterates over all consensus states for a given @@ -318,7 +318,7 @@ func PruneAllExpiredConsensusStates( } // Helper function for GetNextConsensusState and GetPreviousConsensusState -func getOcConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, key []byte) (*ConsensusState, bool) { +func getTmConsensusState(clientStore sdk.KVStore, cdc codec.BinaryCodec, key []byte) (*ConsensusState, bool) { bz := clientStore.Get(key) if bz == nil { return nil, false @@ -344,7 +344,7 @@ func bigEndianHeightBytes(height exported.Height) []byte { } // setConsensusMetadata sets context time as processed time and set context height as processed height -// as this is internal ostracon light client logic. +// as this is internal tendermint light client logic. // client state and consensus state will be set by client keeper // set iteration key to provide ability for efficient ordered iteration of consensus states. func setConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore, height exported.Height) { diff --git a/modules/light-clients/99-ostracon/types/store_test.go b/modules/light-clients/07-tendermint/types/store_test.go similarity index 96% rename from modules/light-clients/99-ostracon/types/store_test.go rename to modules/light-clients/07-tendermint/types/store_test.go index 9c2e6d5221e..4572f2aee9a 100644 --- a/modules/light-clients/99-ostracon/types/store_test.go +++ b/modules/light-clients/07-tendermint/types/store_test.go @@ -9,11 +9,11 @@ import ( host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" solomachinetypes "github.com/line/ibc-go/v3/modules/light-clients/06-solomachine/types" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) -func (suite *OstraconTestSuite) TestGetConsensusState() { +func (suite *TendermintTestSuite) TestGetConsensusState() { var ( height exported.Height path *ibctesting.Path @@ -80,7 +80,7 @@ func (suite *OstraconTestSuite) TestGetConsensusState() { } } -func (suite *OstraconTestSuite) TestGetProcessedTime() { +func (suite *TendermintTestSuite) TestGetProcessedTime() { // setup path := ibctesting.NewPath(suite.chainA, suite.chainB) @@ -121,7 +121,7 @@ func (suite *OstraconTestSuite) TestGetProcessedTime() { suite.Require().False(ok, "retrieved processed time for a non-existent consensus state") } -func (suite *OstraconTestSuite) TestIterationKey() { +func (suite *TendermintTestSuite) TestIterationKey() { testHeights := []exported.Height{ clienttypes.NewHeight(0, 1), clienttypes.NewHeight(0, 1234), @@ -135,7 +135,7 @@ func (suite *OstraconTestSuite) TestIterationKey() { } } -func (suite *OstraconTestSuite) TestIterateConsensusStates() { +func (suite *TendermintTestSuite) TestIterateConsensusStates() { nextValsHash := []byte("nextVals") // Set iteration keys and consensus states @@ -161,7 +161,7 @@ func (suite *OstraconTestSuite) TestIterateConsensusStates() { suite.Require().Equal(expectedArr, testArr) } -func (suite *OstraconTestSuite) TestGetNeighboringConsensusStates() { +func (suite *TendermintTestSuite) TestGetNeighboringConsensusStates() { nextValsHash := []byte("nextVals") cs01 := types.NewConsensusState(time.Now().UTC(), commitmenttypes.NewMerkleRoot([]byte("hash0-1")), nextValsHash) cs04 := types.NewConsensusState(time.Now().UTC(), commitmenttypes.NewMerkleRoot([]byte("hash0-4")), nextValsHash) diff --git a/modules/light-clients/99-ostracon/types/ostracon.pb.go b/modules/light-clients/07-tendermint/types/tendermint.pb.go similarity index 76% rename from modules/light-clients/99-ostracon/types/ostracon.pb.go rename to modules/light-clients/07-tendermint/types/tendermint.pb.go index 26240f7a3b8..0684af09ca6 100644 --- a/modules/light-clients/99-ostracon/types/ostracon.pb.go +++ b/modules/light-clients/07-tendermint/types/tendermint.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/lightclients/ostracon/v1/ostracon.proto +// source: ibc/lightclients/tendermint/v1/tendermint.proto package types @@ -69,7 +69,7 @@ func (m *ClientState) Reset() { *m = ClientState{} } func (m *ClientState) String() string { return proto.CompactTextString(m) } func (*ClientState) ProtoMessage() {} func (*ClientState) Descriptor() ([]byte, []int) { - return fileDescriptor_049a55681d0db341, []int{0} + return fileDescriptor_c6d6cf2b288949be, []int{0} } func (m *ClientState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -112,7 +112,7 @@ func (m *ConsensusState) Reset() { *m = ConsensusState{} } func (m *ConsensusState) String() string { return proto.CompactTextString(m) } func (*ConsensusState) ProtoMessage() {} func (*ConsensusState) Descriptor() ([]byte, []int) { - return fileDescriptor_049a55681d0db341, []int{1} + return fileDescriptor_c6d6cf2b288949be, []int{1} } func (m *ConsensusState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -154,7 +154,7 @@ func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } func (*Misbehaviour) ProtoMessage() {} func (*Misbehaviour) Descriptor() ([]byte, []int) { - return fileDescriptor_049a55681d0db341, []int{2} + return fileDescriptor_c6d6cf2b288949be, []int{2} } func (m *Misbehaviour) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -206,7 +206,7 @@ func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_049a55681d0db341, []int{3} + return fileDescriptor_c6d6cf2b288949be, []int{3} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -267,7 +267,7 @@ func (m *Fraction) Reset() { *m = Fraction{} } func (m *Fraction) String() string { return proto.CompactTextString(m) } func (*Fraction) ProtoMessage() {} func (*Fraction) Descriptor() ([]byte, []int) { - return fileDescriptor_049a55681d0db341, []int{4} + return fileDescriptor_c6d6cf2b288949be, []int{4} } func (m *Fraction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -319,79 +319,79 @@ func init() { } func init() { - proto.RegisterFile("ibc/lightclients/ostracon/v1/ostracon.proto", fileDescriptor_049a55681d0db341) + proto.RegisterFile("ibc/lightclients/tendermint/v1/tendermint.proto", fileDescriptor_c6d6cf2b288949be) } -var fileDescriptor_049a55681d0db341 = []byte{ - // 1081 bytes of a gzipped FileDescriptorProto +var fileDescriptor_c6d6cf2b288949be = []byte{ + // 1079 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x26, 0xe9, 0x76, 0x31, 0x4b, 0x37, 0x2d, 0xdd, 0x38, 0x32, 0x52, - 0x89, 0xc4, 0xd6, 0x56, 0xd2, 0xd3, 0x56, 0x5c, 0xd6, 0x5d, 0x50, 0x8b, 0x58, 0x51, 0xb9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0x19, 0xd4, 0x5e, 0x39, 0xe5, 0xc8, + 0x09, 0xcd, 0x0f, 0xff, 0x68, 0xb6, 0x4b, 0xb5, 0x5c, 0xa2, 0x79, 0xef, 0x7d, 0xef, 0xfb, 0x32, + 0x6f, 0xde, 0xbc, 0x31, 0xb0, 0xf0, 0xd8, 0xb3, 0x42, 0x3c, 0x0d, 0x98, 0x17, 0x62, 0x14, 0x33, + 0x6a, 0x31, 0x14, 0xfb, 0x28, 0x8d, 0x70, 0xcc, 0xac, 0xd9, 0xb0, 0x66, 0x99, 0x49, 0x4a, 0x18, + 0xd1, 0x7a, 0x78, 0xec, 0x99, 0xf5, 0x04, 0xb3, 0x06, 0x99, 0x0d, 0x77, 0xfa, 0xb5, 0x7c, 0x76, + 0x91, 0x20, 0x6a, 0xcd, 0x60, 0x88, 0x7d, 0xc8, 0x48, 0x2a, 0x19, 0x76, 0x76, 0x5f, 0x41, 0x88, + 0x5f, 0x15, 0xed, 0x24, 0x29, 0x21, 0x93, 0xc2, 0xea, 0x4d, 0x09, 0x99, 0x86, 0xc8, 0x12, 0xd6, + 0x38, 0x9b, 0x58, 0x7e, 0x96, 0x42, 0x86, 0x49, 0xac, 0xe2, 0xfa, 0x62, 0x9c, 0xe1, 0x08, 0x51, + 0x06, 0xa3, 0xa4, 0x00, 0xf0, 0xfd, 0x79, 0x24, 0x45, 0x96, 0xfc, 0xbb, 0x7c, 0x4f, 0x72, 0xa5, + 0x00, 0x1f, 0x54, 0x00, 0x12, 0x45, 0x98, 0x45, 0x05, 0xa8, 0xb4, 0x14, 0x70, 0x73, 0x4a, 0xa6, + 0x44, 0x2c, 0x2d, 0xbe, 0x92, 0x5e, 0xe3, 0xef, 0x35, 0xd0, 0x3e, 0x12, 0x7c, 0x67, 0x0c, 0x32, + 0xa4, 0x6d, 0x83, 0xa6, 0x17, 0x40, 0x1c, 0xbb, 0xd8, 0xef, 0x36, 0xfa, 0x8d, 0x41, 0xcb, 0x59, + 0x13, 0xf6, 0x89, 0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0x00, 0x87, 0xab, 0x3f, 0xfd, 0xae, 0x2f, 0x19, 0xbf, 0x2d, 0x83, 0xfb, 0x47, 0x24, 0xa6, 0x28, + 0xa6, 0x19, 0x95, 0x37, 0xde, 0x06, 0xad, 0x72, 0xe8, 0x88, 0x2b, 0xcf, 0x8f, 0x74, 0xb1, 0x2d, + 0xbf, 0x2a, 0x10, 0x76, 0x93, 0x1f, 0xe9, 0x0b, 0xde, 0x7d, 0x55, 0x9a, 0xf6, 0x31, 0x58, 0x4d, + 0x09, 0x61, 0x6a, 0x26, 0x18, 0xb5, 0x8e, 0xa8, 0xa6, 0xd0, 0x6c, 0x68, 0x3e, 0x45, 0xe9, 0xf3, + 0x10, 0x39, 0x84, 0x30, 0x7b, 0x95, 0xd3, 0x38, 0x22, 0x4b, 0xfb, 0xb1, 0x01, 0x36, 0x63, 0x74, + 0xce, 0xdc, 0x72, 0xd2, 0x52, 0x37, 0x80, 0x34, 0x10, 0xf7, 0xbe, 0x63, 0x7f, 0x39, 0xcf, 0xf5, + 0xf7, 0x64, 0x15, 0x6e, 0x43, 0x19, 0xff, 0xe4, 0xfa, 0xe3, 0x29, 0x66, 0x41, 0x36, 0xe6, 0x72, + 0x56, 0x88, 0x63, 0x64, 0x11, 0xca, 0x52, 0xe8, 0x91, 0xd8, 0x0a, 0xf1, 0x98, 0x5a, 0xe3, 0x0b, + 0x86, 0xa8, 0x79, 0x8c, 0xce, 0x6d, 0xbe, 0x70, 0x34, 0x4e, 0xf3, 0x4d, 0xc9, 0x72, 0x0c, 0x69, + 0xa0, 0xca, 0xf3, 0xf3, 0x32, 0xe8, 0xd4, 0xab, 0xa6, 0x1d, 0x80, 0x96, 0x6c, 0xea, 0x72, 0x1e, + 0x8a, 0x06, 0x7c, 0x20, 0xff, 0x4e, 0x19, 0xe2, 0xe5, 0x6f, 0x4a, 0xeb, 0xc4, 0xd7, 0x20, 0x68, + 0x06, 0x08, 0xfa, 0x28, 0x75, 0x87, 0xaa, 0x22, 0x7b,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b, 0x47, 0x31, 0x89, 0x70, 0x2c, 0xe2, 0xcb, 0x22, 0x5e, 0x77, 0xd9, 0xcf, 0x5e, 0x5e, 0xf5, + 0x1a, 0x97, 0x57, 0xbd, 0xc6, 0x5f, 0x57, 0xbd, 0xc6, 0x8b, 0xeb, 0xde, 0xd2, 0xe5, 0x75, 0x6f, + 0xe9, 0x8f, 0xeb, 0xde, 0xd2, 0xb7, 0x47, 0x8b, 0x97, 0x0b, 0x8f, 0xbd, 0xfd, 0x29, 0xb1, 0x66, + 0x07, 0x56, 0x44, 0xfc, 0x2c, 0x44, 0x54, 0x7e, 0x80, 0xed, 0x17, 0x5f, 0x60, 0x1f, 0x7e, 0xb4, + 0xbf, 0xf8, 0x89, 0x34, 0xbe, 0x27, 0x46, 0xc9, 0xc1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4a, + 0x9b, 0x5e, 0xfc, 0xb0, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -438,7 +438,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.UpgradePath) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.UpgradePath[iNdEx]) copy(dAtA[i:], m.UpgradePath[iNdEx]) - i = encodeVarintOstracon(dAtA, i, uint64(len(m.UpgradePath[iNdEx]))) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.UpgradePath[iNdEx]))) i-- dAtA[i] = 0x4a } @@ -451,7 +451,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 @@ -463,7 +463,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a @@ -473,7 +473,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 @@ -482,7 +482,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err3 } i -= n3 - i = encodeVarintOstracon(dAtA, i, uint64(n3)) + i = encodeVarintTendermint(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x2a n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingPeriod):]) @@ -490,7 +490,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err4 } i -= n4 - i = encodeVarintOstracon(dAtA, i, uint64(n4)) + i = encodeVarintTendermint(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x22 n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TrustingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TrustingPeriod):]) @@ -498,7 +498,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err5 } i -= n5 - i = encodeVarintOstracon(dAtA, i, uint64(n5)) + i = encodeVarintTendermint(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x1a { @@ -507,14 +507,14 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.ChainId) > 0 { i -= len(m.ChainId) copy(dAtA[i:], m.ChainId) - i = encodeVarintOstracon(dAtA, i, uint64(len(m.ChainId))) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.ChainId))) i-- dAtA[i] = 0xa } @@ -544,7 +544,7 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.NextValidatorsHash) > 0 { i -= len(m.NextValidatorsHash) copy(dAtA[i:], m.NextValidatorsHash) - i = encodeVarintOstracon(dAtA, i, uint64(len(m.NextValidatorsHash))) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.NextValidatorsHash))) i-- dAtA[i] = 0x1a } @@ -554,7 +554,7 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -563,7 +563,7 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err8 } i -= n8 - i = encodeVarintOstracon(dAtA, i, uint64(n8)) + i = encodeVarintTendermint(dAtA, i, uint64(n8)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -596,7 +596,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -608,7 +608,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -616,7 +616,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintOstracon(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintTendermint(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } @@ -650,7 +650,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 @@ -661,7 +661,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -672,7 +672,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -684,7 +684,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintOstracon(dAtA, i, uint64(size)) + i = encodeVarintTendermint(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -713,20 +713,20 @@ func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Denominator != 0 { - i = encodeVarintOstracon(dAtA, i, uint64(m.Denominator)) + i = encodeVarintTendermint(dAtA, i, uint64(m.Denominator)) i-- dAtA[i] = 0x10 } if m.Numerator != 0 { - i = encodeVarintOstracon(dAtA, i, uint64(m.Numerator)) + i = encodeVarintTendermint(dAtA, i, uint64(m.Numerator)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintOstracon(dAtA []byte, offset int, v uint64) int { - offset -= sovOstracon(v) +func encodeVarintTendermint(dAtA []byte, offset int, v uint64) int { + offset -= sovTendermint(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -744,30 +744,30 @@ func (m *ClientState) Size() (n int) { _ = l l = len(m.ChainId) if l > 0 { - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } l = m.TrustLevel.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TrustingPeriod) - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingPeriod) - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift) - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = m.FrozenHeight.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = m.LatestHeight.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) if len(m.ProofSpecs) > 0 { for _, e := range m.ProofSpecs { l = e.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } } if len(m.UpgradePath) > 0 { for _, s := range m.UpgradePath { l = len(s) - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } } if m.AllowUpdateAfterExpiry { @@ -786,12 +786,12 @@ func (m *ConsensusState) Size() (n int) { var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = m.Root.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) l = len(m.NextValidatorsHash) if l > 0 { - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } return n } @@ -804,15 +804,15 @@ func (m *Misbehaviour) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } if m.Header1 != nil { l = m.Header1.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } if m.Header2 != nil { l = m.Header2.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } return n } @@ -825,17 +825,17 @@ func (m *Header) Size() (n int) { _ = l if m.SignedHeader != nil { l = m.SignedHeader.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } if m.ValidatorSet != nil { l = m.ValidatorSet.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } l = m.TrustedHeight.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) if m.TrustedValidators != nil { l = m.TrustedValidators.Size() - n += 1 + l + sovOstracon(uint64(l)) + n += 1 + l + sovTendermint(uint64(l)) } return n } @@ -847,19 +847,19 @@ func (m *Fraction) Size() (n int) { var l int _ = l if m.Numerator != 0 { - n += 1 + sovOstracon(uint64(m.Numerator)) + n += 1 + sovTendermint(uint64(m.Numerator)) } if m.Denominator != 0 { - n += 1 + sovOstracon(uint64(m.Denominator)) + n += 1 + sovTendermint(uint64(m.Denominator)) } return n } -func sovOstracon(x uint64) (n int) { +func sovTendermint(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozOstracon(x uint64) (n int) { - return sovOstracon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozTendermint(x uint64) (n int) { + return sovTendermint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ClientState) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -869,7 +869,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -897,7 +897,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -911,11 +911,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -929,7 +929,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -942,11 +942,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -962,7 +962,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -975,11 +975,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -995,7 +995,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1008,11 +1008,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1028,7 +1028,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1041,11 +1041,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1061,7 +1061,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1074,11 +1074,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1094,7 +1094,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1107,11 +1107,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1127,7 +1127,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1140,11 +1140,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1161,7 +1161,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1175,11 +1175,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1193,7 +1193,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1213,7 +1213,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1228,12 +1228,12 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { m.AllowUpdateAfterMisbehaviour = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipOstracon(dAtA[iNdEx:]) + skippy, err := skipTendermint(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1255,7 +1255,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1283,7 +1283,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1296,11 +1296,11 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1316,7 +1316,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1329,11 +1329,11 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1349,7 +1349,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1362,11 +1362,11 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1378,12 +1378,12 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipOstracon(dAtA[iNdEx:]) + skippy, err := skipTendermint(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1405,7 +1405,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1433,7 +1433,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1447,11 +1447,11 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1465,7 +1465,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1478,11 +1478,11 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1501,7 +1501,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1514,11 +1514,11 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1532,12 +1532,12 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipOstracon(dAtA[iNdEx:]) + skippy, err := skipTendermint(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1559,7 +1559,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1587,7 +1587,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1600,11 +1600,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1623,7 +1623,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1636,11 +1636,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1659,7 +1659,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1672,11 +1672,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1692,7 +1692,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1705,11 +1705,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if postIndex > l { return io.ErrUnexpectedEOF @@ -1723,12 +1723,12 @@ func (m *Header) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipOstracon(dAtA[iNdEx:]) + skippy, err := skipTendermint(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1750,7 +1750,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1778,7 +1778,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { m.Numerator = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1797,7 +1797,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { m.Denominator = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowOstracon + return ErrIntOverflowTendermint } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1811,12 +1811,12 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipOstracon(dAtA[iNdEx:]) + skippy, err := skipTendermint(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOstracon + return ErrInvalidLengthTendermint } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1830,7 +1830,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } return nil } -func skipOstracon(dAtA []byte) (n int, err error) { +func skipTendermint(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -1838,7 +1838,7 @@ func skipOstracon(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowOstracon + return 0, ErrIntOverflowTendermint } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1855,7 +1855,7 @@ func skipOstracon(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowOstracon + return 0, ErrIntOverflowTendermint } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1871,7 +1871,7 @@ func skipOstracon(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowOstracon + return 0, ErrIntOverflowTendermint } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1884,14 +1884,14 @@ func skipOstracon(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthOstracon + return 0, ErrInvalidLengthTendermint } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupOstracon + return 0, ErrUnexpectedEndOfGroupTendermint } depth-- case 5: @@ -1900,7 +1900,7 @@ func skipOstracon(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthOstracon + return 0, ErrInvalidLengthTendermint } if depth == 0 { return iNdEx, nil @@ -1910,7 +1910,7 @@ func skipOstracon(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthOstracon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOstracon = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupOstracon = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTendermint = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTendermint = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTendermint = fmt.Errorf("proto: unexpected end of group") ) diff --git a/modules/light-clients/99-ostracon/types/ostracon_test.go b/modules/light-clients/07-tendermint/types/tendermint_test.go similarity index 87% rename from modules/light-clients/99-ostracon/types/ostracon_test.go rename to modules/light-clients/07-tendermint/types/tendermint_test.go index c2c28b5dda6..4bd2aa68b4b 100644 --- a/modules/light-clients/99-ostracon/types/ostracon_test.go +++ b/modules/light-clients/07-tendermint/types/tendermint_test.go @@ -13,7 +13,7 @@ import ( octypes "github.com/line/ostracon/types" clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" "github.com/line/ibc-go/v3/testing/simapp" @@ -35,7 +35,7 @@ var ( upgradePath = []string{"upgrade", "upgradedIBCState"} ) -type OstraconTestSuite struct { +type TendermintTestSuite struct { suite.Suite coordinator *ibctesting.Coordinator @@ -56,7 +56,7 @@ type OstraconTestSuite struct { clientTime time.Time } -func (suite *OstraconTestSuite) SetupTest() { +func (suite *TendermintTestSuite) SetupTest() { suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) @@ -91,11 +91,11 @@ func (suite *OstraconTestSuite) SetupTest() { suite.ctx = app.BaseApp.NewContext(checkTx, tmproto.Header{Height: 1, Time: suite.now}) } -func getSuiteSigners(suite *OstraconTestSuite) []octypes.PrivValidator { +func getSuiteSigners(suite *TendermintTestSuite) []octypes.PrivValidator { return []octypes.PrivValidator{suite.privVal} } -func getBothSigners(suite *OstraconTestSuite, altVal *octypes.Validator, altPrivVal octypes.PrivValidator) (*octypes.ValidatorSet, []octypes.PrivValidator) { +func getBothSigners(suite *TendermintTestSuite, altVal *octypes.Validator, altPrivVal octypes.PrivValidator) (*octypes.ValidatorSet, []octypes.PrivValidator) { // Create bothValSet with both suite validator and altVal. Would be valid update bothValSet := octypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) // Create signer array and ensure it is in same order as bothValSet @@ -104,6 +104,6 @@ func getBothSigners(suite *OstraconTestSuite, altVal *octypes.Validator, altPriv return bothValSet, bothSigners } -func TestOstraconTestSuite(t *testing.T) { - suite.Run(t, new(OstraconTestSuite)) +func TestTendermintTestSuite(t *testing.T) { + suite.Run(t, new(TendermintTestSuite)) } diff --git a/modules/light-clients/99-ostracon/types/update.go b/modules/light-clients/07-tendermint/types/update.go similarity index 94% rename from modules/light-clients/99-ostracon/types/update.go rename to modules/light-clients/07-tendermint/types/update.go index ee525e8c057..17bc88f7b33 100644 --- a/modules/light-clients/99-ostracon/types/update.go +++ b/modules/light-clients/07-tendermint/types/update.go @@ -20,7 +20,7 @@ import ( // create the consensus state for the header.Height // and update the client state if the header height is greater than the latest client state height // It returns an error if: -// - the client or header provided are not parseable to ostracon types +// - 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 revision is not equal to trusted header revision @@ -36,8 +36,8 @@ import ( // the new latest height // UpdateClient must only be used to update within a single revision, thus header revision number and trusted height's revision // number must be the same. To update to a new revision, use a separate upgrade path -// Ostracon client validity checking uses the bisection algorithm described -// in the [Ostracon spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md). +// 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). // // Misbehaviour Detection: // UpdateClient will detect implicit misbehaviour by enforcing certain invariants on any new update call and will return a frozen client. @@ -146,7 +146,7 @@ func (cs ClientState) CheckHeaderAndUpdateState( func checkTrustedHeader(header *Header, consState *ConsensusState) error { tmTrustedValidators, err := octypes.ValidatorSetFromProto(header.TrustedValidators) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set in not ostracon validator set type") + return sdkerrors.Wrap(err, "trusted validator set in not tendermint validator set type") } // assert that trustedVals is NextValidators of last trusted header @@ -162,7 +162,7 @@ func checkTrustedHeader(header *Header, consState *ConsensusState) error { return nil } -// checkValidity checks if the Ostracon header is valid. +// checkValidity checks if the Tendermint header is valid. // CONTRACT: consState.Height == header.TrustedHeight func checkValidity( clientState *ClientState, consState *ConsensusState, @@ -184,17 +184,17 @@ func checkValidity( tmTrustedValidators, err := octypes.ValidatorSetFromProto(header.TrustedValidators) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set in not ostracon validator set type") + return sdkerrors.Wrap(err, "trusted validator set in not tendermint validator set type") } tmSignedHeader, err := octypes.SignedHeaderFromProto(header.SignedHeader) if err != nil { - return sdkerrors.Wrap(err, "signed header in not ostracon signed header type") + return sdkerrors.Wrap(err, "signed header in not tendermint signed header type") } tmValidatorSet, err := octypes.ValidatorSetFromProto(header.ValidatorSet) if err != nil { - return sdkerrors.Wrap(err, "validator set in not ostracon validator set type") + return sdkerrors.Wrap(err, "validator set in not tendermint validator set type") } // assert header height is newer than consensus state diff --git a/modules/light-clients/99-ostracon/types/update_test.go b/modules/light-clients/07-tendermint/types/update_test.go similarity index 95% rename from modules/light-clients/99-ostracon/types/update_test.go rename to modules/light-clients/07-tendermint/types/update_test.go index 772240c4098..43c55b202c3 100644 --- a/modules/light-clients/99-ostracon/types/update_test.go +++ b/modules/light-clients/07-tendermint/types/update_test.go @@ -9,12 +9,12 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" - types "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + types "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ibctestingmock "github.com/line/ibc-go/v3/testing/mock" ) -func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { +func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { var ( clientState *types.ClientState consensusState *types.ConsensusState @@ -46,13 +46,13 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { testCases := []struct { name string - setup func(*OstraconTestSuite) + setup func(*TendermintTestSuite) expFrozen bool expPass bool }{ { name: "successful update with next height and same validator set", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -63,7 +63,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "successful update with future height and different validator set", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) @@ -74,7 +74,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "successful update with next height and different validator set", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) @@ -85,7 +85,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "successful update for a previous height", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) consStateHeight = heightMinus3 @@ -97,7 +97,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "successful update for a previous revision", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainIDRevision1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) consStateHeight = heightMinus3 @@ -108,7 +108,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "successful update with identical header to a previous update", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, heightPlus1, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -122,7 +122,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "misbehaviour detection: header conflicts with existing consensus state", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, heightPlus1, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -138,7 +138,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "misbehaviour detection: previous consensus state time is not before header time. time monotonicity violation", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // create an intermediate consensus state with the same time as the newHeader to create a time violation. // header time is after client time @@ -156,7 +156,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "misbehaviour detection: next consensus state time is not after header time. time monotonicity violation", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) // create the next consensus state with the same time as the intermediate newHeader to create a time violation. // header time is after clientTime @@ -174,7 +174,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update with incorrect header chain-id", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader("ethermint", int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -185,7 +185,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update to a future revision", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainIDRevision0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainIDRevision1, 1, height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -195,7 +195,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update: header height revision and trusted height revision mismatch", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainIDRevision1, 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) newHeader = suite.chainA.CreateOCClientHeader(chainIDRevision1, 3, height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -206,7 +206,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update with next height: update header mismatches nextValSetHash", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) @@ -217,7 +217,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update with next height: update header mismatches different nextValSetHash", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, bothValSet, signers) @@ -228,7 +228,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update with future height: too much change in validator set", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, altValSet, suite.valSet, altSigners) @@ -239,7 +239,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful updates, passed in incorrect trusted validators for given consensus state", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) @@ -250,7 +250,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update: trusting period has passed since last client timestamp", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -262,7 +262,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update: header timestamp is past current timestamp", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers) @@ -273,7 +273,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "unsuccessful update: header timestamp is not past last client timestamp", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.clientTime, suite.valSet, suite.valSet, signers) @@ -284,7 +284,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "header basic validation failed", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) @@ -297,7 +297,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { }, { name: "header height < consensus height", - setup: func(suite *OstraconTestSuite) { + setup: func(suite *TendermintTestSuite) { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(height.RevisionNumber, heightPlus5.RevisionHeight), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) // Make new header at height less than latest client state @@ -373,7 +373,7 @@ func (suite *OstraconTestSuite) TestCheckHeaderAndUpdateState() { } } -func (suite *OstraconTestSuite) TestPruneConsensusState() { +func (suite *TendermintTestSuite) TestPruneConsensusState() { // create path and setup clients path := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path) diff --git a/modules/light-clients/99-ostracon/types/upgrade.go b/modules/light-clients/07-tendermint/types/upgrade.go similarity index 92% rename from modules/light-clients/99-ostracon/types/upgrade.go rename to modules/light-clients/07-tendermint/types/upgrade.go index ba9ebd3c1e1..0806193bb86 100644 --- a/modules/light-clients/99-ostracon/types/upgrade.go +++ b/modules/light-clients/07-tendermint/types/upgrade.go @@ -15,14 +15,14 @@ import ( // VerifyUpgradeAndUpdateState checks if the upgraded client has been committed by the current client // It will zero out all client-specific fields (e.g. TrustingPeriod and verify all data -// in client state that must be the same across all valid Ostracon clients for the new chain. +// in client state that must be the same across all valid Tendermint clients for the new chain. // VerifyUpgrade will return an error if: -// - the upgradedClient is not a Ostracon ClientState +// - the upgradedClient is not a Tendermint ClientState // - the lastest height of the client state does not have the same revision number or has a greater // height than the committed client. // - the height of upgraded client is not greater than that of current client // - the latest height of the new client does not match or is greater than the height in committed client -// - any Ostracon chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, +// - any Tendermint chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, // and ProofSpecs do not match parameters set by committed client func (cs ClientState) VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, @@ -41,17 +41,17 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( upgradedClient.GetLatestHeight(), lastHeight) } - // upgraded client state and consensus state must be IBC ostracon client state and consensus state - // this may be modified in the future to upgrade to a new IBC ostracon type + // upgraded client state and consensus state must be IBC tendermint client state and consensus state + // this may be modified in the future to upgrade to a new IBC tendermint type // counterparty must also commit to the upgraded consensus state at a sub-path under the upgrade path specified tmUpgradeClient, ok := upgradedClient.(*ClientState) if !ok { - return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Ostracon client. expected: %T got: %T", + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Tendermint client. expected: %T got: %T", &ClientState{}, upgradedClient) } tmUpgradeConsState, ok := upgradedConsState.(*ConsensusState) if !ok { - return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "upgraded consensus state must be Ostracon consensus state. expected %T, got: %T", + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "upgraded consensus state must be Tendermint consensus state. expected %T, got: %T", &ConsensusState{}, upgradedConsState) } diff --git a/modules/light-clients/99-ostracon/types/upgrade_test.go b/modules/light-clients/07-tendermint/types/upgrade_test.go similarity index 99% rename from modules/light-clients/99-ostracon/types/upgrade_test.go rename to modules/light-clients/07-tendermint/types/upgrade_test.go index f35a5db71b1..4f5b09813f2 100644 --- a/modules/light-clients/99-ostracon/types/upgrade_test.go +++ b/modules/light-clients/07-tendermint/types/upgrade_test.go @@ -6,13 +6,13 @@ import ( clienttypes "github.com/line/ibc-go/v3/modules/core/02-client/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" "github.com/line/ibc-go/v3/modules/core/exported" - "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ibctesting "github.com/line/ibc-go/v3/testing" ) var newChainId = "newChainId-1" -func (suite *OstraconTestSuite) TestVerifyUpgrade() { +func (suite *TendermintTestSuite) TestVerifyUpgrade() { var ( upgradedClient exported.ClientState upgradedConsState exported.ConsensusState diff --git a/modules/light-clients/09-localhost/types/client_state_test.go b/modules/light-clients/09-localhost/types/client_state_test.go index 75afd872a40..e48488abb0a 100644 --- a/modules/light-clients/09-localhost/types/client_state_test.go +++ b/modules/light-clients/09-localhost/types/client_state_test.go @@ -9,8 +9,8 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" "github.com/line/ibc-go/v3/modules/light-clients/09-localhost/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" ) const ( diff --git a/proto/ibc/lightclients/ostracon/v1/ostracon.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto similarity index 99% rename from proto/ibc/lightclients/ostracon/v1/ostracon.proto rename to proto/ibc/lightclients/tendermint/v1/tendermint.proto index 4b2d28b7bfb..7b98a08440a 100644 --- a/proto/ibc/lightclients/ostracon/v1/ostracon.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package ibc.lightclients.tendermint.v1; -option go_package = "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types"; +option go_package = "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types"; import "tendermint/types/validator.proto"; import "tendermint/types/types.proto"; diff --git a/testing/chain.go b/testing/chain.go index 97ee677d9ed..9e84bd661b2 100644 --- a/testing/chain.go +++ b/testing/chain.go @@ -34,7 +34,7 @@ import ( host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" "github.com/line/ibc-go/v3/modules/core/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" "github.com/line/ibc-go/v3/testing/mock" "github.com/line/ibc-go/v3/testing/simapp" ) @@ -384,13 +384,13 @@ func (chain *TestChain) GetPrefix() commitmenttypes.MerklePrefix { return commitmenttypes.NewMerklePrefix(chain.App.GetIBCKeeper().ConnectionKeeper.GetCommitmentPrefix().Bytes()) } -// ConstructUpdateOCClientHeader will construct a valid 99-ostracon Header to update the +// ConstructUpdateOCClientHeader will construct a valid 07-tendermint Header to update the // light client on the source chain. func (chain *TestChain) ConstructUpdateOCClientHeader(counterparty *TestChain, clientID string) (*ibcoctypes.Header, error) { return chain.ConstructUpdateOCClientHeaderWithTrustedHeight(counterparty, clientID, clienttypes.ZeroHeight()) } -// ConstructUpdateOCClientHeader will construct a valid 99-ostracon Header to update the +// ConstructUpdateOCClientHeader will construct a valid 07-tendermint Header to update the // light client on the source chain. func (chain *TestChain) ConstructUpdateOCClientHeaderWithTrustedHeight(counterparty *TestChain, clientID string, trustedHeight clienttypes.Height) (*ibcoctypes.Header, error) { header := counterparty.LastHeader diff --git a/testing/config.go b/testing/config.go index a809625a73a..049cc414ef5 100644 --- a/testing/config.go +++ b/testing/config.go @@ -6,7 +6,7 @@ import ( connectiontypes "github.com/line/ibc-go/v3/modules/core/03-connection/types" channeltypes "github.com/line/ibc-go/v3/modules/core/04-channel/types" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" "github.com/line/ibc-go/v3/testing/mock" ) @@ -35,7 +35,7 @@ func NewOstraconConfig() *OstraconConfig { } func (tmcfg *OstraconConfig) GetClientType() string { - return exported.Ostracon + return exported.Tendermint } type ConnectionConfig struct { diff --git a/testing/endpoint.go b/testing/endpoint.go index b0991208186..b43a485463d 100644 --- a/testing/endpoint.go +++ b/testing/endpoint.go @@ -12,7 +12,7 @@ import ( commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" host "github.com/line/ibc-go/v3/modules/core/24-host" "github.com/line/ibc-go/v3/modules/core/exported" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" ) // Endpoint is a which represents a channel endpoint and its associated @@ -86,7 +86,7 @@ func (endpoint *Endpoint) CreateClient() (err error) { ) switch endpoint.ClientConfig.GetClientType() { - case exported.Ostracon: + case exported.Tendermint: tmConfig, ok := endpoint.ClientConfig.(*OstraconConfig) require.True(endpoint.Chain.T, ok) @@ -134,7 +134,7 @@ func (endpoint *Endpoint) UpdateClient() (err error) { var header exported.Header switch endpoint.ClientConfig.GetClientType() { - case exported.Ostracon: + case exported.Tendermint: header, err = endpoint.Chain.ConstructUpdateOCClientHeader(endpoint.Counterparty.Chain, endpoint.ClientID) default: diff --git a/testing/values.go b/testing/values.go index 2a5ce8e5932..0f079253dd8 100644 --- a/testing/values.go +++ b/testing/values.go @@ -12,12 +12,12 @@ import ( ibctransfertypes "github.com/line/ibc-go/v3/modules/apps/transfer/types" connectiontypes "github.com/line/ibc-go/v3/modules/core/03-connection/types" commitmenttypes "github.com/line/ibc-go/v3/modules/core/23-commitment/types" - ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/99-ostracon/types" + ibcoctypes "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" "github.com/line/ibc-go/v3/testing/mock" ) const ( - FirstClientID = "99-ostracon-0" + FirstClientID = "07-tendermint-0" FirstChannelID = "channel-0" FirstConnectionID = "connection-0" From eab723347d7b59e0065ea2e1b23e572dfd2801a7 Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Thu, 9 Mar 2023 14:19:21 +0900 Subject: [PATCH 3/4] Update change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01e078f0c8c..e53cd958213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Features * [\#5](https://github.com/line/ibc-go/pull/5) apply the changes of lbm-sdk and ostracon proto +* [\#6](https://github.com/line/ibc-go/pull/6) change to use 07-tendermint ### Improvements * [\#1](https://github.com/line/ibc-go/pull/1) apply all changes of `x/ibc` in lbm-sdk until [lbm-sdk@0fbc2fcae6dba90fa80b815cf3219d6fcf46fc64](https://github.com/line/lbm-sdk/tree/0fbc2fcae6dba90fa80b815cf3219d6fcf46fc64) From 7719bafa558a577860519a5464bfab5b86ba647e Mon Sep 17 00:00:00 2001 From: Shogo Hyodo Date: Fri, 10 Mar 2023 12:52:25 +0900 Subject: [PATCH 4/4] Tidy up code --- docs/ibc/proto-docs.md | 10 +- .../27-interchain-accounts/host/types/ack.go | 2 +- modules/apps/transfer/spec/01_concepts.md | 4 +- modules/apps/transfer/types/ack.go | 2 +- modules/core/02-client/client/cli/query.go | 4 +- modules/core/02-client/client/utils/utils.go | 12 +- modules/core/02-client/keeper/client.go | 2 +- modules/core/02-client/keeper/client_test.go | 4 +- modules/core/02-client/keeper/keeper.go | 2 +- modules/core/02-client/keeper/keeper_test.go | 6 +- modules/core/02-client/keeper/migrations.go | 4 +- .../core/02-client/keeper/proposal_test.go | 2 +- modules/core/02-client/legacy/v100/genesis.go | 8 +- .../02-client/legacy/v100/genesis_test.go | 8 +- modules/core/02-client/legacy/v100/store.go | 10 +- .../core/02-client/legacy/v100/store_test.go | 8 +- modules/core/02-client/types/client_test.go | 8 +- modules/core/02-client/types/codec_test.go | 10 +- modules/core/02-client/types/keys_test.go | 20 +-- modules/core/02-client/types/msgs_test.go | 58 +++---- .../core/03-connection/client/utils/utils.go | 4 +- modules/core/04-channel/client/utils/utils.go | 10 +- modules/core/23-commitment/types/merkle.go | 2 +- modules/core/23-commitment/types/utils.go | 2 +- modules/core/client/query.go | 8 +- modules/core/exported/client.go | 2 +- modules/core/keeper/migrations.go | 4 +- modules/core/legacy/v100/genesis.go | 2 +- modules/core/legacy/v100/genesis_test.go | 6 +- modules/core/spec/01_concepts.md | 6 +- .../06-solomachine/spec/01_concepts.md | 2 +- .../06-solomachine/types/client_state_test.go | 6 +- modules/light-clients/07-tendermint/doc.go | 6 +- modules/light-clients/07-tendermint/module.go | 2 +- .../07-tendermint/types/tendermint.pb.go | 141 +++++++++--------- .../tendermint/v1/tendermint.proto | 11 +- 36 files changed, 198 insertions(+), 200 deletions(-) diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md index 76e79ad3ce2..865a6fd0999 100644 --- a/docs/ibc/proto-docs.md +++ b/docs/ibc/proto-docs.md @@ -4008,7 +4008,7 @@ to preserve uniqueness of different data sign byte encodings. ### ClientState -ClientState from Ostracon tracks the current validator set, latest height, +ClientState from Tendermint tracks the current validator set, latest height, and a possible frozen height. @@ -4034,7 +4034,7 @@ and a possible frozen height. ### ConsensusState -ConsensusState defines the consensus state from Ostracon. +ConsensusState defines the consensus state from Tendermint. | Field | Type | Label | Description | @@ -4068,9 +4068,9 @@ supports positive values. ### Header -Header defines the Ostracon client consensus Header. +Header defines the Tendermint client consensus Header. It encapsulates all the information necessary to update from a trusted -Ostracon ConsensusState. The inclusion of TrustedHeight and +Tendermint ConsensusState. The inclusion of TrustedHeight and TrustedValidators allows this update to process correctly, so long as the ConsensusState for the TrustedHeight exists, this removes race conditions among relayers The SignedHeader and ValidatorSet are the new untrusted update @@ -4103,7 +4103,7 @@ that implements Misbehaviour interface expected by ICS-02 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | **Deprecated.** ClientID is deprecated | +| `client_id` | [string](#string) | | | | `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | | `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | diff --git a/modules/apps/27-interchain-accounts/host/types/ack.go b/modules/apps/27-interchain-accounts/host/types/ack.go index d11c241eca0..9d067ce3efa 100644 --- a/modules/apps/27-interchain-accounts/host/types/ack.go +++ b/modules/apps/27-interchain-accounts/host/types/ack.go @@ -18,7 +18,7 @@ const ( // the packet acknowledgement. func NewErrorAcknowledgement(err error) channeltypes.Acknowledgement { // the ABCI code is included in the abcitypes.ResponseDeliverTx hash - // constructed in Ostracon and is therefore determinstic + // constructed in Tendermint and is therefore determinstic _, code, _ := sdkerrors.ABCIInfo(err, false) // discard non-deterministic codespace and log values errorString := fmt.Sprintf("ABCI code: %d: %s", code, ackErrorString) diff --git a/modules/apps/transfer/spec/01_concepts.md b/modules/apps/transfer/spec/01_concepts.md index e66f11c83b6..e70185fcae5 100644 --- a/modules/apps/transfer/spec/01_concepts.md +++ b/modules/apps/transfer/spec/01_concepts.md @@ -54,7 +54,7 @@ A general pseudo algorithm would look like the following: 3. Query the client state using the identifiers pair. Note that this query will return a `"Not Found"` response if the current chain is not connected to this channel. 4. Retrieve the the client identifier or chain identifier from the client state (eg: on - Ostracon clients) and store it locally. + Tendermint clients) and store it locally. Using the gRPC gataway client service the steps above would be, with a given IBC token `ibc/7F1D3FCF4AE79E1554D670D1AD949A9BA4E4A3C76C63093E17E446A46061A7A2` stored on `chainB`: @@ -101,7 +101,7 @@ In some [exceptional cases](https://github.com/cosmos/ibc-go/blob/main/docs/arch To mitigate this, a client update governance proposal can be submitted to update the frozen client with a new valid header. Once the proposal passes the client state will be unfrozen and the funds from the associated channels will then be unlocked. This mechanism only applies to clients that -allow updates via governance, such as Ostracon clients. +allow updates via governance, such as Tendermint clients. In addition to this, it's important to mention that a token must be sent back along the exact route that it took originally un order to return it to its original form on the source chain (eg: the diff --git a/modules/apps/transfer/types/ack.go b/modules/apps/transfer/types/ack.go index 7412022aee8..9b8cc3c5275 100644 --- a/modules/apps/transfer/types/ack.go +++ b/modules/apps/transfer/types/ack.go @@ -18,7 +18,7 @@ const ( // the packet acknowledgement. func NewErrorAcknowledgement(err error) channeltypes.Acknowledgement { // the ABCI code is included in the abcitypes.ResponseDeliverTx hash - // constructed in Ostracon and is therefore deterministic + // constructed in Tendermint and is therefore deterministic _, code, _ := sdkerrors.ABCIInfo(err, false) // discard non-determinstic codespace and log values errorString := fmt.Sprintf("ABCI code: %d: %s", code, ackErrorString) diff --git a/modules/core/02-client/client/cli/query.go b/modules/core/02-client/client/cli/query.go index c3b7dee78a1..c58856acdbc 100644 --- a/modules/core/02-client/client/cli/query.go +++ b/modules/core/02-client/client/cli/query.go @@ -260,7 +260,7 @@ func GetCmdQueryHeader() *cobra.Command { cmd := &cobra.Command{ Use: "header", Short: "Query the latest header of the running chain", - Long: "Query the latest Ostracon header of the running chain", + Long: "Query the latest Tendermint header of the running chain", Example: fmt.Sprintf("%s query %s %s header", version.AppName, host.ModuleName, types.SubModuleName), Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, _ []string) error { @@ -268,7 +268,7 @@ func GetCmdQueryHeader() *cobra.Command { if err != nil { return err } - header, _, err := utils.QueryOstraconHeader(clientCtx) + header, _, err := utils.QueryTendermintHeader(clientCtx) if err != nil { return err } diff --git a/modules/core/02-client/client/utils/utils.go b/modules/core/02-client/client/utils/utils.go index b9b740a261a..d44f534e731 100644 --- a/modules/core/02-client/client/utils/utils.go +++ b/modules/core/02-client/client/utils/utils.go @@ -39,7 +39,7 @@ func QueryClientStateABCI( ) (*types.QueryClientStateResponse, error) { key := host.FullClientStateKey(clientID) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -92,7 +92,7 @@ func QueryConsensusStateABCI( ) (*types.QueryConsensusStateResponse, error) { key := host.FullConsensusStateKey(clientID, height) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -117,9 +117,9 @@ func QueryConsensusStateABCI( return types.NewQueryConsensusStateResponse(anyConsensusState, proofBz, proofHeight), nil } -// QueryOstraconHeader takes a client context and returns the appropriate -// ostracon header -func QueryOstraconHeader(clientCtx client.Context) (ibcoctypes.Header, int64, error) { +// QueryTendermintHeader takes a client context and returns the appropriate +// tendermint header +func QueryTendermintHeader(clientCtx client.Context) (ibcoctypes.Header, int64, error) { node, err := clientCtx.GetNode() if err != nil { return ibcoctypes.Header{}, 0, err @@ -165,7 +165,7 @@ func QueryOstraconHeader(clientCtx client.Context) (ibcoctypes.Header, int64, er } // QuerySelfConsensusState takes a client context and returns the appropriate -// ostracon consensus state +// tendermint consensus state func QuerySelfConsensusState(clientCtx client.Context) (*ibcoctypes.ConsensusState, int64, error) { node, err := clientCtx.GetNode() if err != nil { diff --git a/modules/core/02-client/keeper/client.go b/modules/core/02-client/keeper/client.go index 150a15aa125..16d6eb47186 100644 --- a/modules/core/02-client/keeper/client.go +++ b/modules/core/02-client/keeper/client.go @@ -31,7 +31,7 @@ func (k Keeper) CreateClient( k.Logger(ctx).Info("client created at height", "client-id", clientID, "height", clientState.GetLatestHeight().String()) // verifies initial consensus state against client state and initializes client store with any client-specific metadata - // e.g. set ProcessedTime in Ostracon clients + // e.g. set ProcessedTime in Tendermint clients if err := clientState.Initialize(ctx, k.cdc, k.ClientStore(ctx, clientID), consensusState); err != nil { return "", err } diff --git a/modules/core/02-client/keeper/client_test.go b/modules/core/02-client/keeper/client_test.go index e82f9e5a408..e08f2b41221 100644 --- a/modules/core/02-client/keeper/client_test.go +++ b/modules/core/02-client/keeper/client_test.go @@ -41,7 +41,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { } } -func (suite *KeeperTestSuite) TestUpdateClientOstracon() { +func (suite *KeeperTestSuite) TestUpdateClientTendermint() { var ( path *ibctesting.Path updateHeader *ibcoctypes.Header @@ -364,7 +364,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { expPass: false, }, { - name: "ostracon client VerifyUpgrade fails", + name: "tendermint client VerifyUpgrade fails", setup: func() { // last Height is at next block lastHeight = clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()+1)) diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index 35e5b67cb21..9f4084d3ced 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -270,7 +270,7 @@ func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) ( func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error { tmClient, ok := clientState.(*ibcoctypes.ClientState) if !ok { - return sdkerrors.Wrapf(types.ErrInvalidClient, "client must be a Ostracon client, expected: %T, got: %T", + return sdkerrors.Wrapf(types.ErrInvalidClient, "client must be a Tendermint client, expected: %T, got: %T", &ibcoctypes.ClientState{}, tmClient) } diff --git a/modules/core/02-client/keeper/keeper_test.go b/modules/core/02-client/keeper/keeper_test.go index 580f2863423..3a4dc2b5d13 100644 --- a/modules/core/02-client/keeper/keeper_test.go +++ b/modules/core/02-client/keeper/keeper_test.go @@ -31,9 +31,9 @@ const ( testChainID = "gaiahub-0" testChainIDRevision1 = "gaiahub-1" - testClientID = "ostracon-0" - testClientID2 = "ostracon-1" - testClientID3 = "ostracon-2" + testClientID = "tendermint-0" + testClientID2 = "tendermint-1" + testClientID3 = "tendermint-2" height = 5 diff --git a/modules/core/02-client/keeper/migrations.go b/modules/core/02-client/keeper/migrations.go index b4ca0ac49df..a3b703b065d 100644 --- a/modules/core/02-client/keeper/migrations.go +++ b/modules/core/02-client/keeper/migrations.go @@ -20,8 +20,8 @@ func NewMigrator(keeper Keeper) Migrator { // This migration // - migrates solo machine client states from v1 to v2 protobuf definition // - prunes solo machine consensus states -// - prunes expired ostracon consensus states -// - adds iteration and processed height keys for unexpired ostracon consensus states +// - prunes expired tendermint consensus states +// - adds iteration and processed height keys for unexpired tendermint consensus states func (m Migrator) Migrate1to2(ctx sdk.Context) error { return v100.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) } diff --git a/modules/core/02-client/keeper/proposal_test.go b/modules/core/02-client/keeper/proposal_test.go index cec816423f4..ec83e532f23 100644 --- a/modules/core/02-client/keeper/proposal_test.go +++ b/modules/core/02-client/keeper/proposal_test.go @@ -58,7 +58,7 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { }, false, }, { - "cannot use solomachine as substitute for ostracon client", func() { + "cannot use solomachine as substitute for tendermint client", func() { solomachine := ibctesting.NewSolomachine(suite.T(), suite.cdc, "solo machine", "", 1) solomachine.Sequence = subjectClientState.GetLatestHeight().GetRevisionHeight() + 1 substituteClientState = solomachine.ClientState() diff --git a/modules/core/02-client/legacy/v100/genesis.go b/modules/core/02-client/legacy/v100/genesis.go index 0ba27a9eda7..5d6adc8aeb3 100644 --- a/modules/core/02-client/legacy/v100/genesis.go +++ b/modules/core/02-client/legacy/v100/genesis.go @@ -17,13 +17,13 @@ import ( // // - Update solo machine client state protobuf definition (v1 to v2) // - Remove all solo machine consensus states -// - Remove all expired ostracon consensus states -// - Adds ProcessedHeight and Iteration keys for unexpired ostracon consensus states +// - Remove all expired tendermint consensus states +// - Adds ProcessedHeight and Iteration keys for unexpired tendermint consensus states func MigrateGenesis(cdc codec.BinaryCodec, clientGenState *types.GenesisState, genesisBlockTime time.Time, selfHeight exported.Height) (*types.GenesisState, error) { // To prune the consensus states, we will create new clientsConsensus // and clientsMetadata. These slices will be filled up with consensus states // which should not be pruned. No solo machine consensus states should be added - // and only unexpired consensus states for ostracon clients will be added. + // and only unexpired consensus states for tendermint clients will be added. // The metadata keys for unexpired consensus states will be added to clientsMetadata var ( clientsConsensus []types.ClientConsensusStates @@ -93,7 +93,7 @@ func MigrateGenesis(cdc codec.BinaryCodec, clientGenState *types.GenesisState, g // collect metadata for unexpired consensus states var clientMetadata []types.GenesisMetadata - // remove all expired ostracon consensus state metadata by adding only + // remove all expired tendermint consensus state metadata by adding only // unexpired consensus state metadata for _, consState := range unexpiredConsensusStates { for _, identifiedGenMetadata := range clientGenState.ClientsMetadata { diff --git a/modules/core/02-client/legacy/v100/genesis_test.go b/modules/core/02-client/legacy/v100/genesis_test.go index 09ab0bb81a9..449477b187d 100644 --- a/modules/core/02-client/legacy/v100/genesis_test.go +++ b/modules/core/02-client/legacy/v100/genesis_test.go @@ -31,7 +31,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { solomachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-0", "testing", 1) solomachineMulti := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-1", "testing", 4) - // create ostracon clients + // create tendermint clients suite.coordinator.SetupClients(path) err := path.EndpointA.UpdateClient() suite.Require().NoError(err) @@ -113,7 +113,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { clientStore.Set(host.ConsensusStateKey(height2), bz) clientStore.Set(host.ConsensusStateKey(height3), bz) } - // solo machine clients must come before ostracon in expected + // solo machine clients must come before tendermint in expected clientGenState.Clients = append(clients, clientGenState.Clients...) // migrate store get expected genesis @@ -122,7 +122,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { suite.Require().NoError(err) expectedClientGenState := ibcclient.ExportGenesis(path.EndpointA.Chain.GetContext(), path.EndpointA.Chain.App.GetIBCKeeper().ClientKeeper) - // NOTE: genesis time isn't updated since we aren't testing for ostracon consensus state pruning + // NOTE: genesis time isn't updated since we aren't testing for tendermint consensus state pruning migrated, err := v100.MigrateGenesis(codec.NewProtoCodec(clientCtx.InterfaceRegistry), &clientGenState, suite.coordinator.CurrentTime, types.GetSelfHeight(suite.chainA.GetContext())) suite.Require().NoError(err) @@ -169,7 +169,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { suite.Require().Equal(string(expectedIndentedBz), string(indentedBz)) } -func (suite *LegacyTestSuite) TestMigrateGenesisOstracon() { +func (suite *LegacyTestSuite) TestMigrateGenesisTendermint() { // create two paths and setup clients path1 := ibctesting.NewPath(suite.chainA, suite.chainB) path2 := ibctesting.NewPath(suite.chainA, suite.chainB) diff --git a/modules/core/02-client/legacy/v100/store.go b/modules/core/02-client/legacy/v100/store.go index 875895049bc..575eaaae6e5 100644 --- a/modules/core/02-client/legacy/v100/store.go +++ b/modules/core/02-client/legacy/v100/store.go @@ -22,8 +22,8 @@ import ( // // - Migrating solo machine client states from v1 to v2 protobuf definition // - Pruning all solo machine consensus states -// - Pruning expired ostracon consensus states -// - Adds ProcessedHeight and Iteration keys for unexpired ostracon consensus states +// - Pruning expired tendermint consensus states +// - Adds ProcessedHeight and Iteration keys for unexpired tendermint consensus states func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) (err error) { store := ctx.KVStore(storeKey) iterator := sdk.KVStorePrefixIterator(store, host.KeyClientStorePrefix) @@ -84,12 +84,12 @@ func MigrateStore(ctx sdk.Context, storeKey sdk.StoreKey, cdc codec.BinaryCodec) case exported.Tendermint: var clientState exported.ClientState if err := cdc.UnmarshalInterface(bz, &clientState); err != nil { - return sdkerrors.Wrap(err, "failed to unmarshal client state bytes into ostracon client state") + return sdkerrors.Wrap(err, "failed to unmarshal client state bytes into tendermint client state") } tmClientState, ok := clientState.(*ibcoctypes.ClientState) if !ok { - return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "client state is not ostracon even though client id contains 07-tendermint") + return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "client state is not tendermint even though client id contains 07-tendermint") } // add iteration keys so pruning will be successful @@ -148,7 +148,7 @@ func pruneSolomachineConsensusStates(clientStore sdk.KVStore) { } } -// addConsensusMetadata adds the iteration key and processed height for all ostracon consensus states +// addConsensusMetadata adds the iteration key and processed height for all tendermint consensus states // These keys were not included in the previous release of the IBC module. Adding the iteration keys allows // for pruning iteration. func addConsensusMetadata(ctx sdk.Context, clientStore sdk.KVStore) { diff --git a/modules/core/02-client/legacy/v100/store_test.go b/modules/core/02-client/legacy/v100/store_test.go index 2998299059a..efc654741e2 100644 --- a/modules/core/02-client/legacy/v100/store_test.go +++ b/modules/core/02-client/legacy/v100/store_test.go @@ -91,7 +91,7 @@ func (suite *LegacyTestSuite) TestMigrateStoreSolomachine() { clientStore.Set(host.ConsensusStateKey(height3), bz) } - // create ostracon clients + // create tendermint clients suite.coordinator.SetupClients(path) err := v100.MigrateStore(path.EndpointA.Chain.GetContext(), path.EndpointA.Chain.GetSimApp().GetKey(host.StoreKey), path.EndpointA.Chain.App.AppCodec()) @@ -114,9 +114,9 @@ func (suite *LegacyTestSuite) TestMigrateStoreSolomachine() { } } -// only test migration for ostracon clients -// ensure all expired consensus states are removed from ostracon client stores -func (suite *LegacyTestSuite) TestMigrateStoreOstracon() { +// only test migration for tendermint clients +// ensure all expired consensus states are removed from tendermint client stores +func (suite *LegacyTestSuite) TestMigrateStoreTendermint() { // create path and setup clients path1 := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path1) diff --git a/modules/core/02-client/types/client_test.go b/modules/core/02-client/types/client_test.go index 7eeaeb07db1..ac851f833f4 100644 --- a/modules/core/02-client/types/client_test.go +++ b/modules/core/02-client/types/client_test.go @@ -23,7 +23,7 @@ func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { }, }, { - "ostracon client", func() { + "tendermint client", func() { path := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(path) clientState := suite.chainA.GetClientState(path.EndpointA.ClientID) @@ -63,13 +63,13 @@ func TestValidateClientType(t *testing.T) { clientType string expPass bool }{ - {"valid", "ostracon", true}, + {"valid", "tendermint", true}, {"valid solomachine", "solomachine-v1", true}, - {"too large", "ostraconostraconostraconostraconostraconostraconostracon", false}, + {"too large", "tenderminttenderminttenderminttenderminttenderminttenderminttendermint", false}, {"too short", "t", false}, {"blank id", " ", false}, {"empty id", "", false}, - {"ends with dash", "ostracon-", false}, + {"ends with dash", "tendermint-", false}, } for _, tc := range testCases { diff --git a/modules/core/02-client/types/codec_test.go b/modules/core/02-client/types/codec_test.go index a612e161730..2714e05bbf5 100644 --- a/modules/core/02-client/types/codec_test.go +++ b/modules/core/02-client/types/codec_test.go @@ -29,7 +29,7 @@ func (suite *TypesTestSuite) TestPackClientState() { true, }, { - "ostracon client", + "tendermint client", ibcoctypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), true, }, @@ -81,7 +81,7 @@ func (suite *TypesTestSuite) TestPackConsensusState() { true, }, { - "ostracon consensus", + "tendermint consensus", suite.chainA.LastHeader.ConsensusState(), true, }, @@ -127,7 +127,7 @@ func (suite *TypesTestSuite) TestPackHeader() { true, }, { - "ostracon header", + "tendermint header", suite.chainA.LastHeader, true, }, @@ -174,8 +174,8 @@ func (suite *TypesTestSuite) TestPackMisbehaviour() { true, }, { - "ostracon misbehaviour", - ibcoctypes.NewMisbehaviour("ostracon-0", suite.chainA.LastHeader, suite.chainA.LastHeader), + "tendermint misbehaviour", + ibcoctypes.NewMisbehaviour("tendermint-0", suite.chainA.LastHeader, suite.chainA.LastHeader), true, }, { diff --git a/modules/core/02-client/types/keys_test.go b/modules/core/02-client/types/keys_test.go index 261d50be5ab..5d38999d01e 100644 --- a/modules/core/02-client/types/keys_test.go +++ b/modules/core/02-client/types/keys_test.go @@ -18,23 +18,23 @@ func TestParseClientIdentifier(t *testing.T) { expSeq uint64 expPass bool }{ - {"valid 0", "ostracon-0", "ostracon", 0, true}, - {"valid 1", "ostracon-1", "ostracon", 1, true}, + {"valid 0", "tendermint-0", "tendermint", 0, true}, + {"valid 1", "tendermint-1", "tendermint", 1, true}, {"valid solemachine", "solomachine-v1-1", "solomachine-v1", 1, true}, - {"valid large sequence", types.FormatClientIdentifier("ostracon", math.MaxUint64), "ostracon", math.MaxUint64, true}, + {"valid large sequence", types.FormatClientIdentifier("tendermint", math.MaxUint64), "tendermint", math.MaxUint64, true}, {"valid short client type", "t-0", "t", 0, true}, // one above uint64 max - {"invalid uint64", "ostracon-18446744073709551616", "ostracon", 0, false}, + {"invalid uint64", "tendermint-18446744073709551616", "tendermint", 0, false}, // uint64 == 20 characters - {"invalid large sequence", "ostracon-2345682193567182931243", "ostracon", 0, false}, + {"invalid large sequence", "tendermint-2345682193567182931243", "tendermint", 0, false}, {"invalid newline in clientID", "ostraco\nn-1", "ostraco\nn", 0, false}, - {"invalid newline character before dash", "ostracon\n-1", "ostracon", 0, false}, - {"missing dash", "ostracon0", "ostracon", 0, false}, + {"invalid newline character before dash", "tendermint\n-1", "tendermint", 0, false}, + {"missing dash", "tendermint0", "tendermint", 0, false}, {"blank id", " ", " ", 0, false}, {"empty id", "", "", 0, false}, - {"negative sequence", "ostracon--1", "ostracon", 0, false}, - {"invalid format", "ostracon-tm", "ostracon", 0, false}, - {"empty clientype", " -100", "ostracon", 0, false}, + {"negative sequence", "tendermint--1", "tendermint", 0, false}, + {"invalid format", "tendermint-tm", "tendermint", 0, false}, + {"empty clientype", " -100", "tendermint", 0, false}, } for _, tc := range testCases { diff --git a/modules/core/02-client/types/msgs_test.go b/modules/core/02-client/types/msgs_test.go index e39df3c1b30..89f42f41d80 100644 --- a/modules/core/02-client/types/msgs_test.go +++ b/modules/core/02-client/types/msgs_test.go @@ -54,9 +54,9 @@ func (suite *TypesTestSuite) TestMarshalMsgCreateClient() { }, }, { - "ostracon client", func() { - ostraconClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - msg, err = types.NewMsgCreateClient(ostraconClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) + "tendermint client", func() { + tendermintClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, }, @@ -98,16 +98,16 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { expPass bool }{ { - "valid - ostracon client", + "valid - tendermint client", func() { - ostraconClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - msg, err = types.NewMsgCreateClient(ostraconClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) + tendermintClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, true, }, { - "invalid ostracon client", + "invalid tendermint client", func() { msg, err = types.NewMsgCreateClient(&ibcoctypes.ClientState{}, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) @@ -124,8 +124,8 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "failed to unpack consensus state", func() { - ostraconClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - msg, err = types.NewMsgCreateClient(ostraconClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) + tendermintClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) msg.ConsensusState = nil }, @@ -168,9 +168,9 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "invalid - client state and consensus state client types do not match", func() { - ostraconClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) soloMachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachine", "", 2) - msg, err = types.NewMsgCreateClient(ostraconClient, soloMachine.ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) + msg, err = types.NewMsgCreateClient(tendermintClient, soloMachine.ConsensusState(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, false, @@ -208,8 +208,8 @@ func (suite *TypesTestSuite) TestMarshalMsgUpdateClient() { }, }, { - "ostracon client", func() { - msg, err = types.NewMsgUpdateClient("ostracon-0", suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress().String()) + "tendermint client", func() { + msg, err = types.NewMsgUpdateClient("tendermint-0", suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, }, @@ -258,17 +258,17 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { false, }, { - "valid - ostracon header", + "valid - tendermint header", func() { - msg, err = types.NewMsgUpdateClient("ostracon-0", suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress().String()) + msg, err = types.NewMsgUpdateClient("tendermint-0", suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, true, }, { - "invalid ostracon header", + "invalid tendermint header", func() { - msg, err = types.NewMsgUpdateClient("ostracon-0", &ibcoctypes.Header{}, suite.chainA.SenderAccount.GetAddress().String()) + msg, err = types.NewMsgUpdateClient("tendermint-0", &ibcoctypes.Header{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, false, @@ -336,11 +336,11 @@ func (suite *TypesTestSuite) TestMarshalMsgUpgradeClient() { malleate func() }{ { - "client upgrades to new ostracon client", + "client upgrades to new tendermint client", func() { - ostraconClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - ostraconConsState := &ibcoctypes.ConsensusState{NextValidatorsHash: []byte("nextValsHash")} - msg, err = types.NewMsgUpgradeClient("clientid", ostraconClient, ostraconConsState, []byte("proofUpgradeClient"), []byte("proofUpgradeConsState"), suite.chainA.SenderAccount.GetAddress().String()) + tendermintClient := ibcoctypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) + tendermintConsState := &ibcoctypes.ConsensusState{NextValidatorsHash: []byte("nextValsHash")} + msg, err = types.NewMsgUpgradeClient("clientid", tendermintClient, tendermintConsState, []byte("proofUpgradeClient"), []byte("proofUpgradeConsState"), suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, }, @@ -486,14 +486,14 @@ func (suite *TypesTestSuite) TestMarshalMsgSubmitMisbehaviour() { }, }, { - "ostracon client", func() { + "tendermint client", func() { height := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)) heightMinus1 := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)-1) header1 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) header2 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - misbehaviour := ibcoctypes.NewMisbehaviour("ostracon-0", header1, header2) - msg, err = types.NewMsgSubmitMisbehaviour("ostracon-0", misbehaviour, suite.chainA.SenderAccount.GetAddress().String()) + misbehaviour := ibcoctypes.NewMisbehaviour("tendermint-0", header1, header2) + msg, err = types.NewMsgSubmitMisbehaviour("tendermint-0", misbehaviour, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, }, @@ -542,23 +542,23 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { false, }, { - "valid - ostracon misbehaviour", + "valid - tendermint misbehaviour", func() { height := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)) heightMinus1 := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)-1) header1 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) header2 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - misbehaviour := ibcoctypes.NewMisbehaviour("ostracon-0", header1, header2) - msg, err = types.NewMsgSubmitMisbehaviour("ostracon-0", misbehaviour, suite.chainA.SenderAccount.GetAddress().String()) + misbehaviour := ibcoctypes.NewMisbehaviour("tendermint-0", header1, header2) + msg, err = types.NewMsgSubmitMisbehaviour("tendermint-0", misbehaviour, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, true, }, { - "invalid ostracon misbehaviour", + "invalid tendermint misbehaviour", func() { - msg, err = types.NewMsgSubmitMisbehaviour("ostracon-0", &ibcoctypes.Misbehaviour{}, suite.chainA.SenderAccount.GetAddress().String()) + msg, err = types.NewMsgSubmitMisbehaviour("tendermint-0", &ibcoctypes.Misbehaviour{}, suite.chainA.SenderAccount.GetAddress().String()) suite.Require().NoError(err) }, false, diff --git a/modules/core/03-connection/client/utils/utils.go b/modules/core/03-connection/client/utils/utils.go index d73464f3ac0..68dd84dc598 100644 --- a/modules/core/03-connection/client/utils/utils.go +++ b/modules/core/03-connection/client/utils/utils.go @@ -40,7 +40,7 @@ func QueryConnection( func queryConnectionABCI(clientCtx client.Context, connectionID string) (*types.QueryConnectionResponse, error) { key := host.ConnectionKey(connectionID) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -81,7 +81,7 @@ func QueryClientConnections( func queryClientConnectionsABCI(clientCtx client.Context, clientID string) (*types.QueryClientConnectionsResponse, error) { key := host.ClientConnectionsKey(clientID) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } diff --git a/modules/core/04-channel/client/utils/utils.go b/modules/core/04-channel/client/utils/utils.go index 9e79821aa4a..cb443e7857b 100644 --- a/modules/core/04-channel/client/utils/utils.go +++ b/modules/core/04-channel/client/utils/utils.go @@ -38,7 +38,7 @@ func QueryChannel( func queryChannelABCI(clientCtx client.Context, portID, channelID string) (*types.QueryChannelResponse, error) { key := host.ChannelKey(portID, channelID) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -178,7 +178,7 @@ func QueryNextSequenceReceive( func queryNextSequenceRecvABCI(clientCtx client.Context, portID, channelID string) (*types.QueryNextSequenceReceiveResponse, error) { key := host.NextSequenceRecvKey(portID, channelID) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -219,7 +219,7 @@ func queryPacketCommitmentABCI( ) (*types.QueryPacketCommitmentResponse, error) { key := host.PacketCommitmentKey(portID, channelID, sequence) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -258,7 +258,7 @@ func queryPacketReceiptABCI( ) (*types.QueryPacketReceiptResponse, error) { key := host.PacketReceiptKey(portID, channelID, sequence) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } @@ -287,7 +287,7 @@ func QueryPacketAcknowledgement(clientCtx client.Context, portID, channelID stri func queryPacketAcknowledgementABCI(clientCtx client.Context, portID, channelID string, sequence uint64) (*types.QueryPacketAcknowledgementResponse, error) { key := host.PacketAcknowledgementKey(portID, channelID, sequence) - value, proofBz, proofHeight, err := ibcclient.QueryOstraconProof(clientCtx, key) + value, proofBz, proofHeight, err := ibcclient.QueryTendermintProof(clientCtx, key) if err != nil { return nil, err } diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 8e45fd121c5..59c9ea37935 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -77,7 +77,7 @@ func NewMerklePath(keyPath ...string) MerklePath { } // String implements fmt.Stringer. -// This represents the path in the same way the ostracon KeyPath will +// This represents the path in the same way the tendermint KeyPath will // represent a key path. The backslashes partition the key path into // the respective stores they belong to. func (mp MerklePath) String() string { diff --git a/modules/core/23-commitment/types/utils.go b/modules/core/23-commitment/types/utils.go index b08297ea780..7400438c97f 100644 --- a/modules/core/23-commitment/types/utils.go +++ b/modules/core/23-commitment/types/utils.go @@ -10,7 +10,7 @@ import ( // ConvertProofs converts crypto.ProofOps into MerkleProof func ConvertProofs(tmProof *crypto.ProofOps) (MerkleProof, error) { if tmProof == nil { - return MerkleProof{}, sdkerrors.Wrapf(ErrInvalidMerkleProof, "ostracon proof is nil") + return MerkleProof{}, sdkerrors.Wrapf(ErrInvalidMerkleProof, "tendermint proof is nil") } // Unmarshal all proof ops to CommitmentProof proofs := make([]*ics23.CommitmentProof, len(tmProof.Ops)) diff --git a/modules/core/client/query.go b/modules/core/client/query.go index 74292ad3c42..1529194c767 100644 --- a/modules/core/client/query.go +++ b/modules/core/client/query.go @@ -13,16 +13,16 @@ import ( host "github.com/line/ibc-go/v3/modules/core/24-host" ) -// QueryOstraconProof performs an ABCI query with the given key and returns +// QueryTendermintProof performs an ABCI query with the given key and returns // the value of the query, the proto encoded merkle proof, and the height of -// the Ostracon block containing the state root. The desired ostracon height +// the Tendermint block containing the state root. The desired tendermint height // to perform the query should be set in the client context. The query will be // performed at one below this height (at the IAVL version) in order to obtain // the correct merkle proof. Proof queries at height less than or equal to 2 are // not supported. Queries with a client context height of 0 will perform a query // at the lastest state available. // Issue: https://github.com/cosmos/cosmos-sdk/issues/6567 -func QueryOstraconProof(clientCtx client.Context, key []byte) ([]byte, []byte, clienttypes.Height, error) { +func QueryTendermintProof(clientCtx client.Context, key []byte) ([]byte, []byte, clienttypes.Height, error) { height := clientCtx.Height // ABCI queries at heights 1, 2 or less than or equal to 0 are not supported. @@ -33,7 +33,7 @@ func QueryOstraconProof(clientCtx client.Context, key []byte) ([]byte, []byte, c return nil, nil, clienttypes.Height{}, fmt.Errorf("proof queries at height <= 2 are not supported") } - // Use the IAVL height if a valid ostracon height is passed in. + // Use the IAVL height if a valid tendermint height is passed in. // A height of 0 will query with the latest state. if height != 0 { height-- diff --git a/modules/core/exported/client.go b/modules/core/exported/client.go index f6d100d147a..e9d78575857 100644 --- a/modules/core/exported/client.go +++ b/modules/core/exported/client.go @@ -16,7 +16,7 @@ const ( // Solomachine is used to indicate that the light client is a solo machine. Solomachine string = "06-solomachine" - // Tendermint is used to indicate that the client uses the Tendermint or Ostracon Consensus Algorithm. + // Tendermint is used to indicate that the client uses the Tendermint or Tendermint Consensus Algorithm. Tendermint string = "07-tendermint" // Localhost is the client type for a localhost client. It is also used as the clientID diff --git a/modules/core/keeper/migrations.go b/modules/core/keeper/migrations.go index 5737b3ae231..78153b54d1a 100644 --- a/modules/core/keeper/migrations.go +++ b/modules/core/keeper/migrations.go @@ -20,8 +20,8 @@ func NewMigrator(keeper Keeper) Migrator { // This migration prunes: // - migrates solo machine client state from protobuf definition v1 to v2 // - prunes solo machine consensus states -// - prunes expired ostracon consensus states -// - adds ProcessedHeight and Iteration keys for unexpired ostracon consensus states +// - prunes expired tendermint consensus states +// - adds ProcessedHeight and Iteration keys for unexpired tendermint consensus states func (m Migrator) Migrate1to2(ctx sdk.Context) error { clientMigrator := clientkeeper.NewMigrator(m.keeper.ClientKeeper) if err := clientMigrator.Migrate1to2(ctx); err != nil { diff --git a/modules/core/legacy/v100/genesis.go b/modules/core/legacy/v100/genesis.go index 689225101ac..2fa92f3e9fe 100644 --- a/modules/core/legacy/v100/genesis.go +++ b/modules/core/legacy/v100/genesis.go @@ -17,7 +17,7 @@ import ( // // - Update solo machine client state protobuf definition (v1 to v2) // - Remove all solo machine consensus states -// - Remove all expired ostracon consensus states +// - Remove all expired tendermint consensus states func MigrateGenesis(appState genutiltypes.AppMap, clientCtx client.Context, genDoc octypes.GenesisDoc, maxExpectedTimePerBlock uint64) (genutiltypes.AppMap, error) { if appState[host.ModuleName] != nil { // ensure legacy solo machines are registered diff --git a/modules/core/legacy/v100/genesis_test.go b/modules/core/legacy/v100/genesis_test.go index 1aad8869260..85b33081a96 100644 --- a/modules/core/legacy/v100/genesis_test.go +++ b/modules/core/legacy/v100/genesis_test.go @@ -58,7 +58,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { solomachine := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-0", "testing", 1) solomachineMulti := ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "06-solomachine-1", "testing", 4) - // create ostracon clients + // create tendermint clients // NOTE: only 1 set of metadata is created, we aren't testing ordering // The purpose of this test is to ensure the genesis states can be marshalled/unmarshalled suite.coordinator.SetupClients(path) @@ -140,7 +140,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { clientStore.Set(host.ConsensusStateKey(height2), bz) clientStore.Set(host.ConsensusStateKey(height3), bz) } - // solo machine clients must come before ostracon in expected + // solo machine clients must come before tendermint in expected clientGenState.Clients = append(clients, clientGenState.Clients...) // migrate store get expected genesis @@ -162,7 +162,7 @@ func (suite *LegacyTestSuite) TestMigrateGenesisSolomachine() { InitialHeight: suite.chainA.GetContext().BlockHeight(), } - // NOTE: genesis time isn't updated since we aren't testing for ostracon consensus state pruning + // NOTE: genesis time isn't updated since we aren't testing for tendermint consensus state pruning migrated, err := v100.MigrateGenesis(appState, clientCtx, genDoc, uint64(connectiontypes.DefaultTimePerBlock)) suite.Require().NoError(err) diff --git a/modules/core/spec/01_concepts.md b/modules/core/spec/01_concepts.md index b3498ab4373..0ab6fa70710 100644 --- a/modules/core/spec/01_concepts.md +++ b/modules/core/spec/01_concepts.md @@ -15,9 +15,9 @@ as valid. Upon verifying the misbehaviour the IBC client must freeze at that height so that any proof verifications for the frozen height or later fail. Note, there is a difference between the chain-level Misbehaviour that IBC is -concerned with and the validator-level Evidence that Ostracon is concerned -with. Ostracon must be able to detect, submit, and punish any evidence of -individual validators breaking the Ostracon consensus protocol and attempting +concerned with and the validator-level Evidence that Tendermint is concerned +with. Tendermint must be able to detect, submit, and punish any evidence of +individual validators breaking the Tendermint consensus protocol and attempting to mount an attack. IBC clients must only act when an attack is successful and the chain has successfully forked. In this case, valid Headers submitted to the IBC client can no longer be trusted and the client must freeze. diff --git a/modules/light-clients/06-solomachine/spec/01_concepts.md b/modules/light-clients/06-solomachine/spec/01_concepts.md index a177a21ed96..75d31bf5340 100644 --- a/modules/light-clients/06-solomachine/spec/01_concepts.md +++ b/modules/light-clients/06-solomachine/spec/01_concepts.md @@ -23,7 +23,7 @@ is used on. ## Public Key The public key can be a single public key or a multi-signature public key. The public key type used -must fulfill the ostracon public key interface (this will become the SDK public key interface in the +must fulfill the tendermint public key interface (this will become the SDK public key interface in the near future). The public key must be registered on the application codec otherwise encoding/decoding errors will arise. The public key stored in the consensus state is represented as a protobuf `Any`. This allows for flexibility in what other public key types can be supported in the future. diff --git a/modules/light-clients/06-solomachine/types/client_state_test.go b/modules/light-clients/06-solomachine/types/client_state_test.go index dbf5d05c931..cfc26894931 100644 --- a/modules/light-clients/06-solomachine/types/client_state_test.go +++ b/modules/light-clients/06-solomachine/types/client_state_test.go @@ -116,7 +116,7 @@ func (suite *SoloMachineTestSuite) TestInitialize() { false, }, { - "invalid consensus state: Ostracon consensus state", + "invalid consensus state: Tendermint consensus state", &ibcoctypes.ConsensusState{}, false, }, @@ -144,7 +144,7 @@ func (suite *SoloMachineTestSuite) TestInitialize() { } func (suite *SoloMachineTestSuite) TestVerifyClientState() { - // create client for ostracon so we can use client state for verification + // create client for tendermint so we can use client state for verification tmPath := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(tmPath) clientState := suite.chainA.GetClientState(tmPath.EndpointA.ClientID) @@ -262,7 +262,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientState() { } func (suite *SoloMachineTestSuite) TestVerifyClientConsensusState() { - // create client for ostracon so we can use consensus state for verification + // create client for tendermint so we can use consensus state for verification tmPath := ibctesting.NewPath(suite.chainA, suite.chainB) suite.coordinator.SetupClients(tmPath) clientState := suite.chainA.GetClientState(tmPath.EndpointA.ClientID) diff --git a/modules/light-clients/07-tendermint/doc.go b/modules/light-clients/07-tendermint/doc.go index 548f0066ce5..26aa430a82d 100644 --- a/modules/light-clients/07-tendermint/doc.go +++ b/modules/light-clients/07-tendermint/doc.go @@ -1,5 +1,5 @@ /* -Package ostracon implements a concrete `ConsensusState`, `Header`, -`Misbehaviour` and `Equivocation` types for the Ostracon consensus light client. +Package tendermint implements a concrete `ConsensusState`, `Header`, +`Misbehaviour` and `Equivocation` types for the Tendermint consensus light client. */ -package ostracon +package tendermint diff --git a/modules/light-clients/07-tendermint/module.go b/modules/light-clients/07-tendermint/module.go index cdfd37ca03b..e019717bd65 100644 --- a/modules/light-clients/07-tendermint/module.go +++ b/modules/light-clients/07-tendermint/module.go @@ -1,4 +1,4 @@ -package ostracon +package tendermint import ( "github.com/line/ibc-go/v3/modules/light-clients/07-tendermint/types" diff --git a/modules/light-clients/07-tendermint/types/tendermint.pb.go b/modules/light-clients/07-tendermint/types/tendermint.pb.go index 0684af09ca6..89427bd2bb9 100644 --- a/modules/light-clients/07-tendermint/types/tendermint.pb.go +++ b/modules/light-clients/07-tendermint/types/tendermint.pb.go @@ -33,7 +33,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ClientState from Ostracon tracks the current validator set, latest height, +// ClientState from Tendermint tracks the current validator set, latest height, // and a possible frozen height. type ClientState struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -98,7 +98,7 @@ func (m *ClientState) XXX_DiscardUnknown() { var xxx_messageInfo_ClientState proto.InternalMessageInfo -// ConsensusState defines the consensus state from Ostracon. +// ConsensusState defines the consensus state from Tendermint. type ConsensusState struct { // timestamp that corresponds to the block height in which the ConsensusState // was stored. @@ -144,8 +144,7 @@ var xxx_messageInfo_ConsensusState proto.InternalMessageInfo // Misbehaviour is a wrapper over two conflicting Headers // that implements Misbehaviour interface expected by ICS-02 type Misbehaviour struct { - // ClientID is deprecated - ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` // Deprecated: Do not use. + ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"` Header1 *Header `protobuf:"bytes,2,opt,name=header_1,json=header1,proto3" json:"header_1,omitempty" yaml:"header_1"` Header2 *Header `protobuf:"bytes,3,opt,name=header_2,json=header2,proto3" json:"header_2,omitempty" yaml:"header_2"` } @@ -183,9 +182,9 @@ func (m *Misbehaviour) XXX_DiscardUnknown() { var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo -// Header defines the Ostracon client consensus Header. +// Header defines the Tendermint client consensus Header. // It encapsulates all the information necessary to update from a trusted -// Ostracon ConsensusState. The inclusion of TrustedHeight and +// Tendermint ConsensusState. The inclusion of TrustedHeight and // TrustedValidators allows this update to process correctly, so long as the // ConsensusState for the TrustedHeight exists, this removes race conditions // among relayers The SignedHeader and ValidatorSet are the new untrusted update @@ -323,75 +322,75 @@ func init() { } var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1079 bytes of a gzipped FileDescriptorProto + // 1081 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0x44, 0x14, 0x6e, 0xda, 0xb2, 0x4d, 0x26, 0xe9, 0x76, 0x31, 0xa5, 0x9b, 0x96, 0x6e, 0x1c, 0x19, 0xa9, 0xe4, 0xb0, 0xb5, 0x49, 0x7a, 0x40, 0xaa, 0xb8, 0xe0, 0x2e, 0xa8, 0x45, 0xac, 0xa8, 0x5c, 0xe0, 0x80, 0xb4, 0x32, 0x13, 0x7b, 0x12, 0x8f, 0xd6, 0xf6, 0x58, 0x9e, 0x71, 0x68, 0xb9, 0x71, 0xe3, - 0xc6, 0x1e, 0x11, 0xe2, 0xc0, 0x9f, 0xb3, 0xc7, 0x1e, 0x39, 0x19, 0xd4, 0x5e, 0x39, 0xe5, 0xc8, - 0x09, 0xcd, 0x0f, 0xff, 0x68, 0xb6, 0x4b, 0xb5, 0x5c, 0xa2, 0x79, 0xef, 0x7d, 0xef, 0xfb, 0x32, - 0x6f, 0xde, 0xbc, 0x31, 0xb0, 0xf0, 0xd8, 0xb3, 0x42, 0x3c, 0x0d, 0x98, 0x17, 0x62, 0x14, 0x33, - 0x6a, 0x31, 0x14, 0xfb, 0x28, 0x8d, 0x70, 0xcc, 0xac, 0xd9, 0xb0, 0x66, 0x99, 0x49, 0x4a, 0x18, - 0xd1, 0x7a, 0x78, 0xec, 0x99, 0xf5, 0x04, 0xb3, 0x06, 0x99, 0x0d, 0x77, 0xfa, 0xb5, 0x7c, 0x76, - 0x91, 0x20, 0x6a, 0xcd, 0x60, 0x88, 0x7d, 0xc8, 0x48, 0x2a, 0x19, 0x76, 0x76, 0x5f, 0x41, 0x88, - 0x5f, 0x15, 0xed, 0x24, 0x29, 0x21, 0x93, 0xc2, 0xea, 0x4d, 0x09, 0x99, 0x86, 0xc8, 0x12, 0xd6, - 0x38, 0x9b, 0x58, 0x7e, 0x96, 0x42, 0x86, 0x49, 0xac, 0xe2, 0xfa, 0x62, 0x9c, 0xe1, 0x08, 0x51, - 0x06, 0xa3, 0xa4, 0x00, 0xf0, 0xfd, 0x79, 0x24, 0x45, 0x96, 0xfc, 0xbb, 0x7c, 0x4f, 0x72, 0xa5, - 0x00, 0x1f, 0x54, 0x00, 0x12, 0x45, 0x98, 0x45, 0x05, 0xa8, 0xb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, 0x6b, 0x11, 0xfc, 0x84, 0xc7, 0x3e, 0x15, 0x21, - 0x8d, 0x02, 0xfd, 0x96, 0xbc, 0x08, 0xd3, 0x31, 0x0a, 0xe0, 0x0c, 0x93, 0x2c, 0xed, 0xb6, 0x85, - 0xd0, 0xe3, 0x79, 0xae, 0xef, 0xbd, 0x56, 0xa8, 0x9e, 0xc0, 0xe5, 0x76, 0x17, 0xe5, 0x9e, 0xd6, - 0x00, 0x87, 0xab, 0x3f, 0xfd, 0xae, 0x2f, 0x19, 0xbf, 0x2d, 0x83, 0xfb, 0x47, 0x24, 0xa6, 0x28, - 0xa6, 0x19, 0x95, 0x37, 0xde, 0x06, 0xad, 0x72, 0xe8, 0x88, 0x2b, 0xcf, 0x8f, 0x74, 0xb1, 0x2d, - 0xbf, 0x2a, 0x10, 0x76, 0x93, 0x1f, 0xe9, 0x0b, 0xde, 0x7d, 0x55, 0x9a, 0xf6, 0x31, 0x58, 0x4d, - 0x09, 0x61, 0x6a, 0x26, 0x18, 0xb5, 0x8e, 0xa8, 0xa6, 0xd0, 0x6c, 0x68, 0x3e, 0x45, 0xe9, 0xf3, - 0x10, 0x39, 0x84, 0x30, 0x7b, 0x95, 0xd3, 0x38, 0x22, 0x4b, 0xfb, 0xb1, 0x01, 0x36, 0x63, 0x74, - 0xce, 0xdc, 0x72, 0xd2, 0x52, 0x37, 0x80, 0x34, 0x10, 0xf7, 0xbe, 0x63, 0x7f, 0x39, 0xcf, 0xf5, - 0xf7, 0x64, 0x15, 0x6e, 0x43, 0x19, 0xff, 0xe4, 0xfa, 0xe3, 0x29, 0x66, 0x41, 0x36, 0xe6, 0x72, - 0x56, 0x88, 0x63, 0x64, 0x11, 0xca, 0x52, 0xe8, 0x91, 0xd8, 0x0a, 0xf1, 0x98, 0x5a, 0xe3, 0x0b, - 0x86, 0xa8, 0x79, 0x8c, 0xce, 0x6d, 0xbe, 0x70, 0x34, 0x4e, 0xf3, 0x4d, 0xc9, 0x72, 0x0c, 0x69, - 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 0xae, 0x7b, 0x4b, 0xdf, 0x1e, 0x2d, 0x5e, 0x2d, 0x3c, 0xf6, 0xf6, 0xa7, + 0xc4, 0x9a, 0x1d, 0x58, 0x11, 0xf1, 0xb3, 0x10, 0x51, 0xf9, 0xf9, 0xb5, 0x5f, 0x7c, 0x7f, 0x7d, + 0xf8, 0xd1, 0xfe, 0xe2, 0x07, 0xd2, 0xf8, 0x9e, 0x18, 0x24, 0x07, 0xff, 0x06, 0x00, 0x00, 0xff, + 0xff, 0x92, 0x26, 0x6d, 0x83, 0xae, 0x09, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto index 7b98a08440a..843a64a20fc 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -13,7 +13,7 @@ import "ibc/core/client/v1/client.proto"; import "ibc/core/commitment/v1/commitment.proto"; import "gogoproto/gogo.proto"; -// ClientState from Ostracon tracks the current validator set, latest height, +// ClientState from Tendermint tracks the current validator set, latest height, // and a possible frozen height. message ClientState { option (gogoproto.goproto_getters) = false; @@ -59,7 +59,7 @@ message ClientState { [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; } -// ConsensusState defines the consensus state from Ostracon. +// ConsensusState defines the consensus state from Tendermint. message ConsensusState { option (gogoproto.goproto_getters) = false; @@ -79,15 +79,14 @@ message ConsensusState { message Misbehaviour { option (gogoproto.goproto_getters) = false; - // ClientID is deprecated - string client_id = 1 [deprecated = true, (gogoproto.moretags) = "yaml:\"client_id\""]; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; } -// Header defines the Ostracon client consensus Header. +// Header defines the Tendermint client consensus Header. // It encapsulates all the information necessary to update from a trusted -// Ostracon ConsensusState. The inclusion of TrustedHeight and +// Tendermint ConsensusState. The inclusion of TrustedHeight and // TrustedValidators allows this update to process correctly, so long as the // ConsensusState for the TrustedHeight exists, this removes race conditions // among relayers The SignedHeader and ValidatorSet are the new untrusted update