Skip to content

Commit

Permalink
refactor(sequencer): generate SequencerBlock after transaction exec…
Browse files Browse the repository at this point in the history
…ution in proposal phase (#1562)

## Summary
refactor the sequencer app to generate and store the resulting
`SequencerBlock` after transaction execution even in the proposal phase.

## Background
previously, we were only generating the `SequencerBlock` in
`finalize_block`, however with the upcoming builder APIs (#1519) we
require the (proposed) `SequencerBlock` to be available after execution
in the proposal phase.

## Changes
- create a `post_execute_transactions` method and move the
after-execution logic that generates the `SequencerBlock` from
`finalize_block` to there.
- call this method after transaction execution in `process_proposal`. 
- if txs were executed in `prepare_proposal`,
`post_execute_transactions` is still called in `process_proposal`, as
the block hash is not available in `prepare_proposal`.

## Testing
existing unit tests pass, app logic was not changed, just refactored

## Related Issues
 related to #1322
  • Loading branch information
noot authored Oct 7, 2024
1 parent 0238e67 commit f4dba95
Show file tree
Hide file tree
Showing 3 changed files with 253 additions and 131 deletions.
Loading

0 comments on commit f4dba95

Please sign in to comment.