diff --git a/proto/interchain_security/ccv/provider/v1/provider.proto b/proto/interchain_security/ccv/provider/v1/provider.proto index 7204d5754b..3a4a1108aa 100644 --- a/proto/interchain_security/ccv/provider/v1/provider.proto +++ b/proto/interchain_security/ccv/provider/v1/provider.proto @@ -464,3 +464,20 @@ message PowerShapingParameters { // ConsumerIds contains consumer ids of chains // Used so we can easily (de)serialize slices of strings message ConsumerIds { repeated string ids = 1; } + +// ConsumerPhase indicates the phases of a consumer chain according to ADR 019 +enum ConsumerPhase { + // UNSPECIFIED defines an empty phase. + CONSUMER_PHASE_UNSPECIFIED = 0; + // REGISTERED defines the phase in which a consumer chain has been assigned a unique consumer id. + // A chain in this phase cannot yet launch. + CONSUMER_PHASE_REGISTERED = 1; + // INITIALIZED defines the phase in which a consumer chain has set all the needed parameters to launch but + // has not yet launched (e.g., because the `spawnTime` of the consumer chain has not yet been reached). + CONSUMER_PHASE_INITIALIZED = 2; + // LAUNCHED defines the phase in which a consumer chain is running and consuming a subset of the validator + // set of the provider. + CONSUMER_PHASE_LAUNCHED = 3; + // STOPPED defines the phase in which a previously-launched chain has stopped. + CONSUMER_PHASE_STOPPED = 4; +} diff --git a/tests/integration/setup.go b/tests/integration/setup.go index 20924e9b2e..04f1882113 100644 --- a/tests/integration/setup.go +++ b/tests/integration/setup.go @@ -3,7 +3,6 @@ package integration import ( "context" "fmt" - "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" "testing" transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" @@ -22,6 +21,7 @@ import ( icstestingutils "github.com/cosmos/interchain-security/v5/testutil/ibc_testing" testutil "github.com/cosmos/interchain-security/v5/testutil/integration" consumertypes "github.com/cosmos/interchain-security/v5/x/ccv/consumer/types" + providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" ccv "github.com/cosmos/interchain-security/v5/x/ccv/types" ) @@ -150,7 +150,7 @@ func (suite *CCVTestSuite) SetupTest() { // 2. MakeGenesis is called on the provider chain // 3. ibc/testing sets the tendermint header for the consumer chain app - providerKeeper.SetConsumerPhase(suite.providerCtx(), icstestingutils.FirstConsumerId, keeper.Initialized) + providerKeeper.SetConsumerPhase(suite.providerCtx(), icstestingutils.FirstConsumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) preProposalKeyAssignment(suite, icstestingutils.FirstConsumerId) // start consumer chains diff --git a/testutil/ibc_testing/generic_setup.go b/testutil/ibc_testing/generic_setup.go index 12fe71a34e..8b0cdfa9f0 100644 --- a/testutil/ibc_testing/generic_setup.go +++ b/testutil/ibc_testing/generic_setup.go @@ -3,10 +3,10 @@ package ibc_testing import ( "encoding/json" "fmt" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" "testing" + clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" + ibctesting "github.com/cosmos/ibc-go/v8/testing" testkeeper "github.com/cosmos/interchain-security/v5/testutil/keeper" "github.com/stretchr/testify/require" @@ -158,7 +158,7 @@ func AddConsumer[Tp testutil.ProviderApp, Tc testutil.ConsumerApp]( providerKeeper.SetConsumerMetadata(providerChain.GetContext(), consumerId, consumerMetadata) providerKeeper.SetConsumerInitializationParameters(providerChain.GetContext(), consumerId, initializationParameters) providerKeeper.SetConsumerPowerShapingParameters(providerChain.GetContext(), consumerId, powerShapingParameters) - providerKeeper.SetConsumerPhase(providerChain.GetContext(), consumerId, keeper.Initialized) + providerKeeper.SetConsumerPhase(providerChain.GetContext(), consumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(providerChain.GetContext(), consumerId, coordinator.CurrentTime) // opt-in all validators diff --git a/testutil/keeper/unit_test_helpers.go b/testutil/keeper/unit_test_helpers.go index b27129c543..a7ef6d7563 100644 --- a/testutil/keeper/unit_test_helpers.go +++ b/testutil/keeper/unit_test_helpers.go @@ -235,7 +235,7 @@ func SetupForStoppingConsumerChain(t *testing.T, ctx sdk.Context, providerKeeper.SetConsumerMetadata(ctx, consumerId, GetTestConsumerMetadata()) providerKeeper.SetConsumerInitializationParameters(ctx, consumerId, GetTestInitializationParameters()) providerKeeper.SetConsumerPowerShapingParameters(ctx, consumerId, GetTestPowerShapingParameters()) - providerKeeper.SetConsumerPhase(ctx, consumerId, providerkeeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, consumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) err := providerKeeper.CreateConsumerClient(ctx, consumerId) require.NoError(t, err) diff --git a/x/ccv/provider/handler_test.go b/x/ccv/provider/handler_test.go index 7ea306f47e..0d06ba7dea 100644 --- a/x/ccv/provider/handler_test.go +++ b/x/ccv/provider/handler_test.go @@ -55,7 +55,7 @@ func TestAssignConsensusKeyMsgHandling(t *testing.T) { setup: func(ctx sdk.Context, k keeper.Keeper, mocks testkeeper.MockedKeepers, ) { - k.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + k.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) gomock.InOrder( mocks.MockStakingKeeper.EXPECT().GetValidator( ctx, providerCryptoId.SDKValOpAddress(), @@ -88,7 +88,7 @@ func TestAssignConsensusKeyMsgHandling(t *testing.T) { setup: func(ctx sdk.Context, k keeper.Keeper, mocks testkeeper.MockedKeepers, ) { - k.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + k.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) gomock.InOrder( mocks.MockStakingKeeper.EXPECT().GetValidator( ctx, providerCryptoId.SDKValOpAddress(), @@ -103,7 +103,7 @@ func TestAssignConsensusKeyMsgHandling(t *testing.T) { setup: func(ctx sdk.Context, k keeper.Keeper, mocks testkeeper.MockedKeepers, ) { - k.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + k.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // Use the consumer key already used by some other validator k.SetValidatorByConsumerAddr(ctx, "consumerId", consumerConsAddr, providerConsAddr2) @@ -127,7 +127,7 @@ func TestAssignConsensusKeyMsgHandling(t *testing.T) { setup: func(ctx sdk.Context, k keeper.Keeper, mocks testkeeper.MockedKeepers, ) { - k.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + k.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // Use the consumer key already k.SetValidatorByConsumerAddr(ctx, "consumerId", consumerConsAddr, providerConsAddr) @@ -149,7 +149,7 @@ func TestAssignConsensusKeyMsgHandling(t *testing.T) { setup: func(ctx sdk.Context, k keeper.Keeper, mocks testkeeper.MockedKeepers, ) { - k.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + k.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // Use the consumer key already used by some other validator k.SetValidatorByConsumerAddr(ctx, "consumerId", consumerConsAddr, providerConsAddr2) diff --git a/x/ccv/provider/keeper/grpc_query_test.go b/x/ccv/provider/keeper/grpc_query_test.go index bbc61794d8..bb51e85952 100644 --- a/x/ccv/provider/keeper/grpc_query_test.go +++ b/x/ccv/provider/keeper/grpc_query_test.go @@ -4,8 +4,6 @@ import ( "fmt" "testing" - "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" @@ -83,7 +81,7 @@ func TestQueryConsumerChainOptedInValidators(t *testing.T) { require.Error(t, err) pk.FetchAndIncrementConsumerId(ctx) - pk.SetConsumerPhase(ctx, consumerId, keeper.Initialized) + pk.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerAddr1 := types.NewProviderConsAddress([]byte("providerAddr1")) providerAddr2 := types.NewProviderConsAddress([]byte("providerAddr2")) @@ -253,7 +251,7 @@ func TestQueryValidatorConsumerCommissionRate(t *testing.T) { require.Error(t, err) pk.FetchAndIncrementConsumerId(ctx) - pk.SetConsumerPhase(ctx, consumerId, keeper.Initialized) + pk.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // validator with set consumer commission rate expectedCommissionRate := math.LegacyMustNewDecFromStr("0.123") diff --git a/x/ccv/provider/keeper/hooks_test.go b/x/ccv/provider/keeper/hooks_test.go index 8f7f90c948..bc6450923f 100644 --- a/x/ccv/provider/keeper/hooks_test.go +++ b/x/ccv/provider/keeper/hooks_test.go @@ -1,12 +1,14 @@ package keeper_test import ( + "testing" + sdk "github.com/cosmos/cosmos-sdk/types" cryptotestutil "github.com/cosmos/interchain-security/v5/testutil/crypto" testkeeper "github.com/cosmos/interchain-security/v5/testutil/keeper" providerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" + "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" "github.com/golang/mock/gomock" - "testing" ) func TestValidatorConsensusKeyInUse(t *testing.T) { @@ -30,7 +32,7 @@ func TestValidatorConsensusKeyInUse(t *testing.T) { name: "in use by another validator", setup: func(ctx sdk.Context, k providerkeeper.Keeper) { k.FetchAndIncrementConsumerId(ctx) - k.SetConsumerPhase(ctx, "0", providerkeeper.Initialized) + k.SetConsumerPhase(ctx, "0", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // We are trying to add a new validator, but its address has already been used // by another validator @@ -47,8 +49,8 @@ func TestValidatorConsensusKeyInUse(t *testing.T) { setup: func(ctx sdk.Context, k providerkeeper.Keeper) { k.FetchAndIncrementConsumerId(ctx) k.FetchAndIncrementConsumerId(ctx) - k.SetConsumerPhase(ctx, "0", providerkeeper.Initialized) - k.SetConsumerPhase(ctx, "1", providerkeeper.Initialized) + k.SetConsumerPhase(ctx, "0", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) + k.SetConsumerPhase(ctx, "1", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // We are trying to add a new validator, but its address has already been used // by another validator, of which there are several, across potentially several chains diff --git a/x/ccv/provider/keeper/keeper.go b/x/ccv/provider/keeper/keeper.go index 66df230b09..318fb7c90c 100644 --- a/x/ccv/provider/keeper/keeper.go +++ b/x/ccv/provider/keeper/keeper.go @@ -752,8 +752,10 @@ func (k Keeper) GetAllActiveConsumerIds(ctx sdk.Context) []string { consumerIds := []string{} for i := uint64(0); i < latestConsumerId; i++ { consumerId := fmt.Sprintf("%d", i) - phase, foundPhase := k.GetConsumerPhase(ctx, consumerId) - if !foundPhase || (phase != Registered && phase != Initialized && phase != Launched) { + phase := k.GetConsumerPhase(ctx, consumerId) + if phase != types.ConsumerPhase_CONSUMER_PHASE_REGISTERED && + phase != types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED && + phase != types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { continue } consumerIds = append(consumerIds, consumerId) diff --git a/x/ccv/provider/keeper/key_assignment.go b/x/ccv/provider/keeper/key_assignment.go index 2e3846feb4..c01a061266 100644 --- a/x/ccv/provider/keeper/key_assignment.go +++ b/x/ccv/provider/keeper/key_assignment.go @@ -403,12 +403,14 @@ func (k Keeper) AssignConsumerKey( validator stakingtypes.Validator, consumerKey tmprotocrypto.PublicKey, ) error { - phase, found := k.GetConsumerPhase(ctx, consumerId) - if !found || phase == Stopped { - //check that the consumer chain is either registered, initialized, or launched + phase := k.GetConsumerPhase(ctx, consumerId) + if phase != types.ConsumerPhase_CONSUMER_PHASE_REGISTERED && + phase != types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED && + phase != types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { + // check that the consumer chain is either registered, initialized, or launched return errorsmod.Wrapf( - types.ErrUnknownConsumerId, consumerId, - ) + types.ErrInvalidPhase, + "cannot assign a key to a consumer chain that is not in the registered, initialized, or launched phase: %s", consumerId) } consAddrTmp, err := ccvtypes.TMCryptoPublicKeyToConsAddr(consumerKey) @@ -460,7 +462,7 @@ func (k Keeper) AssignConsumerKey( oldConsumerAddr := types.NewConsumerConsAddress(oldConsumerAddrTmp) // check whether the consumer chain has already launched (i.e., a client to the consumer was already created) - if phase == Launched { + if phase == types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { // mark the old consumer address as prunable once UnbondingPeriod elapses; // note: this state is removed on EndBlock unbondingPeriod, err := k.stakingKeeper.UnbondingTime(ctx) diff --git a/x/ccv/provider/keeper/key_assignment_test.go b/x/ccv/provider/keeper/key_assignment_test.go index 290b8a6048..9779b727ca 100644 --- a/x/ccv/provider/keeper/key_assignment_test.go +++ b/x/ccv/provider/keeper/key_assignment_test.go @@ -393,7 +393,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Launched) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[0].SDKStakingValidator(), consumerIdentities[0].TMProtoCryptoPublicKey(), @@ -420,7 +420,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(sdkCtx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(sdkCtx, consumerId, providerkeeper.Launched) + k.SetConsumerPhase(sdkCtx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) err := k.AssignConsumerKey(sdkCtx, consumerId, providerIdentities[0].SDKStakingValidator(), consumerIdentities[0].TMProtoCryptoPublicKey(), @@ -450,7 +450,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Launched) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[0].SDKStakingValidator(), consumerIdentities[0].TMProtoCryptoPublicKey(), @@ -477,7 +477,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Launched) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[1].SDKStakingValidator(), providerIdentities[0].TMProtoCryptoPublicKey(), @@ -495,7 +495,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Initialized) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[0].SDKStakingValidator(), consumerIdentities[0].TMProtoCryptoPublicKey(), @@ -520,7 +520,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Initialized) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[0].SDKStakingValidator(), consumerIdentities[0].TMProtoCryptoPublicKey(), @@ -550,7 +550,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Initialized) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[0].SDKStakingValidator(), consumerIdentities[0].TMProtoCryptoPublicKey(), @@ -577,7 +577,7 @@ func TestAssignConsensusKeyForConsumerChain(t *testing.T) { ) }, doActions: func(ctx sdk.Context, k providerkeeper.Keeper) { - k.SetConsumerPhase(ctx, consumerId, providerkeeper.Initialized) + k.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) err := k.AssignConsumerKey(ctx, consumerId, providerIdentities[1].SDKStakingValidator(), providerIdentities[0].TMProtoCryptoPublicKey(), @@ -613,7 +613,7 @@ func TestCannotReassignDefaultKeyAssignment(t *testing.T) { providerKeeper, ctx, ctrl, mocks := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() - providerKeeper.SetConsumerPhase(ctx, "consumerId", providerkeeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "consumerId", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // Mock that the validator is validating with the single key, as confirmed by provider's staking keeper gomock.InOrder( diff --git a/x/ccv/provider/keeper/msg_server.go b/x/ccv/provider/keeper/msg_server.go index aa6b8f9aab..28e0ef24ba 100644 --- a/x/ccv/provider/keeper/msg_server.go +++ b/x/ccv/provider/keeper/msg_server.go @@ -2,8 +2,11 @@ package keeper import ( "context" - errorsmod "cosmossdk.io/errors" "fmt" + "strings" + "time" + + errorsmod "cosmossdk.io/errors" tmtypes "github.com/cometbft/cometbft/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -11,8 +14,6 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" ccvtypes "github.com/cosmos/interchain-security/v5/x/ccv/types" - "strings" - "time" ) type msgServer struct { @@ -100,8 +101,8 @@ func (k msgServer) RemoveConsumer(goCtx context.Context, msg *types.MsgRemoveCon return &types.MsgRemoveConsumerResponse{}, errorsmod.Wrapf(types.ErrUnauthorized, "expected owner address %s, got %s", ownerAddress, msg.Signer) } - phase, found := k.Keeper.GetConsumerPhase(ctx, consumerId) - if !found || phase != Launched { + phase := k.Keeper.GetConsumerPhase(ctx, consumerId) + if phase != types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { return nil, errorsmod.Wrapf(types.ErrInvalidPhase, "chain with consumer id: %s has to be in its launched phase", consumerId) } @@ -315,7 +316,7 @@ func (k msgServer) CreateConsumer(goCtx context.Context, msg *types.MsgCreateCon k.Keeper.SetConsumerOwnerAddress(ctx, consumerId, msg.Signer) k.Keeper.SetConsumerChainId(ctx, consumerId, msg.ChainId) - k.Keeper.SetConsumerPhase(ctx, consumerId, Registered) + k.Keeper.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_REGISTERED) if err := k.Keeper.SetConsumerMetadata(ctx, consumerId, msg.Metadata); err != nil { return &types.MsgCreateConsumerResponse{}, errorsmod.Wrapf(types.ErrInvalidConsumerMetadata, @@ -343,7 +344,7 @@ func (k msgServer) CreateConsumer(goCtx context.Context, msg *types.MsgCreateCon } if spawnTime, canLaunch := k.Keeper.CanLaunch(ctx, consumerId); canLaunch { - k.Keeper.SetConsumerPhase(ctx, consumerId, Initialized) + k.Keeper.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) if err := k.Keeper.PrepareConsumerForLaunch(ctx, consumerId, time.Time{}, spawnTime); err != nil { return &types.MsgCreateConsumerResponse{}, errorsmod.Wrapf(types.ErrCannotPrepareForLaunch, "cannot prepare chain with consumer id (%s) for launch", consumerId) @@ -358,10 +359,12 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon ctx := sdk.UnwrapSDKContext(goCtx) consumerId := msg.ConsumerId - phase, found := k.Keeper.GetConsumerPhase(ctx, consumerId) - if found && phase == Stopped { + phase := k.Keeper.GetConsumerPhase(ctx, consumerId) + if phase != types.ConsumerPhase_CONSUMER_PHASE_REGISTERED && + phase != types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED && + phase != types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { return &types.MsgUpdateConsumerResponse{}, errorsmod.Wrapf(types.ErrInvalidPhase, - "cannot update consumer chain that is in the stopped phase: %s", consumerId) + "cannot update consumer chain that is not in the registered, initialized, or launched phase: %s", consumerId) } ownerAddress, err := k.Keeper.GetConsumerOwnerAddress(ctx, consumerId) @@ -446,7 +449,7 @@ func (k msgServer) UpdateConsumer(goCtx context.Context, msg *types.MsgUpdateCon } if spawnTime, canLaunch := k.Keeper.CanLaunch(ctx, consumerId); canLaunch { - k.Keeper.SetConsumerPhase(ctx, consumerId, Initialized) + k.Keeper.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) if err := k.Keeper.PrepareConsumerForLaunch(ctx, consumerId, previousSpawnTime, spawnTime); err != nil { return &types.MsgUpdateConsumerResponse{}, errorsmod.Wrapf(types.ErrCannotPrepareForLaunch, "cannot prepare chain with consumer id (%s) for launch", consumerId) diff --git a/x/ccv/provider/keeper/msg_server_test.go b/x/ccv/provider/keeper/msg_server_test.go index b9e1f05b58..fd353e38bf 100644 --- a/x/ccv/provider/keeper/msg_server_test.go +++ b/x/ccv/provider/keeper/msg_server_test.go @@ -1,13 +1,14 @@ package keeper_test import ( + "testing" + "time" + "github.com/cosmos/cosmos-sdk/codec/address" testkeeper "github.com/cosmos/interchain-security/v5/testutil/keeper" providerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/provider/keeper" providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" "github.com/stretchr/testify/require" - "testing" - "time" ) func TestCreateConsumer(t *testing.T) { @@ -31,9 +32,8 @@ func TestCreateConsumer(t *testing.T) { require.Equal(t, consumerMetadata, actualMetadata) ownerAddress, err := providerKeeper.GetConsumerOwnerAddress(ctx, "0") require.Equal(t, "signer", ownerAddress) - phase, found := providerKeeper.GetConsumerPhase(ctx, "0") - require.True(t, found) - require.Equal(t, providerkeeper.Registered, phase) + phase := providerKeeper.GetConsumerPhase(ctx, "0") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_REGISTERED, phase) consumerMetadata = providertypes.ConsumerMetadata{ Name: "chain name", @@ -51,9 +51,8 @@ func TestCreateConsumer(t *testing.T) { require.Equal(t, consumerMetadata, actualMetadata) ownerAddress, err = providerKeeper.GetConsumerOwnerAddress(ctx, "1") require.Equal(t, "signer2", ownerAddress) - phase, found = providerKeeper.GetConsumerPhase(ctx, "1") - require.True(t, found) - require.Equal(t, providerkeeper.Registered, phase) + phase = providerKeeper.GetConsumerPhase(ctx, "1") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_REGISTERED, phase) } func TestUpdateConsumer(t *testing.T) { @@ -132,9 +131,8 @@ func TestUpdateConsumer(t *testing.T) { require.Equal(t, expectedPowerShapingParameters, actualPowerShapingParameters) // assert phase - phase, found := providerKeeper.GetConsumerPhase(ctx, consumerId) - require.True(t, found) - require.Equal(t, providerkeeper.Initialized, phase) + phase := providerKeeper.GetConsumerPhase(ctx, consumerId) + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED, phase) // assert that chain is set to launch consumerIds, err := providerKeeper.GetConsumersToBeLaunched(ctx, expectedInitializationParameters.SpawnTime) diff --git a/x/ccv/provider/keeper/partial_set_security.go b/x/ccv/provider/keeper/partial_set_security.go index 6787429a6f..2a3152a27d 100644 --- a/x/ccv/provider/keeper/partial_set_security.go +++ b/x/ccv/provider/keeper/partial_set_security.go @@ -16,11 +16,13 @@ import ( // HandleOptIn prepares validator `providerAddr` to opt in to `consumerId` with an optional `consumerKey` consumer public key. // Note that the validator only opts in at the end of an epoch. func (k Keeper) HandleOptIn(ctx sdk.Context, consumerId string, providerAddr types.ProviderConsAddress, consumerKey string) error { - phase, found := k.GetConsumerPhase(ctx, consumerId) - if !found || phase == Stopped { + phase := k.GetConsumerPhase(ctx, consumerId) + if phase != types.ConsumerPhase_CONSUMER_PHASE_REGISTERED && + phase != types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED && + phase != types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED { return errorsmod.Wrapf( types.ErrInvalidPhase, - "opting in to an unknown (or stopped) consumer chain, with id: %s", consumerId) + "cannot opt in to a consumer chain that is not in the registered, initialized, or launched phase: %s", consumerId) } chainId, err := k.GetConsumerChainId(ctx, consumerId) diff --git a/x/ccv/provider/keeper/partial_set_security_test.go b/x/ccv/provider/keeper/partial_set_security_test.go index 671150f865..cbccfe7e9e 100644 --- a/x/ccv/provider/keeper/partial_set_security_test.go +++ b/x/ccv/provider/keeper/partial_set_security_test.go @@ -37,10 +37,10 @@ func TestHandleOptIn(t *testing.T) { require.Error(t, providerKeeper.HandleOptIn(ctx, "unknownConsumerId", providerAddr, "")) // trying to opt in to a stopped consumer chain - providerKeeper.SetConsumerPhase(ctx, "stoppedConsumerId", keeper.Stopped) + providerKeeper.SetConsumerPhase(ctx, "stoppedConsumerId", types.ConsumerPhase_CONSUMER_PHASE_STOPPED) require.Error(t, providerKeeper.HandleOptIn(ctx, "stoppedConsumerId", providerAddr, "")) - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "consumerId", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.SetConsumerChainId(ctx, "consumerId", "chainId") require.False(t, providerKeeper.IsOptedIn(ctx, "consumerId", providerAddr)) err := providerKeeper.HandleOptIn(ctx, "consumerId", providerAddr, "") @@ -49,7 +49,7 @@ func TestHandleOptIn(t *testing.T) { // validator tries to opt in to another chain with chain id ("chainId") while it is already opted in to // a different chain with the same chain id - providerKeeper.SetConsumerPhase(ctx, "consumerId2", keeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "consumerId2", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.SetConsumerChainId(ctx, "consumerId2", "chainId") err = providerKeeper.HandleOptIn(ctx, "consumerId2", providerAddr, "") require.ErrorContains(t, err, "validator is already opted in to a chain") @@ -89,7 +89,7 @@ func TestHandleOptInWithConsumerKey(t *testing.T) { expectedConsumerPubKey, err := providerKeeper.ParseConsumerKey(consumerKey) require.NoError(t, err) - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "consumerId", types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.SetConsumerChainId(ctx, "consumerId", "consumerId") err = providerKeeper.HandleOptIn(ctx, "consumerId", providerAddr, consumerKey) require.NoError(t, err) @@ -198,7 +198,7 @@ func TestHandleSetConsumerCommissionRate(t *testing.T) { // setup a pending consumer chain consumerId := "0" providerKeeper.FetchAndIncrementConsumerId(ctx) - providerKeeper.SetConsumerPhase(ctx, consumerId, keeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.SetPendingConsumerAdditionProp(ctx, &types.ConsumerAdditionProposal{ChainId: consumerId}) // check that there's no commission rate set for the validator yet diff --git a/x/ccv/provider/keeper/permissionless.go b/x/ccv/provider/keeper/permissionless.go index 7353b13f86..e77d152bd2 100644 --- a/x/ccv/provider/keeper/permissionless.go +++ b/x/ccv/provider/keeper/permissionless.go @@ -1,35 +1,16 @@ package keeper import ( - errorsmod "cosmossdk.io/errors" - storetypes "cosmossdk.io/store/types" "encoding/binary" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" "strconv" "time" -) -// ConsumerPhase captures the phases of a consumer chain according to `docs/docs/adrs/adr-018-permissionless-ics.md` -type ConsumerPhase byte - -const ( - // Registered phase indicates the phase in which a consumer chain has been assigned a unique consumer id. This consumer - // id can be used to interact with the consumer chain (e.g., when a validator opts in to a chain). A chain in this - // phase cannot yet launch. It has to be initialized first. - Registered ConsumerPhase = iota - // Initialized phase indicates the phase in which a consumer chain has set all the needed parameters to launch but - // has not yet launched (e.g., because the `spawnTime` of the consumer chain has not yet been reached). - Initialized - // FailedToLaunch phase indicates that the chain attempted but failed to launch (e.g., due to no validator opting in). - FailedToLaunch - // Launched phase corresponds to the phase in which a consumer chain is running and consuming a subset of the validator - // set of the provider. - Launched - // Stopped phase corresponds to the phase in which a previously-launched chain has stopped. - Stopped + errorsmod "cosmossdk.io/errors" + storetypes "cosmossdk.io/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" ) // setConsumerId sets the provided consumerId @@ -198,19 +179,22 @@ func (k Keeper) DeleteConsumerPowerShapingParameters(ctx sdk.Context, consumerId } // GetConsumerPhase returns the phase associated with this consumer id -func (k Keeper) GetConsumerPhase(ctx sdk.Context, consumerId string) (ConsumerPhase, bool) { +func (k Keeper) GetConsumerPhase(ctx sdk.Context, consumerId string) types.ConsumerPhase { store := ctx.KVStore(k.storeKey) buf := store.Get(types.ConsumerIdToPhaseKey(consumerId)) if buf == nil { - return ConsumerPhase(0), false + return types.ConsumerPhase_CONSUMER_PHASE_UNSPECIFIED } - return ConsumerPhase(buf[0]), true + phase := types.ConsumerPhase(binary.BigEndian.Uint32(buf)) + return phase } // SetConsumerPhase sets the phase associated with this consumer id -func (k Keeper) SetConsumerPhase(ctx sdk.Context, consumerId string, phase ConsumerPhase) { +func (k Keeper) SetConsumerPhase(ctx sdk.Context, consumerId string, phase types.ConsumerPhase) { store := ctx.KVStore(k.storeKey) - store.Set(types.ConsumerIdToPhaseKey(consumerId), []byte{byte(phase)}) + phaseBytes := make([]byte, 8) + binary.BigEndian.PutUint32(phaseBytes, uint32(phase)) + store.Set(types.ConsumerIdToPhaseKey(consumerId), phaseBytes) } // DeleteConsumerPhase deletes the phase associated with this consumer id @@ -670,8 +654,8 @@ func (k Keeper) PrepareConsumerForLaunch(ctx sdk.Context, consumerId string, pre // TODO (PERMISSIONLESS): could remove, all fields should be there because we validate the initialization parameters func (k Keeper) CanLaunch(ctx sdk.Context, consumerId string) (time.Time, bool) { // a chain that is already launched or stopped cannot launch again - phase, found := k.GetConsumerPhase(ctx, consumerId) - if !found || phase == Launched || phase == Stopped { + phase := k.GetConsumerPhase(ctx, consumerId) + if phase == types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED || phase == types.ConsumerPhase_CONSUMER_PHASE_STOPPED { return time.Time{}, false } diff --git a/x/ccv/provider/keeper/permissionless_test.go b/x/ccv/provider/keeper/permissionless_test.go index a18fe738cc..da8412220e 100644 --- a/x/ccv/provider/keeper/permissionless_test.go +++ b/x/ccv/provider/keeper/permissionless_test.go @@ -1,6 +1,9 @@ package keeper_test import ( + "testing" + "time" + sdk "github.com/cosmos/cosmos-sdk/types" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" @@ -10,8 +13,6 @@ import ( providertypes "github.com/cosmos/interchain-security/v5/x/ccv/provider/types" "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" - "testing" - "time" ) // TestConsumerId tests setters and getters of consumer id (i.e., `FetchAndIncrementConsumerId` and `GetConsumerId`) @@ -231,18 +232,16 @@ func TestConsumerPhase(t *testing.T) { providerKeeper, ctx, ctrl, _ := testkeeper.GetProviderKeeperAndCtx(t, testkeeper.NewInMemKeeperParams(t)) defer ctrl.Finish() - _, found := providerKeeper.GetConsumerPhase(ctx, "consumerId") - require.False(t, found) + phase := providerKeeper.GetConsumerPhase(ctx, "consumerId") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_UNSPECIFIED, phase) - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) - phase, found := providerKeeper.GetConsumerPhase(ctx, "consumerId") - require.True(t, found) - require.Equal(t, keeper.Initialized, phase) + providerKeeper.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) + phase = providerKeeper.GetConsumerPhase(ctx, "consumerId") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED, phase) - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Launched) - phase, found = providerKeeper.GetConsumerPhase(ctx, "consumerId") - require.True(t, found) - require.Equal(t, keeper.Launched, phase) + providerKeeper.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) + phase = providerKeeper.GetConsumerPhase(ctx, "consumerId") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED, phase) } // TestConsumerStopTime tests the getter, setter, and deletion of the consumer id to stop times methods @@ -680,7 +679,7 @@ func TestCanLaunch(t *testing.T) { require.False(t, canLaunch) // cannot launch a chain without initialization parameters - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) _, canLaunch = providerKeeper.CanLaunch(ctx, "consumerId") require.False(t, canLaunch) @@ -690,17 +689,17 @@ func TestCanLaunch(t *testing.T) { require.NoError(t, err) // cannot launch a launched chain - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Launched) + providerKeeper.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) _, canLaunch = providerKeeper.CanLaunch(ctx, "consumerId") require.False(t, canLaunch) // cannot launch a stopped chain - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Stopped) + providerKeeper.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_STOPPED) _, canLaunch = providerKeeper.CanLaunch(ctx, "consumerId") require.False(t, canLaunch) // initialized chain can launch - providerKeeper.SetConsumerPhase(ctx, "consumerId", keeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "consumerId", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) _, canLaunch = providerKeeper.CanLaunch(ctx, "consumerId") require.True(t, canLaunch) diff --git a/x/ccv/provider/keeper/proposal.go b/x/ccv/provider/keeper/proposal.go index fb1920c453..a175518257 100644 --- a/x/ccv/provider/keeper/proposal.go +++ b/x/ccv/provider/keeper/proposal.go @@ -42,8 +42,8 @@ func (k Keeper) CreateConsumerClient(ctx sdk.Context, consumerId string) error { return err } - phase, found := k.GetConsumerPhase(ctx, consumerId) - if !found || phase != Initialized { + phase := k.GetConsumerPhase(ctx, consumerId) + if phase != types.ConsumerPhase_CONSUMER_PHASE_INITIALIZED { return errorsmod.Wrapf(types.ErrInvalidPhase, "cannot create client for consumer chain that is not in the Initialized phase but in phase %d: %s", phase, consumerId) } @@ -357,7 +357,7 @@ func (k Keeper) BeginBlockInit(ctx sdk.Context) { "error", err) continue } - k.SetConsumerPhase(cachedCtx, consumerId, Launched) + k.SetConsumerPhase(cachedCtx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) // the cached context is created with a new EventManager, so we merge the events into the original context ctx.EventManager().EmitEvents(cachedCtx.EventManager().Events()) @@ -491,7 +491,7 @@ func (k Keeper) BeginBlockCCR(ctx sdk.Context) { continue } - k.SetConsumerPhase(cachedCtx, consumerId, Stopped) + k.SetConsumerPhase(cachedCtx, consumerId, types.ConsumerPhase_CONSUMER_PHASE_STOPPED) k.RemoveConsumerToBeStoppedFromStopTime(ctx, consumerId, stopTime) // The cached context is created with a new EventManager so we merge the event into the original context diff --git a/x/ccv/provider/keeper/proposal_test.go b/x/ccv/provider/keeper/proposal_test.go index ee0f8039cd..2386ab65f2 100644 --- a/x/ccv/provider/keeper/proposal_test.go +++ b/x/ccv/provider/keeper/proposal_test.go @@ -4,11 +4,12 @@ import ( "bytes" "encoding/json" "fmt" - cryptotestutil "github.com/cosmos/interchain-security/v5/testutil/crypto" "sort" "testing" "time" + cryptotestutil "github.com/cosmos/interchain-security/v5/testutil/crypto" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "cosmossdk.io/math" @@ -45,7 +46,7 @@ func TestCreateConsumerClient(t *testing.T) { { description: "No state mutation, new client should be created", setup: func(providerKeeper *providerkeeper.Keeper, ctx sdk.Context, mocks *testkeeper.MockedKeepers) { - providerKeeper.SetConsumerPhase(ctx, "0", providerkeeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, "0", providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) // Valid client creation is asserted with mock expectations here testkeeper.SetupMocksForLastBondedValidatorsExpectation(mocks.MockStakingKeeper, 0, []stakingtypes.Validator{}, 1) // returns empty validator set @@ -58,7 +59,7 @@ func TestCreateConsumerClient(t *testing.T) { { description: "chain for this consumer id has already launched, and hence client was created, NO new one is created", setup: func(providerKeeper *providerkeeper.Keeper, ctx sdk.Context, mocks *testkeeper.MockedKeepers) { - providerKeeper.SetConsumerPhase(ctx, "0", providerkeeper.Launched) + providerKeeper.SetConsumerPhase(ctx, "0", providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) // Expect none of the client creation related calls to happen mocks.MockStakingKeeper.EXPECT().UnbondingTime(gomock.Any()).Times(0) @@ -804,7 +805,7 @@ func TestBeginBlockInit(t *testing.T) { for i, r := range initializationParameters { providerKeeper.SetConsumerInitializationParameters(ctx, fmt.Sprintf("%d", i), r) // set up the chains in their initialized phase, hence they could launch - providerKeeper.SetConsumerPhase(ctx, fmt.Sprintf("%d", i), providerkeeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, fmt.Sprintf("%d", i), providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.AppendConsumerToBeLaunchedOnSpawnTime(ctx, fmt.Sprintf("%d", i), r.SpawnTime) } for i, r := range powerShapingParameters { @@ -826,39 +827,34 @@ func TestBeginBlockInit(t *testing.T) { providerKeeper.BeginBlockInit(ctx) // first chain was successfully launched - phase, found := providerKeeper.GetConsumerPhase(ctx, "0") - require.True(t, found) - require.Equal(t, providerkeeper.Launched, phase) - _, found = providerKeeper.GetConsumerGenesis(ctx, "0") + phase := providerKeeper.GetConsumerPhase(ctx, "0") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED, phase) + _, found := providerKeeper.GetConsumerGenesis(ctx, "0") require.True(t, found) // second chain was successfully launched - phase, found = providerKeeper.GetConsumerPhase(ctx, "1") - require.True(t, found) - require.Equal(t, providerkeeper.Launched, phase) + phase = providerKeeper.GetConsumerPhase(ctx, "1") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED, phase) _, found = providerKeeper.GetConsumerGenesis(ctx, "1") require.True(t, found) // third chain was not launched because its spawn time has not passed - phase, found = providerKeeper.GetConsumerPhase(ctx, "2") - require.True(t, found) - require.Equal(t, providerkeeper.Initialized, phase) + phase = providerKeeper.GetConsumerPhase(ctx, "2") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED, phase) _, found = providerKeeper.GetConsumerGenesis(ctx, "2") require.False(t, found) // fourth chain corresponds to an Opt-In chain with one opted-in validator and hence the chain gets // successfully executed - phase, found = providerKeeper.GetConsumerPhase(ctx, "3") - require.True(t, found) - require.Equal(t, providerkeeper.Launched, phase) + phase = providerKeeper.GetConsumerPhase(ctx, "3") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED, phase) _, found = providerKeeper.GetConsumerGenesis(ctx, "3") require.True(t, found) // fifth chain corresponds to an Opt-In chain with no opted-in validators and hence the // chain launch is NOT successful - phase, found = providerKeeper.GetConsumerPhase(ctx, "4") - require.True(t, found) - require.Equal(t, providerkeeper.Initialized, phase) + phase = providerKeeper.GetConsumerPhase(ctx, "4") + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED, phase) _, found = providerKeeper.GetConsumerGenesis(ctx, "4") require.False(t, found) } @@ -912,7 +908,7 @@ func TestBeginBlockCCR(t *testing.T) { providerKeeper.SetConsumerMetadata(ctx, consumerId, registrationRecord) providerKeeper.SetConsumerInitializationParameters(ctx, consumerId, initializationRecord) providerKeeper.SetConsumerPowerShapingParameters(ctx, consumerId, testkeeper.GetTestPowerShapingParameters()) - providerKeeper.SetConsumerPhase(ctx, consumerId, providerkeeper.Initialized) + providerKeeper.SetConsumerPhase(ctx, consumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_INITIALIZED) providerKeeper.SetClientIdToConsumerId(ctx, "clientID", consumerId) err := providerKeeper.CreateConsumerClient(ctx, consumerId) @@ -921,7 +917,7 @@ func TestBeginBlockCCR(t *testing.T) { require.NoError(t, err) // after we have created the consumer client, the chain is considered launched and hence we could later stop the chain - providerKeeper.SetConsumerPhase(ctx, consumerId, providerkeeper.Launched) + providerKeeper.SetConsumerPhase(ctx, consumerId, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED) } // @@ -931,14 +927,11 @@ func TestBeginBlockCCR(t *testing.T) { providerKeeper.BeginBlockCCR(ctx) // Only the 3rd (final) proposal is still stored as pending - phase, found := providerKeeper.GetConsumerPhase(ctx, consumerIds[0]) - require.True(t, found) - require.Equal(t, providerkeeper.Stopped, phase) - phase, found = providerKeeper.GetConsumerPhase(ctx, consumerIds[1]) - require.True(t, found) - require.Equal(t, providerkeeper.Stopped, phase) + phase := providerKeeper.GetConsumerPhase(ctx, consumerIds[0]) + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_STOPPED, phase) + phase = providerKeeper.GetConsumerPhase(ctx, consumerIds[1]) + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_STOPPED, phase) // third chain had a stopTime in the future and hence did not stop - phase, found = providerKeeper.GetConsumerPhase(ctx, consumerIds[2]) - require.True(t, found) - require.Equal(t, providerkeeper.Launched, phase) + phase = providerKeeper.GetConsumerPhase(ctx, consumerIds[2]) + require.Equal(t, providertypes.ConsumerPhase_CONSUMER_PHASE_LAUNCHED, phase) } diff --git a/x/ccv/provider/types/provider.pb.go b/x/ccv/provider/types/provider.pb.go index a0d0fa1dd8..4bd1ce4200 100644 --- a/x/ccv/provider/types/provider.pb.go +++ b/x/ccv/provider/types/provider.pb.go @@ -37,6 +37,49 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// ConsumerPhase indicates the phases of a consumer chain according to ADR 018 +type ConsumerPhase int32 + +const ( + // UNSPECIFIED defines an empty phase. + ConsumerPhase_CONSUMER_PHASE_UNSPECIFIED ConsumerPhase = 0 + // REGISTERED defines the phase in which a consumer chain has been assigned a unique consumer id. + // A chain in this phase cannot yet launch. + ConsumerPhase_CONSUMER_PHASE_REGISTERED ConsumerPhase = 1 + // INITIALIZED defines the phase in which a consumer chain has set all the needed parameters to launch but + // has not yet launched (e.g., because the `spawnTime` of the consumer chain has not yet been reached). + ConsumerPhase_CONSUMER_PHASE_INITIALIZED ConsumerPhase = 2 + // LAUNCHED defines the phase in which a consumer chain is running and consuming a subset of the validator + // set of the provider. + ConsumerPhase_CONSUMER_PHASE_LAUNCHED ConsumerPhase = 3 + // STOPPED defines the phase in which a previously-launched chain has stopped. + ConsumerPhase_CONSUMER_PHASE_STOPPED ConsumerPhase = 4 +) + +var ConsumerPhase_name = map[int32]string{ + 0: "CONSUMER_PHASE_UNSPECIFIED", + 1: "CONSUMER_PHASE_REGISTERED", + 2: "CONSUMER_PHASE_INITIALIZED", + 3: "CONSUMER_PHASE_LAUNCHED", + 4: "CONSUMER_PHASE_STOPPED", +} + +var ConsumerPhase_value = map[string]int32{ + "CONSUMER_PHASE_UNSPECIFIED": 0, + "CONSUMER_PHASE_REGISTERED": 1, + "CONSUMER_PHASE_INITIALIZED": 2, + "CONSUMER_PHASE_LAUNCHED": 3, + "CONSUMER_PHASE_STOPPED": 4, +} + +func (x ConsumerPhase) String() string { + return proto.EnumName(ConsumerPhase_name, int32(x)) +} + +func (ConsumerPhase) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f22ec409a72b7b72, []int{0} +} + // WARNING: This message is deprecated in favor of `MsgCreateConsumer`. // ConsumerAdditionProposal is a governance proposal on the provider chain to // spawn a new consumer chain. If it passes, then all validators on the provider @@ -1752,6 +1795,7 @@ func (m *ConsumerIds) GetIds() []string { } func init() { + proto.RegisterEnum("interchain_security.ccv.provider.v1.ConsumerPhase", ConsumerPhase_name, ConsumerPhase_value) proto.RegisterType((*ConsumerAdditionProposal)(nil), "interchain_security.ccv.provider.v1.ConsumerAdditionProposal") proto.RegisterType((*ConsumerRemovalProposal)(nil), "interchain_security.ccv.provider.v1.ConsumerRemovalProposal") proto.RegisterType((*ConsumerModificationProposal)(nil), "interchain_security.ccv.provider.v1.ConsumerModificationProposal") @@ -1782,140 +1826,146 @@ func init() { } var fileDescriptor_f22ec409a72b7b72 = []byte{ - // 2119 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0xd7, 0x8a, 0x94, 0x44, 0x0e, 0xf5, 0x83, 0x1a, 0x3b, 0xf6, 0x4a, 0xd1, 0x97, 0xa4, 0x37, - 0x5f, 0x1b, 0x6c, 0x5c, 0x2f, 0x23, 0x05, 0x05, 0x0c, 0xb7, 0x81, 0x21, 0x51, 0x4e, 0x2c, 0xa9, - 0x71, 0xd8, 0x95, 0xa0, 0x00, 0xe9, 0x61, 0x31, 0xdc, 0x1d, 0x91, 0x53, 0xed, 0xee, 0xac, 0x67, - 0x86, 0x2b, 0xb3, 0x87, 0x9e, 0x8b, 0x02, 0x05, 0xd2, 0x9e, 0x82, 0x5e, 0x9a, 0x63, 0xd1, 0x53, - 0x0f, 0x45, 0xff, 0x80, 0x9e, 0x82, 0x02, 0x45, 0x73, 0xec, 0x29, 0x29, 0xec, 0x43, 0x0f, 0x05, - 0x7a, 0xed, 0xb5, 0x98, 0xd9, 0x1f, 0x5c, 0xea, 0x97, 0x69, 0x58, 0xee, 0x45, 0xda, 0x79, 0xef, - 0xf3, 0xde, 0xbc, 0x99, 0x79, 0xbf, 0x66, 0x08, 0x36, 0x48, 0x20, 0x30, 0x73, 0xfa, 0x88, 0x04, - 0x36, 0xc7, 0xce, 0x80, 0x11, 0x31, 0x6c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78, 0x66, 0xae, 0xfc, 0x8d, 0x67, 0xf6, 0x0d, 0xbd, 0xf1, - 0xcc, 0xfd, 0x4f, 0xde, 0x78, 0x4a, 0x57, 0xfa, 0xc6, 0x53, 0x7e, 0xbd, 0x37, 0x1e, 0xf0, 0x5a, - 0x6f, 0x3c, 0x95, 0x89, 0xde, 0x78, 0x8c, 0x5f, 0x4f, 0x83, 0x1b, 0xea, 0x06, 0xbd, 0xdf, 0x47, - 0xa1, 0x3c, 0xdc, 0x51, 0x08, 0x64, 0xd7, 0x72, 0x6d, 0x82, 0x6b, 0xf9, 0xf4, 0xab, 0x5d, 0xcb, - 0x0b, 0x13, 0x5c, 0xcb, 0x8b, 0x97, 0x5d, 0xcb, 0x67, 0x2e, 0xbb, 0x96, 0xcf, 0x4e, 0x76, 0x2d, - 0x9f, 0xbb, 0xe8, 0x5a, 0x5e, 0x07, 0x95, 0x2c, 0x41, 0xb8, 0x1c, 0x56, 0x41, 0x81, 0xb8, 0x69, - 0x33, 0x29, 0x3f, 0xb7, 0x3e, 0xfd, 0xea, 0x79, 0x4d, 0xfb, 0xfa, 0x79, 0x4d, 0xfb, 0xc7, 0xf3, - 0x9a, 0xf6, 0xf9, 0x8b, 0xda, 0xd4, 0xd7, 0x2f, 0x6a, 0x53, 0x7f, 0x7f, 0x51, 0x9b, 0xfa, 0xec, - 0x83, 0xb3, 0xd9, 0x6f, 0x54, 0x5d, 0xee, 0x65, 0xbf, 0x00, 0x44, 0xdf, 0x6b, 0x3d, 0x1b, 0xff, - 0x7d, 0x41, 0x25, 0xc6, 0xee, 0xac, 0x72, 0xec, 0xf7, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x45, - 0xe0, 0x33, 0x4d, 0x90, 0x18, 0x00, 0x00, + // 2220 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xbd, 0x6f, 0x1b, 0xc9, + 0x15, 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 0x05, 0x76, 0xbc, 0x10, 0x50, 0x3c, 0x0a, + 0xb0, 0x06, 0x3e, 0x16, 0x94, 0xb9, 0x91, 0x02, 0xda, 0x35, 0xab, 0x26, 0xf3, 0x49, 0xd5, 0xb4, + 0x29, 0x71, 0x85, 0x9c, 0x35, 0xf8, 0x0a, 0x01, 0x55, 0x09, 0xb0, 0x69, 0xaf, 0x2f, 0x02, 0x32, + 0xaf, 0x0a, 0xe2, 0x5a, 0xc4, 0x77, 0x68, 0x00, 0x1e, 0x8f, 0x42, 0x81, 0x8d, 0x04, 0xdf, 0xf4, + 0x47, 0x9e, 0x60, 0xd5, 0x43, 0x32, 0xe2, 0x21, 0xf7, 0xb2, 0xc9, 0xb8, 0xc3, 0x78, 0x95, 0xc8, + 0xf5, 0xbb, 0x26, 0xa9, 0x0e, 0xb7, 0xbb, 0x44, 0xe0, 0xed, 0x98, 0x10, 0xd9, 0x1d, 0xe2, 0xba, + 0x98, 0x8f, 0x31, 0x26, 0xa3, 0x91, 0xdd, 0x6b, 0x01, 0xdf, 0x08, 0x76, 0x24, 0x18, 0x84, 0xac, + 0x55, 0xec, 0x50, 0x97, 0x55, 0xd5, 0xdf, 0x80, 0x54, 0xfe, 0x6f, 0x06, 0x0a, 0x35, 0xe6, 0xf2, + 0x81, 0x43, 0xfc, 0x5d, 0xcb, 0xa2, 0x72, 0x03, 0x5a, 0x3e, 0xf3, 0x18, 0xc7, 0x36, 0x3a, 0x0b, + 0x73, 0x82, 0x0a, 0x9b, 0x14, 0xb4, 0x92, 0xb6, 0x95, 0xd5, 0x83, 0x01, 0x2a, 0x41, 0xce, 0x22, + 0xdc, 0xf4, 0xa9, 0x27, 0xc1, 0x85, 0x59, 0xc5, 0x4b, 0x92, 0xd0, 0x1a, 0x64, 0x82, 0x53, 0xa3, + 0x56, 0x21, 0xa5, 0xd8, 0x0b, 0x6a, 0xdc, 0xb4, 0xd0, 0x1d, 0x58, 0xa6, 0x2e, 0x15, 0x14, 0xdb, + 0x46,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, 0xce, 0x45, 0xcd, 0xa4, 0xf4, 0x24, + 0x43, 0xca, 0xcb, 0xed, 0xf2, 0x55, 0xa8, 0x2c, 0xea, 0x67, 0x22, 0xee, 0x3e, 0xb6, 0xe5, 0x64, + 0xbb, 0x96, 0xe5, 0x97, 0xff, 0x33, 0x07, 0xf3, 0x2d, 0xec, 0x63, 0x87, 0xa3, 0x0e, 0xac, 0x08, + 0xe2, 0x78, 0x36, 0x16, 0xc4, 0x08, 0x5a, 0x92, 0x70, 0xa5, 0x57, 0x55, 0xab, 0x92, 0x6c, 0xfc, + 0x2a, 0x89, 0x56, 0x6f, 0xb8, 0x5d, 0xa9, 0x29, 0x6a, 0x5b, 0x60, 0x41, 0xf4, 0xe5, 0x48, 0x47, + 0x40, 0x44, 0xd7, 0xa1, 0x20, 0xfc, 0x01, 0x17, 0xe3, 0x66, 0x61, 0x5c, 0x25, 0x83, 0xb3, 0x3e, + 0x17, 0xf1, 0x83, 0xfa, 0x1a, 0x57, 0xc7, 0x93, 0xfb, 0x82, 0xd4, 0xdb, 0xf4, 0x05, 0x16, 0x6c, + 0x70, 0x79, 0xa8, 0x86, 0x43, 0x84, 0xaa, 0xde, 0x9e, 0x4d, 0x5c, 0xca, 0xfb, 0x91, 0xf2, 0xf9, + 0xe9, 0x95, 0xaf, 0x29, 0x45, 0x0f, 0xa5, 0x1e, 0x3d, 0x52, 0x13, 0xce, 0x52, 0x83, 0xe2, 0xc9, + 0xb3, 0xc4, 0x0b, 0x5f, 0x50, 0x0b, 0xbf, 0x70, 0x82, 0x8a, 0x78, 0xf5, 0x1c, 0x2e, 0x27, 0xba, + 0x0c, 0x19, 0x4d, 0x86, 0x72, 0x64, 0xc3, 0x27, 0x3d, 0x59, 0x8a, 0x71, 0xd0, 0x70, 0x10, 0x12, + 0x77, 0x4a, 0xa1, 0x4f, 0xcb, 0x36, 0x39, 0xe1, 0xd4, 0xd4, 0x0d, 0xdb, 0xc9, 0xf2, 0xb8, 0x19, + 0x89, 0x63,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xfe, 0x17, + 0x00, 0x00, 0xff, 0xff, 0x1d, 0xf2, 0xb2, 0x97, 0x3a, 0x19, 0x00, 0x00, } func (m *ConsumerAdditionProposal) Marshal() (dAtA []byte, err error) {