docs: fix grammatical and terminology issues in ADR documents (#25066)
This commit is contained in:
@@ -17,7 +17,7 @@ Draft
|
||||
|
||||
## Abstract
|
||||
|
||||
Currently, in the Cosmos SDK, there is no convention to sign arbitrary message like on Ethereum. We propose with this specification, for Cosmos SDK ecosystem, a way to sign and validate off-chain arbitrary messages.
|
||||
Currently, in the Cosmos SDK, there is no convention to sign arbitrary message like in Ethereum. We propose with this specification, for Cosmos SDK ecosystem, a way to sign and validate off-chain arbitrary messages.
|
||||
|
||||
This specification serves the purpose of covering every use case, this means that cosmos-sdk applications developers decide how to serialize and represent `Data` to users.
|
||||
|
||||
@@ -51,7 +51,7 @@ Verification of an offchain transaction follows the same rules as an onchain one
|
||||
|
||||
The first message added to the `offchain` package is `MsgSignData`.
|
||||
|
||||
`MsgSignData` allows developers to sign arbitrary bytes valid offchain only. Where `Signer` is the account address of the signer. `Data` is arbitrary bytes which can represent `text`, `files`, `object`s. It's applications developers decision how `Data` should be deserialized, serialized and the object it can represent in their context.
|
||||
`MsgSignData` allows developers to sign arbitrary bytes validatable offchain only. Where `Signer` is the account address of the signer. `Data` is arbitrary bytes which can represent `text`, `files`, `object`s. It's applications developers decision how `Data` should be deserialized, serialized and the object it can represent in their context.
|
||||
|
||||
It's applications developers decision how `Data` should be treated, by treated we mean the serialization and deserialization process and the Object `Data` should represent.
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ type ResponseCheckTx struct {
|
||||
}
|
||||
```
|
||||
|
||||
Please note that because CheckTx handles separate logic related to mempool priotization, its signature is different than DeliverTx and SimulateTx.
|
||||
Please note that because CheckTx handles separate logic related to mempool prioritization, its signature is different than DeliverTx and SimulateTx.
|
||||
|
||||
BaseApp holds a reference to a `tx.Handler`:
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ message Artifact {
|
||||
It is not required, but is recommended.
|
||||
If provided, it MUST be a hex encoded checksum string.
|
||||
Tools utilizing these `UpgradeInstructions` MUST fail if a `checksum` is provided but is different from the checksum of the result returned by the `url`.
|
||||
* `checksum_algo` is a string identify the algorithm used to generate the `checksum`.
|
||||
* `checksum_algo` is a string identifying the algorithm used to generate the `checksum`.
|
||||
Recommended algorithms: `sha256`, `sha512`.
|
||||
Algorithms also supported (but not recommended): `sha1`, `md5`.
|
||||
If a `checksum` is provided, a `checksum_algo` MUST also be provided.
|
||||
|
||||
@@ -51,7 +51,7 @@ Value Renderers describe how values of different Protobuf types should be encode
|
||||
|
||||
### `coins`
|
||||
|
||||
* an array of `coin` is display as the concatenation of each `coin` encoded as the specification above, the joined together with the delimiter `", "` (a comma and a space, no quotes around).
|
||||
* an array of `coin` is display as the concatenation of each `coin` encoded as the specification above, then joined together with the delimiter `", "` (a comma and a space, no quotes around).
|
||||
* the list of coins is ordered by unicode code point of the display denom: `A-Z` < `a-z`. For example, the string `aAbBcC` would be sorted `ABCabc`.
|
||||
* if the coins list had 0 items in it then it'll be rendered as `zero`
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ per-project, although most of these will hopefully be indirect
|
||||
|
||||
## Further Discussions
|
||||
|
||||
Further discussions are occurring in primarily in
|
||||
Further discussions are occurring primarily in
|
||||
https://github.com/cosmos/cosmos-sdk/discussions/10582 and within
|
||||
the Cosmos SDK Framework Working Group.
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ through several steps, beginning with decoding `Tx`.
|
||||
|
||||
### Decoding
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### ValidateBasic (deprecated)
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ The list above contains a few examples that show how much flexibility applicatio
|
||||
|
||||
Decentralized applications built with Smart Contracts are inherently capped in performance by the underlying environment. For a decentralized application to optimise performance, it needs to be built as an application-specific blockchain. Next are some of the benefits an application-specific blockchain brings in terms of performance:
|
||||
|
||||
* Developers of application-specific blockchains can choose to operate with a novel consensus engine such as CometBFT BFT. Compared to Proof-of-Work (used by most virtual-machine blockchains today), it offers significant gains in throughput.
|
||||
* Developers of application-specific blockchains can choose to operate with a novel consensus engine such as CometBFT. Compared to Proof-of-Work (used by most virtual-machine blockchains today), it offers significant gains in throughput.
|
||||
* An application-specific blockchain only operates a single application, so that the application does not compete with others for computation and storage. This is the opposite of most non-sharded virtual-machine blockchains today, where smart contracts all compete for computation and storage.
|
||||
* Even if a virtual-machine blockchain offered application-based sharding coupled with an efficient consensus algorithm, performance would still be limited by the virtual-machine itself. The real throughput bottleneck is the state-machine, and requiring transactions to be interpreted by a virtual-machine significantly increases the computational complexity of processing them.
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ Note that **CometBFT only handles transaction bytes**. It has no knowledge of wh
|
||||
|
||||
Here are the most important messages of the ABCI:
|
||||
|
||||
* `CheckTx`: When a transaction is received by CometBFT, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. . A special handler called the [`AnteHandler`](../beginner/04-gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://docs.cometbft.com/v0.37/spec/p2p/legacy-docs/messages/mempool) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet.
|
||||
* `CheckTx`: When a transaction is received by CometBFT, it is passed to the application to check if a few basic requirements are met. `CheckTx` is used to protect the mempool of full-nodes against spam transactions. A special handler called the [`AnteHandler`](../beginner/04-gas-fees.md#antehandler) is used to execute a series of validation steps such as checking for sufficient fees and validating the signatures. If the checks are valid, the transaction is added to the [mempool](https://docs.cometbft.com/v0.37/spec/p2p/legacy-docs/messages/mempool) and relayed to peer nodes. Note that transactions are not processed (i.e. no modification of the state occurs) with `CheckTx` since they have not been included in a block yet.
|
||||
* `DeliverTx`: When a [valid block](https://docs.cometbft.com/v0.37/spec/core/data_structures#block) is received by CometBFT, each transaction in the block is passed to the application via `DeliverTx` in order to be processed. It is during this stage that the state transitions occur. The `AnteHandler` executes again, along with the actual [`Msg` service](../../build/building-modules/03-msg-services.md) RPC for each message in the transaction.
|
||||
* `BeginBlock`/`EndBlock`: These messages are executed at the beginning and the end of each block, whether the block contains transactions or not. It is useful to trigger automatic execution of logic. Proceed with caution though, as computationally expensive loops could slow down your blockchain, or even freeze it if the loop is infinite.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ sidebar_position: 0
|
||||
---
|
||||
# Learn
|
||||
|
||||
* [Introduction](./intro/00-overview.md) - Dive into the fundamentals of Cosmos SDK with an insightful introduction,
|
||||
* [Introduction](./intro/00-overview.md) - Dive into the fundamentals of Cosmos SDK with an insightful introduction,
|
||||
laying the groundwork for understanding blockchain development. In this section we provide a High-Level Overview of the SDK, then dive deeper into Core concepts such as Application-Specific Blockchains, Blockchain Architecture, and finally we begin to explore the main components of the SDK.
|
||||
* [Beginner](./beginner/00-app-anatomy.md) - Start your journey with beginner-friendly resources in the Cosmos SDK's "Learn"
|
||||
section, providing a gentle entry point for newcomers to blockchain development. Here we focus on a little more detail, covering the Anatomy of a Cosmos SDK Application, Transaction Lifecycles, Accounts and lastly, Gas and Fees.
|
||||
|
||||
@@ -50,7 +50,7 @@ The `~/.simapp` folder has the following structure:
|
||||
|
||||
## Updating Some Default Settings
|
||||
|
||||
If you want to change any field values in configuration files (for ex: genesis.json) you can use `jq` ([installation](https://stedolan.github.io/jq/download/) & [docs](https://stedolan.github.io/jq/manual/#Assignment)) & `sed` commands to do that. Few examples are listed here.
|
||||
If you want to change any field values in configuration files (for ex: genesis.json) you can use `jq` ([installation](https://stedolan.github.io/jq/download/) & [docs](https://stedolan.github.io/jq/manual/#Assignment)) & `sed` commands to do that. A few examples are listed here.
|
||||
|
||||
```bash
|
||||
# to change the chain-id
|
||||
|
||||
@@ -420,7 +420,7 @@ Broadcasting a transaction using the REST endpoint (served by `gRPC-gateway`) ca
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d'{"tx_bytes":"{{txBytes}}","mode":"BROADCAST_MODE_SYNC"}' \
|
||||
-d' {"tx_bytes":"{{txBytes}}","mode":"BROADCAST_MODE_SYNC"}' \
|
||||
localhost:1317/cosmos/tx/v1beta1/txs
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -10,11 +10,11 @@
|
||||
|
||||
An RFC is a sort of async whiteboarding session. It is meant to replace the need for a distributed team to come together to make a decision. Currently, the Cosmos SDK team and contributors are distributed around the world. The team conducts working groups to have a synchronous discussion and an RFC can be used to capture the discussion for a wider audience to better understand the changes that are coming to the software.
|
||||
|
||||
The main difference the Cosmos SDK is defining as a differentiation between RFC and ADRs is that one is to come to consensus and circulate information about a potential change or feature. An ADR is used if there is already consensus on a feature or change and there is not a need to articulate the change coming to the software. An ADR will articulate the changes and have a lower amount of communication .
|
||||
The main difference the Cosmos SDK is defining as a differentiation between RFC and ADRs is that one is to come to consensus and circulate information about a potential change or feature. An ADR is used if there is already consensus on a feature or change and there is not a need to articulate the change coming to the software. An ADR will articulate the changes and have a lower amount of communication.
|
||||
|
||||
## RFC life cycle
|
||||
|
||||
RFC creation is an **iterative** process. An RFC is meant as a distributed collaboration session, it may have many comments and is usually the bi-product of no working group or synchronous communication
|
||||
RFC creation is an **iterative** process. An RFC is meant as a distributed collaboration session, it may have many comments and is usually the by-product of no working group or synchronous communication
|
||||
|
||||
1. Proposals could start with a new GitHub Issue, be a result of existing Issues or a discussion.
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ block.
|
||||
|
||||
## Modules specifications
|
||||
|
||||
Go the [module directory](https://docs.cosmos.network/main/modules)
|
||||
Go to the [module directory](https://docs.cosmos.network/main/modules)
|
||||
|
||||
## CometBFT
|
||||
|
||||
|
||||
@@ -18,4 +18,4 @@ While all user facing interfaces to Cosmos software should exposed Bech32 interf
|
||||
|
||||
To convert between other binary representation of addresses and keys, it is important to first apply the Amino encoding process before Bech32 encoding.
|
||||
|
||||
A complete implementation of the Amino serialization format is unnecessary in most cases. Simply prepending bytes from this [table](https://github.com/cometbft/cometbft/blob/main/spec/blockchain/encoding.md) to the byte string payload before Bech32 encoding will sufficient for compatible representation.
|
||||
A complete implementation of the Amino serialization format is unnecessary in most cases. Simply prepending bytes from this [table](https://github.com/cometbft/cometbft/blob/main/spec/blockchain/encoding.md) to the byte string payload before Bech32 encoding will be sufficient for compatible representation.
|
||||
|
||||
Reference in New Issue
Block a user