Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestPrepareProposal has unclear comments #1390

Closed
rootulp opened this issue Jun 13, 2024 · 1 comment
Closed

RequestPrepareProposal has unclear comments #1390

rootulp opened this issue Jun 13, 2024 · 1 comment
Assignees

Comments

@rootulp
Copy link
Collaborator

rootulp commented Jun 13, 2024

Context

See Slack thread

message RequestPrepareProposal {
// block_data is an array of transactions that will be included in a block,
// sent to the app for possible modifications.
// applications can not exceed the size of the data passed to it.
tendermint.types.Data block_data = 1;
// If an application decides to populate block_data with extra information, they can not exceed this value.
int64 block_data_size = 2;

Problem

I think these comments aren't clear.

// block_data is an array of transactions that will be included in a block, sent to the app for possible modifications.

block_data is an array of candidate transactions that may be included in a block. The array is sent to the application to filter out any invalid transactions and re-order all SDK transactions before blob transactions. Note the transactions themselves aren't modified.

// applications can not exceed the size of the data passed to it.

IDK what this means because the application does in fact return a BlockData with a size greater than the data passed in. The BlockData that the application returns includes a SquareSize and hash (data root).

// If an application decides to populate block_data with extra information, they can not exceed this value.

IMO this should clarify that the total BlockData can't exceed BlockDataSize. The way it's written currently made me think that just the extra information can no exceed BlockDataSize.

Proposal

Update the comments to make them clearer.

Note: the CometBFT RequestPrepareProposal type looks a bit different from ours so we can't copy their comments.

@rootulp
Copy link
Collaborator Author

rootulp commented Jun 18, 2024

Closed by #1393

@rootulp rootulp closed this as completed Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant