From f4b837624a1d3e36bc4210b39973f62733f28510 Mon Sep 17 00:00:00 2001 From: insumity Date: Thu, 30 May 2024 15:37:41 +0200 Subject: [PATCH 01/10] init commit --- ...ards-to-long-term-validating-validators.md | 3 + ...ards-to-long-term-validating-validators.md | 3 + .../ccv/provider/v1/provider.proto | 8 + tests/integration/distribution.go | 110 +++++++++- x/ccv/provider/keeper/distribution.go | 14 ++ x/ccv/provider/keeper/distribution_test.go | 5 + x/ccv/provider/keeper/params.go | 9 + x/ccv/provider/keeper/params_test.go | 1 + x/ccv/provider/keeper/proposal_test.go | 3 +- x/ccv/provider/keeper/relay_test.go | 49 +++++ x/ccv/provider/keeper/validator_set_update.go | 25 +++ x/ccv/provider/migrations/migrator.go | 1 + .../provider/migrations/v6/migration_test.go | 27 +++ x/ccv/provider/migrations/v6/migrations.go | 12 ++ x/ccv/provider/module.go | 4 + x/ccv/provider/types/genesis_test.go | 26 +-- x/ccv/provider/types/params.go | 55 +++-- x/ccv/provider/types/params_test.go | 28 +-- x/ccv/provider/types/provider.pb.go | 201 ++++++++++++++++++ 19 files changed, 539 insertions(+), 45 deletions(-) create mode 100644 .changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md create mode 100644 .changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md create mode 100644 x/ccv/provider/migrations/v6/migration_test.go diff --git a/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md b/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md new file mode 100644 index 0000000000..1b5c3e8d1f --- /dev/null +++ b/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md @@ -0,0 +1,3 @@ +- Only start distributing rewards to validators after they have been validating + for a fixed number of blocks. ([\#1929](https://github.com/cosmos/interchain- + security/pull/1929)) \ No newline at end of file diff --git a/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md b/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md new file mode 100644 index 0000000000..1b5c3e8d1f --- /dev/null +++ b/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md @@ -0,0 +1,3 @@ +- Only start distributing rewards to validators after they have been validating + for a fixed number of blocks. ([\#1929](https://github.com/cosmos/interchain- + security/pull/1929)) \ No newline at end of file diff --git a/proto/interchain_security/ccv/provider/v1/provider.proto b/proto/interchain_security/ccv/provider/v1/provider.proto index 2a25eb533f..0cf17556c2 100644 --- a/proto/interchain_security/ccv/provider/v1/provider.proto +++ b/proto/interchain_security/ccv/provider/v1/provider.proto @@ -243,6 +243,9 @@ message Params { // The number of blocks that comprise an epoch. int64 blocks_per_epoch = 10; + + // The number of epochs a validator has to validate a consumer chain in order to start receiving rewards from that chain. + int64 number_of_epochs_to_start_receiving_rewards = 11; } // SlashAcks contains cons addresses of consumer chain validators @@ -360,6 +363,11 @@ message ConsumerValidator { int64 power = 2; // public key the validator uses on the consumer chain during this epoch tendermint.crypto.PublicKey consumer_public_key = 3; + // height the validator had when it FIRST became a consumer validator + // If a validator becomes a consumer validator at height `H` and is continuously a consumer validator for all the upcoming + // epochs, then the height of the validator SHOULD remain `H`. This height only resets to a different height if a validator + // stops being a consumer validator during an epoch and later becomes again a consumer validator. + int64 height = 4; } // ConsumerRewardsAllocation stores the rewards allocated by a consumer chain // to the consumer rewards pool. It is used to allocate the tokens to the consumer diff --git a/tests/integration/distribution.go b/tests/integration/distribution.go index 8229850a63..9681d0b272 100644 --- a/tests/integration/distribution.go +++ b/tests/integration/distribution.go @@ -935,7 +935,7 @@ func (s *CCVTestSuite) prepareRewardDist() { s.coordinator.CommitNBlocks(s.consumerChain, uint64(blocksToGo)) } -func (s *CCVTestSuite) TestAllocateTokensToValidator() { +func (s *CCVTestSuite) TestAllocateTokensToConsumerValidators() { providerKeeper := s.providerApp.GetProviderKeeper() distributionKeeper := s.providerApp.GetTestDistributionKeeper() bankKeeper := s.providerApp.GetTestBankKeeper() @@ -1061,6 +1061,114 @@ func (s *CCVTestSuite) TestAllocateTokensToValidator() { } } +// TestAllocateTokensToConsumerValidatorsWithDifferentValidatorHeights tests `AllocateTokensToConsumerValidators` with +// consumer validators that have different heights. Specifically, test that validators that have been consumer validators +// for some time receive rewards, while validators that recently became consumer validators do not receive rewards. +func (s *CCVTestSuite) TestAllocateTokensToConsumerValidatorsWithDifferentValidatorHeights() { + // Note this test is an adaptation of a `TestAllocateTokensToConsumerValidators` testcase. + providerKeeper := s.providerApp.GetProviderKeeper() + distributionKeeper := s.providerApp.GetTestDistributionKeeper() + bankKeeper := s.providerApp.GetTestBankKeeper() + + chainID := s.consumerChain.ChainID + + tokens := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyNewDecFromIntWithPrec(math.NewInt(999), 2))} + rate := sdk.OneDec() + expAllocated := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyNewDecFromIntWithPrec(math.NewInt(999), 2))} + + ctx, _ := s.providerCtx().CacheContext() + // If the provider chain has not yet reached `GetNumberOfEpochsToStartReceivingRewards * GetBlocksPerEpoch` block height, + // then all validators receive rewards. In this test, we want to check whether validators receive rewards or not based on how + // long they have been consumer validators. Because of this, we increase the block height. + ctx = ctx.WithBlockHeight(providerKeeper.GetNumberOfEpochsToStartReceivingRewards(ctx)*providerKeeper.GetBlocksPerEpoch(ctx) + 1) + + // update the consumer validators + consuVals := providerKeeper.GetConsumerValSet(ctx, chainID) + // first 2 validators were consumer validators since block height 1 and hence get rewards + consuVals[0].Height = 1 + consuVals[1].Height = 1 + // last 2 validators were consumer validators since block height 2 and hence do not get rewards because they + // have not been consumer validators for `GetNumberOfEpochsToStartReceivingRewards * GetBlocksPerEpoch` blocks + consuVals[2].Height = 2 + consuVals[3].Height = 2 + providerKeeper.SetConsumerValSet(ctx, chainID, consuVals) + + providerKeeper.DeleteConsumerValSet(ctx, chainID) + providerKeeper.SetConsumerValSet(ctx, chainID, consuVals) + consuVals = providerKeeper.GetConsumerValSet(ctx, chainID) + + // set the same consumer commission rate for all consumer validators + for _, v := range consuVals { + provAddr := providertypes.NewProviderConsAddress(sdk.ConsAddress(v.ProviderConsAddr)) + err := providerKeeper.SetConsumerCommissionRate( + ctx, + chainID, + provAddr, + rate, + ) + s.Require().NoError(err) + } + + // allocate tokens + res := providerKeeper.AllocateTokensToConsumerValidators( + ctx, + chainID, + tokens, + ) + + // check that the expected result is returned + s.Require().Equal(expAllocated, res) + + // rewards are expected to be allocated evenly between validators 3 and 4 + rewardsPerVal := expAllocated.QuoDec(sdk.NewDec(int64(2))) + + // assert that the rewards are allocated to the first 2 validators + for _, v := range consuVals[0:2] { + valAddr := sdk.ValAddress(v.ProviderConsAddr) + rewards := s.providerApp.GetTestDistributionKeeper().GetValidatorOutstandingRewards( + ctx, + valAddr, + ) + s.Require().Equal(rewardsPerVal, rewards.Rewards) + + // send rewards to the distribution module + valRewardsTrunc, _ := rewards.Rewards.TruncateDecimal() + err := bankKeeper.SendCoinsFromAccountToModule( + ctx, + s.providerChain.SenderAccount.GetAddress(), + distrtypes.ModuleName, + valRewardsTrunc) + s.Require().NoError(err) + + // check that validators can withdraw their rewards + withdrawnCoins, err := distributionKeeper.WithdrawValidatorCommission( + ctx, + valAddr, + ) + s.Require().NoError(err) + + // check that the withdrawn coins is equal to the entire reward amount + // times the set consumer commission rate + commission := rewards.Rewards.MulDec(rate) + c, _ := commission.TruncateDecimal() + s.Require().Equal(withdrawnCoins, c) + + // check that validators get rewards in their balance + s.Require().Equal(withdrawnCoins, bankKeeper.GetAllBalances(ctx, sdk.AccAddress(valAddr))) + } + + // assert that no rewards are allocated to the last 2 validators because they have not been consumer validators + // for at least `GetNumberOfEpochsToStartReceivingRewards * GetBlocksPerEpoch` blocks + for _, v := range consuVals[2:4] { + valAddr := sdk.ValAddress(v.ProviderConsAddr) + rewards := s.providerApp.GetTestDistributionKeeper().GetValidatorOutstandingRewards( + ctx, + valAddr, + ) + s.Require().Zero(rewards.Rewards) + } +} + // TestMultiConsumerRewardsDistribution tests the rewards distribution of multiple consumers chains func (s *CCVTestSuite) TestMultiConsumerRewardsDistribution() { s.SetupAllCCVChannels() diff --git a/x/ccv/provider/keeper/distribution.go b/x/ccv/provider/keeper/distribution.go index 7d875b7c38..a7f36ac291 100644 --- a/x/ccv/provider/keeper/distribution.go +++ b/x/ccv/provider/keeper/distribution.go @@ -147,6 +147,13 @@ func (k Keeper) AllocateTokensToConsumerValidators( // Allocate tokens by iterating over the consumer validators for _, consumerVal := range k.GetConsumerValSet(ctx, chainID) { + + // do not distribute rewards to a validator that has not been validating long enough + numberOfBlocksToStartReceivingRewards := k.GetNumberOfEpochsToStartReceivingRewards(ctx) * k.GetBlocksPerEpoch(ctx) + if ctx.BlockHeight() >= numberOfBlocksToStartReceivingRewards && ctx.BlockHeight()-consumerVal.Height < numberOfBlocksToStartReceivingRewards { + continue + } + consAddr := sdk.ConsAddress(consumerVal.ProviderConsAddr) // get the validator tokens fraction using its voting power @@ -240,6 +247,13 @@ func (k Keeper) GetConsumerRewardsPool(ctx sdk.Context) sdk.Coins { func (k Keeper) ComputeConsumerTotalVotingPower(ctx sdk.Context, chainID string) (totalPower int64) { // sum the consumer validators set voting powers for _, v := range k.GetConsumerValSet(ctx, chainID) { + + // only consider the voting power of a validator that would receive rewards (i.e., validator has been validating for a number of blocks) + numberOfBlocksToStartReceivingRewards := k.GetNumberOfEpochsToStartReceivingRewards(ctx) * k.GetBlocksPerEpoch(ctx) + if ctx.BlockHeight() >= numberOfBlocksToStartReceivingRewards && ctx.BlockHeight()-v.Height < numberOfBlocksToStartReceivingRewards { + continue + } + totalPower += v.Power } diff --git a/x/ccv/provider/keeper/distribution_test.go b/x/ccv/provider/keeper/distribution_test.go index d95ae598c0..2bdbfdb621 100644 --- a/x/ccv/provider/keeper/distribution_test.go +++ b/x/ccv/provider/keeper/distribution_test.go @@ -23,6 +23,11 @@ func TestComputeConsumerTotalVotingPower(t *testing.T) { keeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() + // `ComputeConsumerTotalVotingPower` used in this test retrieves the blocks per epoch, so we need to set this param + params := providertypes.DefaultParams() + params.BlocksPerEpoch = 1 + keeper.SetParams(ctx, params) + createVal := func(power int64) tmtypes.Validator { signer := tmtypes.NewMockPV() val := tmtypes.NewValidator(signer.PrivKey.PubKey(), power) diff --git a/x/ccv/provider/keeper/params.go b/x/ccv/provider/keeper/params.go index f74baf656e..b5854e5b59 100644 --- a/x/ccv/provider/keeper/params.go +++ b/x/ccv/provider/keeper/params.go @@ -85,6 +85,14 @@ func (k Keeper) GetBlocksPerEpoch(ctx sdk.Context) int64 { return b } +// GetNumberOfEpochsToStartReceivingRewards returns the number of epochs needed by a validator to continuously validate +// to start receiving rewards +func (k Keeper) GetNumberOfEpochsToStartReceivingRewards(ctx sdk.Context) int64 { + var b int64 + k.paramSpace.Get(ctx, types.KeyNumberOfEpochsToStartReceivingRewards, &b) + return b +} + // GetParams returns the paramset for the provider module func (k Keeper) GetParams(ctx sdk.Context) types.Params { return types.NewParams( @@ -97,6 +105,7 @@ func (k Keeper) GetParams(ctx sdk.Context) types.Params { k.GetSlashMeterReplenishFraction(ctx), k.GetConsumerRewardDenomRegistrationFee(ctx), k.GetBlocksPerEpoch(ctx), + k.GetNumberOfEpochsToStartReceivingRewards(ctx), ) } diff --git a/x/ccv/provider/keeper/params_test.go b/x/ccv/provider/keeper/params_test.go index 88175431c0..9dd10076a6 100644 --- a/x/ccv/provider/keeper/params_test.go +++ b/x/ccv/provider/keeper/params_test.go @@ -49,6 +49,7 @@ func TestParams(t *testing.T) { Amount: sdk.NewInt(10000000), }, 600, + 24, ) providerKeeper.SetParams(ctx, newParams) params = providerKeeper.GetParams(ctx) diff --git a/x/ccv/provider/keeper/proposal_test.go b/x/ccv/provider/keeper/proposal_test.go index a7e26534b5..09942f82f1 100644 --- a/x/ccv/provider/keeper/proposal_test.go +++ b/x/ccv/provider/keeper/proposal_test.go @@ -839,7 +839,8 @@ func TestMakeConsumerGenesis(t *testing.T) { Denom: "stake", Amount: sdk.NewInt(1000000), }, - BlocksPerEpoch: 600, + BlocksPerEpoch: 600, + NumberOfEpochsToStartReceivingRewards: 24, } providerKeeper.SetParams(ctx, moduleParams) defer ctrl.Finish() diff --git a/x/ccv/provider/keeper/relay_test.go b/x/ccv/provider/keeper/relay_test.go index a4fe6e60ff..b21c6b5844 100644 --- a/x/ccv/provider/keeper/relay_test.go +++ b/x/ccv/provider/keeper/relay_test.go @@ -87,6 +87,55 @@ func TestQueueVSCPackets(t *testing.T) { } } +// TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights checks that the heights of consumer validators are not +// getting correctly updated +func TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights(t *testing.T) { + providerKeeper, ctx, ctrl, mocks := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) + defer ctrl.Finish() + + chainHeight := int64(987654321) + ctx = ctx.WithBlockHeight(chainHeight) + providerKeeper.SetParams(ctx, providertypes.DefaultParams()) + + // mock 2 bonded validators + valA := createStakingValidator(ctx, mocks, 1, 1) + valAConsAddr, _ := valA.GetConsAddr() + valAPubKey, _ := valA.TmConsPublicKey() + mocks.MockStakingKeeper.EXPECT().GetValidatorByConsAddr(ctx, valAConsAddr).Return(valA, true).AnyTimes() + valB := createStakingValidator(ctx, mocks, 2, 2) + valBConsAddr, _ := valB.GetConsAddr() + mocks.MockStakingKeeper.EXPECT().GetValidatorByConsAddr(ctx, valBConsAddr).Return(valB, true).AnyTimes() + mocks.MockStakingKeeper.EXPECT().GetLastValidators(ctx).Return([]stakingtypes.Validator{valA, valB}).AnyTimes() + + // set a consumer client, so we have a consumer chain (i.e., `k.GetAllConsumerChains(ctx)` is non empty) + providerKeeper.SetConsumerClientId(ctx, "chainID", "clientID") + + // opt in validator A and set as a consumer validator + providerKeeper.SetOptedIn(ctx, "chainID", providertypes.NewProviderConsAddress(valAConsAddr)) + consumerValidatorA := types.ConsumerValidator{ + ProviderConsAddr: valAConsAddr, + Power: 1, + ConsumerPublicKey: &valAPubKey, + Height: 123456789, + } + providerKeeper.SetConsumerValidator(ctx, "chainID", consumerValidatorA) + + // Opt in validator B. Note that validator B is not a consumer validator and hence would become a consumer + // validator for the first time after the `QueueVSCPackets` call. + providerKeeper.SetOptedIn(ctx, "chainID", providertypes.NewProviderConsAddress(valBConsAddr)) + + providerKeeper.QueueVSCPackets(ctx) + + // the height of consumer validator A should not be modified because A was already a consumer validator + cv, _ := providerKeeper.GetConsumerValidator(ctx, "chainID", providertypes.NewProviderConsAddress(valAConsAddr)) + require.Equal(t, consumerValidatorA.Height, cv.Height, "the consumer validator's height was erroneously modified") + + // the height of consumer validator B is set to be the same as the one of the current chain height because this + // consumer validator becomes a consumer validator for the first time (i.e., was not a consumer validator in the previous epoch) + cv, _ = providerKeeper.GetConsumerValidator(ctx, "chainID", providertypes.NewProviderConsAddress(valBConsAddr)) + require.Equal(t, chainHeight, cv.Height, "the consumer validator's height was not correctly set") +} + // TestOnRecvVSCMaturedPacket tests the OnRecvVSCMaturedPacket method of the keeper. // // Note: Handling logic itself is not tested here. diff --git a/x/ccv/provider/keeper/validator_set_update.go b/x/ccv/provider/keeper/validator_set_update.go index 9ba2c961ab..916922b620 100644 --- a/x/ccv/provider/keeper/validator_set_update.go +++ b/x/ccv/provider/keeper/validator_set_update.go @@ -72,6 +72,23 @@ func (k Keeper) IsConsumerValidator(ctx sdk.Context, chainID string, providerAdd return store.Get(types.ConsumerValidatorKey(chainID, providerAddr.ToSdkConsAddr())) != nil } +// GetConsumerValidator returns the consumer validator with `providerAddr` if it exists for chain `chainID` +func (k Keeper) GetConsumerValidator(ctx sdk.Context, chainID string, providerAddr types.ProviderConsAddress) (types.ConsumerValidator, bool) { + store := ctx.KVStore(k.storeKey) + marshalledConsumerValidator := store.Get(types.ConsumerValidatorKey(chainID, providerAddr.ToSdkConsAddr())) + + if marshalledConsumerValidator == nil { + return types.ConsumerValidator{}, false + } + + var validator types.ConsumerValidator + if err := validator.Unmarshal(marshalledConsumerValidator); err != nil { + panic(fmt.Errorf("failed to unmarshal ConsumerValidator: %w", err)) + } + + return validator, true +} + // GetConsumerValSet returns all the consumer validators for chain `chainID` func (k Keeper) GetConsumerValSet( ctx sdk.Context, @@ -152,10 +169,18 @@ func (k Keeper) CreateConsumerValidator(ctx sdk.Context, chainID string, validat } } + height := ctx.BlockHeight() + if v, found := k.GetConsumerValidator(ctx, chainID, types.ProviderConsAddress{Address: consAddr}); found { + // if validator was already a consumer validator, then do not update the height set the first time + // the validator became a consumer validator + height = v.Height + } + return types.ConsumerValidator{ ProviderConsAddr: consAddr, Power: power, ConsumerPublicKey: &consumerPublicKey, + Height: height, }, nil } diff --git a/x/ccv/provider/migrations/migrator.go b/x/ccv/provider/migrations/migrator.go index abc23c42d0..85be20fc95 100644 --- a/x/ccv/provider/migrations/migrator.go +++ b/x/ccv/provider/migrations/migrator.go @@ -53,5 +53,6 @@ func (m Migrator) Migrate4to5(ctx sdktypes.Context) error { // The migration consists of computing and storing the minimal power in the top N for all registered consumer chains. func (m Migrator) Migrate5to6(ctx sdktypes.Context) error { v6.MigrateMinPowerInTopN(ctx, m.providerKeeper) + v6.MigrateParams(ctx, m.paramSpace) return nil } diff --git a/x/ccv/provider/migrations/v6/migration_test.go b/x/ccv/provider/migrations/v6/migration_test.go new file mode 100644 index 0000000000..080b694279 --- /dev/null +++ b/x/ccv/provider/migrations/v6/migration_test.go @@ -0,0 +1,27 @@ +package v4 + +import ( + "testing" + + "github.com/stretchr/testify/require" + + testutil "github.com/cosmos/interchain-security/v4/testutil/keeper" + providertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" +) + +func TestMigrateParams(t *testing.T) { + inMemParams := testutil.NewInMemKeeperParams(t) + _, ctx, ctrl, _ := testutil.GetProviderKeeperAndCtx(t, inMemParams) + defer ctrl.Finish() + + // initially number of epochs param does not exist + require.False(t, inMemParams.ParamsSubspace.Has(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards)) + + MigrateParams(ctx, *inMemParams.ParamsSubspace) + + // after migration, number of epochs epoch param should exist and be equal to default + require.True(t, inMemParams.ParamsSubspace.Has(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards)) + var numberOfEpochsParam int64 + inMemParams.ParamsSubspace.Get(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, &numberOfEpochsParam) + require.Equal(t, providertypes.DefaultNumberOfEpochsToStartReceivingRewards, numberOfEpochsParam) +} diff --git a/x/ccv/provider/migrations/v6/migrations.go b/x/ccv/provider/migrations/v6/migrations.go index 7e659de143..810c98f027 100644 --- a/x/ccv/provider/migrations/v6/migrations.go +++ b/x/ccv/provider/migrations/v6/migrations.go @@ -2,6 +2,8 @@ package v6 import ( sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + providertypes "github.com/cosmos/interchain-security/v4/x/ccv/provider/types" providerkeeper "github.com/cosmos/interchain-security/v4/x/ccv/provider/keeper" ) @@ -31,3 +33,13 @@ func MigrateMinPowerInTopN(ctx sdk.Context, providerKeeper providerkeeper.Keeper } } } + +// MigrateParams adds missing provider chain params to the param store. +func MigrateParams(ctx sdk.Context, paramsSubspace paramtypes.Subspace) { + if paramsSubspace.HasKeyTable() { + paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) + } else { + paramsSubspace.WithKeyTable(providertypes.ParamKeyTable()) + paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) + } +} diff --git a/x/ccv/provider/module.go b/x/ccv/provider/module.go index 23c773e97a..e78a1e051e 100644 --- a/x/ccv/provider/module.go +++ b/x/ccv/provider/module.go @@ -118,6 +118,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) { if err := cfg.RegisterMigration(providertypes.ModuleName, 4, m.Migrate4to5); err != nil { panic(fmt.Sprintf("failed to register migrator for %s: %s", providertypes.ModuleName, err)) } + if err := cfg.RegisterMigration(providertypes.ModuleName, 5, m.Migrate5to6); err != nil { + panic(fmt.Sprintf("failed to register migrator for %s: %s", providertypes.ModuleName, err)) + } + } // InitGenesis performs genesis initialization for the provider module. It returns no validator updates. diff --git a/x/ccv/provider/types/genesis_test.go b/x/ccv/provider/types/genesis_test.go index 41a716757f..323aaa49be 100644 --- a/x/ccv/provider/types/genesis_test.go +++ b/x/ccv/provider/types/genesis_test.go @@ -81,7 +81,7 @@ func TestValidateGenesisState(t *testing.T) { nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -102,7 +102,7 @@ func TestValidateGenesisState(t *testing.T) { nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -123,7 +123,7 @@ func TestValidateGenesisState(t *testing.T) { nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -144,7 +144,7 @@ func TestValidateGenesisState(t *testing.T) { nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -171,7 +171,7 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultVscTimeoutPeriod, types.DefaultSlashMeterReplenishPeriod, types.DefaultSlashMeterReplenishFraction, - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -198,7 +198,7 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultVscTimeoutPeriod, types.DefaultSlashMeterReplenishPeriod, types.DefaultSlashMeterReplenishFraction, - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -225,7 +225,7 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultVscTimeoutPeriod, types.DefaultSlashMeterReplenishPeriod, types.DefaultSlashMeterReplenishFraction, - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(1000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(1000000)}, 600, 24), nil, nil, nil, @@ -252,7 +252,7 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultVscTimeoutPeriod, types.DefaultSlashMeterReplenishPeriod, types.DefaultSlashMeterReplenishFraction, - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -279,7 +279,7 @@ func TestValidateGenesisState(t *testing.T) { 0, // 0 vsc timeout here types.DefaultSlashMeterReplenishPeriod, types.DefaultSlashMeterReplenishFraction, - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -306,7 +306,7 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultVscTimeoutPeriod, 0, // 0 slash meter replenish period here types.DefaultSlashMeterReplenishFraction, - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -333,7 +333,7 @@ func TestValidateGenesisState(t *testing.T) { types.DefaultVscTimeoutPeriod, types.DefaultSlashMeterReplenishPeriod, "1.15", - sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600), + sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -685,7 +685,7 @@ func TestValidateGenesisState(t *testing.T) { nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "st", Amount: sdk.NewInt(10000000)}, 600), + types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "st", Amount: sdk.NewInt(10000000)}, 600, 24), nil, nil, nil, @@ -706,7 +706,7 @@ func TestValidateGenesisState(t *testing.T) { nil, types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(-1000000)}, 600), + types.DefaultTrustingPeriodFraction, time.Hour, time.Hour, 30*time.Minute, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(-1000000)}, 600, 24), nil, nil, nil, diff --git a/x/ccv/provider/types/params.go b/x/ccv/provider/types/params.go index a0a7a5ed7a..f7ecf22d41 100644 --- a/x/ccv/provider/types/params.go +++ b/x/ccv/provider/types/params.go @@ -41,18 +41,30 @@ const ( // an epoch corresponds to 1 hour (6 * 600 = 3600 seconds). // forcing int64 as the Params KeyTable expects an int64 and not int. DefaultBlocksPerEpoch = int64(600) + + // DefaultNumberOfEpochsToStartReceivingRewards defines the default minimum number of epochs required by a validator to validate + // during so that the validator can start receiving rewards. This would mean that a validator has to be a consumer validator for at least + // `DefaultNumberOfEpochsToStartReceivingRewards * DefaultBlocksPerEpoch` on a consumer chain to stat receiving rewards from the chain. + // Note that after a validator starts receiving rewards, the validator would keep receiving rewards every time the + // consumer chain sends an IBC transfer over to the provider. This value only sets a constraint on when a validator + // can first start receiving rewards to avoid cases where a validator just opts in to receive rewards and then opts out + // immediately afterward. + // Current default values for blocks per epoch corresponds to about 1 hour, so with 24 being the + // minimum amount of epochs, this would imply that a validator has to validate at least for 1 day to receive rewards. + DefaultNumberOfEpochsToStartReceivingRewards = int64(24) ) // Reflection based keys for params subspace var ( - KeyTemplateClient = []byte("TemplateClient") - KeyTrustingPeriodFraction = []byte("TrustingPeriodFraction") - KeyInitTimeoutPeriod = []byte("InitTimeoutPeriod") - KeyVscTimeoutPeriod = []byte("VscTimeoutPeriod") - KeySlashMeterReplenishPeriod = []byte("SlashMeterReplenishPeriod") - KeySlashMeterReplenishFraction = []byte("SlashMeterReplenishFraction") - KeyConsumerRewardDenomRegistrationFee = []byte("ConsumerRewardDenomRegistrationFee") - KeyBlocksPerEpoch = []byte("BlocksPerEpoch") + KeyTemplateClient = []byte("TemplateClient") + KeyTrustingPeriodFraction = []byte("TrustingPeriodFraction") + KeyInitTimeoutPeriod = []byte("InitTimeoutPeriod") + KeyVscTimeoutPeriod = []byte("VscTimeoutPeriod") + KeySlashMeterReplenishPeriod = []byte("SlashMeterReplenishPeriod") + KeySlashMeterReplenishFraction = []byte("SlashMeterReplenishFraction") + KeyConsumerRewardDenomRegistrationFee = []byte("ConsumerRewardDenomRegistrationFee") + KeyBlocksPerEpoch = []byte("BlocksPerEpoch") + KeyNumberOfEpochsToStartReceivingRewards = []byte("NumberOfEpochsToStartReceivingRewards") ) // ParamKeyTable returns a key table with the necessary registered provider params @@ -71,17 +83,19 @@ func NewParams( slashMeterReplenishFraction string, consumerRewardDenomRegistrationFee sdk.Coin, blocksPerEpoch int64, + numberOfEpochsToStartReceivingRewards int64, ) Params { return Params{ - TemplateClient: cs, - TrustingPeriodFraction: trustingPeriodFraction, - CcvTimeoutPeriod: ccvTimeoutPeriod, - InitTimeoutPeriod: initTimeoutPeriod, - VscTimeoutPeriod: vscTimeoutPeriod, - SlashMeterReplenishPeriod: slashMeterReplenishPeriod, - SlashMeterReplenishFraction: slashMeterReplenishFraction, - ConsumerRewardDenomRegistrationFee: consumerRewardDenomRegistrationFee, - BlocksPerEpoch: blocksPerEpoch, + TemplateClient: cs, + TrustingPeriodFraction: trustingPeriodFraction, + CcvTimeoutPeriod: ccvTimeoutPeriod, + InitTimeoutPeriod: initTimeoutPeriod, + VscTimeoutPeriod: vscTimeoutPeriod, + SlashMeterReplenishPeriod: slashMeterReplenishPeriod, + SlashMeterReplenishFraction: slashMeterReplenishFraction, + ConsumerRewardDenomRegistrationFee: consumerRewardDenomRegistrationFee, + BlocksPerEpoch: blocksPerEpoch, + NumberOfEpochsToStartReceivingRewards: numberOfEpochsToStartReceivingRewards, } } @@ -113,6 +127,7 @@ func DefaultParams() Params { Amount: sdk.NewInt(10000000), }, DefaultBlocksPerEpoch, + DefaultNumberOfEpochsToStartReceivingRewards, ) } @@ -145,9 +160,12 @@ func (p Params) Validate() error { if err := ValidateCoin(p.ConsumerRewardDenomRegistrationFee); err != nil { return fmt.Errorf("consumer reward denom registration fee is invalid: %s", err) } - if err := ccvtypes.ValidateInt64(p.BlocksPerEpoch); err != nil { + if err := ccvtypes.ValidatePositiveInt64(p.BlocksPerEpoch); err != nil { return fmt.Errorf("blocks per epoch is invalid: %s", err) } + if err := ccvtypes.ValidatePositiveInt64(p.NumberOfEpochsToStartReceivingRewards); err != nil { + return fmt.Errorf("number of epochs to start received rewards is invalid: %s", err) + } return nil } @@ -163,6 +181,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeySlashMeterReplenishFraction, p.SlashMeterReplenishFraction, ccvtypes.ValidateStringFraction), paramtypes.NewParamSetPair(KeyConsumerRewardDenomRegistrationFee, p.ConsumerRewardDenomRegistrationFee, ValidateCoin), paramtypes.NewParamSetPair(KeyBlocksPerEpoch, p.BlocksPerEpoch, ccvtypes.ValidatePositiveInt64), + paramtypes.NewParamSetPair(KeyNumberOfEpochsToStartReceivingRewards, p.NumberOfEpochsToStartReceivingRewards, ccvtypes.ValidatePositiveInt64), } } diff --git a/x/ccv/provider/types/params_test.go b/x/ccv/provider/types/params_test.go index 4e72c233af..bcec7c7c77 100644 --- a/x/ccv/provider/types/params_test.go +++ b/x/ccv/provider/types/params_test.go @@ -24,39 +24,43 @@ func TestValidateParams(t *testing.T) { {"custom valid params", types.NewParams( ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), true}, + "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), true}, {"custom invalid params", types.NewParams( ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, 0, clienttypes.Height{}, nil, []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"blank client", types.NewParams(&ibctmtypes.ClientState{}, - "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, - {"nil client", types.NewParams(nil, "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, + {"nil client", types.NewParams(nil, "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, // Check if "0.00" is valid or if a zero dec TrustFraction needs to return an error {"0 trusting period fraction", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.00", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), true}, + "0.00", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), true}, {"0 ccv timeout period", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", 0, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", 0, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"0 init timeout period", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, 0, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, 0, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"0 vsc timeout period", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, 0, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, 0, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"0 slash meter replenish period", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, 24*time.Hour, 0, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, 24*time.Hour, 0, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"slash meter replenish fraction over 1", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, 24*time.Hour, time.Hour, "1.5", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, 24*time.Hour, time.Hour, "1.5", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"invalid consumer reward denom registration fee denom", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, 24*time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "st", Amount: sdk.NewInt(10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, 24*time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "st", Amount: sdk.NewInt(10000000)}, 1000, 24), false}, {"invalid consumer reward denom registration fee amount", types.NewParams(ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), - "0.33", time.Hour, time.Hour, 24*time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(-10000000)}, 1000), false}, + "0.33", time.Hour, time.Hour, 24*time.Hour, time.Hour, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(-10000000)}, 1000, 24), false}, + {"invalid number of epochs to start receiving rewards", types.NewParams( + ibctmtypes.NewClientState("", ibctmtypes.DefaultTrustLevel, 0, 0, + time.Second*40, clienttypes.Height{}, commitmenttypes.GetSDKSpecs(), []string{"ibc", "upgradedIBCState"}), + "0.33", time.Hour, time.Hour, time.Hour, 30*time.Minute, "0.1", sdk.Coin{Denom: "stake", Amount: sdk.NewInt(10000000)}, 1000, 0), false}, } for _, tc := range testCases { diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index 0540dfb0a6..5a339ee6aa 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -593,6 +593,9 @@ type Params struct { ConsumerRewardDenomRegistrationFee types2.Coin `protobuf:"bytes,9,opt,name=consumer_reward_denom_registration_fee,json=consumerRewardDenomRegistrationFee,proto3" json:"consumer_reward_denom_registration_fee"` // The number of blocks that comprise an epoch. BlocksPerEpoch int64 `protobuf:"varint,10,opt,name=blocks_per_epoch,json=blocksPerEpoch,proto3" json:"blocks_per_epoch,omitempty"` + // The number of epochs a validator has to validate a consumer chain during in order to start receiving rewards from + // that chain. + NumberOfEpochsToStartReceivingRewards int64 `protobuf:"varint,11,opt,name=number_of_epochs_to_start_receiving_rewards,json=numberOfEpochsToStartReceivingRewards,proto3" json:"number_of_epochs_to_start_receiving_rewards,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -691,6 +694,13 @@ func (m *Params) GetBlocksPerEpoch() int64 { return 0 } +func (m *Params) GetNumberOfEpochsToStartReceivingRewards() int64 { + if m != nil { + return m.NumberOfEpochsToStartReceivingRewards + } + return 0 +} + // SlashAcks contains cons addresses of consumer chain validators // successfully slashed on the provider chain. type SlashAcks struct { @@ -1543,6 +1553,8 @@ type ConsumerValidator struct { Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` // public key the validator uses on the consumer chain during this epoch ConsumerPublicKey *crypto.PublicKey `protobuf:"bytes,3,opt,name=consumer_public_key,json=consumerPublicKey,proto3" json:"consumer_public_key,omitempty"` + // height the validator had when it first opted in + Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` } func (m *ConsumerValidator) Reset() { *m = ConsumerValidator{} } @@ -1599,6 +1611,13 @@ func (m *ConsumerValidator) GetConsumerPublicKey() *crypto.PublicKey { return nil } +func (m *ConsumerValidator) GetHeight() int64 { + if m != nil { + return m.Height + } + return 0 +} + // ConsumerRewardsAllocation stores the rewards allocated by a consumer chain // to the consumer rewards pool. It is used to allocate the tokens to the consumer // opted-in validators and the community pool during BeginBlock. @@ -1679,6 +1698,7 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ +<<<<<<< HEAD // 1954 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcb, 0x6f, 0x1b, 0xc7, 0x19, 0xd7, 0x92, 0x94, 0x44, 0x0e, 0xf5, 0x1c, 0x29, 0xf1, 0x4a, 0x55, 0x29, 0x7a, 0xd3, 0xa4, @@ -1803,6 +1823,133 @@ var fileDescriptor_f22ec409a72b7b72 = []byte{ 0x31, 0xba, 0x9d, 0x7d, 0x3a, 0x8c, 0x7e, 0xd2, 0xfa, 0x64, 0xfc, 0xc3, 0xa4, 0xb6, 0xd7, 0x9d, 0xd3, 0xdd, 0xf4, 0xdd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x24, 0x1f, 0x07, 0x8b, 0xc9, 0x14, 0x00, 0x00, +======= + // 1977 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00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0xd6, 0x94, 0xb4, + 0x4f, 0x84, 0x44, 0xfd, 0x30, 0x51, 0xa8, 0x8f, 0x2b, 0x78, 0x03, 0x8e, 0x24, 0x65, 0x41, 0x0a, + 0x40, 0x3b, 0xb8, 0x89, 0x19, 0x27, 0x4d, 0xec, 0x53, 0x12, 0x48, 0xe5, 0x35, 0x7e, 0x4a, 0x14, + 0x9a, 0x4a, 0xc1, 0xa7, 0xdd, 0x9e, 0x8c, 0xc5, 0xa2, 0x29, 0x49, 0xe0, 0x11, 0xde, 0xa7, 0xb1, + 0x72, 0xfe, 0x96, 0x18, 0x6c, 0x16, 0xd6, 0x31, 0x1f, 0x86, 0x92, 0x35, 0xcf, 0xc9, 0x50, 0x24, + 0xab, 0x6f, 0x61, 0x26, 0xfa, 0x4c, 0x34, 0x89, 0xda, 0x7f, 0x80, 0x49, 0x33, 0xda, 0xe9, 0x10, + 0x89, 0x76, 0x32, 0x41, 0x1a, 0x77, 0xa2, 0xd7, 0x41, 0x22, 0xd7, 0xc1, 0x8c, 0xa6, 0x71, 0xaf, + 0xa0, 0x3e, 0x0d, 0x58, 0x53, 0xff, 0x8d, 0x45, 0xd6, 0x6f, 0x2a, 0xc0, 0x6c, 0xb1, 0x40, 0x0c, + 0xfa, 0x84, 0xef, 0x79, 0x1e, 0x55, 0xbb, 0x6c, 0x73, 0x16, 0x32, 0x81, 0x7c, 0xb8, 0x06, 0x66, + 0x24, 0x95, 0x3e, 0x31, 0x8d, 0x86, 0xb1, 0x5d, 0x75, 0xe2, 0x17, 0xd8, 0x00, 0x35, 0x8f, 0x08, + 0xcc, 0x69, 0xa8, 0x94, 0xcd, 0x69, 0xbd, 0x56, 0x14, 0xc1, 0x75, 0x50, 0x89, 0x53, 0x43, 0x3d, + 0xb3, 0xa4, 0x97, 0xe7, 0xf4, 0xfb, 0xa1, 0x07, 0x3f, 0x04, 0x8b, 0x34, 0xa0, 0x92, 0x22, 0xdf, + 0xed, 0x11, 0x75, 0x40, 0x66, 0xb9, 0x61, 0x6c, 0xd7, 0x76, 0x37, 0x6c, 0xda, 0xc1, 0xb6, 0x3a, + 0x53, 0x3b, 0x39, 0xc9, 0x68, 0xc7, 0x7e, 0xa8, 0x35, 0xf6, 0xcb, 0x5f, 0x7d, 0xb3, 0x35, 0xe5, + 0x2c, 0x24, 0x76, 0xb1, 0x10, 0xde, 0x02, 0xf3, 0x5d, 0x12, 0x10, 0x41, 0x85, 0xdb, 0x43, 0xa2, + 0x67, 0xce, 0x34, 0x8c, 0xed, 0x79, 0xa7, 0x96, 0xc8, 0x1e, 0x22, 0xd1, 0x83, 0x5b, 0xa0, 0xd6, + 0xa1, 0x01, 0xe2, 0xc3, 0x58, 0x63, 0x56, 0x6b, 0x80, 0x58, 0xa4, 0x15, 0x5a, 0x00, 0x88, 0x10, + 0x5d, 0x04, 0xae, 0x2a, 0x00, 0x73, 0x2e, 0x09, 0x24, 0x4e, 0xbe, 0x9d, 0x26, 0xdf, 0x3e, 0x49, + 0xab, 0x63, 0xbf, 0xa2, 0x02, 0xf9, 0xfc, 0xdb, 0x2d, 0xc3, 0xa9, 0x6a, 0x3b, 0xb5, 0x02, 0x1f, + 0x83, 0xe5, 0x41, 0xd0, 0x61, 0x81, 0x47, 0x83, 0xae, 0x1b, 0x12, 0x4e, 0x99, 0x67, 0x56, 0x34, + 0xd4, 0xfa, 0x25, 0xa8, 0x83, 0xa4, 0x8e, 0x62, 0xa4, 0x2f, 0x14, 0xd2, 0x52, 0x66, 0xdc, 0xd6, + 0xb6, 0xf0, 0x13, 0x00, 0x31, 0x8e, 0x74, 0x48, 0x6c, 0x20, 0x53, 0xc4, 0xea, 0xe4, 0x88, 0xcb, + 0x18, 0x47, 0x27, 0xb1, 0x75, 0x02, 0xf9, 0x4b, 0x70, 0x53, 0x72, 0x14, 0x88, 0x33, 0xc2, 0xc7, + 0x71, 0xc1, 0xe4, 0xb8, 0x6f, 0xa4, 0x18, 0xa3, 0xe0, 0x0f, 0x41, 0x03, 0x27, 0x05, 0x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x10, 0x67, 0x24, 0xf0, 0x28, 0xa4, 0x07, 0x36, 0x85, 0x2a, 0x3e, 0xb7, 0x4f, 0xa4, 0x26, + 0x93, 0xd0, 0x27, 0x01, 0x15, 0xbd, 0x14, 0x7c, 0x76, 0x72, 0xf0, 0x75, 0x0d, 0xf4, 0xb1, 0xc2, + 0x71, 0x52, 0x98, 0xc4, 0x4b, 0x0b, 0xd4, 0xaf, 0xf6, 0x92, 0x25, 0x68, 0x4e, 0x27, 0xe8, 0x7b, + 0x57, 0x40, 0x64, 0x59, 0x12, 0xe0, 0xad, 0x02, 0xe9, 0xa9, 0x5b, 0xed, 0xea, 0x0b, 0xe5, 0x72, + 0xd2, 0x55, 0xcc, 0x80, 0x62, 0xfe, 0x23, 0x24, 0x23, 0xee, 0xa4, 0x7b, 0xa8, 0xd1, 0x2c, 0xeb, + 0x1c, 0x2d, 0x46, 0x83, 0x64, 0xba, 0xb1, 0x72, 0x6e, 0xcc, 0x7a, 0x84, 0x53, 0xc0, 0xfa, 0x80, + 0x10, 0x75, 0x9b, 0x0b, 0xfc, 0x48, 0x42, 0x86, 0x7b, 0x9a, 0xbf, 0x4b, 0xce, 0x62, 0xc6, 0x85, + 0x0f, 0x94, 0x14, 0x7e, 0x0a, 0xee, 0x04, 0x83, 0x7e, 0x87, 0x70, 0x97, 0x9d, 0xc5, 0x8a, 0xba, + 0x03, 0x08, 0x89, 0xb8, 0x74, 0x39, 0xc1, 0x84, 0x46, 0xaa, 0x32, 0xe3, 0xc8, 0x85, 0xa6, 0xe7, + 0x92, 0x73, 0x3b, 0x36, 0x79, 0x72, 0xa6, 0x31, 0xc4, 0x09, 0x3b, 0x56, 0xea, 0x4e, 0xaa, 0x1d, + 0x07, 0x26, 0x1e, 0x95, 0x2b, 0x95, 0xe5, 0xaa, 0xf5, 0x23, 0x50, 0xd5, 0x8d, 0x62, 0x0f, 0x9f, + 0x0b, 0xcd, 0x3c, 0x9e, 0xc7, 0x89, 0x10, 0x44, 0x98, 0x46,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, 0x87, 0x8f, 0x92, 0x93, + 0xbc, 0x59, 0xbf, 0x35, 0x72, 0x9a, 0x4c, 0xa8, 0x76, 0xcf, 0xf7, 0x93, 0x1f, 0x12, 0x30, 0x04, + 0x73, 0x29, 0x59, 0xc7, 0x7d, 0x65, 0xf3, 0xca, 0x81, 0xe2, 0x80, 0x60, 0x3d, 0x53, 0xdc, 0x53, + 0x57, 0xef, 0x2f, 0xdf, 0x6e, 0xdd, 0xe9, 0x52, 0xd9, 0x1b, 0x74, 0x6c, 0xcc, 0xfa, 0xcd, 0xe4, + 0xdb, 0x50, 0xfc, 0xef, 0xae, 0xf0, 0xce, 0x9b, 0x72, 0x18, 0x12, 0x91, 0xda, 0x88, 0x3f, 0xff, + 0xfb, 0x6f, 0x6f, 0x1b, 0x4e, 0xea, 0x66, 0xff, 0xe9, 0x57, 0xcf, 0xeb, 0xc6, 0xd7, 0xcf, 0xeb, + 0xc6, 0xbf, 0x9e, 0xd7, 0x8d, 0xcf, 0x5f, 0xd4, 0xa7, 0xbe, 0x7e, 0x51, 0x9f, 0xfa, 0xe7, 0x8b, + 0xfa, 0xd4, 0xa7, 0xef, 0x5d, 0x06, 0xcd, 0x73, 0x77, 0x37, 0xfb, 0x1a, 0x17, 0xfd, 0xa4, 0xf9, + 0xd9, 0xe8, 0xb7, 0x3e, 0xed, 0xaf, 0x33, 0xab, 0xbb, 0xec, 0xbb, 0xff, 0x0d, 0x00, 0x00, 0xff, + 0xff, 0xbf, 0xd3, 0xf2, 0xea, 0x1c, 0x14, 0x00, 0x00, +>>>>>>> 907a0f15 (init commit) } func (m *ConsumerAdditionProposal) Marshal() (dAtA []byte, err error) { @@ -2275,6 +2422,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.NumberOfEpochsToStartReceivingRewards != 0 { + i = encodeVarintProvider(dAtA, i, uint64(m.NumberOfEpochsToStartReceivingRewards)) + i-- + dAtA[i] = 0x58 + } if m.BlocksPerEpoch != 0 { i = encodeVarintProvider(dAtA, i, uint64(m.BlocksPerEpoch)) i-- @@ -3009,6 +3161,11 @@ func (m *ConsumerValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Height != 0 { + i = encodeVarintProvider(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } if m.ConsumerPublicKey != nil { { size, err := m.ConsumerPublicKey.MarshalToSizedBuffer(dAtA[:i]) @@ -3328,6 +3485,9 @@ func (m *Params) Size() (n int) { if m.BlocksPerEpoch != 0 { n += 1 + sovProvider(uint64(m.BlocksPerEpoch)) } + if m.NumberOfEpochsToStartReceivingRewards != 0 { + n += 1 + sovProvider(uint64(m.NumberOfEpochsToStartReceivingRewards)) + } return n } @@ -3624,6 +3784,9 @@ func (m *ConsumerValidator) Size() (n int) { l = m.ConsumerPublicKey.Size() n += 1 + l + sovProvider(uint64(l)) } + if m.Height != 0 { + n += 1 + sovProvider(uint64(m.Height)) + } return n } @@ -5503,6 +5666,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberOfEpochsToStartReceivingRewards", wireType) + } + m.NumberOfEpochsToStartReceivingRewards = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumberOfEpochsToStartReceivingRewards |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProvider(dAtA[iNdEx:]) @@ -7441,6 +7623,25 @@ func (m *ConsumerValidator) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProvider + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProvider(dAtA[iNdEx:]) From 0f4c2ddebbbce735a5d78bd9721ef0e6f996581a Mon Sep 17 00:00:00 2001 From: insumity Date: Thu, 30 May 2024 17:12:07 +0200 Subject: [PATCH 02/10] added a warning --- docs/docs/validators/withdraw_rewards.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/docs/validators/withdraw_rewards.md b/docs/docs/validators/withdraw_rewards.md index 1a9ab1fb3c..905b34cdec 100644 --- a/docs/docs/validators/withdraw_rewards.md +++ b/docs/docs/validators/withdraw_rewards.md @@ -2,8 +2,17 @@ sidebar_position: 3 --- -# Withdrawing consumer chain validator rewards +# Consumer chain validator rewards +:::warning +A validator can only receive rewards from a consumer chain if the validator has been validating the consumer chain +for some time. Specifically, the validator has to be a consumer validator of the consumer chain for at least +`NumberOfEpochsToStartReceivingRewards * BlocksPerEpoch` blocks (run `interchain-security-pd query provider params` for +the actual values of the `NumberOfEpochsToStartReceivingRewards` and `BlocksPerEpoch` params). +::: + + +## Withdrawing rewards Here are example steps for withdrawing rewards from consumer chains in the provider chain :::info From a26c116aed8a6a62f5e2051d57b38aea7162e772 Mon Sep 17 00:00:00 2001 From: insumity Date: Fri, 31 May 2024 11:22:13 +0200 Subject: [PATCH 03/10] took into account comments --- tests/integration/distribution.go | 4 ++-- x/ccv/provider/keeper/distribution.go | 25 ++++++++++++++++------ x/ccv/provider/keeper/distribution_test.go | 21 ++++++++++++++++++ x/ccv/provider/keeper/relay_test.go | 2 +- x/ccv/provider/migrations/v6/migrations.go | 6 ++---- 5 files changed, 45 insertions(+), 13 deletions(-) diff --git a/tests/integration/distribution.go b/tests/integration/distribution.go index 9681d0b272..6b7cab916c 100644 --- a/tests/integration/distribution.go +++ b/tests/integration/distribution.go @@ -1078,8 +1078,8 @@ func (s *CCVTestSuite) TestAllocateTokensToConsumerValidatorsWithDifferentValida ctx, _ := s.providerCtx().CacheContext() // If the provider chain has not yet reached `GetNumberOfEpochsToStartReceivingRewards * GetBlocksPerEpoch` block height, - // then all validators receive rewards. In this test, we want to check whether validators receive rewards or not based on how - // long they have been consumer validators. Because of this, we increase the block height. + // then all validators receive rewards (see `IsEligibleForConsumerRewards`). In this test, we want to check whether + // validators receive rewards or not based on how long they have been consumer validators. Because of this, we increase the block height. ctx = ctx.WithBlockHeight(providerKeeper.GetNumberOfEpochsToStartReceivingRewards(ctx)*providerKeeper.GetBlocksPerEpoch(ctx) + 1) // update the consumer validators diff --git a/x/ccv/provider/keeper/distribution.go b/x/ccv/provider/keeper/distribution.go index a7f36ac291..9d1b6eb759 100644 --- a/x/ccv/provider/keeper/distribution.go +++ b/x/ccv/provider/keeper/distribution.go @@ -127,6 +127,23 @@ func (k Keeper) AllocateTokens(ctx sdk.Context) { } } +// IsEligibleForConsumerRewards returns `true` if the validator with `consumerValidatorHeight` has been a consumer +// validator for a long period of time and hence is eligible to receive rewards, and false otherwise +func (k Keeper) IsEligibleForConsumerRewards(ctx sdk.Context, consumerValidatorHeight int64) bool { + numberOfBlocksToStartReceivingRewards := k.GetNumberOfEpochsToStartReceivingRewards(ctx) * k.GetBlocksPerEpoch(ctx) + + // Note that at the beginning of the chain's life (e.g., when the block height of the chain is still small), no validator + // could have been a consumer validator for more than `NumberOfEpochsToStartReceivingRewards` epochs and hence in this + // case all validators are eligible for rewards, even though they might have not been a consumer validator on the + // consumer chain for more than a single epoch. + isChainStillNew := ctx.BlockHeight() < numberOfBlocksToStartReceivingRewards + + // a validator is eligible for rewards if it has been a consumer validator for `NumberOfEpochsToStartReceivingRewards` epochs + hasBeenConsumerValidatorForLongEnough := (ctx.BlockHeight() - consumerValidatorHeight) >= numberOfBlocksToStartReceivingRewards + + return isChainStillNew || hasBeenConsumerValidatorForLongEnough +} + // AllocateTokensToConsumerValidators allocates tokens // to the given consumer chain's validator set func (k Keeper) AllocateTokensToConsumerValidators( @@ -147,10 +164,7 @@ func (k Keeper) AllocateTokensToConsumerValidators( // Allocate tokens by iterating over the consumer validators for _, consumerVal := range k.GetConsumerValSet(ctx, chainID) { - - // do not distribute rewards to a validator that has not been validating long enough - numberOfBlocksToStartReceivingRewards := k.GetNumberOfEpochsToStartReceivingRewards(ctx) * k.GetBlocksPerEpoch(ctx) - if ctx.BlockHeight() >= numberOfBlocksToStartReceivingRewards && ctx.BlockHeight()-consumerVal.Height < numberOfBlocksToStartReceivingRewards { + if !k.IsEligibleForConsumerRewards(ctx, consumerVal.Height) { continue } @@ -249,8 +263,7 @@ func (k Keeper) ComputeConsumerTotalVotingPower(ctx sdk.Context, chainID string) for _, v := range k.GetConsumerValSet(ctx, chainID) { // only consider the voting power of a validator that would receive rewards (i.e., validator has been validating for a number of blocks) - numberOfBlocksToStartReceivingRewards := k.GetNumberOfEpochsToStartReceivingRewards(ctx) * k.GetBlocksPerEpoch(ctx) - if ctx.BlockHeight() >= numberOfBlocksToStartReceivingRewards && ctx.BlockHeight()-v.Height < numberOfBlocksToStartReceivingRewards { + if !k.IsEligibleForConsumerRewards(ctx, v.Height) { continue } diff --git a/x/ccv/provider/keeper/distribution_test.go b/x/ccv/provider/keeper/distribution_test.go index 2bdbfdb621..08656aacd9 100644 --- a/x/ccv/provider/keeper/distribution_test.go +++ b/x/ccv/provider/keeper/distribution_test.go @@ -275,3 +275,24 @@ func TestGetConsumerRewardsAllocationNil(t *testing.T) { } require.Equal(t, expectedRewardAllocation, alloc) } + +func TestIsEligibleForConsumerRewards(t *testing.T) { + keeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) + defer ctrl.Finish() + + params := providertypes.DefaultParams() + params.NumberOfEpochsToStartReceivingRewards = 10 + params.BlocksPerEpoch = 5 + keeper.SetParams(ctx, params) + + numberOfBlocks := params.NumberOfEpochsToStartReceivingRewards * params.BlocksPerEpoch + + // if the provider's chain block height is less than `numberOfBlocks`, then irrespectively of the height of a consumer + // validator, the validator is eligible for rewards + require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks-1), numberOfBlocks-1)) + + require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks), 0)) + require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks+1), 0)) + require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks+1), 1)) + require.False(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks+1), 2)) +} diff --git a/x/ccv/provider/keeper/relay_test.go b/x/ccv/provider/keeper/relay_test.go index b21c6b5844..7b0b4629ea 100644 --- a/x/ccv/provider/keeper/relay_test.go +++ b/x/ccv/provider/keeper/relay_test.go @@ -88,7 +88,7 @@ func TestQueueVSCPackets(t *testing.T) { } // TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights checks that the heights of consumer validators are not -// getting correctly updated +// getting incorrectly updated func TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights(t *testing.T) { providerKeeper, ctx, ctrl, mocks := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() diff --git a/x/ccv/provider/migrations/v6/migrations.go b/x/ccv/provider/migrations/v6/migrations.go index 810c98f027..9395d625e3 100644 --- a/x/ccv/provider/migrations/v6/migrations.go +++ b/x/ccv/provider/migrations/v6/migrations.go @@ -36,10 +36,8 @@ func MigrateMinPowerInTopN(ctx sdk.Context, providerKeeper providerkeeper.Keeper // MigrateParams adds missing provider chain params to the param store. func MigrateParams(ctx sdk.Context, paramsSubspace paramtypes.Subspace) { - if paramsSubspace.HasKeyTable() { - paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) - } else { + if !paramsSubspace.HasKeyTable() { paramsSubspace.WithKeyTable(providertypes.ParamKeyTable()) - paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) } + paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) } From 2d6e3f7f1d13aa735f1c96b36bb9b32d39ab4da5 Mon Sep 17 00:00:00 2001 From: insumity Date: Thu, 30 May 2024 15:37:41 +0200 Subject: [PATCH 04/10] init commit --- x/ccv/provider/migrations/migrator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/ccv/provider/migrations/migrator.go b/x/ccv/provider/migrations/migrator.go index 85be20fc95..aab0b17524 100644 --- a/x/ccv/provider/migrations/migrator.go +++ b/x/ccv/provider/migrations/migrator.go @@ -54,5 +54,6 @@ func (m Migrator) Migrate4to5(ctx sdktypes.Context) error { func (m Migrator) Migrate5to6(ctx sdktypes.Context) error { v6.MigrateMinPowerInTopN(ctx, m.providerKeeper) v6.MigrateParams(ctx, m.paramSpace) + v6.MigrateMinPowerInTopN(ctx, m.providerKeeper) return nil } From c2f7316ac9e0daf1f24038b29e638b9383edcbc6 Mon Sep 17 00:00:00 2001 From: insumity Date: Thu, 30 May 2024 17:19:07 +0200 Subject: [PATCH 05/10] added a warning --- docs/docs/validators/withdraw_rewards.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/validators/withdraw_rewards.md b/docs/docs/validators/withdraw_rewards.md index 905b34cdec..15d27b3006 100644 --- a/docs/docs/validators/withdraw_rewards.md +++ b/docs/docs/validators/withdraw_rewards.md @@ -7,7 +7,7 @@ sidebar_position: 3 :::warning A validator can only receive rewards from a consumer chain if the validator has been validating the consumer chain for some time. Specifically, the validator has to be a consumer validator of the consumer chain for at least -`NumberOfEpochsToStartReceivingRewards * BlocksPerEpoch` blocks (run `interchain-security-pd query provider params` for +`NumberOfEpochsToStartReceivingRewards * BlocksPerEpoch` blocks (run `interchain-security-pd query provider params` for the actual values of the `NumberOfEpochsToStartReceivingRewards` and `BlocksPerEpoch` params). ::: From 68d0b4f461215ba312b1fb5b7a4caa9d58f15d24 Mon Sep 17 00:00:00 2001 From: insumity Date: Mon, 17 Jun 2024 11:04:19 +0200 Subject: [PATCH 06/10] took into account comments --- ...ards-to-long-term-validating-validators.md | 4 +- ...ards-to-long-term-validating-validators.md | 4 +- tests/integration/distribution.go | 25 +- x/ccv/provider/keeper/distribution.go | 10 +- x/ccv/provider/keeper/distribution_test.go | 8 +- x/ccv/provider/keeper/relay_test.go | 2 +- x/ccv/provider/migrations/migrator.go | 4 +- .../provider/migrations/v6/migration_test.go | 2 +- x/ccv/provider/migrations/v6/migrations.go | 10 + x/ccv/provider/types/params.go | 4 +- x/ccv/provider/types/provider.pb.go | 388 ++++++------------ 11 files changed, 175 insertions(+), 286 deletions(-) diff --git a/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md b/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md index 1b5c3e8d1f..08ac4441c1 100644 --- a/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md +++ b/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md @@ -1,3 +1,3 @@ - Only start distributing rewards to validators after they have been validating - for a fixed number of blocks. ([\#1929](https://github.com/cosmos/interchain- - security/pull/1929)) \ No newline at end of file + for a fixed number of blocks. Introduces the `NumberOfEpochsToStartReceivingRewards` param. ([\#1929](https://github.com/cosmos/interchain- + security/pull/1929)) diff --git a/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md b/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md index 1b5c3e8d1f..08ac4441c1 100644 --- a/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md +++ b/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md @@ -1,3 +1,3 @@ - Only start distributing rewards to validators after they have been validating - for a fixed number of blocks. ([\#1929](https://github.com/cosmos/interchain- - security/pull/1929)) \ No newline at end of file + for a fixed number of blocks. Introduces the `NumberOfEpochsToStartReceivingRewards` param. ([\#1929](https://github.com/cosmos/interchain- + security/pull/1929)) diff --git a/tests/integration/distribution.go b/tests/integration/distribution.go index 6b7cab916c..956d69f901 100644 --- a/tests/integration/distribution.go +++ b/tests/integration/distribution.go @@ -705,9 +705,14 @@ func (s *CCVTestSuite) TestAllocateTokens() { totalRewards := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100))} + // increase the block height so validators are eligible for consumer rewards (see `IsEligibleForConsumerRewards`) + numberOfBlocksToStartReceivingRewards := + providerKeeper.GetNumberOfEpochsToStartReceivingRewards(s.providerCtx()) * providerKeeper.GetBlocksPerEpoch(s.providerCtx()) + providerCtx := s.providerCtx().WithBlockHeight(numberOfBlocksToStartReceivingRewards + s.providerCtx().BlockHeight()) + // fund consumer rewards pool bankKeeper.SendCoinsFromAccountToModule( - s.providerCtx(), + providerCtx, s.providerChain.SenderAccount.GetAddress(), providertypes.ConsumerRewardsPool, totalRewards, @@ -718,7 +723,7 @@ func (s *CCVTestSuite) TestAllocateTokens() { for chainID := range s.consumerBundles { // update consumer allocation providerKeeper.SetConsumerRewardsAllocation( - s.providerCtx(), + providerCtx, chainID, providertypes.ConsumerRewardsAllocation{ Rewards: sdk.NewDecCoinsFromCoins(rewardsPerConsumer...), @@ -738,16 +743,16 @@ func (s *CCVTestSuite) TestAllocateTokens() { }, ) - valRewards := distributionKeeper.GetValidatorOutstandingRewards(s.providerCtx(), sdk.ValAddress(val.Address)) + valRewards := distributionKeeper.GetValidatorOutstandingRewards(providerCtx, sdk.ValAddress(val.Address)) lastValOutRewards[sdk.ValAddress(val.Address).String()] = valRewards.Rewards } // store community pool balance - lastCommPool := distributionKeeper.GetFeePoolCommunityCoins(s.providerCtx()) + lastCommPool := distributionKeeper.GetFeePoolCommunityCoins(providerCtx) // execute BeginBlock to trigger the token allocation providerKeeper.BeginBlockRD( - s.providerCtx(), + providerCtx, abci.RequestBeginBlock{ LastCommitInfo: abci.CommitInfo{ Votes: votes, @@ -760,7 +765,7 @@ func (s *CCVTestSuite) TestAllocateTokens() { // compute the expected validators token allocation by subtracting the community tax rewardsPerConsumerDec := sdk.NewDecCoinsFromCoins(rewardsPerConsumer...) - communityTax := distributionKeeper.GetCommunityTax(s.providerCtx()) + communityTax := distributionKeeper.GetCommunityTax(providerCtx) validatorsExpRewards := rewardsPerConsumerDec. MulDecTruncate(math.LegacyOneDec().Sub(communityTax)). // multiply by the number of consumers since all the validators opted in @@ -770,7 +775,7 @@ func (s *CCVTestSuite) TestAllocateTokens() { // verify the validator tokens allocation // note that the validators have the same voting power to keep things simple for _, val := range s.providerChain.Vals.Validators { - valRewards := distributionKeeper.GetValidatorOutstandingRewards(s.providerCtx(), sdk.ValAddress(val.Address)) + valRewards := distributionKeeper.GetValidatorOutstandingRewards(providerCtx, sdk.ValAddress(val.Address)) s.Require().Equal( valRewards.Rewards, lastValOutRewards[sdk.ValAddress(val.Address).String()].Add(perValExpReward...), @@ -778,7 +783,7 @@ func (s *CCVTestSuite) TestAllocateTokens() { } commPoolExpRewards := sdk.NewDecCoinsFromCoins(totalRewards...).Sub(validatorsExpRewards) - currCommPool := distributionKeeper.GetFeePoolCommunityCoins(s.providerCtx()) + currCommPool := distributionKeeper.GetFeePoolCommunityCoins(providerCtx) s.Require().Equal(currCommPool, (lastCommPool.Add(commPoolExpRewards...))) } @@ -981,6 +986,10 @@ func (s *CCVTestSuite) TestAllocateTokensToConsumerValidators() { s.Run(tc.name, func() { ctx, _ := s.providerCtx().CacheContext() + // increase the block height so validators are eligible for consumer rewards (see `IsEligibleForConsumerRewards`) + ctx = ctx.WithBlockHeight(providerKeeper.GetNumberOfEpochsToStartReceivingRewards(ctx)*providerKeeper.GetBlocksPerEpoch(ctx) + + ctx.BlockHeight()) + // change the consumer valset consuVals := providerKeeper.GetConsumerValSet(ctx, chainID) providerKeeper.DeleteConsumerValSet(ctx, chainID) diff --git a/x/ccv/provider/keeper/distribution.go b/x/ccv/provider/keeper/distribution.go index 9d1b6eb759..883bf22c34 100644 --- a/x/ccv/provider/keeper/distribution.go +++ b/x/ccv/provider/keeper/distribution.go @@ -132,16 +132,8 @@ func (k Keeper) AllocateTokens(ctx sdk.Context) { func (k Keeper) IsEligibleForConsumerRewards(ctx sdk.Context, consumerValidatorHeight int64) bool { numberOfBlocksToStartReceivingRewards := k.GetNumberOfEpochsToStartReceivingRewards(ctx) * k.GetBlocksPerEpoch(ctx) - // Note that at the beginning of the chain's life (e.g., when the block height of the chain is still small), no validator - // could have been a consumer validator for more than `NumberOfEpochsToStartReceivingRewards` epochs and hence in this - // case all validators are eligible for rewards, even though they might have not been a consumer validator on the - // consumer chain for more than a single epoch. - isChainStillNew := ctx.BlockHeight() < numberOfBlocksToStartReceivingRewards - // a validator is eligible for rewards if it has been a consumer validator for `NumberOfEpochsToStartReceivingRewards` epochs - hasBeenConsumerValidatorForLongEnough := (ctx.BlockHeight() - consumerValidatorHeight) >= numberOfBlocksToStartReceivingRewards - - return isChainStillNew || hasBeenConsumerValidatorForLongEnough + return (ctx.BlockHeight() - consumerValidatorHeight) >= numberOfBlocksToStartReceivingRewards } // AllocateTokensToConsumerValidators allocates tokens diff --git a/x/ccv/provider/keeper/distribution_test.go b/x/ccv/provider/keeper/distribution_test.go index 08656aacd9..2c80b418b0 100644 --- a/x/ccv/provider/keeper/distribution_test.go +++ b/x/ccv/provider/keeper/distribution_test.go @@ -28,6 +28,9 @@ func TestComputeConsumerTotalVotingPower(t *testing.T) { params.BlocksPerEpoch = 1 keeper.SetParams(ctx, params) + // increase the block height so validators are eligible for consumer rewards (see `IsEligibleForConsumerRewards`) + ctx = ctx.WithBlockHeight(params.NumberOfEpochsToStartReceivingRewards * params.BlocksPerEpoch) + createVal := func(power int64) tmtypes.Validator { signer := tmtypes.NewMockPV() val := tmtypes.NewValidator(signer.PrivKey.PubKey(), power) @@ -287,10 +290,7 @@ func TestIsEligibleForConsumerRewards(t *testing.T) { numberOfBlocks := params.NumberOfEpochsToStartReceivingRewards * params.BlocksPerEpoch - // if the provider's chain block height is less than `numberOfBlocks`, then irrespectively of the height of a consumer - // validator, the validator is eligible for rewards - require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks-1), numberOfBlocks-1)) - + require.False(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks-1), 0)) require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks), 0)) require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks+1), 0)) require.True(t, keeper.IsEligibleForConsumerRewards(ctx.WithBlockHeight(numberOfBlocks+1), 1)) diff --git a/x/ccv/provider/keeper/relay_test.go b/x/ccv/provider/keeper/relay_test.go index 7b0b4629ea..bb0b8d4d98 100644 --- a/x/ccv/provider/keeper/relay_test.go +++ b/x/ccv/provider/keeper/relay_test.go @@ -105,7 +105,7 @@ func TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights(t *testing.T) { valB := createStakingValidator(ctx, mocks, 2, 2) valBConsAddr, _ := valB.GetConsAddr() mocks.MockStakingKeeper.EXPECT().GetValidatorByConsAddr(ctx, valBConsAddr).Return(valB, true).AnyTimes() - mocks.MockStakingKeeper.EXPECT().GetLastValidators(ctx).Return([]stakingtypes.Validator{valA, valB}).AnyTimes() + testkeeper.SetupMocksForLastBondedValidatorsExpectation(mocks.MockStakingKeeper, 2, []stakingtypes.Validator{valA, valB}, []int64{1, 2}, -1) // set a consumer client, so we have a consumer chain (i.e., `k.GetAllConsumerChains(ctx)` is non empty) providerKeeper.SetConsumerClientId(ctx, "chainID", "clientID") diff --git a/x/ccv/provider/migrations/migrator.go b/x/ccv/provider/migrations/migrator.go index aab0b17524..3ed41da6dd 100644 --- a/x/ccv/provider/migrations/migrator.go +++ b/x/ccv/provider/migrations/migrator.go @@ -50,9 +50,9 @@ func (m Migrator) Migrate4to5(ctx sdktypes.Context) error { } // Migrate5to6 migrates x/ccvprovider state from consensus version 5 to 6. -// The migration consists of computing and storing the minimal power in the top N for all registered consumer chains. +// The migration consists of setting the `NumberOfEpochsToStartReceivingRewards` param, as well as +// computing and storing the minimal power in the top N for all registered consumer chains. func (m Migrator) Migrate5to6(ctx sdktypes.Context) error { - v6.MigrateMinPowerInTopN(ctx, m.providerKeeper) v6.MigrateParams(ctx, m.paramSpace) v6.MigrateMinPowerInTopN(ctx, m.providerKeeper) return nil diff --git a/x/ccv/provider/migrations/v6/migration_test.go b/x/ccv/provider/migrations/v6/migration_test.go index 080b694279..a5ae1b0d0c 100644 --- a/x/ccv/provider/migrations/v6/migration_test.go +++ b/x/ccv/provider/migrations/v6/migration_test.go @@ -1,4 +1,4 @@ -package v4 +package v6 import ( "testing" diff --git a/x/ccv/provider/migrations/v6/migrations.go b/x/ccv/provider/migrations/v6/migrations.go index 9395d625e3..3c339435b3 100644 --- a/x/ccv/provider/migrations/v6/migrations.go +++ b/x/ccv/provider/migrations/v6/migrations.go @@ -41,3 +41,13 @@ func MigrateParams(ctx sdk.Context, paramsSubspace paramtypes.Subspace) { } paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) } + +// MigrateSomething adds missing provider chain params to the param store. +func MigrateSomething(ctx sdk.Context, providerKeeper providerkeeper.Keeper) { + for _, chainID := range providerKeeper.GetAllRegisteredConsumerChainIDs(ctx) { + for _, val := range providerKeeper.GetConsumerValSet(ctx, chainID) { + val.Height = ctx.BlockHeight() + providerKeeper.SetConsumerValidator(ctx, chainID, val) + } + } +} diff --git a/x/ccv/provider/types/params.go b/x/ccv/provider/types/params.go index f7ecf22d41..2c04dd511c 100644 --- a/x/ccv/provider/types/params.go +++ b/x/ccv/provider/types/params.go @@ -44,7 +44,7 @@ const ( // DefaultNumberOfEpochsToStartReceivingRewards defines the default minimum number of epochs required by a validator to validate // during so that the validator can start receiving rewards. This would mean that a validator has to be a consumer validator for at least - // `DefaultNumberOfEpochsToStartReceivingRewards * DefaultBlocksPerEpoch` on a consumer chain to stat receiving rewards from the chain. + // `DefaultNumberOfEpochsToStartReceivingRewards * DefaultBlocksPerEpoch` on a consumer chain to start receiving rewards from the chain. // Note that after a validator starts receiving rewards, the validator would keep receiving rewards every time the // consumer chain sends an IBC transfer over to the provider. This value only sets a constraint on when a validator // can first start receiving rewards to avoid cases where a validator just opts in to receive rewards and then opts out @@ -164,7 +164,7 @@ func (p Params) Validate() error { return fmt.Errorf("blocks per epoch is invalid: %s", err) } if err := ccvtypes.ValidatePositiveInt64(p.NumberOfEpochsToStartReceivingRewards); err != nil { - return fmt.Errorf("number of epochs to start received rewards is invalid: %s", err) + return fmt.Errorf("number of epochs to start receiving rewards is invalid: %s", err) } return nil } diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index 5a339ee6aa..6b59809ec8 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -593,8 +593,7 @@ type Params struct { ConsumerRewardDenomRegistrationFee types2.Coin `protobuf:"bytes,9,opt,name=consumer_reward_denom_registration_fee,json=consumerRewardDenomRegistrationFee,proto3" json:"consumer_reward_denom_registration_fee"` // The number of blocks that comprise an epoch. BlocksPerEpoch int64 `protobuf:"varint,10,opt,name=blocks_per_epoch,json=blocksPerEpoch,proto3" json:"blocks_per_epoch,omitempty"` - // The number of epochs a validator has to validate a consumer chain during in order to start receiving rewards from - // that chain. + // The number of epochs a validator has to validate a consumer chain in order to start receiving rewards from that chain. NumberOfEpochsToStartReceivingRewards int64 `protobuf:"varint,11,opt,name=number_of_epochs_to_start_receiving_rewards,json=numberOfEpochsToStartReceivingRewards,proto3" json:"number_of_epochs_to_start_receiving_rewards,omitempty"` } @@ -1553,7 +1552,10 @@ type ConsumerValidator struct { Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` // public key the validator uses on the consumer chain during this epoch ConsumerPublicKey *crypto.PublicKey `protobuf:"bytes,3,opt,name=consumer_public_key,json=consumerPublicKey,proto3" json:"consumer_public_key,omitempty"` - // height the validator had when it first opted in + // height the validator had when it FIRST became a consumer validator + // If a validator becomes a consumer validator at height `H` and is continuously a consumer validator for all the upcoming + // epochs, then the height of the validator SHOULD remain `H`. This height only resets to a different height if a validator + // stops being a consumer validator during an epoch and later becomes again a consumer validator. Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` } @@ -1698,258 +1700,134 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ -<<<<<<< HEAD - // 1954 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcb, 0x6f, 0x1b, 0xc7, - 0x19, 0xd7, 0x92, 0x94, 0x44, 0x0e, 0xf5, 0x1c, 0x29, 0xf1, 0x4a, 0x55, 0x29, 0x7a, 0xd3, 0xa4, - 0x6a, 0x5c, 0x2f, 0x23, 0xa5, 0x05, 0x0c, 0xa3, 0x41, 0x20, 0x51, 0x4e, 0x2c, 0x2b, 0xb6, 0x99, - 0x95, 0x2a, 0xa3, 0xed, 0x61, 0x31, 0x9c, 0x1d, 0x93, 0x03, 0x2d, 0x77, 0xd6, 0x33, 0xc3, 0x55, - 0x78, 0xe9, 0xb9, 0x87, 0x16, 0x48, 0x6f, 0x41, 0x0f, 0x6d, 0x5a, 0xa0, 0x40, 0xd1, 0x4b, 0xfb, - 0x67, 0xe4, 0x98, 0x63, 0x4f, 0x49, 0x61, 0x1f, 0x7a, 0xe8, 0x3f, 0x51, 0xcc, 0xec, 0x93, 0x94, - 0xe4, 0xd2, 0x48, 0x72, 0x91, 0x76, 0xbf, 0xc7, 0xef, 0xfb, 0x66, 0xbe, 0x27, 0x17, 0xec, 0xd1, - 0x40, 0x12, 0x8e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b2, 0xc0, 0xa3, 0x41, 0xcf, 0x0d, 0x09, 0xa7, 0xcc, 0x33, 0xab, 0x1a, 0x6a, 0xe3, 0x12, 0xd4, - 0x61, 0x92, 0x47, 0x31, 0xd2, 0x67, 0x0a, 0x69, 0x39, 0x53, 0xee, 0x68, 0x5d, 0xf8, 0x31, 0x80, - 0x18, 0x47, 0xda, 0x25, 0x36, 0x94, 0x29, 0x62, 0x6d, 0x7a, 0xc4, 0x15, 0x8c, 0xa3, 0xd3, 0x58, - 0x3b, 0x81, 0xfc, 0x15, 0xb8, 0x21, 0x39, 0x0a, 0xc4, 0x53, 0xc2, 0x27, 0x71, 0xc1, 0xf4, 0xb8, - 0xaf, 0xa5, 0x18, 0xe3, 0xe0, 0xf7, 0x41, 0x13, 0x27, 0x09, 0xe4, 0x72, 0xe2, 0x51, 0x21, 0x39, - 0xed, 0x0e, 0x95, 0xae, 0xfb, 0x94, 0x23, 0xac, 0x73, 0xa4, 0xae, 0x93, 0xa0, 0x91, 0xca, 0x39, - 0x63, 0x62, 0x1f, 0x24, 0x52, 0xf0, 0x31, 0xf8, 0x41, 0xd7, 0x67, 0xf8, 0x5c, 0x28, 0xe7, 0xdc, - 0x31, 0x24, 0x6d, 0x7a, 0x40, 0x85, 0x50, 0x68, 0x0b, 0x4d, 0x63, 0xa7, 0xec, 0xdc, 0x8c, 0x65, - 0x3b, 0x84, 0x1f, 0x16, 0x24, 0x4f, 0x0b, 0x82, 0xf0, 0x36, 0x80, 0x7d, 0x2a, 0x24, 0xe3, 0x14, - 0x23, 0xdf, 0x25, 0x81, 0xe4, 0x94, 0x08, 0x73, 0x51, 0xab, 0xaf, 0xe6, 0x9c, 0x7b, 0x31, 0x03, - 0x3e, 0x00, 0x37, 0xaf, 0x35, 0xea, 0xe2, 0x3e, 0x0a, 0x02, 0xe2, 0x9b, 0x4b, 0xfa, 0x28, 0xdb, - 0xde, 0x35, 0x36, 0xdb, 0xb1, 0x18, 0x5c, 0x03, 0xb3, 0x92, 0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0xda, 0xf9, 0xca, 0xcd, 0x42, 0x97, 0x7a, 0xc2, 0x2c, 0x35, 0xcb, - 0x3b, 0x15, 0x67, 0x69, 0x98, 0xab, 0x1f, 0x79, 0xc2, 0xfa, 0x05, 0xa8, 0x17, 0x00, 0xe1, 0x12, - 0x28, 0x65, 0x58, 0x25, 0xea, 0xc1, 0xbb, 0x60, 0x23, 0x07, 0x1a, 0x6f, 0xc3, 0x31, 0x62, 0xcd, - 0xb9, 0x91, 0x09, 0x8c, 0x75, 0x62, 0x61, 0x3d, 0x06, 0xeb, 0x47, 0x79, 0xd1, 0x67, 0x4d, 0x7e, - 0xec, 0x84, 0xc6, 0xf8, 0xde, 0xb0, 0x05, 0x6a, 0xd9, 0x4f, 0x4d, 0x7d, 0xfa, 0x8a, 0x93, 0x13, - 0xac, 0x01, 0x58, 0x39, 0x13, 0xf8, 0x84, 0x04, 0x5e, 0x0e, 0x76, 0xcd, 0x05, 0x1c, 0x4c, 0x02, - 0x4d, 0xfd, 0xbb, 0x25, 0x37, 0xc7, 0xc0, 0xc6, 0x59, 0x71, 0xc9, 0xd0, 0x03, 0xb8, 0x83, 0xf0, - 0x39, 0x91, 0x02, 0x3a, 0xa0, 0xa2, 0x97, 0x89, 0x38, 0xb3, 0xee, 0x5c, 0x9b, 0x59, 0xd1, 0xae, - 0x7d, 0x1d, 0xc8, 0x21, 0x92, 0x28, 0xa9, 0x5d, 0x8d, 0x65, 0xfd, 0x10, 0xac, 0x3d, 0x44, 0x72, - 0xc8, 0x89, 0x37, 0x16, 0xe3, 0x15, 0x50, 0x56, 0xf1, 0x33, 0x74, 0xfc, 0xd4, 0xa3, 0xda, 0x07, - 0xcc, 0x7b, 0x9f, 0x84, 0x8c, 0x4b, 0xe2, 0x5d, 0xba, 0x91, 0x97, 0x5c, 0xef, 0x39, 0x58, 0x53, - 0x97, 0x25, 0x48, 0xe0, 0xb9, 0xd9, 0x39, 0xe3, 0x38, 0xd6, 0xf7, 0x7e, 0x3a, 0x55, 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 0xff, 0x24, 0x1f, 0x07, 0x8b, 0xc9, 0x14, - 0x00, 0x00, -======= - // 1977 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x8a, 0x94, 0x44, 0x0e, 0xf5, 0x77, 0xa4, 0xd8, 0x2b, 0x55, 0xa5, 0xe8, 0x4d, 0x9d, - 0xaa, 0x71, 0xbd, 0x8c, 0x94, 0x16, 0x30, 0x8c, 0x06, 0x81, 0x44, 0x39, 0xb1, 0xac, 0xc4, 0x66, - 0x56, 0xaa, 0x8c, 0xa6, 0x87, 0xc5, 0x70, 0x76, 0x44, 0x0e, 0xb4, 0xdc, 0x59, 0xcf, 0x0c, 0x57, - 0xe1, 0xa5, 0xe7, 0x1e, 0x5a, 0x20, 0xbd, 0x05, 0xbd, 0x34, 0xed, 0xa9, 0xe8, 0xa5, 0xfd, 0x02, - 0x45, 0xaf, 0x39, 0xe6, 0xd8, 0x53, 0x52, 0xd8, 0x87, 0x1e, 0xfa, 0x25, 0x8a, 0x99, 0xfd, 0x4b, - 0x4a, 0x72, 0x69, 0xb8, 0xb9, 0x48, 0xbb, 0x6f, 0xde, 0xfb, 0xbd, 0x37, 0xf3, 0xde, 0xbc, 0xdf, - 0xe3, 0x82, 0x5d, 0x1a, 0x48, 0xc2, 0x71, 0x0f, 0xd1, 0xc0, 0x15, 0x04, 0x0f, 0x38, 0x95, 0xc3, - 0x26, 0xc6, 0x51, 0x33, 0xe4, 0x2c, 0xa2, 0x1e, 0xe1, 0xcd, 0x68, 0x27, 0x7b, 0xb6, 0x43, 0xce, - 0x24, 0x83, 0x6f, 0x5e, 0x61, 0x63, 0x63, 0x1c, 0xd9, 0x99, 0x5e, 0xb4, 0xb3, 0x71, 0xfb, 0x3a, - 0xe0, 0x68, 0xa7, 0x79, 0x41, 0x39, 0x89, 0xb1, 0x36, 0xd6, 0xba, 0xac, 0xcb, 0xf4, 0x63, 0x53, - 0x3d, 0x25, 0xd2, 0xad, 0x2e, 0x63, 0x5d, 0x9f, 0x34, 0xf5, 0x5b, 0x67, 0x70, 0xd6, 0x94, 0xb4, - 0x4f, 0x84, 0x44, 0xfd, 0x30, 0x51, 0xa8, 0x8f, 0x2b, 0x78, 0x03, 0x8e, 0x24, 0x65, 0x41, 0x0a, - 0x40, 0x3b, 0xb8, 0x89, 0x19, 0x27, 0x4d, 0xec, 0x53, 0x12, 0x48, 0xe5, 0x35, 0x7e, 0x4a, 0x14, - 0x9a, 0x4a, 0xc1, 0xa7, 0xdd, 0x9e, 0x8c, 0xc5, 0xa2, 0x29, 0x49, 0xe0, 0x11, 0xde, 0xa7, 0xb1, - 0x72, 0xfe, 0x96, 0x18, 0x6c, 0x16, 0xd6, 0x31, 0x1f, 0x86, 0x92, 0x35, 0xcf, 0xc9, 0x50, 0x24, - 0xab, 0x6f, 0x61, 0x26, 0xfa, 0x4c, 0x34, 0x89, 0xda, 0x7f, 0x80, 0x49, 0x33, 0xda, 0xe9, 0x10, - 0x89, 0x76, 0x32, 0x41, 0x1a, 0x77, 0xa2, 0xd7, 0x41, 0x22, 0xd7, 0xc1, 0x8c, 0xa6, 0x71, 0xaf, - 0xa0, 0x3e, 0x0d, 0x58, 0x53, 0xff, 0x8d, 0x45, 0xd6, 0x6f, 0x2a, 0xc0, 0x6c, 0xb1, 0x40, 0x0c, - 0xfa, 0x84, 0xef, 0x79, 0x1e, 0x55, 0xbb, 0x6c, 0x73, 0x16, 0x32, 0x81, 0x7c, 0xb8, 0x06, 0x66, - 0x24, 0x95, 0x3e, 0x31, 0x8d, 0x86, 0xb1, 0x5d, 0x75, 0xe2, 0x17, 0xd8, 0x00, 0x35, 0x8f, 0x08, - 0xcc, 0x69, 0xa8, 0x94, 0xcd, 0x69, 0xbd, 0x56, 0x14, 0xc1, 0x75, 0x50, 0x89, 0x53, 0x43, 0x3d, - 0xb3, 0xa4, 0x97, 0xe7, 0xf4, 0xfb, 0xa1, 0x07, 0x3f, 0x04, 0x8b, 0x34, 0xa0, 0x92, 0x22, 0xdf, - 0xed, 0x11, 0x75, 0x40, 0x66, 0xb9, 0x61, 0x6c, 0xd7, 0x76, 0x37, 0x6c, 0xda, 0xc1, 0xb6, 0x3a, - 0x53, 0x3b, 0x39, 0xc9, 0x68, 0xc7, 0x7e, 0xa8, 0x35, 0xf6, 0xcb, 0x5f, 0x7d, 0xb3, 0x35, 0xe5, - 0x2c, 0x24, 0x76, 0xb1, 0x10, 0xde, 0x02, 0xf3, 0x5d, 0x12, 0x10, 0x41, 0x85, 0xdb, 0x43, 0xa2, - 0x67, 0xce, 0x34, 0x8c, 0xed, 0x79, 0xa7, 0x96, 0xc8, 0x1e, 0x22, 0xd1, 0x83, 0x5b, 0xa0, 0xd6, - 0xa1, 0x01, 0xe2, 0xc3, 0x58, 0x63, 0x56, 0x6b, 0x80, 0x58, 0xa4, 0x15, 0x5a, 0x00, 0x88, 0x10, - 0x5d, 0x04, 0xae, 0x2a, 0x00, 0x73, 0x2e, 0x09, 0x24, 0x4e, 0xbe, 0x9d, 0x26, 0xdf, 0x3e, 0x49, - 0xab, 0x63, 0xbf, 0xa2, 0x02, 0xf9, 0xfc, 0xdb, 0x2d, 0xc3, 0xa9, 0x6a, 0x3b, 0xb5, 0x02, 0x1f, - 0x83, 0xe5, 0x41, 0xd0, 0x61, 0x81, 0x47, 0x83, 0xae, 0x1b, 0x12, 0x4e, 0x99, 0x67, 0x56, 0x34, - 0xd4, 0xfa, 0x25, 0xa8, 0x83, 0xa4, 0x8e, 0x62, 0xa4, 0x2f, 0x14, 0xd2, 0x52, 0x66, 0xdc, 0xd6, - 0xb6, 0xf0, 0x13, 0x00, 0x31, 0x8e, 0x74, 0x48, 0x6c, 0x20, 0x53, 0xc4, 0xea, 0xe4, 0x88, 0xcb, - 0x18, 0x47, 0x27, 0xb1, 0x75, 0x02, 0xf9, 0x4b, 0x70, 0x53, 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, 0x71, 0xe7, 0x38, - 0x66, 0x79, 0x72, 0xcc, 0x15, 0x65, 0x3f, 0x0a, 0xfa, 0x09, 0x80, 0x91, 0xc0, 0xe3, 0x98, 0x33, - 0xaf, 0x10, 0x67, 0x24, 0xf0, 0x28, 0xa4, 0x07, 0x36, 0x85, 0x2a, 0x3e, 0xb7, 0x4f, 0xa4, 0x26, - 0x93, 0xd0, 0x27, 0x01, 0x15, 0xbd, 0x14, 0x7c, 0x76, 0x72, 0xf0, 0x75, 0x0d, 0xf4, 0xb1, 0xc2, - 0x71, 0x52, 0x98, 0xc4, 0x4b, 0x0b, 0xd4, 0xaf, 0xf6, 0x92, 0x25, 0x68, 0x4e, 0x27, 0xe8, 0x7b, - 0x57, 0x40, 0x64, 0x59, 0x12, 0xe0, 0xad, 0x02, 0xe9, 0xa9, 0x5b, 0xed, 0xea, 0x0b, 0xe5, 0x72, - 0xd2, 0x55, 0xcc, 0x80, 0x62, 0xfe, 0x23, 0x24, 0x23, 0xee, 0xa4, 0x7b, 0xa8, 0xd1, 0x2c, 0xeb, - 0x1c, 0x2d, 0x46, 0x83, 0x64, 0xba, 0xb1, 0x72, 0x6e, 0xcc, 0x7a, 0x84, 0x53, 0xc0, 0xfa, 0x80, - 0x10, 0x75, 0x9b, 0x0b, 0xfc, 0x48, 0x42, 0x86, 0x7b, 0x9a, 0xbf, 0x4b, 0xce, 0x62, 0xc6, 0x85, - 0x0f, 0x94, 0x14, 0x7e, 0x0a, 0xee, 0x04, 0x83, 0x7e, 0x87, 0x70, 0x97, 0x9d, 0xc5, 0x8a, 0xba, - 0x03, 0x08, 0x89, 0xb8, 0x74, 0x39, 0xc1, 0x84, 0x46, 0xaa, 0x32, 0xe3, 0xc8, 0x85, 0xa6, 0xe7, - 0x92, 0x73, 0x3b, 0x36, 0x79, 0x72, 0xa6, 0x31, 0xc4, 0x09, 0x3b, 0x56, 0xea, 0x4e, 0xaa, 0x1d, - 0x07, 0x26, 0x1e, 0x95, 0x2b, 0x95,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, 0x01, 0x3f, 0x02, 0xab, 0x59, 0xc8, 0xa1, 0x4e, - 0xd0, 0xc4, 0x59, 0xcc, 0x66, 0xdf, 0x4c, 0x04, 0x6f, 0x80, 0xd9, 0xc2, 0x87, 0x8f, 0x92, 0x93, - 0xbc, 0x59, 0xbf, 0x35, 0x72, 0x9a, 0x4c, 0xa8, 0x76, 0xcf, 0xf7, 0x93, 0x1f, 0x12, 0x30, 0x04, - 0x73, 0x29, 0x59, 0xc7, 0x7d, 0x65, 0xf3, 0xca, 0x81, 0xe2, 0x80, 0x60, 0x3d, 0x53, 0xdc, 0x53, - 0x57, 0xef, 0x2f, 0xdf, 0x6e, 0xdd, 0xe9, 0x52, 0xd9, 0x1b, 0x74, 0x6c, 0xcc, 0xfa, 0xcd, 0xe4, - 0xdb, 0x50, 0xfc, 0xef, 0xae, 0xf0, 0xce, 0x9b, 0x72, 0x18, 0x12, 0x91, 0xda, 0x88, 0x3f, 0xff, - 0xfb, 0x6f, 0x6f, 0x1b, 0x4e, 0xea, 0x66, 0xff, 0xe9, 0x57, 0xcf, 0xeb, 0xc6, 0xd7, 0xcf, 0xeb, - 0xc6, 0xbf, 0x9e, 0xd7, 0x8d, 0xcf, 0x5f, 0xd4, 0xa7, 0xbe, 0x7e, 0x51, 0x9f, 0xfa, 0xe7, 0x8b, - 0xfa, 0xd4, 0xa7, 0xef, 0x5d, 0x06, 0xcd, 0x73, 0x77, 0x37, 0xfb, 0x1a, 0x17, 0xfd, 0xa4, 0xf9, - 0xd9, 0xe8, 0xb7, 0x3e, 0xed, 0xaf, 0x33, 0xab, 0xbb, 0xec, 0xbb, 0xff, 0x0d, 0x00, 0x00, 0xff, - 0xff, 0xbf, 0xd3, 0xf2, 0xea, 0x1c, 0x14, 0x00, 0x00, ->>>>>>> 907a0f15 (init commit) + // 2017 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 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, 0x40, 0x29, 0xe3, 0x2a, 0x51, 0x0f, 0xde, 0x07, 0x6b, 0x39, 0xd1, 0x68, + 0x89, 0x8f, 0x19, 0x6b, 0xce, 0xcd, 0x0c, 0x30, 0x52, 0xe5, 0x85, 0xf5, 0x14, 0xac, 0x1e, 0xe4, + 0x05, 0x25, 0x6b, 0x20, 0x23, 0x3b, 0x34, 0x46, 0x67, 0x92, 0x0d, 0x50, 0xcb, 0x7e, 0xc6, 0xea, + 0xdd, 0x57, 0x9c, 0x5c, 0x60, 0xf5, 0xc1, 0xd2, 0xa9, 0xc0, 0xc7, 0x24, 0xf0, 0x72, 0xb2, 0x6b, + 0x0e, 0x60, 0x6f, 0x9c, 0x68, 0xe2, 0xdf, 0x44, 0xb9, 0x39, 0x06, 0xd6, 0x4e, 0x8b, 0x03, 0x8c, + 0x6e, 0xee, 0x47, 0x08, 0x9f, 0x13, 0x29, 0xa0, 0x03, 0x2a, 0x7a, 0x50, 0x89, 0x33, 0xeb, 0xde, + 0xb5, 0x99, 0x15, 0x6d, 0xdb, 0xd7, 0x91, 0xec, 0x23, 0x89, 0x92, 0xba, 0xa0, 0xb9, 0xac, 0xef, + 0x83, 0x95, 0xc7, 0x48, 0x0e, 0x38, 0xf1, 0x46, 0x62, 0xbc, 0x04, 0xca, 0x2a, 0x7e, 0x86, 0x8e, + 0x9f, 0x7a, 0x54, 0xb3, 0x86, 0xf9, 0xe0, 0xd3, 0x90, 0x71, 0x49, 0xbc, 0x4b, 0x27, 0xf2, 0x8a, + 0xe3, 0x3d, 0x07, 0x2b, 0xea, 0xb0, 0x04, 0x09, 0x3c, 0x37, 0xdb, 0x67, 0x1c, 0xc7, 0xfa, 0xce, + 0x8f, 0x27, 0xba, 0x1d, 0xe3, 0xe6, 0x92, 0x0d, 0x2c, 0x47, 0x63, 0x72, 0x61, 0xfd, 0xc6, 0x00, + 0xe6, 0x21, 0x19, 0xee, 0x0a, 0x41, 0xbb, 0x41, 0x9f, 0x04, 0x52, 0xd5,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 0x61, 0x9c, 0x52, 0x4b, 0xe9, 0x4a, 0x3a, 0x16, 0xe6, 0xa9, 0x51, 0x2a, 0xa4, 0x06, + 0xfc, 0x08, 0xac, 0x64, 0x2e, 0x87, 0x3a, 0x40, 0x13, 0x47, 0x31, 0x9b, 0x7d, 0x33, 0x11, 0xbc, + 0x01, 0x66, 0x0a, 0x5f, 0x86, 0xca, 0x4e, 0xf2, 0x66, 0xfd, 0xda, 0xc8, 0xdb, 0x64, 0xd2, 0x6a, + 0x77, 0x7d, 0x3f, 0xf9, 0x21, 0x01, 0x43, 0x30, 0x9b, 0x36, 0xeb, 0xb8, 0xae, 0x6c, 0x5c, 0x39, + 0x50, 0xec, 0x13, 0xac, 0x67, 0x8a, 0x7b, 0xea, 0xea, 0xfd, 0xf9, 0x9b, 0xcd, 0x3b, 0x5d, 0x2a, + 0x7b, 0x83, 0x8e, 0x8d, 0x59, 0xbf, 0x95, 0x7c, 0x3c, 0x8b, 0xff, 0xdd, 0x15, 0xde, 0x79, 0x4b, + 0x0e, 0x43, 0x22, 0x52, 0x1d, 0xf1, 0xa7, 0x7f, 0xfd, 0xf5, 0x6d, 0xc3, 0x49, 0xcd, 0xec, 0x3d, + 0xfb, 0xf2, 0x45, 0xc3, 0xf8, 0xea, 0x45, 0xc3, 0xf8, 0xe7, 0x8b, 0x86, 0xf1, 0xd9, 0xcb, 0xc6, + 0xd4, 0x57, 0x2f, 0x1b, 0x53, 0xff, 0x78, 0xd9, 0x98, 0xfa, 0xe4, 0xbd, 0xcb, 0xa4, 0x79, 0xec, + 0xee, 0x66, 0x9f, 0x2b, 0xa3, 0x1f, 0xb5, 0x3e, 0x1d, 0xfd, 0x18, 0xaa, 0xed, 0x75, 0x66, 0x74, + 0x95, 0x7d, 0xf7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xce, 0x17, 0x90, 0x22, 0x3d, 0x15, 0x00, + 0x00, } func (m *ConsumerAdditionProposal) Marshal() (dAtA []byte, err error) { From 864b3acd5a26842049ec23e6f3bcbe0d4ab78519 Mon Sep 17 00:00:00 2001 From: insumity Date: Mon, 17 Jun 2024 11:26:22 +0200 Subject: [PATCH 07/10] added a comment --- x/ccv/provider/keeper/distribution.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/ccv/provider/keeper/distribution.go b/x/ccv/provider/keeper/distribution.go index 883bf22c34..49b511261d 100644 --- a/x/ccv/provider/keeper/distribution.go +++ b/x/ccv/provider/keeper/distribution.go @@ -156,6 +156,7 @@ func (k Keeper) AllocateTokensToConsumerValidators( // Allocate tokens by iterating over the consumer validators for _, consumerVal := range k.GetConsumerValSet(ctx, chainID) { + // if a validator is not eligible, this means that the other eligible validators would get more rewards if !k.IsEligibleForConsumerRewards(ctx, consumerVal.Height) { continue } From 720495915def932b5f6a3a2a361328b313ce7889 Mon Sep 17 00:00:00 2001 From: insumity Date: Tue, 18 Jun 2024 14:41:31 +0200 Subject: [PATCH 08/10] Update .changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md Co-authored-by: Marius Poke --- ...9-distribute-rewards-to-long-term-validating-validators.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md b/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md index 08ac4441c1..b4ff9d6341 100644 --- a/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md +++ b/.changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md @@ -1,3 +1,3 @@ - Only start distributing rewards to validators after they have been validating - for a fixed number of blocks. Introduces the `NumberOfEpochsToStartReceivingRewards` param. ([\#1929](https://github.com/cosmos/interchain- - security/pull/1929)) + for a fixed number of blocks. Introduces the `NumberOfEpochsToStartReceivingRewards` param. + ([\#1929](https://github.com/cosmos/interchain-security/pull/1929)) From 395409128f29dee730d5d9103f0cf18067bb1b7b Mon Sep 17 00:00:00 2001 From: insumity Date: Tue, 18 Jun 2024 14:41:46 +0200 Subject: [PATCH 09/10] Update .changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md Co-authored-by: Marius Poke --- ...9-distribute-rewards-to-long-term-validating-validators.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md b/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md index 08ac4441c1..b4ff9d6341 100644 --- a/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md +++ b/.changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md @@ -1,3 +1,3 @@ - Only start distributing rewards to validators after they have been validating - for a fixed number of blocks. Introduces the `NumberOfEpochsToStartReceivingRewards` param. ([\#1929](https://github.com/cosmos/interchain- - security/pull/1929)) + for a fixed number of blocks. Introduces the `NumberOfEpochsToStartReceivingRewards` param. + ([\#1929](https://github.com/cosmos/interchain-security/pull/1929)) From d28aba5493be187c2654794f46f9f69184c1d76d Mon Sep 17 00:00:00 2001 From: insumity Date: Tue, 18 Jun 2024 15:35:43 +0200 Subject: [PATCH 10/10] took into account comments --- .../ccv/provider/v1/provider.proto | 2 +- tests/integration/distribution.go | 8 +- x/ccv/provider/keeper/distribution.go | 4 +- x/ccv/provider/keeper/relay_test.go | 6 +- x/ccv/provider/keeper/validator_set_update.go | 4 +- x/ccv/provider/migrations/v6/migrations.go | 10 - x/ccv/provider/types/provider.pb.go | 276 +++++++++--------- 7 files changed, 150 insertions(+), 160 deletions(-) diff --git a/proto/interchain_security/ccv/provider/v1/provider.proto b/proto/interchain_security/ccv/provider/v1/provider.proto index 0cf17556c2..e31b3a150f 100644 --- a/proto/interchain_security/ccv/provider/v1/provider.proto +++ b/proto/interchain_security/ccv/provider/v1/provider.proto @@ -367,7 +367,7 @@ message ConsumerValidator { // If a validator becomes a consumer validator at height `H` and is continuously a consumer validator for all the upcoming // epochs, then the height of the validator SHOULD remain `H`. This height only resets to a different height if a validator // stops being a consumer validator during an epoch and later becomes again a consumer validator. - int64 height = 4; + int64 join_height = 4; } // ConsumerRewardsAllocation stores the rewards allocated by a consumer chain // to the consumer rewards pool. It is used to allocate the tokens to the consumer diff --git a/tests/integration/distribution.go b/tests/integration/distribution.go index 956d69f901..2bea909c75 100644 --- a/tests/integration/distribution.go +++ b/tests/integration/distribution.go @@ -1094,12 +1094,12 @@ func (s *CCVTestSuite) TestAllocateTokensToConsumerValidatorsWithDifferentValida // update the consumer validators consuVals := providerKeeper.GetConsumerValSet(ctx, chainID) // first 2 validators were consumer validators since block height 1 and hence get rewards - consuVals[0].Height = 1 - consuVals[1].Height = 1 + consuVals[0].JoinHeight = 1 + consuVals[1].JoinHeight = 1 // last 2 validators were consumer validators since block height 2 and hence do not get rewards because they // have not been consumer validators for `GetNumberOfEpochsToStartReceivingRewards * GetBlocksPerEpoch` blocks - consuVals[2].Height = 2 - consuVals[3].Height = 2 + consuVals[2].JoinHeight = 2 + consuVals[3].JoinHeight = 2 providerKeeper.SetConsumerValSet(ctx, chainID, consuVals) providerKeeper.DeleteConsumerValSet(ctx, chainID) diff --git a/x/ccv/provider/keeper/distribution.go b/x/ccv/provider/keeper/distribution.go index 49b511261d..2259e472d1 100644 --- a/x/ccv/provider/keeper/distribution.go +++ b/x/ccv/provider/keeper/distribution.go @@ -157,7 +157,7 @@ func (k Keeper) AllocateTokensToConsumerValidators( // Allocate tokens by iterating over the consumer validators for _, consumerVal := range k.GetConsumerValSet(ctx, chainID) { // if a validator is not eligible, this means that the other eligible validators would get more rewards - if !k.IsEligibleForConsumerRewards(ctx, consumerVal.Height) { + if !k.IsEligibleForConsumerRewards(ctx, consumerVal.JoinHeight) { continue } @@ -256,7 +256,7 @@ func (k Keeper) ComputeConsumerTotalVotingPower(ctx sdk.Context, chainID string) for _, v := range k.GetConsumerValSet(ctx, chainID) { // only consider the voting power of a validator that would receive rewards (i.e., validator has been validating for a number of blocks) - if !k.IsEligibleForConsumerRewards(ctx, v.Height) { + if !k.IsEligibleForConsumerRewards(ctx, v.JoinHeight) { continue } diff --git a/x/ccv/provider/keeper/relay_test.go b/x/ccv/provider/keeper/relay_test.go index bb0b8d4d98..c71a53d13d 100644 --- a/x/ccv/provider/keeper/relay_test.go +++ b/x/ccv/provider/keeper/relay_test.go @@ -116,7 +116,7 @@ func TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights(t *testing.T) { ProviderConsAddr: valAConsAddr, Power: 1, ConsumerPublicKey: &valAPubKey, - Height: 123456789, + JoinHeight: 123456789, } providerKeeper.SetConsumerValidator(ctx, "chainID", consumerValidatorA) @@ -128,12 +128,12 @@ func TestQueueVSCPacketsDoesNotResetConsumerValidatorsHeights(t *testing.T) { // the height of consumer validator A should not be modified because A was already a consumer validator cv, _ := providerKeeper.GetConsumerValidator(ctx, "chainID", providertypes.NewProviderConsAddress(valAConsAddr)) - require.Equal(t, consumerValidatorA.Height, cv.Height, "the consumer validator's height was erroneously modified") + require.Equal(t, consumerValidatorA.JoinHeight, cv.JoinHeight, "the consumer validator's height was erroneously modified") // the height of consumer validator B is set to be the same as the one of the current chain height because this // consumer validator becomes a consumer validator for the first time (i.e., was not a consumer validator in the previous epoch) cv, _ = providerKeeper.GetConsumerValidator(ctx, "chainID", providertypes.NewProviderConsAddress(valBConsAddr)) - require.Equal(t, chainHeight, cv.Height, "the consumer validator's height was not correctly set") + require.Equal(t, chainHeight, cv.JoinHeight, "the consumer validator's height was not correctly set") } // TestOnRecvVSCMaturedPacket tests the OnRecvVSCMaturedPacket method of the keeper. diff --git a/x/ccv/provider/keeper/validator_set_update.go b/x/ccv/provider/keeper/validator_set_update.go index 916922b620..de46e880ab 100644 --- a/x/ccv/provider/keeper/validator_set_update.go +++ b/x/ccv/provider/keeper/validator_set_update.go @@ -173,14 +173,14 @@ func (k Keeper) CreateConsumerValidator(ctx sdk.Context, chainID string, validat if v, found := k.GetConsumerValidator(ctx, chainID, types.ProviderConsAddress{Address: consAddr}); found { // if validator was already a consumer validator, then do not update the height set the first time // the validator became a consumer validator - height = v.Height + height = v.JoinHeight } return types.ConsumerValidator{ ProviderConsAddr: consAddr, Power: power, ConsumerPublicKey: &consumerPublicKey, - Height: height, + JoinHeight: height, }, nil } diff --git a/x/ccv/provider/migrations/v6/migrations.go b/x/ccv/provider/migrations/v6/migrations.go index 3c339435b3..9395d625e3 100644 --- a/x/ccv/provider/migrations/v6/migrations.go +++ b/x/ccv/provider/migrations/v6/migrations.go @@ -41,13 +41,3 @@ func MigrateParams(ctx sdk.Context, paramsSubspace paramtypes.Subspace) { } paramsSubspace.Set(ctx, providertypes.KeyNumberOfEpochsToStartReceivingRewards, providertypes.DefaultNumberOfEpochsToStartReceivingRewards) } - -// MigrateSomething adds missing provider chain params to the param store. -func MigrateSomething(ctx sdk.Context, providerKeeper providerkeeper.Keeper) { - for _, chainID := range providerKeeper.GetAllRegisteredConsumerChainIDs(ctx) { - for _, val := range providerKeeper.GetConsumerValSet(ctx, chainID) { - val.Height = ctx.BlockHeight() - providerKeeper.SetConsumerValidator(ctx, chainID, val) - } - } -} diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index 6b59809ec8..8649882e18 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -1556,7 +1556,7 @@ type ConsumerValidator struct { // If a validator becomes a consumer validator at height `H` and is continuously a consumer validator for all the upcoming // epochs, then the height of the validator SHOULD remain `H`. This height only resets to a different height if a validator // stops being a consumer validator during an epoch and later becomes again a consumer validator. - Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` + JoinHeight int64 `protobuf:"varint,4,opt,name=join_height,json=joinHeight,proto3" json:"join_height,omitempty"` } func (m *ConsumerValidator) Reset() { *m = ConsumerValidator{} } @@ -1613,9 +1613,9 @@ func (m *ConsumerValidator) GetConsumerPublicKey() *crypto.PublicKey { return nil } -func (m *ConsumerValidator) GetHeight() int64 { +func (m *ConsumerValidator) GetJoinHeight() int64 { if m != nil { - return m.Height + return m.JoinHeight } return 0 } @@ -1700,134 +1700,134 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ - // 2017 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0xd7, 0x92, 0x94, 0x44, 0x0e, 0xf5, 0x73, 0xa4, 0xd8, 0x2b, 0x7d, 0xf5, 0xa5, 0xe8, 0x4d, - 0x9d, 0xaa, 0x71, 0xbd, 0x8c, 0x94, 0x16, 0x30, 0x8c, 0x06, 0x81, 0x44, 0x39, 0xb1, 0xac, 0xd8, - 0x56, 0x56, 0xaa, 0x8c, 0xa6, 0x87, 0xc5, 0x70, 0x76, 0x44, 0x0e, 0xb4, 0xdc, 0x59, 0xcf, 0x0c, - 0x57, 0xe1, 0xa5, 0xe7, 0x1e, 0x5a, 0x20, 0xbd, 0x05, 0x3d, 0xb4, 0x69, 0x4f, 0x45, 0x2f, 0xed, - 0x3f, 0x50, 0xf4, 0x9a, 0x63, 0x8e, 0x3d, 0x25, 0x85, 0x7d, 0xe8, 0xa1, 0xff, 0x44, 0x31, 0xb3, - 0x3f, 0x49, 0x49, 0x2e, 0x8d, 0x34, 0x17, 0x69, 0xf7, 0xcd, 0xe7, 0x7d, 0xde, 0x9b, 0x79, 0x6f, - 0xde, 0x7b, 0x5c, 0xb0, 0x43, 0x03, 0x49, 0x38, 0xee, 0x21, 0x1a, 0xb8, 0x82, 0xe0, 0x01, 0xa7, - 0x72, 0xd8, 0xc2, 0x38, 0x6a, 0x85, 0x9c, 0x45, 0xd4, 0x23, 0xbc, 0x15, 0x6d, 0x67, 0xcf, 0x76, - 0xc8, 0x99, 0x64, 0xf0, 0xcd, 0x2b, 0x74, 0x6c, 0x8c, 0x23,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34, 0x14, 0xf0, 0x0d, 0x30, 0xa3, 0xee, - 0x67, 0x42, 0x54, 0x71, 0xa6, 0x23, 0x81, 0x0f, 0x74, 0x47, 0xc8, 0xc7, 0x79, 0x16, 0xba, 0xd4, - 0x13, 0x66, 0xa9, 0x59, 0xde, 0xaa, 0x38, 0x0b, 0x83, 0x5c, 0xfd, 0xc0, 0x13, 0xd6, 0xcf, 0x40, - 0xbd, 0x40, 0x08, 0x17, 0x40, 0x29, 0xe3, 0x2a, 0x51, 0x0f, 0xde, 0x07, 0x6b, 0x39, 0xd1, 0x68, - 0x89, 0x8f, 0x19, 0x6b, 0xce, 0xcd, 0x0c, 0x30, 0x52, 0xe5, 0x85, 0xf5, 0x14, 0xac, 0x1e, 0xe4, - 0x05, 0x25, 0x6b, 0x20, 0x23, 0x3b, 0x34, 0x46, 0x67, 0x92, 0x0d, 0x50, 0xcb, 0x7e, 0xc6, 0xea, - 0xdd, 0x57, 0x9c, 0x5c, 0x60, 0xf5, 0xc1, 0xd2, 0xa9, 0xc0, 0xc7, 0x24, 0xf0, 0x72, 0xb2, 0x6b, - 0x0e, 0x60, 0x6f, 0x9c, 0x68, 0xe2, 0xdf, 0x44, 0xb9, 0x39, 0x06, 0xd6, 0x4e, 0x8b, 0x03, 0x8c, - 0x6e, 0xee, 0x47, 0x08, 0x9f, 0x13, 0x29, 0xa0, 0x03, 0x2a, 0x7a, 0x50, 0x89, 0x33, 0xeb, 0xde, - 0xb5, 0x99, 0x15, 0x6d, 0xdb, 0xd7, 0x91, 0xec, 0x23, 0x89, 0x92, 0xba, 0xa0, 0xb9, 0xac, 0xef, - 0x83, 0x95, 0xc7, 0x48, 0x0e, 0x38, 0xf1, 0x46, 0x62, 0xbc, 0x04, 0xca, 0x2a, 0x7e, 0x86, 0x8e, - 0x9f, 0x7a, 0x54, 0xb3, 0x86, 0xf9, 0xe0, 0xd3, 0x90, 0x71, 0x49, 0xbc, 0x4b, 0x27, 0xf2, 0x8a, - 0xe3, 0x3d, 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79, 0xec, - 0xee, 0x66, 0x9f, 0x2b, 0xa3, 0x1f, 0xb5, 0x3e, 0x1d, 0xfd, 0x18, 0xaa, 0xed, 0x75, 0x66, 0x74, - 0x95, 0x7d, 0xf7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xce, 0x17, 0x90, 0x22, 0x3d, 0x15, 0x00, - 0x00, + // 2022 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xcd, 0x73, 0x1c, 0x47, + 0x15, 0xd7, 0x68, 0x57, 0xd2, 0xee, 0x5b, 0x7d, 0xb6, 0x94, 0x78, 0x64, 0x84, 0x24, 0x4f, 0x70, + 0x10, 0x31, 0xde, 0x8d, 0x1c, 0xa8, 0x72, 0xb9, 0x48, 0xa5, 0xa4, 0x95, 0x13, 0x7f, 0xc4, 0xb6, + 0x32, 0x12, 0x76, 0x11, 0x0e, 0x53, 0xbd, 0x3d, 0xad, 0xdd, 0x46, 0xb3, 0xd3, 0xe3, 0xee, 0xde, + 0x71, 0xf6, 0xc2, 0x99, 0x03, 0x54, 0x85, 0x5b, 0x8a, 0x03, 0x04, 0x4e, 0x14, 0x17, 0xf8, 0x0f, + 0xb8, 0x51, 0x39, 0xe6, 0xc8, 0x29, 0xa1, 0xec, 0x03, 0x07, 0xfe, 0x09, 0xaa, 0x7b, 0x3e, 0x77, + 0x25, 0x99, 0x75, 0x85, 0x5c, 0xa4, 0x99, 0xd7, 0xbf, 0xf7, 0x7b, 0xaf, 0xfb, 0xbd, 0x7e, 0xef, + 0xed, 0xc0, 0x0d, 0x16, 0x2a, 0x2a, 0x48, 0x0f, 0xb3, 0xd0, 0x93, 0x94, 0x0c, 0x04, 0x53, 0xc3, + 0x16, 0x21, 0x71, 0x2b, 0x12, 0x3c, 0x66, 0x3e, 0x15, 0xad, 0x78, 0x37, 0x7f, 0x6e, 0x46, 0x82, + 0x2b, 0x8e, 0xde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 0xeb, 0x5f, 0xcf, 0x37, + 0xad, 0x4f, 0x5f, 0x6c, 0x4e, 0x7d, 0xf9, 0x62, 0x73, 0xea, 0x9f, 0x2f, 0x36, 0xa7, 0x3e, 0x7e, + 0xf7, 0x2c, 0x69, 0x11, 0xc4, 0xeb, 0xf9, 0x77, 0xcb, 0xf8, 0x47, 0xad, 0x4f, 0x46, 0xbf, 0x8a, + 0x1a, 0x7b, 0x9d, 0x59, 0x53, 0x6e, 0xdf, 0xf9, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x49, + 0x1e, 0xe4, 0x46, 0x15, 0x00, 0x00, } func (m *ConsumerAdditionProposal) Marshal() (dAtA []byte, err error) { @@ -3039,8 +3039,8 @@ func (m *ConsumerValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Height != 0 { - i = encodeVarintProvider(dAtA, i, uint64(m.Height)) + if m.JoinHeight != 0 { + i = encodeVarintProvider(dAtA, i, uint64(m.JoinHeight)) i-- dAtA[i] = 0x20 } @@ -3662,8 +3662,8 @@ func (m *ConsumerValidator) Size() (n int) { l = m.ConsumerPublicKey.Size() n += 1 + l + sovProvider(uint64(l)) } - if m.Height != 0 { - n += 1 + sovProvider(uint64(m.Height)) + if m.JoinHeight != 0 { + n += 1 + sovProvider(uint64(m.JoinHeight)) } return n } @@ -7503,9 +7503,9 @@ func (m *ConsumerValidator) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JoinHeight", wireType) } - m.Height = 0 + m.JoinHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProvider @@ -7515,7 +7515,7 @@ func (m *ConsumerValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Height |= int64(b&0x7F) << shift + m.JoinHeight |= int64(b&0x7F) << shift if b < 0x80 { break }