-
Notifications
You must be signed in to change notification settings - Fork 678
Description
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.