mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 12:05:18 +00:00
614d4e40fe
* Update cometbft, cosmos, ethermint, and ibc-go * Replace github.com/tendermint/tendermint by github.com/cometbft/cometbft * Replace github.com/tendermint/tm-db by github.com/cometbft/cometbft-db * Replace gogo/protobuf with cosmos/gogoproto & simapp replacement * Replace cosmos-sdk/simapp/helpers with cosmos-sdk/testutil/sims * Remove no longer used simulations * Replace ibchost with ibcexported See https://github.com/cosmos/ibc-go/blob/v7.2.2/docs/migrations/v6-to-v7.md#ibc-module-constants * Add new consensus params keeper * Add consensus keeper to blockers * Fix keeper and module issues in app.go * Add IsSendEnabledCoins and update SetParams interface changes * Fix protobuf build for cosmos 47 (#1800) * fix cp errors by using -f; fix lint by only linting our proto dir; and use proofs.proto directly from ics23 for ibc-go v7 * run proto-all; commit updated third party deps and swagger changes * regenerate proto files * use correct gocosmos build plugin for buf * re-gen all protobuf files to update paths for new gocosmos plugin * update protoc and buf to latest versions * fix staking keeper issues in app.go * update tally handler for gov changes * chain id fix and flag fixes * update deps for cometbft 47.7 upgrade * remove all module legacy queriers * update stakingKeeper to pointer * Replace ModuleCdc from govv1beta1 to govcodec * remove simulations * abci.LastCommitInfo → abci.CommitInfo * Remove unused code in keys.go * simapp.MakeTestEncodingConfig -> moduletestutil.MakeTestEncodingConfi * Fix chain id issues in tests * Fix remaining unit test issues * Update changelog for upgrade * Fix e2e tests using updated kvtool * Update protonet to v47 compatible genesis * Bump cometbft-db to v0.9.1-kava.1 * Update kvtool * Remove extra changelog * Fix merged rocksdb issues * go mod cleanup * Bump cometbft-db to v9 and go to 1.21 * Bump rocksdb version to v8.10.0 * Update kvtool to latest version * Update gin to v1.9.0 * Use ibctm.ModuleName in app_test * Fallback to genesis chain id instead of client toml * Remove all simulations * Fix cdp migrations issue with v47 * Update dependencies to correct tags --------- Co-authored-by: Nick DeLuca <nickdeluca08@gmail.com>
116 lines
5.6 KiB
Protocol Buffer
116 lines
5.6 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ibc.lightclients.tendermint.v1;
|
|
|
|
option go_package = "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint;tendermint";
|
|
|
|
import "tendermint/types/validator.proto";
|
|
import "tendermint/types/types.proto";
|
|
import "cosmos/ics23/v1/proofs.proto";
|
|
import "google/protobuf/duration.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "ibc/core/client/v1/client.proto";
|
|
import "ibc/core/commitment/v1/commitment.proto";
|
|
import "gogoproto/gogo.proto";
|
|
|
|
// ClientState from Tendermint tracks the current validator set, latest height,
|
|
// and a possible frozen height.
|
|
message ClientState {
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
string chain_id = 1;
|
|
Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""];
|
|
// duration of the period since the LastestTimestamp during which the
|
|
// submitted headers are valid for upgrade
|
|
google.protobuf.Duration trusting_period = 3
|
|
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""];
|
|
// duration of the staking unbonding period
|
|
google.protobuf.Duration unbonding_period = 4 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.stdduration) = true,
|
|
(gogoproto.moretags) = "yaml:\"unbonding_period\""
|
|
];
|
|
// defines how much new (untrusted) header's Time can drift into the future.
|
|
google.protobuf.Duration max_clock_drift = 5
|
|
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""];
|
|
// Block height when the client was frozen due to a misbehaviour
|
|
ibc.core.client.v1.Height frozen_height = 6
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""];
|
|
// Latest height the client was updated to
|
|
ibc.core.client.v1.Height latest_height = 7
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""];
|
|
|
|
// Proof specifications used in verifying counterparty state
|
|
repeated cosmos.ics23.v1.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""];
|
|
|
|
// 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"}`
|
|
repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""];
|
|
|
|
// allow_update_after_expiry is deprecated
|
|
bool allow_update_after_expiry = 10 [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""];
|
|
// allow_update_after_misbehaviour is deprecated
|
|
bool allow_update_after_misbehaviour = 11
|
|
[deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""];
|
|
}
|
|
|
|
// ConsensusState defines the consensus state from Tendermint.
|
|
message ConsensusState {
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// timestamp that corresponds to the block height in which the ConsensusState
|
|
// was stored.
|
|
google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
|
// commitment root (i.e app hash)
|
|
ibc.core.commitment.v1.MerkleRoot root = 2 [(gogoproto.nullable) = false];
|
|
bytes next_validators_hash = 3 [
|
|
(gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes",
|
|
(gogoproto.moretags) = "yaml:\"next_validators_hash\""
|
|
];
|
|
}
|
|
|
|
// Misbehaviour is a wrapper over two conflicting Headers
|
|
// that implements Misbehaviour interface expected by ICS-02
|
|
message Misbehaviour {
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// ClientID is deprecated
|
|
string client_id = 1 [deprecated = true, (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 Tendermint client consensus Header.
|
|
// It encapsulates all the information necessary to update from a trusted
|
|
// 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
|
|
// 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.
|
|
message Header {
|
|
.tendermint.types.SignedHeader signed_header = 1
|
|
[(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""];
|
|
|
|
.tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""];
|
|
ibc.core.client.v1.Height trusted_height = 3
|
|
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""];
|
|
.tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""];
|
|
}
|
|
|
|
// Fraction defines the protobuf message type for tmmath.Fraction that only
|
|
// supports positive values.
|
|
message Fraction {
|
|
uint64 numerator = 1;
|
|
uint64 denominator = 2;
|
|
}
|