From 1debb23bef258a183d0333522ba1125120c40750 Mon Sep 17 00:00:00 2001 From: Tomass <155266802+zeroprooff@users.noreply.github.com> Date: Fri, 25 Jul 2025 22:53:59 +0300 Subject: [PATCH] docs: fix typos in comments / code (#25017) Co-authored-by: Alex | Interchain Labs --- core/coins/format_test.go | 2 +- crypto/keys/ed25519/doc.go | 2 +- crypto/keys/ed25519/ed25519.go | 2 +- crypto/keys/secp256k1/internal/secp256k1/secp256_test.go | 2 +- crypto/keys/secp256k1/secp256k1.go | 2 +- crypto/keys/secp256k1/secp256k1_test.go | 2 +- depinject/debug.go | 2 +- depinject/group.go | 2 +- x/authz/README.md | 2 +- x/bank/migrations/v2/store_test.go | 2 +- x/feegrant/filtered_fee.go | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/coins/format_test.go b/core/coins/format_test.go index 994be1a829..ce63f7ea32 100644 --- a/core/coins/format_test.go +++ b/core/coins/format_test.go @@ -12,7 +12,7 @@ import ( "cosmossdk.io/core/coins" ) -// coinsJsonTest is the type of test cases in the coin.json file. +// coinsJSONTest is the type of test cases in the coin.json file. type coinJSONTest struct { Proto *basev1beta1.Coin Metadata *bankv1beta1.Metadata diff --git a/crypto/keys/ed25519/doc.go b/crypto/keys/ed25519/doc.go index 31ab65349e..3248d07fc2 100644 --- a/crypto/keys/ed25519/doc.go +++ b/crypto/keys/ed25519/doc.go @@ -1,7 +1,7 @@ package ed25519 /* -This package contains a wrapper around crypto/ed22519 to make it comply with the crypto interfaces. +This package contains a wrapper around crypto/ed25519 to make it comply with the crypto interfaces. This package employs zip215 rules. We use https://github.com/hdevalence/ed25519consensus verification function. This is done in order to keep compatibility with Tendermints ed25519 implementation. - https://github.com/cometbft/cometbft/v2/blob/master/crypto/ed25519/ed25519.go#L155 diff --git a/crypto/keys/ed25519/ed25519.go b/crypto/keys/ed25519/ed25519.go index 6004c4bb36..15a3ebc149 100644 --- a/crypto/keys/ed25519/ed25519.go +++ b/crypto/keys/ed25519/ed25519.go @@ -22,7 +22,7 @@ import ( const ( PrivKeyName = "tendermint/PrivKeyEd25519" PubKeyName = "tendermint/PubKeyEd25519" - // PubKeySize is is the size, in bytes, of public keys as used in this package. + // PubKeySize is the size, in bytes, of public keys as used in this package. PubKeySize = 32 // PrivKeySize is the size, in bytes, of private keys as used in this package. PrivKeySize = 64 diff --git a/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go b/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go index b156d36cd6..954845d74b 100644 --- a/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go +++ b/crypto/keys/secp256k1/internal/secp256k1/secp256_test.go @@ -49,7 +49,7 @@ func randSig() []byte { } // tests for malleability -// highest bit of signature ECDSA s value must be 0, in the 33th byte +// highest bit of signature ECDSA s value must be 0, in the 33rd byte func compactSigCheck(t *testing.T, sig []byte) { b := int(sig[32]) if b < 0 { diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 77efd61a48..cd5dfb0083 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -99,7 +99,7 @@ func genPrivKey(rand io.Reader) []byte { } d.SetBytes(privKeyBytes[:]) - // break if we found a valid point (i.e. > 0 and < N == curverOrder) + // break if we found a valid point (i.e. > 0 and < N == curveOrder) isValidFieldElement := 0 < d.Sign() && d.Cmp(secp256k1.S256().N) < 0 if isValidFieldElement { break diff --git a/crypto/keys/secp256k1/secp256k1_test.go b/crypto/keys/secp256k1/secp256k1_test.go index 9420f3b7fe..4dd0196830 100644 --- a/crypto/keys/secp256k1/secp256k1_test.go +++ b/crypto/keys/secp256k1/secp256k1_test.go @@ -238,7 +238,7 @@ func TestSecp256k1LoadPrivkeyAndSerializeIsIdentity(t *testing.T) { } func TestGenPrivKeyFromSecret(t *testing.T) { - // curve oder N + // curve order N N := secp.S256().N tests := []struct { name string diff --git a/depinject/debug.go b/depinject/debug.go index 9576323844..e06a4e9eae 100644 --- a/depinject/debug.go +++ b/depinject/debug.go @@ -54,7 +54,7 @@ func FileLogger(filename string) DebugOption { } // Visualizer creates an option which provides a visualizer function which -// will receive a rendering of the container in the Graphiz DOT format +// will receive a rendering of the container in the Graphviz DOT format // whenever the container finishes building or fails due to an error. The // graph is color-coded to aid debugging with black representing success, // red representing an error, and gray representing unused types or functions. diff --git a/depinject/group.go b/depinject/group.go index e6d0080123..1f9ed72809 100644 --- a/depinject/group.go +++ b/depinject/group.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/depinject/internal/graphviz" ) -// ManyPerContainerType marks a type which automatically gets grouped together. For an ManyPerContainerType T, +// ManyPerContainerType marks a type which automatically gets grouped together. For a ManyPerContainerType T, // T and []T can be declared as output parameters for providers as many times within the container // as desired. All of the provided values for T can be retrieved by declaring an // []T input parameter. diff --git a/x/authz/README.md b/x/authz/README.md index b87d31cac1..9ce112cc50 100644 --- a/x/authz/README.md +++ b/x/authz/README.md @@ -122,7 +122,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"`. diff --git a/x/bank/migrations/v2/store_test.go b/x/bank/migrations/v2/store_test.go index bb6c11900e..4757ec9c76 100644 --- a/x/bank/migrations/v2/store_test.go +++ b/x/bank/migrations/v2/store_test.go @@ -92,7 +92,7 @@ func TestBalanceKeysMigration(t *testing.T) { fooBarBz, err := encCfg.Codec.Marshal(&fooBarCoin) require.NoError(t, err) store.Set(oldKeyFooBar, fooBarBz) - require.NotNil(t, store.Get(oldKeyFooBar)) // before store migation zero values can also exist in store. + require.NotNil(t, store.Get(oldKeyFooBar)) // before store migration zero values can also exist in store. err = v2bank.MigrateStore(ctx, storeService, encCfg.Codec) require.NoError(t, err) diff --git a/x/feegrant/filtered_fee.go b/x/feegrant/filtered_fee.go index 201a1f3f99..b7f3c10cb9 100644 --- a/x/feegrant/filtered_fee.go +++ b/x/feegrant/filtered_fee.go @@ -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)