From 5c615e1c0532efbc189c6670267baef9a01a195b Mon Sep 17 00:00:00 2001 From: toni <143221387+xyztoni@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:01:07 +0100 Subject: [PATCH 1/2] Update ante_handler.md --- specs/src/specs/ante_handler.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/src/specs/ante_handler.md b/specs/src/specs/ante_handler.md index 82d684da0a..25df1d4aac 100644 --- a/specs/src/specs/ante_handler.md +++ b/specs/src/specs/ante_handler.md @@ -18,7 +18,7 @@ The AnteHandler chains together several decorators to ensure the following crite - The tx's count of signatures <= the max number of signatures. The max number of signatures is [`TxSigLimit = 7`](https://github.com/cosmos/cosmos-sdk/blob/a429238fc267da88a8548bfebe0ba7fb28b82a13/x/auth/README.md?plain=1#L231). - The tx's [gas_limit](https://github.com/cosmos/cosmos-sdk/blob/22c28366466e64ebf0df1ce5bec8b1130523552c/proto/cosmos/tx/v1beta1/tx.proto#L211-L213) is > the gas consumed based on the tx's signatures. - The tx's [signatures](https://github.com/cosmos/cosmos-sdk/blob/22c28366466e64ebf0df1ce5bec8b1130523552c/types/tx/signing/signature.go#L10-L26) are valid. For each signature, ensure that the signature's sequence number (a.k.a nonce) matches the account sequence number of the signer. -- The tx's [gas_limit](https://github.com/cosmos/cosmos-sdk/blob/22c28366466e64ebf0df1ce5bec8b1130523552c/proto/cosmos/tx/v1beta1/tx.proto#L211-L213) is > the gas consumed based on the blob size(s). Since blobs are charged based on the number of shares they occupy, the gas consumed is calculated as follows: `gasToConsume = sharesNeeded(blob) * bytesPerShare * gasPerBlobByte`. Where `bytesPerShare` is a a global constant (an alias for [`ShareSize = 512`](https://github.com/celestiaorg/celestia-app/blob/c90e61d5a2d0c0bd0e123df4ab416f6f0d141b7f/pkg/appconsts/global_consts.go#L27-L28)) and `gasPerBlobByte` is a governance parameter that can be modified (the [`DefaultGasPerBlobByte = 8`](https://github.com/celestiaorg/celestia-app/blob/c90e61d5a2d0c0bd0e123df4ab416f6f0d141b7f/pkg/appconsts/initial_consts.go#L16-L18)). +- The tx's [gas_limit](https://github.com/cosmos/cosmos-sdk/blob/22c28366466e64ebf0df1ce5bec8b1130523552c/proto/cosmos/tx/v1beta1/tx.proto#L211-L213) is > the gas consumed based on the blob size(s). Since blobs are charged based on the number of shares they occupy, the gas consumed is calculated as follows: `gasToConsume = sharesNeeded(blob) * bytesPerShare * gasPerBlobByte`. Where `bytesPerShare` is a global constant (an alias for [`ShareSize = 512`](https://github.com/celestiaorg/celestia-app/blob/c90e61d5a2d0c0bd0e123df4ab416f6f0d141b7f/pkg/appconsts/global_consts.go#L27-L28)) and `gasPerBlobByte` is a governance parameter that can be modified (the [`DefaultGasPerBlobByte = 8`](https://github.com/celestiaorg/celestia-app/blob/c90e61d5a2d0c0bd0e123df4ab416f6f0d141b7f/pkg/appconsts/initial_consts.go#L16-L18)). - The tx's total blob size is <= the max blob size. The max blob size is derived from the maximum valid square size. The max valid square size is the minimum of: `GovMaxSquareSize` and `SquareSizeUpperBound`. - The tx does not contain a message of type [MsgSubmitProposal](https://github.com/cosmos/cosmos-sdk/blob/d6d929843bbd331b885467475bcb3050788e30ca/proto/cosmos/gov/v1/tx.proto#L33-L43) with zero proposal messages. - The tx is not an IBC packet or update message that has already been processed. @@ -26,5 +26,5 @@ The AnteHandler chains together several decorators to ensure the following crite In addition to the above criteria, the AnteHandler also has a number of side-effects: - Tx fees are deducted from the tx's feepayer and added to the fee collector module account. -- Tx priority is calculated based on the the smallest denomination of gas price in the tx and set in context. +- Tx priority is calculated based on the smallest denomination of gas price in the tx and set in context. - The nonce of all tx signers is incremented by 1. From adaffcfb1ea91bb48cc950c61382d63f3bfc129b Mon Sep 17 00:00:00 2001 From: toni <143221387+xyztoni@users.noreply.github.com> Date: Wed, 21 Feb 2024 17:03:31 +0100 Subject: [PATCH 2/2] Update block_validity_rules.md --- specs/src/specs/block_validity_rules.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/src/specs/block_validity_rules.md b/specs/src/specs/block_validity_rules.md index 86718b38aa..b95cdf89af 100644 --- a/specs/src/specs/block_validity_rules.md +++ b/specs/src/specs/block_validity_rules.md @@ -9,7 +9,7 @@ constrained light clients must be able to detect when a subset of these validity rules have not been followed in order to avoid making an honest majority assumption on the consensus network. This has a significant impact on their design. More information on how light clients can check the invalidity of a -block can be foud in the [Fraud Proofs](./fraud_proofs.md) spec. +block can be found in the [Fraud Proofs](./fraud_proofs.md) spec. > **Note** Celestia relies on CometBFT (formerly tendermint) for consensus, > meaning that it has single slot finality and is fork-free. Therefore, in order @@ -27,7 +27,7 @@ rules](https://github.com/cometbft/cometbft/blob/v0.34.28/spec/core/data_structu must be followed. Notably, this includes verifying data availability. Consensus nodes verify data -availabily by simply downloading the entire block. +availability by simply downloading the entire block. > **Note** Light clients only sample a fraction of the block. More details on > how sampling actually works can be found in the seminal ["Fraud and Data