flashbots / flashbots/rbuilder
Flashblocks `BlockBuildingAlgorithm`
- Dominant language
- Rust
- Stars
- 567
- Forks
- 209
- PR merge metrics
- No merged PRs in 30d
Description
A new `BlockBuildingAlgorithm` implementation is required for Flashblocks.
The idea is a `timing` config can be specified with the millis since last block it should "checkpoint". Checkpointing means to cache the orders at that point in time, and always use those orders as the head of the block when suggesting future blocks.
e.g. `timings` set to `[250, 500, 750, 950]` should result in:
- While building block N
- Between 0 - 250ms since block N-1, `build_blocks` produces and returns empty blocks
- The first `build_blocks` call 250 - 500ms since block N-1 produces, caches, and returns `f1` (Flashblock 1) using the existing simple gas price ordering algorithm.
- Subsequent `build_blocks` calls 250 - 500ms since block N-1 returns `f1`.
- The first `build_blocks` call 500 - 750ms since block N-1 produces, caches, and returns `f2` (Flashblock 2) using the existing simple gas price ordering algorithm.
- Subsequent `build_blocks` calls 500 - 750ms since block N-1 returns `f2`.
- The first `build_blocks` call 750 - 900ms since block N-1 produces, caches, and returns `f3` (Flashblock 3) using the existing simple gas price ordering algorithm.
- Subsequent `build_blocks` calls 750 - 950ms since block N-1 returns `f3`.
- The first `build_blocks` call 900 - ∞ms since block N-1 produces, caches, and returns `f4` (Flashblock 4) using the existing simple gas price ordering algorithm.
- Subsequent `build_blocks` calls 950 - ∞ms since block N-1 returns `f4`.
Notes
- It should probably be a wrapper around an existing `BlockBuildingAlgorithm` implementation, like one that simply orders by gas price.
- Flexible Flashblock counts and intervals per block
Contributor guide
Assessment
This issue has not been assessed yet.