Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix spelling errors #1855

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proto/interchain_security/ccv/provider/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@


// Msg defines the Msg service.
service Msg {

Check failure on line 14 in proto/interchain_security/ccv/provider/v1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Previously present RPC "OptIn" on service "Msg" was deleted.

Check failure on line 14 in proto/interchain_security/ccv/provider/v1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Previously present RPC "OptIn" on service "Msg" was deleted.

Check failure on line 14 in proto/interchain_security/ccv/provider/v1/tx.proto

View workflow job for this annotation

GitHub Actions / break-check

Previously present RPC "OptIn" on service "Msg" was deleted.
rpc AssignConsumerKey(MsgAssignConsumerKey) returns (MsgAssignConsumerKeyResponse);
rpc SubmitConsumerMisbehaviour(MsgSubmitConsumerMisbehaviour) returns (MsgSubmitConsumerMisbehaviourResponse);
rpc SubmitConsumerDoubleVoting(MsgSubmitConsumerDoubleVoting) returns (MsgSubmitConsumerDoubleVotingResponse);
rpc OptIn(MsgOptIn) returns (MsgOptInResponse);
rpc option(MsgOptIn) returns (MsgOptInResponse);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a typo!

This could have been called OptInValidator, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider renaming option to Option to follow typical naming conventions for RPC methods, which usually start with a capital letter. This change ensures consistency and clarity in method visibility across the codebase.

rpc OptOut(MsgOptOut) returns (MsgOptOutResponse);
rpc SetConsumerCommissionRate(MsgSetConsumerCommissionRate) returns (MsgSetConsumerCommissionRateResponse);
}
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -2274,7 +2274,7 @@ type OptInAction struct {
Validator ValidatorID
}

func (tr TestConfig) optIn(action OptInAction, target ExecutionTarget, verbose bool) {
func (tr TestConfig) option(action OptInAction, target ExecutionTarget, verbose bool) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not a typo.

// Note: to get error response reported back from this command '--gas auto' needs to be set.
gas := "auto"
// Unfortunately, --gas auto does not work with CometMock. so when using CometMock, just use --gas 9000000 then
Expand All @@ -2283,7 +2283,7 @@ func (tr TestConfig) optIn(action OptInAction, target ExecutionTarget, verbose b
}

// Use: "opt-in [consumer-chain-id] [consumer-pubkey]",
optIn := fmt.Sprintf(
option := fmt.Sprintf(
`%s tx provider opt-in %s --from validator%s --chain-id %s --home %s --node %s --gas %s --keyring-backend test -y -o json`,
tr.chainConfigs[ChainID("provi")].BinaryName,
string(tr.chainConfigs[action.Chain].ChainId),
Expand All @@ -2296,11 +2296,11 @@ func (tr TestConfig) optIn(action OptInAction, target ExecutionTarget, verbose b

cmd := target.ExecCommand(
"/bin/bash", "-c",
optIn,
option,
)

if verbose {
fmt.Println("optIn cmd:", cmd.String())
fmt.Println("option cmd:", cmd.String())
}

bz, err := cmd.CombinedOutput()
Expand Down Expand Up @@ -2333,7 +2333,7 @@ func (tr TestConfig) optOut(action OptOutAction, target ExecutionTarget, verbose
}

// Use: "opt-out [consumer-chain-id]",
optIn := fmt.Sprintf(
option := fmt.Sprintf(
`%s tx provider opt-out %s --from validator%s --chain-id %s --home %s --node %s --gas %s --keyring-backend test -y -o json`,
tr.chainConfigs[ChainID("provi")].BinaryName,
string(tr.chainConfigs[action.Chain].ChainId),
Expand All @@ -2346,7 +2346,7 @@ func (tr TestConfig) optOut(action OptOutAction, target ExecutionTarget, verbose

cmd := target.ExecCommand(
"/bin/bash", "-c",
optIn,
option,
)

if verbose {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/steps_partial_set_security.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func stepsOptInChain() []Step {
},
// Οpt in "alice" and "bob" so the chain is not empty when it is about to start. Note, that "alice" and "bob" use
// the provider's public key (see `UseConsumerKey` is set to `false` in `getDefaultValidators`) and hence do not
// need a consumer-key assigment.
// need a consumer-key assignment.
{
Action: OptInAction{
Chain: ChainID("consu"),
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (td *DefaultDriver) runAction(action interface{}) error {
case SubmitChangeRewardDenomsProposalAction:
td.testCfg.submitChangeRewardDenomsProposal(action, td.target, td.verbose)
case OptInAction:
td.testCfg.optIn(action, td.target, td.verbose)
td.testCfg.option(action, td.target, td.verbose)
case OptOutAction:
td.testCfg.optOut(action, td.target, td.verbose)
default:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ func (s *CCVTestSuite) TestMultiConsumerRewardsDistribution() {
bundle.GetCtx(),
accountKeeper.GetModuleAccount(bundle.GetCtx(), consumertypes.ConsumerToSendToProviderName).GetAddress(),
)
s.Require().Len(pool, 1, "consumer reward pool cannot have mutiple token denoms")
s.Require().Len(pool, 1, "consumer reward pool cannot have multiple token denoms")
rewardsPerConsumer = pool[0]
}

Expand Down
2 changes: 1 addition & 1 deletion tests/mbt/model/ccv_pss.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module ccv_pss {
// Opts a validator in for a consumer chain the provider.
// Possible before the consumer chain starts running,
// and will then be applied when the consumer chain starts running.
pure def OptIn(currentState: ProtocolState, consumer: Chain, validator: Node): Result = {
pure def option(currentState: ProtocolState, consumer: Chain, validator: Node): Result = {
pure val optedInVals = currentState.providerState.optedInVals.get(consumer)
pure val newOptedInVals = optedInVals.union(Set(validator))
Ok({
Expand Down
6 changes: 3 additions & 3 deletions tests/mbt/model/ccv_pss_model.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ module ccv_pss_model {
}

action OptIn_Deterministic(consumer: Chain, validator: Node): bool = {
val res = OptIn(currentState, consumer, validator)
val res = option(currentState, consumer, validator)
all {
currentState' = res.newState,
trace' = trace.append(
{
...emptyAction,
kind: "OptIn",
kind: "option",
consumerChain: consumer,
validator: validator
}
Expand Down Expand Up @@ -83,7 +83,7 @@ module ccv_pss_model {

val CanOptIn = {
not(
trace[length(trace)-1].kind == "OptIn"
trace[length(trace)-1].kind == "option"
and
trace[length(trace)-1].expectedError == ""
)
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewHandler(k *keeper.Keeper) sdk.Handler {
res, err := msgServer.SubmitConsumerDoubleVoting(sdk.WrapSDKContext(ctx), msg)
return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgOptIn:
res, err := msgServer.OptIn(sdk.WrapSDKContext(ctx), msg)
res, err := msgServer.option(sdk.WrapSDKContext(ctx), msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renaming OptIn to option might not adhere to Go naming conventions.

Consider renaming option to Option to follow Go's convention of capitalizing exported method names. This change ensures consistency and clarity in method visibility across the codebase.

return sdk.WrapServiceResult(ctx, res, err)
case *types.MsgOptOut:
res, err := msgServer.OptOut(sdk.WrapSDKContext(ctx), msg)
Expand Down
2 changes: 1 addition & 1 deletion x/ccv/provider/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
// NewMsgServerImpl returns an implementation of the bank MsgServer interface
// for the provided Keeper.
func NewMsgServerImpl(keeper *Keeper) types.MsgServer {
return &msgServer{Keeper: keeper}

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / test-integration

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / tests

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / test-integration

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / tests

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / test-integration

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / tests

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 25 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use &msgServer{…} (value of type *msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in return statement: *msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)
}

var _ types.MsgServer = msgServer{}

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / test-integration

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / tests

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / test-integration

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / tests

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / test-integration

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / tests

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

Check failure on line 28 in x/ccv/provider/keeper/msg_server.go

View workflow job for this annotation

GitHub Actions / Analyze

cannot use msgServer{} (value of type msgServer) as "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer value in variable declaration: msgServer does not implement "github.com/cosmos/interchain-security/v4/x/ccv/provider/types".MsgServer (missing method OptIn)

// AssignConsumerKey defines a method to assign a consensus key on a consumer chain
// for a given validator on the provider
Expand Down Expand Up @@ -137,7 +137,7 @@
return &types.MsgSubmitConsumerDoubleVotingResponse{}, nil
}

func (k msgServer) OptIn(goCtx context.Context, msg *types.MsgOptIn) (*types.MsgOptInResponse, error) {
func (k msgServer) option(goCtx context.Context, msg *types.MsgOptIn) (*types.MsgOptInResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx)

valAddress, err := sdk.ValAddressFromBech32(msg.ProviderAddr)
Expand Down
Loading