Skip to content

docs: Update docs to reflect max bytes check #1376

@alijnmerchant21

Description

@alijnmerchant21

Description

The documentation currently shows an example of simply returning the list of transactions sent in the RequestPrepareProposal. However, according to the CometBFT spec, the Application is responsible for ensuring the total bytes of transactions returned does not exceed RequestPrepareProposal.max_tx_bytes.

The current behavior in the codebase adheres to the spec by only returning transactions that fit within the max bytes limit. However, the documentation example could cause confusion by not demonstrating the max bytes check.

Fix

The documentation example should be updated to demonstrate checking the total transaction bytes and only returning transactions up to the max bytes limit.

A note should be added to the documentation clarifying that the Application is responsible for enforcing the max bytes limit, even if more transactions are sent in the RequestPrepareProposal.

This will ensure the documentation matches both the spec and the actual code behavior.

Metadata

Metadata

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions