Skip to content

Commit

Permalink
fix(sequencer): respect max_tx_bytes when preparing proposals (#911)
Browse files Browse the repository at this point in the history
## Summary
Ensures that `cometBFT` blocks will not become too large during
`prepare_proposal()` from the addition of commitments to the front of
the block.

## Background
`cometBFT` sends in a `max_tx_bytes` parameter to the ABCI
`prepare_proposal()` that should be respected when modifying the block.
We currently add commitments to the front of the block for the included
rollup ids and included rollup transactions. It is possible that adding
these bytes will cause the `cometBFT` block to be larger than the
`max_tx_bytes` parameter.

## Changes
- Refactored `execute_block()` into `execute_block()` and
`execute_and_filter_block()` and pulled out the shared logic into
`execute_transaction()`.
- Prevents `cometBFT` blocks from becoming too large from adding the
commitments to the front of the block.

## Testing
- Added new unit test ensuring that overflow is okay.
- Ran local setup to ensure that transactions still flow through the
system in general.

## Issues
closes #850
  • Loading branch information
Lilyjjo authored Apr 16, 2024
1 parent 5693fc7 commit 473041a
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 52 deletions.
Loading

0 comments on commit 473041a

Please sign in to comment.