Skip to content

Commit

Permalink
wording update
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Jan 21, 2022
1 parent 6775f38 commit 442ceaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/basics/tx-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ To discard obviously invalid messages, the BaseApp` type calls the `ValidateBasi

#### Guideline

Gas is not charged when `ValidateBasic` is executed so we recommend only performing the most necessary sanity checks to enable middleware operations (for example, parsing the required signer accounts to validate a signature by a middleware). Other validation operations must be performed when [handling a message](../building-modules/msg-services#Validation) in a module Msg Server.
Gas is not charged when `ValidateBasic` is executed so we recommend only performing all necessary stateless checks to enable middleware operations (for example, parsing the required signer accounts to validate a signature by a middleware) and stateless sanity checks not impacting performance of the CheckTx phase.
Other validation operations must be performed when [handling a message](../building-modules/msg-services#Validation) in a module Msg Server.

For example, if the message is to send coins from one address to another, `ValidateBasic` likely checks for non-empty addresses and a non-negative coin amount, but does not require knowledge of state such as the account balance of an address.
Example, if the message is to send coins from one address to another, `ValidateBasic` likely checks for non-empty addresses and a non-negative coin amount, but does not require knowledge of state such as the account balance of an address.

See also [Msg Service Validation](../building-modules/msg-services.md#Validation).

Expand Down
2 changes: 1 addition & 1 deletion docs/core/baseapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ The response contains:
#### RecheckTx

After `Commit`, `CheckTx` is run again on all transactions that remain in the node's local mempool
excluding those included in the block. To prevent the mempool from rechecking all transactions
excluding the transactions that are included in the block. To prevent the mempool from rechecking all transactions
every time a block is committed, the configuration option `mempool.recheck=false` can be set. As of
Tendermint v0.32.1, an additional `Type` parameter is made available to the `CheckTx` function that
indicates whether an incoming transaction is new (`CheckTxType_New`), or a recheck (`CheckTxType_Recheck`).
Expand Down

0 comments on commit 442ceaa

Please sign in to comment.