8000 Extend ABCI `max_block_size` parameter to give extended control to the app (backport #1003) by mergify[bot] · Pull Request #1006 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Extend ABCI max_block_size parameter to give extended control to the app (backport #1003) #1006

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

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

mergify[bot]
Copy link
Contributor
@mergify mergify bot commented Jun 20, 2023

This is an automatic backport of pull request #1003 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…e app (#1003)

Closes #980

This PR is the result of internal discussions (last year, but also last week), and interactions with the Vega team in order to address their use case.

The gist of the agreed solution is to interpret value -1 for `ConsensusParams.Block.MaxBytes` as the Application wanting to enforce a size limit at its level, via `PrepareProposal` and `ProcessProposal`. Additionally, it instructs CometBFT to send all transactions in the mempool upon calling `PrepareProposal` so that the application can apply its own transaction ordering policies to *all* transactions known to the node.

This solution is also the most _surgical_ among all candidate solutions in that the least amount of logic/spec needed to be added/removed/modified.

So, at CometBFT level, a value of -1 for `ConsensusParams.Block.MaxBytes` implies:

* The limit enforced at CometBFT level is the generic `types.MaxBlockSizeBytes` (hard-coded to 100MB)
* CometBFT will reap all transactions from the mempool when creating a proposed block (just before calling `PrepareProposal`)

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code comments

(cherry picked from commit c138e78)
@mergify mergify bot requested review from a team as code owners June 20, 2023 16:01
@sergio-mena sergio-mena added the abci Application blockchain interface label Jun 20, 2023
@sergio-mena sergio-mena self-assigned this Jun 20, 2023
@sergio-mena sergio-mena merged commit fda9f51 into v0.38.x Jun 20, 2023
@sergio-mena sergio-mena deleted the mergify/bp/v0.38.x/pr-1003 branch June 20, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abci Application blockchain interface
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant
0