Skip to content

Commit

Permalink
doc: improve documentation of BlockParams.MaxBytes (manual backport of
Browse files Browse the repository at this point in the history
  • Loading branch information
cason committed Sep 27, 2023
1 parent 8d4b622 commit 8ab6345
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions spec/abci/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,26 @@ evidence. They can be set in InitChain and updated in EndBlock.
### BlockParams.MaxBytes

The maximum size of a complete Protobuf encoded block.
This is enforced by CometBFT consensus.
This is enforced by the consensus algorithm.

This implies a maximum transaction size that is this MaxBytes, less the expected size of
This implies a maximum transaction size that is this `MaxBytes`, less the expected size of
the header, the validator set, and any included evidence in the block.

Must have `0 < MaxBytes < 100 MB`.
The Application should be aware that honest validators _may_ produce and
broadcast blocks with up the configured `MaxBytes` size.
As a result, the consensus
[timeout parameters](../../docs/core/configuration.md#consensus-timeouts-explained)
adopted by nodes should be configured so as to account for the worst-case
latency for the delivery of a full block with `MaxBytes` size to all validators.

Must have `0 < MaxBytes <= 100 MB`.

> Bear in mind that the default value for the `BlockParams.MaxBytes` consensus
> parameter accepts as valid blocks with size up to 21 MB.
> If the Application's use case does not need blocks of that size,
> or if the impact (specially on bandwidth consumption and block latency)
> of propagating blocks of that size was not evaluated,
> it is strongly recommended to wind down this default value.
### BlockParams.MaxGas

Expand Down

0 comments on commit 8ab6345

Please sign in to comment.