From 442ceaaab08fd0646f26ac670554f03079f1cf87 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Fri, 21 Jan 2022 19:16:24 +0100 Subject: [PATCH] wording update --- docs/basics/tx-lifecycle.md | 5 +++-- docs/core/baseapp.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/basics/tx-lifecycle.md b/docs/basics/tx-lifecycle.md index c6409bf1318b..d80705c8b2b0 100644 --- a/docs/basics/tx-lifecycle.md +++ b/docs/basics/tx-lifecycle.md @@ -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). diff --git a/docs/core/baseapp.md b/docs/core/baseapp.md index 6ea299351760..74a01ce23571 100644 --- a/docs/core/baseapp.md +++ b/docs/core/baseapp.md @@ -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`).