You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blockstm/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,4 +38,4 @@ The internal data structures are also adapted with multiple stores in mind.
38
38
39
39
### Attribution
40
40
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.
@@ -23,11 +23,11 @@ It is built using the following stack:
23
23
## Docs Build Workflow
24
24
25
25
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.
27
27
28
28
### How It Works
29
29
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.
31
31
32
32
## How to Build the Docs Locally
33
33
@@ -47,7 +47,7 @@ npm start
47
47
It runs `pre.sh` scripts to get all the docs that are not already in the `docs/docs` folder.
48
48
It also runs `post.sh` scripts to clean up the docs and remove unnecessary files when quitting.
49
49
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.
51
51
With the drawback that none of the redirections works. So, you'll need to go to /main to see the docs.
52
52
53
53
To build all the docs (including versioned documentation), run:
@@ -56,7 +56,7 @@ To build all the docs (including versioned documentation), run:
56
56
make build-docs
57
57
```
58
58
59
-
## What to for new major SDK versions
59
+
## What to do for new major SDK versions
60
60
61
61
When a new major version of the SDK is released, the following steps should be taken:
62
62
@@ -75,6 +75,6 @@ When a new major version of the SDK is released, the following steps should be t
75
75
76
76
* Add the newversion sidebar to the list of versioned sidebar and add the version to `versions.json`.
77
77
* Update the latest version (`presets[1].docs.lastVersion`) in`docusaurus.config.js`.
78
-
* Add the newversionwithin`presets[1].docs.versions`in`docusaurus.config.js`.
78
+
* Add the newversionwithin`presets[1].docs.versions`in`docusaurus.config.js`.
79
79
80
80
Learn more about [versioning](https://docusaurus.io/docs/versioning) in Docusaurus.
Copy file name to clipboardExpand all lines: docs/docs/learn/advanced/00-baseapp.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,10 +234,10 @@ The [Application-Blockchain Interface](https://github.com/cometbft/cometbft/blob
234
234
235
235
The consensus engine handles two main tasks:
236
236
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.
238
238
* The consensus logic, which results in the deterministic ordering of transactions in the form of blocks.
239
239
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.
241
241
242
242
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:
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
87
87
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`.
88
88
89
89
@@ -128,7 +128,7 @@ While messages contain the information for state transition logic, a transaction
128
128
129
129
### Transaction Generation
130
130
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:
Here are descriptions of what each of the four fields means:
149
149
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.
151
151
* You can read more about `Any` in [ADR-019](../../build/architecture/adr-019-protobuf-state-encoding.md).
152
152
* 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).
153
153
*`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:
255
255
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:
256
256
257
257
***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.
259
259
***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.
260
260
261
261
See an example of an application's main command-line file from the [Cosmos Hub](https://github.com/cosmos/gaia).
Copy file name to clipboardExpand all lines: docs/docs/learn/beginner/01-tx-lifecycle.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ through several steps, beginning with decoding `Tx`.
98
98
99
99
### Decoding
100
100
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.
@@ -76,7 +76,7 @@ The first thing that is created in the execution of a CLI command is a `client.C
76
76
***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.
77
77
***Account Decoder**: The account decoder from the [`auth`](../../build/modules/auth/README.md) module, which translates `[]byte`s into accounts.
78
78
***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.
80
80
***Output Writer**: A [Writer](https://pkg.go.dev/io/#Writer) used to output the response.
81
81
***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.
82
82
@@ -134,7 +134,7 @@ Once a result is received from the querier, `baseapp` begins the process of retu
134
134
135
135
## Response
136
136
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.
Copy file name to clipboardExpand all lines: docs/docs/learn/beginner/03-accounts.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ The Cosmos SDK supports the following digital key schemes for creating digital s
75
75
*`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).
76
76
*`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.
77
77
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) |
0 commit comments