From a420d79c84ee39110f95e8bb96d4a030880a0047 Mon Sep 17 00:00:00 2001 From: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:04:26 +0000 Subject: [PATCH] chore: spelling errors fixes --- CHANGELOG.md | 2 +- docs/docs/build/modules/03-consumer.md | 2 +- docs/docs/features/reward-distribution.md | 2 +- .../hypha-consumer-start-process.excalidraw | 16 +++++----- tests/e2e/config.go | 2 +- x/ccv/provider/keeper/grpc_query_test.go | 32 +++++++++---------- x/ccv/provider/keeper/relay.go | 4 +-- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d0016b66..ee67e82a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -683,7 +683,7 @@ May 17, 2024 consumer and provider dedicated types where possible. ([\#1350](https://github.com/cosmos/interchain-security/pull/1350)) - [Provider](x/ccv/provider) - - Add `QueryAllPairsValConAddrByConsumerChainID` method to get list of all pairs `valConsensus` address by `Consummer chainID`. ([\#1503](https://github.com/cosmos/interchain-security/pull/1503)) + - Add `QueryAllPairsValConAddrByConsumerChainID` method to get list of all pairs `valConsensus` address by `Consumer chainID`. ([\#1503](https://github.com/cosmos/interchain-security/pull/1503)) ### STATE BREAKING diff --git a/docs/docs/build/modules/03-consumer.md b/docs/docs/build/modules/03-consumer.md index 58ecaa8d74..8fa5090da8 100644 --- a/docs/docs/build/modules/03-consumer.md +++ b/docs/docs/build/modules/03-consumer.md @@ -354,7 +354,7 @@ The consumer module contains the following parameters. `DistributionTransmissionChannel` is the provider chain IBC channel used for receiving consumer chain reward distribution token transfers. This is automatically set during the consumer-provider handshake procedure. -Providing an IBC transfer channel enables a consumer chain to re-use one of the existing channels to the provider for consumer chain rewards distribution. +Providing an IBC transfer channel enables a consumer chain to reuse one of the existing channels to the provider for consumer chain rewards distribution. This will preserve the `ibc denom` that may already be in use. This is especially important for standalone chains transitioning to become consumer chains. For more details, see the [changeover procedure](../../consumer-development/changeover-procedure.md). diff --git a/docs/docs/features/reward-distribution.md b/docs/docs/features/reward-distribution.md index e91bbe5818..96702b0f2a 100644 --- a/docs/docs/features/reward-distribution.md +++ b/docs/docs/features/reward-distribution.md @@ -11,7 +11,7 @@ Consumer chains have the option of sharing _a portion of_ their block rewards (i These rewards are periodically sent from the consumer to the provider according to [consumer chain parameters](../build/modules/03-consumer.md#parameters) using an IBC transfer channel. This channel is created during consumer chain initialization, unless it is provided when creating a new consumer chain (see the [DistributionTransmissionChannel param](../build/modules/03-consumer.md#distributiontransmissionchannel)). -Providing an IBC transfer channel enables a consumer chain to re-use one of the existing channels to the provider for consumer chain rewards distribution. +Providing an IBC transfer channel enables a consumer chain to reuse one of the existing channels to the provider for consumer chain rewards distribution. This will preserve the `ibc denom` that may already be in use. This is especially important for standalone chains transitioning to become consumer chains. For more details, see the [changeover procedure](../consumer-development/changeover-procedure.md). diff --git a/docs/figures/hypha-consumer-start-process.excalidraw b/docs/figures/hypha-consumer-start-process.excalidraw index 72a1b05445..5dac540678 100644 --- a/docs/figures/hypha-consumer-start-process.excalidraw +++ b/docs/figures/hypha-consumer-start-process.excalidraw @@ -8422,11 +8422,11 @@ "locked": false, "fontSize": 16, "fontFamily": 1, - "text": "> high probablity\nall of them would\nhave the same\nvoting power, but\nif not, get the min", + "text": "> high probability\nall of them would\nhave the same\nvoting power, but\nif not, get the min", "textAlign": "left", "verticalAlign": "top", "containerId": null, - "originalText": "> high probablity\nall of them would\nhave the same\nvoting power, but\nif not, get the min", + "originalText": "> high probability\nall of them would\nhave the same\nvoting power, but\nif not, get the min", "autoResize": true, "lineHeight": 1.25 }, @@ -14170,11 +14170,11 @@ "locked": false, "fontSize": 16, "fontFamily": 1, - "text": "LC figures\nout that\nconsumer chain\nis unsecure", + "text": "LC figures\nout that\nconsumer chain\nis insecure", "textAlign": "left", "verticalAlign": "top", "containerId": null, - "originalText": "LC figures\nout that\nconsumer chain\nis unsecure", + "originalText": "LC figures\nout that\nconsumer chain\nis insecure", "autoResize": true, "lineHeight": 1.25 }, @@ -15841,11 +15841,11 @@ "locked": false, "fontSize": 16, "fontFamily": 1, - "text": "LC figures\nout that\nconsumer chain\nis unsecure", + "text": "LC figures\nout that\nconsumer chain\nis insecure", "textAlign": "left", "verticalAlign": "top", "containerId": null, - "originalText": "LC figures\nout that\nconsumer chain\nis unsecure", + "originalText": "LC figures\nout that\nconsumer chain\nis insecure", "autoResize": true, "lineHeight": 1.25 }, @@ -33824,11 +33824,11 @@ "locked": false, "fontSize": 16, "fontFamily": 1, - "text": "bogus header\n4. Febuary 2023\nsigned by Vm", + "text": "bogus header\n4. February 2023\nsigned by Vm", "textAlign": "center", "verticalAlign": "middle", "containerId": "dr-C5qJTTjNBk139hzYmq", - "originalText": "bogus header\n4. Febuary 2023\nsigned by Vm", + "originalText": "bogus header\n4. February 2023\nsigned by Vm", "autoResize": true, "lineHeight": 1.25 }, diff --git a/tests/e2e/config.go b/tests/e2e/config.go index e7c7974457..dfc32bdbe2 100644 --- a/tests/e2e/config.go +++ b/tests/e2e/config.go @@ -515,7 +515,7 @@ func DemocracyTestConfig(allowReward bool) TestConfig { return tr } -// PermissionlessTestConfig contains a provider chain and 2 cosumer chains with the same chain identifier +// PermissionlessTestConfig contains a provider chain and 2 consumer chains with the same chain identifier func PermissionlessTestConfig() TestConfig { tr := TestConfig{ Name: string(PermissionlessTestCfg), diff --git a/x/ccv/provider/keeper/grpc_query_test.go b/x/ccv/provider/keeper/grpc_query_test.go index b5a7ced0ba..251cf4d632 100644 --- a/x/ccv/provider/keeper/grpc_query_test.go +++ b/x/ccv/provider/keeper/grpc_query_test.go @@ -191,7 +191,7 @@ func TestQueryConsumerValidators(t *testing.T) { require.NoError(t, err) // expect both opted-in and topN validator - expRes := types.QueryConsumerValidatorsResponse{ + express := types.QueryConsumerValidatorsResponse{ Validators: []*types.QueryConsumerValidatorsValidator{ { ProviderAddress: providerAddr1.String(), @@ -225,22 +225,22 @@ func TestQueryConsumerValidators(t *testing.T) { } // sort the address of the validators by ascending lexical order as they were persisted to the store - sort.Slice(expRes.Validators, func(i, j int) bool { + sort.Slice(express.Validators, func(i, j int) bool { return bytes.Compare( - expRes.Validators[i].ConsumerKey.GetEd25519(), - expRes.Validators[j].ConsumerKey.GetEd25519(), + express.Validators[i].ConsumerKey.GetEd25519(), + express.Validators[j].ConsumerKey.GetEd25519(), ) == -1 }) res, err = pk.QueryConsumerValidators(ctx, &req) require.NoError(t, err) - require.Equal(t, &expRes, res) + require.Equal(t, &express, res) // expect same result when consumer is in "initialized" phase pk.SetConsumerPhase(ctx, consumerId, types.CONSUMER_PHASE_INITIALIZED) res, err = pk.QueryConsumerValidators(ctx, &req) require.NoError(t, err) - require.Equal(t, &expRes, res) + require.Equal(t, &express, res) // set consumer to the "launched" phase pk.SetConsumerPhase(ctx, consumerId, types.CONSUMER_PHASE_LAUNCHED) @@ -259,7 +259,7 @@ func TestQueryConsumerValidators(t *testing.T) { }) require.NoError(t, err) - expRes.Validators = append(expRes.Validators, &types.QueryConsumerValidatorsValidator{ + express.Validators = append(express.Validators, &types.QueryConsumerValidatorsValidator{ ProviderAddress: providerAddr3.String(), ConsumerKey: &pk3, ConsumerPower: 3, @@ -275,16 +275,16 @@ func TestQueryConsumerValidators(t *testing.T) { }) // sort the address of the validators by ascending lexical order as they were persisted to the store - sort.Slice(expRes.Validators, func(i, j int) bool { + sort.Slice(express.Validators, func(i, j int) bool { return bytes.Compare( - expRes.Validators[i].ConsumerKey.GetEd25519(), - expRes.Validators[j].ConsumerKey.GetEd25519(), + express.Validators[i].ConsumerKey.GetEd25519(), + express.Validators[j].ConsumerKey.GetEd25519(), ) == -1 }) res, err = pk.QueryConsumerValidators(ctx, &req) require.NoError(t, err) - require.Equal(t, &expRes, res) + require.Equal(t, &express, res) // validator with no set consumer commission rate pk.DeleteConsumerCommissionRate(ctx, consumerId, providerAddr1) @@ -597,7 +597,7 @@ func TestQueryConsumerChain(t *testing.T) { require.NoError(t, err) providerKeeper.SetConsumerClientId(ctx, consumerId, clientId) - expRes := types.QueryConsumerChainResponse{ + express := types.QueryConsumerChainResponse{ ChainId: chainId, ConsumerId: consumerId, OwnerAddress: providerKeeper.GetAuthority(), @@ -612,7 +612,7 @@ func TestQueryConsumerChain(t *testing.T) { // expect no error when neither the consumer init and power shaping params are set res, err := providerKeeper.QueryConsumerChain(ctx, &req) require.NoError(t, err) - require.Equal(t, &expRes, res) + require.Equal(t, &express, res) err = providerKeeper.SetConsumerInitializationParameters( ctx, @@ -628,13 +628,13 @@ func TestQueryConsumerChain(t *testing.T) { ) require.NoError(t, err) - expRes.InitParams = &types.ConsumerInitializationParameters{SpawnTime: ctx.BlockTime()} - expRes.PowerShapingParams = &types.PowerShapingParameters{Top_N: uint32(50)} + express.InitParams = &types.ConsumerInitializationParameters{SpawnTime: ctx.BlockTime()} + express.PowerShapingParams = &types.PowerShapingParameters{Top_N: uint32(50)} // expect no error res, err = providerKeeper.QueryConsumerChain(ctx, &req) require.NoError(t, err) - require.Equal(t, &expRes, res) + require.Equal(t, &express, res) } func TestQueryConsumerIdFromClientId(t *testing.T) { diff --git a/x/ccv/provider/keeper/relay.go b/x/ccv/provider/keeper/relay.go index 33a7e05e4c..b9a6647b51 100644 --- a/x/ccv/provider/keeper/relay.go +++ b/x/ccv/provider/keeper/relay.go @@ -489,14 +489,14 @@ func (k Keeper) HandleSlashPacket(ctx sdk.Context, consumerId string, data ccv.S _, err = k.stakingKeeper.SlashWithInfractionReason(ctx, providerConsAddr.ToSdkConsAddr(), int64(infractionHeight), data.Validator.Power, infractionParams.Downtime.SlashFraction, stakingtypes.Infraction_INFRACTION_DOWNTIME) if err != nil { - k.Logger(ctx).Error("failed to slash vaidator", providerConsAddr.ToSdkConsAddr().String(), "err", err.Error()) + k.Logger(ctx).Error("failed to slash validator", providerConsAddr.ToSdkConsAddr().String(), "err", err.Error()) return } // jail validator err := k.stakingKeeper.Jail(ctx, providerConsAddr.ToSdkConsAddr()) if err != nil { - k.Logger(ctx).Error("failed to jail vaidator", providerConsAddr.ToSdkConsAddr().String(), "err", err.Error()) + k.Logger(ctx).Error("failed to jail validator", providerConsAddr.ToSdkConsAddr().String(), "err", err.Error()) return } k.Logger(ctx).Info("HandleSlashPacket - validator jailed", "provider cons addr", providerConsAddr.String())