Skip to content

Commit a64ebec

Browse files
authored
docs: fix typos and wording in learn and README docs (#25668)
1 parent 6065146 commit a64ebec

File tree

16 files changed

+31
-31
lines changed

16 files changed

+31
-31
lines changed

blockstm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ The internal data structures are also adapted with multiple stores in mind.
3838

3939
### Attribution
4040

41-
This package was originally authored in [go-block-stm](https://github.com/crypto-org-chain/go-block-stm). We have brought the full source tree into the SDK so that we can natively incorporate the library and required changes into the SDK. Over time we expect to incoporate optimizations and deviations from the upstream implementation.
41+
This package was originally authored in [go-block-stm](https://github.com/crypto-org-chain/go-block-stm). We have brought the full source tree into the SDK so that we can natively incorporate the library and required changes into the SDK. Over time we expect to incorporate optimizations and deviations from the upstream implementation.

blockstm/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func IncrAtomic(a *atomic.Uint64) {
3737
a.Add(1)
3838
}
3939

40-
// FetchIncr increaes the atomic value by 1 and returns the old value
40+
// FetchIncr increases the atomic value by 1 and returns the old value
4141
func FetchIncr(a *atomic.Uint64) uint64 {
4242
return a.Add(1) - 1
4343
}

client/v2/autocli/query_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ func TestMap(t *testing.T) {
339339
assert.ErrorContains(t, err, "invalid argument \"bar=123.9\" for \"--map-string-uint32\" flag: strconv.ParseUint: parsing \"123.9\": invalid syntax")
340340
}
341341

342-
// TestEveything tests all the different types of flags are correctly read and as well as correctly returned
342+
// TestEverything tests all the different types of flags are correctly read and as well as correctly returned
343343
// This tests the flag binding and the message building
344344
func TestEverything(t *testing.T) {
345345
fixture := initFixture(t)

docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The documentation for Cosmos SDK is hosted at https://docs.cosmos.network and bu
66
It is built using the following stack:
77

88
* [Docusaurus 2](https://docusaurus.io)
9-
* Vuepress (pre v0.47)
9+
* VuePress (pre v0.47)
1010
* [Algolia DocSearch](https://docsearch.algolia.com/)
1111

1212
```js
@@ -23,11 +23,11 @@ It is built using the following stack:
2323
## Docs Build Workflow
2424

2525
The docs are built and deployed automatically on GitHub Pages by a [GitHub Action workflow](../.github/workflows/build-docs.yml).
26-
The workflow is triggered on every push to the `main` and `release/v**` branches, every time documentations or specs are modified.
26+
The workflow is triggered on every push to the `main` and `release/v**` branches, every time documentation or specs are modified.
2727

2828
### How It Works
2929

30-
There is a GitHub Action listening for changes in the `/docs` directory for the `main` branch and each supported version branch (e.g. `release/v0.46.x`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a Github Action within that repository.
30+
There is a GitHub Action listening for changes in the `/docs` directory for the `main` branch and each supported version branch (e.g. `release/v0.46.x`). Any updates to files in the `/docs` directory will automatically trigger a website deployment. Under the hood, the private website repository has a `make build-docs` target consumed by a GitHub Action within that repository.
3131

3232
## How to Build the Docs Locally
3333

@@ -47,7 +47,7 @@ npm start
4747
It runs `pre.sh` scripts to get all the docs that are not already in the `docs/docs` folder.
4848
It also runs `post.sh` scripts to clean up the docs and remove unnecessary files when quitting.
4949

50-
Note, the command above only build the docs for the current versions.
50+
Note, the command above only builds the docs for the current versions.
5151
With the drawback that none of the redirections works. So, you'll need to go to /main to see the docs.
5252

5353
To build all the docs (including versioned documentation), run:
@@ -56,7 +56,7 @@ To build all the docs (including versioned documentation), run:
5656
make build-docs
5757
```
5858

59-
## What to for new major SDK versions
59+
## What to do for new major SDK versions
6060

6161
When a new major version of the SDK is released, the following steps should be taken:
6262

@@ -75,6 +75,6 @@ When a new major version of the SDK is released, the following steps should be t
7575

7676
* Add the new version sidebar to the list of versioned sidebar and add the version to `versions.json`.
7777
* Update the latest version (`presets[1].docs.lastVersion`) in `docusaurus.config.js`.
78-
* Add the new version with in `presets[1].docs.versions` in `docusaurus.config.js`.
78+
* Add the new version within `presets[1].docs.versions` in `docusaurus.config.js`.
7979

8080
Learn more about [versioning](https://docusaurus.io/docs/versioning) in Docusaurus.

docs/docs/learn/advanced/00-baseapp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ The [Application-Blockchain Interface](https://github.com/cometbft/cometbft/blob
234234

235235
The consensus engine handles two main tasks:
236236

237-
* The networking logic, which mainly consists in gossiping block parts, transactions and consensus votes.
237+
* The networking logic, which mainly consists of gossiping block parts, transactions and consensus votes.
238238
* The consensus logic, which results in the deterministic ordering of transactions in the form of blocks.
239239

240-
It is **not** the role of the consensus engine to define the state or the validity of transactions. Generally, transactions are handled by the consensus engine in the form of `[]bytes`, and relayed to the application via the ABCI to be decoded and processed. At keys moments in the networking and consensus processes (e.g. beginning of a block, commit of a block, reception of an unconfirmed transaction, ...), the consensus engine emits ABCI messages for the state-machine to act on.
240+
It is **not** the role of the consensus engine to define the state or the validity of transactions. Generally, transactions are handled by the consensus engine in the form of `[]bytes`, and relayed to the application via the ABCI to be decoded and processed. At key moments in the networking and consensus processes (e.g. beginning of a block, commit of a block, reception of an unconfirmed transaction, ...), the consensus engine emits ABCI messages for the state-machine to act on.
241241

242242
Developers building on top of the Cosmos SDK need not implement the ABCI themselves, as `BaseApp` comes with a built-in implementation of the interface. Let us go through the main ABCI messages that `BaseApp` implements:
243243

docs/docs/learn/advanced/01-transactions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ need to sign over the fees:
8383
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/proto/cosmos/tx/v1beta1/tx.proto#L68-L93
8484
```
8585

86-
The use case is a multi-signer transaction, where one of the signers is appointed to gather all signatures, broadcast the signature and pay for fees, and the others only care about the transaction body. This generally allows for a better multi-signing UX. If Alice, Bob and Charlie are part of a 3-signer transaction, then Alice and Bob can both use `SIGN_MODE_DIRECT_AUX` to sign over the `TxBody` and their own signer info (no need an additional step to gather other signers' ones, like in `SIGN_MODE_DIRECT`), without specifying a fee in their SignDoc. Charlie can then gather both signatures from Alice and Bob, and
86+
The use case is a multi-signer transaction, where one of the signers is appointed to gather all signatures, broadcast the signature and pay for fees, and the others only care about the transaction body. This generally allows for a better multi-signing UX. If Alice, Bob and Charlie are part of a 3-signer transaction, then Alice and Bob can both use `SIGN_MODE_DIRECT_AUX` to sign over the `TxBody` and their own signer info (no need for an additional step to gather other signers' ones, like in `SIGN_MODE_DIRECT`), without specifying a fee in their SignDoc. Charlie can then gather both signatures from Alice and Bob, and
8787
create the final transaction by appending a fee. Note that the fee payer of the transaction (in our case Charlie) must sign over the fees, so must use `SIGN_MODE_DIRECT` or `SIGN_MODE_LEGACY_AMINO_JSON`.
8888

8989

@@ -128,7 +128,7 @@ While messages contain the information for state transition logic, a transaction
128128

129129
### Transaction Generation
130130

131-
The `TxBuilder` interface contains data closely related with the generation of transactions, which an end-user can set to generate the desired transaction:
131+
The `TxBuilder` interface contains data closely related to the generation of transactions, which an end-user can set to generate the desired transaction:
132132

133133
```go reference
134134
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/client/tx_config.go#L39-L57

docs/docs/learn/beginner/00-app-anatomy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/simapp/params/encoding.go#L9-L
147147

148148
Here are descriptions of what each of the four fields means:
149149

150-
* `InterfaceRegistry`: The `InterfaceRegistry` is used by the Protobuf codec to handle interfaces that are encoded and decoded (we also say "unpacked") using [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). `Any` could be thought as a struct that contains a `type_url` (name of a concrete type implementing the interface) and a `value` (its encoded bytes). `InterfaceRegistry` provides a mechanism for registering interfaces and implementations that can be safely unpacked from `Any`. Each application module implements the `RegisterInterfaces` method that can be used to register the module's own interfaces and implementations.
150+
* `InterfaceRegistry`: The `InterfaceRegistry` is used by the Protobuf codec to handle interfaces that are encoded and decoded (we also say "unpacked") using [`google.protobuf.Any`](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto). `Any` could be thought of as a struct that contains a `type_url` (name of a concrete type implementing the interface) and a `value` (its encoded bytes). `InterfaceRegistry` provides a mechanism for registering interfaces and implementations that can be safely unpacked from `Any`. Each application module implements the `RegisterInterfaces` method that can be used to register the module's own interfaces and implementations.
151151
* You can read more about `Any` in [ADR-019](../../build/architecture/adr-019-protobuf-state-encoding.md).
152152
* To go more into details, the Cosmos SDK uses an implementation of the Protobuf specification called [`gogoprotobuf`](https://github.com/cosmos/gogoproto). By default, the [gogo protobuf implementation of `Any`](https://pkg.go.dev/github.com/cosmos/gogoproto/types) uses [global type registration](https://github.com/cosmos/gogoproto/blob/master/proto/properties.go#L540) to decode values packed in `Any` into concrete Go types. This introduces a vulnerability where any malicious module in the dependency tree could register a type with the global protobuf registry and cause it to be loaded and unmarshaled by a transaction that referenced it in the `type_url` field. For more information, please refer to [ADR-019](../../build/architecture/adr-019-protobuf-state-encoding.md).
153153
* `Codec`: The default codec used throughout the Cosmos SDK. It is composed of a `BinaryCodec` used to encode and decode state, and a `JSONCodec` used to output data to the users (for example, in the [CLI](#cli)). By default, the SDK uses Protobuf as `Codec`.
@@ -255,7 +255,7 @@ The Cosmos SDK also provides a development endpoint to generate [Swagger](https:
255255
The main interface is the [Command-Line Interface](../advanced/07-cli.md). The CLI of a Cosmos SDK application is built by aggregating [CLI commands](#cli) defined in each of the modules used by the application. The CLI of an application is the same as the daemon (e.g. `appd`), and is defined in a file called `appd/main.go`. The file contains the following:
256256

257257
* **A `main()` function**, which is executed to build the `appd` interface client. This function prepares each command and adds them to the `rootCmd` before building them. At the root of `appd`, the function adds generic commands like `status`, `keys`, and `config`, query commands, tx commands, and `rest-server`.
258-
* **Query commands**, which are added by calling the `queryCmd` function. This function returns a Cobra command that contains the query commands defined in each of the application's modules (passed as an array of `sdk.ModuleClients` from the `main()` function), as well as some other lower level query commands such as block or validator queries. Query command are called by using the command `appd query [query]` of the CLI.
258+
* **Query commands**, which are added by calling the `queryCmd` function. This function returns a Cobra command that contains the query commands defined in each of the application's modules (passed as an array of `sdk.ModuleClients` from the `main()` function), as well as some other lower level query commands such as block or validator queries. Query commands are called by using the command `appd query [query]` of the CLI.
259259
* **Transaction commands**, which are added by calling the `txCmd` function. Similar to `queryCmd`, the function returns a Cobra command that contains the tx commands defined in each of the application's modules, as well as lower level tx commands like transaction signing or broadcasting. Tx commands are called by using the command `appd tx [tx]` of the CLI.
260260

261261
See an example of an application's main command-line file from the [Cosmos Hub](https://github.com/cosmos/gaia).

docs/docs/learn/beginner/01-tx-lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ through several steps, beginning with decoding `Tx`.
9898

9999
### Decoding
100100

101-
When `Tx` is received by the application from the underlying consensus engine (e.g. CometBFT ), it is still in its [encoded](../advanced/05-encoding.md) `[]byte` form and needs to be unmarshaled in order to be processed. Then, the [`runTx`](../advanced/00-baseapp.md#runtx-antehandler-runmsgs-posthandler) function is called to run in `runTxModeCheck` mode, meaning the function runs all checks but exits before executing messages and writing state changes.
101+
When `Tx` is received by the application from the underlying consensus engine (e.g. CometBFT), it is still in its [encoded](../advanced/05-encoding.md) `[]byte` form and needs to be unmarshaled in order to be processed. Then, the [`runTx`](../advanced/00-baseapp.md#runtx-antehandler-runmsgs-posthandler) function is called to run in `runTxModeCheck` mode, meaning the function runs all checks but exits before executing messages and writing state changes.
102102

103103
### ValidateBasic (deprecated)
104104

docs/docs/learn/beginner/02-query-lifecycle.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ One such tool is [grpcurl](https://github.com/fullstorydev/grpcurl), and a gRPC
4747

4848
```bash
4949
grpcurl \
50-
-plaintext # We want results in plain test
50+
-plaintext # We want results in plain text
5151
-import-path ./proto \ # Import these .proto files
5252
-proto ./proto/cosmos/staking/v1beta1/query.proto \ # Look into this .proto file for the Query protobuf service
5353
-d '{"address":"$MY_DELEGATOR"}' \ # Query arguments
@@ -76,7 +76,7 @@ The first thing that is created in the execution of a CLI command is a `client.C
7676
* **Codec**: The [encoder/decoder](../advanced/05-encoding.md) used by the application, used to marshal the parameters and query before making the CometBFT RPC request and unmarshal the returned response into a JSON object. The default codec used by the CLI is Protobuf.
7777
* **Account Decoder**: The account decoder from the [`auth`](../../build/modules/auth/README.md) module, which translates `[]byte`s into accounts.
7878
* **RPC Client**: The CometBFT RPC Client, or node, to which requests are relayed.
79-
* **Keyring**: A [Key Manager]../beginner/03-accounts.md#keyring) used to sign transactions and handle other operations with keys.
79+
* **Keyring**: A [Key Manager](../beginner/03-accounts.md#keyring) used to sign transactions and handle other operations with keys.
8080
* **Output Writer**: A [Writer](https://pkg.go.dev/io/#Writer) used to output the response.
8181
* **Configurations**: The flags configured by the user for this command, including `--height`, specifying the height of the blockchain to query, and `--indent`, which indicates to add an indent to the JSON response.
8282

@@ -134,7 +134,7 @@ Once a result is received from the querier, `baseapp` begins the process of retu
134134

135135
## Response
136136

137-
Since `Query()` is an ABCI function, `baseapp` returns the response as an [`abci.ResponseQuery`](https://docs.cometbft.com/master/spec/abci/abci.html#query-2) type. The `client.Context` `Query()` routine receives the response and.
137+
Since `Query()` is an ABCI function, `baseapp` returns the response as an [`abci.ResponseQuery`](https://docs.cometbft.com/master/spec/abci/abci.html#query-2) type. The `client.Context` `Query()` routine receives the response.
138138

139139
### CLI Response
140140

docs/docs/learn/beginner/03-accounts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The Cosmos SDK supports the following digital key schemes for creating digital s
7575
* `secp256r1`, as implemented in the [Cosmos SDK's `crypto/keys/secp256r1` package](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/crypto/keys/secp256r1/pubkey.go).
7676
* `tm-ed25519`, as implemented in the [Cosmos SDK `crypto/keys/ed25519` package](https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/crypto/keys/ed25519/ed25519.go). This scheme is supported only for the consensus validation.
7777

78-
| | Address length in bytes | Public key length in bytes | Used for transaction authentication | Used for consensus (cometbft) |
78+
| | Address length in bytes | Public key length in bytes | Used for transaction authentication | Used for consensus (CometBFT) |
7979
| :----------: | :---------------------: | :------------------------: | :---------------------------------: | :-----------------------------: |
8080
| `secp256k1` | 20 | 33 | yes | no |
8181
| `secp256r1` | 32 | 33 | yes | no |
@@ -167,7 +167,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/proto/cosmos/tx/v1beta1/tx.pro
167167

168168
### Create New Key Type
169169

170-
To create a new key type for using in keyring, `keyring.SignatureAlgo` interface must be fulfilled.
170+
To create a new key type for use in the keyring, the `keyring.SignatureAlgo` interface must be fulfilled.
171171

172172
```go reference
173173
https://github.com/cosmos/cosmos-sdk/blob/v0.53.0/crypto/keyring/signing_algorithms.go#L11-L16
@@ -194,7 +194,7 @@ First a new function to create a private key from a secret number is needed in t
194194
```go
195195
// cosmos-sdk/crypto/keys/secp256r1/privkey.go
196196

197-
// NewPrivKeyFromSecret creates a private key derived for the secret number
197+
// NewPrivKeyFromSecret creates a private key derived from the secret number
198198
// represented in big-endian. The `secret` must be a valid ECDSA field element.
199199
func NewPrivKeyFromSecret(secret []byte) (*PrivKey, error) {
200200
var d = new(big.Int).SetBytes(secret)

0 commit comments

Comments
 (0)