Skip to content

Commit

Permalink
Revert "Merge branch 'main' into shawn/throttle-with-retries-provider…
Browse files Browse the repository at this point in the history
…-changes"

This reverts commit 73db33b, reversing
changes made to 78a8269.
  • Loading branch information
shaspitz committed Aug 24, 2023
1 parent 73db33b commit 5bfccc3
Show file tree
Hide file tree
Showing 57 changed files with 4,281 additions and 4,563 deletions.
3 changes: 1 addition & 2 deletions app/consumer-democracy/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ import (
ccvdistr "github.com/cosmos/interchain-security/v3/x/ccv/democracy/distribution"
ccvgov "github.com/cosmos/interchain-security/v3/x/ccv/democracy/governance"
ccvstaking "github.com/cosmos/interchain-security/v3/x/ccv/democracy/staking"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

const (
Expand Down Expand Up @@ -713,7 +712,7 @@ func New(
return fromVM, fmt.Errorf("failed to unmarshal genesis state: %w", err)
}

consumerGenesis := ccvtypes.GenesisState{}
consumerGenesis := consumertypes.GenesisState{}
appCodec.MustUnmarshalJSON(appState[consumertypes.ModuleName], &consumerGenesis)

consumerGenesis.PreCCV = true
Expand Down
202 changes: 0 additions & 202 deletions docs/docs/adrs/adr-011-improving-test-confidence.md

This file was deleted.

Binary file removed docs/figures/cometmock_matrix_test.png
Binary file not shown.
Binary file removed docs/figures/matrix_e2e_tests.png
Binary file not shown.
3 changes: 1 addition & 2 deletions legacy_ibc_testing/testing/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/cosmos/interchain-security/v3/legacy_ibc_testing/core"
"github.com/cosmos/interchain-security/v3/legacy_ibc_testing/simapp"
consumertypes "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types"
ccvtypes "github.com/cosmos/interchain-security/v3/x/ccv/types"
)

/*
Expand Down Expand Up @@ -112,7 +111,7 @@ func SetupWithGenesisValSet(t *testing.T, appIniter AppIniter, valSet *tmtypes.V
// set validators and delegations
var (
stakingGenesis stakingtypes.GenesisState
consumerGenesis ccvtypes.GenesisState
consumerGenesis consumertypes.GenesisState
bondDenom string
)
if genesisState[stakingtypes.ModuleName] != nil {
Expand Down
86 changes: 71 additions & 15 deletions proto/interchain_security/ccv/consumer/v1/consumer.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package interchain_security.ccv.consumer.v1;

import "interchain_security/ccv/v1/wire.proto";
import "interchain_security/ccv/v1/ccv.proto";

option go_package = "github.com/cosmos/interchain-security/v3/x/ccv/consumer/types";

Expand All @@ -11,17 +11,68 @@ import "cosmos_proto/cosmos.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

//
// Note any type defined in this file is ONLY used internally to the consumer CCV module.
// These schemas can change with proper consideration of compatibility or migration.
//

// CrossChainValidator defines the type used to store validator information internal
// to the consumer CCV module. Note one cross chain validator entry is persisted for
// each consumer validator, where incoming VSC packets update this data, which is eventually
// forwarded to comet for consumer chain consensus.
//
// Note this type is only used internally to the consumer CCV module.
// Params defines the parameters for CCV consumer module
message Params {
// TODO: Remove enabled flag and find a better way to setup integration tests
// See: https://github.com/cosmos/interchain-security/issues/339
bool enabled = 1;

///////////////////////
// Distribution Params
// Number of blocks between ibc-token-transfers from the consumer chain to
// the provider chain. Note that at this transmission event a fraction of
// the accumulated tokens are divided and sent consumer redistribution
// address.
int64 blocks_per_distribution_transmission = 2;

// Channel, and provider-chain receiving address to send distribution token
// transfers over. These parameters is auto-set during the consumer <->
// provider handshake procedure.
string distribution_transmission_channel = 3;
string provider_fee_pool_addr_str = 4;
// Sent CCV related IBC packets will timeout after this duration
google.protobuf.Duration ccv_timeout_period = 5
[ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ];

// Sent transfer related IBC packets will timeout after this duration
google.protobuf.Duration transfer_timeout_period = 6
[ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ];

// The fraction of tokens allocated to the consumer redistribution address
// during distribution events. The fraction is a string representing a
// decimal number. For example "0.75" would represent 75%.
string consumer_redistribution_fraction = 7;

// The number of historical info entries to persist in store.
// This param is a part of the cosmos sdk staking module. In the case of
// a ccv enabled consumer chain, the ccv module acts as the staking module.
int64 historical_entries = 8;

// Unbonding period for the consumer,
// which should be smaller than that of the provider in general.
google.protobuf.Duration unbonding_period = 9
[ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ];

// The threshold for the percentage of validators at the bottom of the set who
// can opt out of running the consumer chain without being punished. For
// example, a value of 0.05 means that the validators in the bottom 5% of the
// set can opt out
string soft_opt_out_threshold = 10;

// Reward denoms. These are the denominations which are allowed to be sent to
// the provider as rewards.
repeated string reward_denoms = 11;

// Provider-originated reward denoms. These are denoms coming from the
// provider which are allowed to be used as rewards. e.g. "uatom"
repeated string provider_reward_denoms = 12;
}

// LastTransmissionBlockHeight is the last time validator holding
// pools were transmitted to the provider chain
message LastTransmissionBlockHeight { int64 height = 1; }

// CrossChainValidator defines the validators for CCV consumer module
message CrossChainValidator {
bytes address = 1;
int64 power = 2;
Expand All @@ -32,12 +83,17 @@ message CrossChainValidator {
];
}

// MaturingVSCPacket contains the maturing time of a received VSCPacket
message MaturingVSCPacket {
uint64 vscId = 1;
google.protobuf.Timestamp maturity_time = 2
[ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ];
}

// A record storing the state of a slash packet sent to the provider chain
// which may bounce back and forth until handled by the provider.
//
// Note this type is only used internally to the consumer CCV module.
message SlashRecord {
bool waiting_on_reply = 1;
google.protobuf.Timestamp send_time = 2
[ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ];
}
}
Loading

0 comments on commit 5bfccc3

Please sign in to comment.