Skip to content

Commit

Permalink
chore: fix all typos (cosmos#20196)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdv2429 authored and meetrick committed Apr 29, 2024
1 parent 2449560 commit 05c820a
Show file tree
Hide file tree
Showing 29 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (types) [#19512](https://github.com/cosmos/cosmos-sdk/pull/19512) The notion of basic manager does not exist anymore (and all related helpers).
* The module manager now can do everything that the basic manager was doing.
* `AppModuleBasic` has been deprecated for extension interfaces.
* Modules can now implement `appmodule.HasRegisterInterfaces`, `modue.HasGRPCGateway` and `module.HasAminoCodec` when relevant.
* Modules can now implement `appmodule.HasRegisterInterfaces`, `module.HasGRPCGateway` and `module.HasAminoCodec` when relevant.
* SDK modules now directly implement those extension interfaces on `AppModule` instead of `AppModuleBasic`.
* (client/keys) [#18950](https://github.com/cosmos/cosmos-sdk/pull/18950) Improve `<appd> keys add`, `<appd> keys import` and `<appd> keys rename` by checking name validation.
* (client/keys) [#18745](https://github.com/cosmos/cosmos-sdk/pull/18745) Improve `<appd> keys export` and `<appd> keys mnemonic` by adding --yes option to skip interactive confirmation.
Expand Down
2 changes: 1 addition & 1 deletion api/cosmos/tx/v1beta1/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58575,7 +58575,7 @@ definitions:
gas to be used by the transaction. The ratio yields an effective
"gasprice",

which must be above some miminum to be accepted into the mempool.
which must be above some minimum to be accepted into the mempool.
cosmos.tx.v1beta1.GetBlockWithTxsResponse:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ split_commits = true
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '.*', replace_command = 'sed -E "s/^(\S+)\s(.+)\s\((#[0-9]+)\)$/\1 (\3) \2/"' },
# A reference to an issue is appened to commits that looks like "(#1234)", this will be replaced
# A reference to an issue is append to commits that looks like "(#1234)", this will be replaced
# with a link to that issue, e.g. "[#$1234](https://github.com/cosmos/cosmos-sdk/issues/1234)".
{ pattern = '\(#(\d+)\)', replace = "[#${1}](https://github.com/cosmos/cosmos-sdk/issues/${1})" },
# replace multiple spaces with one space
Expand Down
2 changes: 1 addition & 1 deletion core/appmodule/v2/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type HasUpdateValidators interface {
type ValidatorUpdate struct {
PubKey []byte
PubKeyType string
Power int64 // updated power of the validtor
Power int64 // updated power of the validator
}

// HasRegisterInterfaces is the interface for modules to register their msg types.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ SECP256K1_API int secp256k1_ecdsa_signature_serialize_compact(
/** Verify an ECDSA signature.
*
* Returns: 1: correct signature
* 0: incorrect or unparseable signature
* 0: incorrect or unparsable signature
* Args: ctx: a secp256k1 context object, initialized for verification.
* In: sig: the signature being verified (cannot be NULL)
* msg32: the 32-byte message hash being verified (cannot be NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static void secp256k1_ecmult(const secp256k1_ecmult_context *ctx, secp256k1_gej
#ifdef USE_ENDOMORPHISM
secp256k1_ge pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)];
secp256k1_scalar na_1, na_lam;
/* Splitted G factors. */
/* Split G factors. */
secp256k1_scalar ng_1, ng_128;
int wnaf_na_1[130];
int wnaf_na_lam[130];
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ DRAFT -> PROPOSED -> LAST CALL yyyy-mm-dd -> ACCEPTED | REJECTED -> SUPERSEDED b
* `LAST CALL <date for the last call>`: [optional] clear notify that we are close to accept updates. Changing a status to `LAST CALL` means that social consensus (of Cosmos SDK maintainers) has been reached and we still want to give it a time to let the community react or analyze.
* `ACCEPTED`: ADR which will represent a currently implemented or to be implemented architecture design.
* `REJECTED`: ADR can go from PROPOSED or ACCEPTED to rejected if the consensus among project stakeholders will decide so.
* `SUPERSEEDED by ADR-xxx`: ADR which has been superseded by a new ADR.
* `SUPERSEDED by ADR-xxx`: ADR which has been superseded by a new ADR.
* `ABANDONED`: the ADR is no longer pursued by the original authors.

## Language used in ADR
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-034-account-rekeying.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Breaks the current assumed relationship between address and pubkeys as H(pubkey)

### Neutral

* While the purpose of this is intended to allow the owner of an account to update to a new pubkey they own, this could technically also be used to transfer ownership of an account to a new owner. For example, this could be use used to sell a staked position without unbonding or an account that has vesting tokens. However, the friction of this is very high as this would essentially have to be done as a very specific OTC trade. Furthermore, additional constraints could be added to prevent accouns with Vesting tokens to use this feature.
* While the purpose of this is intended to allow the owner of an account to update to a new pubkey they own, this could technically also be used to transfer ownership of an account to a new owner. For example, this could be use used to sell a staked position without unbonding or an account that has vesting tokens. However, the friction of this is very high as this would essentially have to be done as a very specific OTC trade. Furthermore, additional constraints could be added to prevent accounts with Vesting tokens to use this feature.
* Will require that PubKeys for an account are included in the genesis exports.

## References
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-043-nft-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ message MsgSend {
string class_id = 1;
string id = 2;
string sender = 3;
string reveiver = 4;
string receiver = 4;
}
message MsgSendResponse {}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-050-sign-mode-textual.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Moreover, the renderer must provide 2 functions: one for formatting from Protobu

### Require signing over the `TxBody` and `AuthInfo` raw bytes

Recall that the transaction bytes merklelized on chain are the Protobuf binary serialization of [TxRaw](hhttps://buf.build/cosmos/cosmos-sdk/docs/main:cosmos.tx.v1beta1#cosmos.tx.v1beta1.TxRaw), which contains the `body_bytes` and `auth_info_bytes`. Moreover, the transaction hash is defined as the SHA256 hash of the `TxRaw` bytes. We require that the user signs over these bytes in SIGN_MODE_TEXTUAL, more specifically over the following string:
Recall that the transaction bytes merklelized on chain are the Protobuf binary serialization of [TxRaw](https://buf.build/cosmos/cosmos-sdk/docs/main:cosmos.tx.v1beta1#cosmos.tx.v1beta1.TxRaw), which contains the `body_bytes` and `auth_info_bytes`. Moreover, the transaction hash is defined as the SHA256 hash of the `TxRaw` bytes. We require that the user signs over these bytes in SIGN_MODE_TEXTUAL, more specifically over the following string:

```
*Hash of raw bytes: <HEX(sha256(len(body_bytes) ++ body_bytes ++ len(auth_info_bytes) ++ auth_info_bytes))>
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-063-core-module-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func NewKeeper(logger log.Logger) Keeper {
Modules will provide their core services to the runtime module via extension interfaces built on top of the
`cosmossdk.io/core/appmodule.AppModule` tag interface. This tag interface requires only two empty methods which
allow `depinject` to identify implementors as `depinject.OnePerModule` types and as app module implementations:
allow `depinject` to identify implementers as `depinject.OnePerModule` types and as app module implementations:
```go
type AppModule interface {
Expand Down
2 changes: 1 addition & 1 deletion docs/learn/advanced/05-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Modules are encouraged to utilize Protobuf encoding for their respective types.

In addition to [following official Protocol Buffer guidelines](https://developers.google.com/protocol-buffers/docs/proto3#simple), we recommend using these annotations in .proto files when dealing with interfaces:

* use `cosmos_proto.accepts_interface` to annote `Any` fields that accept interfaces
* use `cosmos_proto.accepts_interface` to annotate `Any` fields that accept interfaces
* pass the same fully qualified name as `protoName` to `InterfaceRegistry.RegisterInterface`
* example: `(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content"` (and not just `Content`)
* annotate interface implementations with `cosmos_proto.implements_interface`
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/fee_distribution/f1_fee_distr.tex
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ \section{TO DOs}
\item Mention storage optimization for how to prune slashing entries in the uniform inflation and iteration over slashing case
\item Add equation numbers
\item perhaps re-organize so that the no iteration
\item Section on decimal precision considerations (would unums help?), and mitigating errors in calculation with floats and decimals. -- This probably belongs in a corrollary markdown file in the implementation
\item Section on decimal precision considerations (would unums help?), and mitigating errors in calculation with floats and decimals. -- This probably belongs in a corollary markdown file in the implementation
\item Consider indicating that the withdraw action need not be a tx type and could instead happen 'transparently' when more coins are needed, if a chain desired this for UX / p2p efficiency.
\end{itemize}

Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/tx/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ message ModeInfo {

// Fee includes the amount of coins paid in fees and the maximum
// gas to be used by the transaction. The ratio yields an effective "gasprice",
// which must be above some miminum to be accepted into the mempool.
// which must be above some minimum to be accepted into the mempool.
message Fee {
// amount is the amount of coins to be paid as a fee
repeated cosmos.base.v1beta1.Coin amount = 1 [
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/distribution/grpc_query_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (s *GRPCQueryTestSuite) SetupSuite() {
s.Require().NoError(s.network.WaitForNextBlock())
}

// TearDownSuite cleans up the curret test network after _each_ test.
// TearDownSuite cleans up the current test network after _each_ test.
func (s *GRPCQueryTestSuite) TearDownSuite() {
s.T().Log("tearing down e2e test suite1")
s.network.Cleanup()
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/distribution/withdraw_all_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (s *WithdrawAllTestSuite) SetupSuite() {
s.Require().NoError(s.network.WaitForNextBlock())
}

// TearDownSuite cleans up the curret test network after _each_ test.
// TearDownSuite cleans up the current test network after _each_ test.
func (s *WithdrawAllTestSuite) TearDownSuite() {
s.T().Log("tearing down e2e test suite")
s.network.Cleanup()
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/staking/keeper/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) {
validators[1] = keeper.TestingUpdateValidator(f.stakingKeeper, f.sdkCtx, validators[1], false)
applyValidatorSetUpdates(t, f.sdkCtx, f.stakingKeeper, 2)

// test validtor added at the beginning
// test validator added at the beginning
// tendermintUpdate set: {} -> {c0}
assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, validators[2]))
assert.NilError(t, f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[2]))
Expand All @@ -651,7 +651,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) {
validators[2], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val2bz)
assert.DeepEqual(t, validators[2].ModuleValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0])

// test validtor added at the beginning
// test validator added at the beginning
// tendermintUpdate set: {} -> {c0}
assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, validators[3]))
assert.NilError(t, f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[3]))
Expand All @@ -661,7 +661,7 @@ func TestApplyAndReturnValidatorSetUpdatesInserted(t *testing.T) {
validators[3], _ = f.stakingKeeper.GetValidator(f.sdkCtx, val3bz)
assert.DeepEqual(t, validators[3].ModuleValidatorUpdate(f.stakingKeeper.PowerReduction(f.sdkCtx)), updates[0])

// test validtor added at the end
// test validator added at the end
// tendermintUpdate set: {} -> {c0}
assert.NilError(t, f.stakingKeeper.SetValidator(f.sdkCtx, validators[4]))
assert.NilError(t, f.stakingKeeper.SetValidatorByPowerIndex(f.sdkCtx, validators[4]))
Expand Down
2 changes: 1 addition & 1 deletion testutil/sims/simulation_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

// SetupSimulation creates the config, db (levelDB), temporary directory and logger for the simulation tests.
// If `skip` is false it skips the current test. `skip` should be set using the `FlagEnabledValue` flag.
// Returns error on an invalid db intantiation or temp dir creation.
// Returns error on an invalid db instantiation or temp dir creation.
func SetupSimulation(config simtypes.Config, dirPrefix, dbName string, verbose, skip bool) (dbm.DB, string, log.Logger, bool, error) {
if !skip {
return nil, "", nil, true, nil
Expand Down
2 changes: 1 addition & 1 deletion types/tx/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/auth/migrations/legacytx/stdtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (

// StdFee includes the amount of coins paid in fees and the maximum
// gas to be used by the transaction. The ratio yields an effective "gasprice",
// which must be above some miminum to be accepted into the mempool.
// which must be above some minimum to be accepted into the mempool.
// [Deprecated]
type StdFee struct {
Amount sdk.Coins `json:"amount" yaml:"amount"`
Expand Down
2 changes: 1 addition & 1 deletion x/auth/vesting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ simd tx vesting create-periodic-vesting-account cosmos1.. periods.json

#### create-vesting-account

The `create-vesting-account` command creates a new vesting account funded with an allocation of tokens. The account can either be a delayed or continuous vesting account, which is determined by the '--delayed' flag. All vesting accouts created will have their start time set by the committed block's time. The end_time must be provided as a UNIX epoch timestamp.
The `create-vesting-account` command creates a new vesting account funded with an allocation of tokens. The account can either be a delayed or continuous vesting account, which is determined by the '--delayed' flag. All vesting accounts created will have their start time set by the committed block's time. The end_time must be provided as a UNIX epoch timestamp.

```bash
simd tx vesting create-vesting-account [to_address] [amount] [end_time] [flags]
Expand Down
4 changes: 2 additions & 2 deletions x/authz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/staking/types/authz.go#L

In order to prevent DoS attacks, granting `StakeAuthorization`s with `x/authz` incurs gas. `StakeAuthorization` allows you to authorize another account to delegate, undelegate, or redelegate to validators. The authorizer can define a list of validators they allow or deny delegations to. The Cosmos SDK iterates over these lists and charge 10 gas for each validator in both of the lists.

Since the state maintaining a list for granter, grantee pair with same expiration, we are iterating over the list to remove the grant (in case of any revoke of paritcular `msgType`) from the list and we are charging 20 gas per iteration.
Since the state maintaining a list for granter, grantee pair with same expiration, we are iterating over the list to remove the grant (in case of any revoke of particular `msgType`) from the list and we are charging 20 gas per iteration.

## State

Expand All @@ -124,7 +124,7 @@ In `EndBlock` (which runs for every block) we continuously check and prune the e
https://github.com/cosmos/cosmos-sdk/blob/5f4ddc6f80f9707320eec42182184207fff3833a/x/authz/keeper/keeper.go#L378-L403
```

* GrantQueue: `0x02 | expiration_bytes | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes -> ProtocalBuffer(GrantQueueItem)`
* GrantQueue: `0x02 | expiration_bytes | granter_address_len (1 byte) | granter_address_bytes | grantee_address_len (1 byte) | grantee_address_bytes -> ProtocolBuffer(GrantQueueItem)`

The `expiration_bytes` are the expiration date in UTC with the format `"2006-01-02T15:04:05.000000000"`.

Expand Down
2 changes: 1 addition & 1 deletion x/authz/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// TODO: Revisit this once we have propoer gas fee framework.
// TODO: Revisit this once we have proper gas fee framework.
// Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054,
// https://github.com/cosmos/cosmos-sdk/discussions/9072
const gasCostPerIteration = uint64(20)
Expand Down
2 changes: 1 addition & 1 deletion x/evidence/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking Changes

* [#16008](https://github.com/cosmos/cosmos-sdk/pull/16008) NewKeeper now takes in a KVStoreService instead of KVStoreKey, most functions use context.Context instead of sdk.Context and `IterateEvidence` callback function now returns an error to stop interation (`errors.ErrStopIterating`).
* [#16008](https://github.com/cosmos/cosmos-sdk/pull/16008) NewKeeper now takes in a KVStoreService instead of KVStoreKey, most functions use context.Context instead of sdk.Context and `IterateEvidence` callback function now returns an error to stop iteration (`errors.ErrStopIterating`).
* (keeper) [#15825](https://github.com/cosmos/cosmos-sdk/pull/15825) Evidence constructor now requires an `address.Codec` (`import "cosmossdk.io/core/address"`)
* [#16336](https://github.com/cosmos/cosmos-sdk/pull/16336) Use collections for state management:
* Removed: keeper `SetEvidence`, `GetEvidence`, `IterateEvidences`, `GetAllEvidences`, `MustMarshalEvidence`, `MustUnmarshalEvidence`, `MarshalEvidence`, `UnmarshalEvidence`
Expand Down
2 changes: 1 addition & 1 deletion x/feegrant/filtered_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// TODO: Revisit this once we have propoer gas fee framework.
// TODO: Revisit this once we have proper gas fee framework.
// Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054, https://github.com/cosmos/cosmos-sdk/discussions/9072
const (
gasCostPerIteration = uint64(10)
Expand Down
2 changes: 1 addition & 1 deletion x/gov/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (k msgServer) SubmitProposal(ctx context.Context, msg *v1.MsgSubmitProposal
}

// This method checks that all message metadata, summary and title
// has te expected length defined in the module configuration.
// has the expected length defined in the module configuration.
if err := k.validateProposalLengths(msg.Metadata, msg.Title, msg.Summary); err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion x/params/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ Modules often define parameters as a proto message. The generated struct can imp
* `KeyTable.RegisterParamSet()`: registers all parameters in the struct
* `Subspace.{Get, Set}ParamSet()`: Get to & Set from the struct

The implementor should be a pointer in order to use `GetParamSet()`.
The implementer should be a pointer in order to use `GetParamSet()`.
2 changes: 1 addition & 1 deletion x/staking/types/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// TODO: Revisit this once we have propoer gas fee framework.
// TODO: Revisit this once we have proper gas fee framework.
// Tracking issues https://github.com/cosmos/cosmos-sdk/issues/9054, https://github.com/cosmos/cosmos-sdk/discussions/9072
const gasCostPerIteration = uint64(10)

Expand Down

0 comments on commit 05c820a

Please sign in to comment.