Skip to content

Cody/back port flashbots #7

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

Open
wants to merge 67 commits into
base: release
Choose a base branch
from
Open

Conversation

cody-wang-cb
Copy link

πŸ“ Summary

πŸ’‘ Motivation and Context


βœ… I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

avalonche and others added 30 commits June 4, 2025 16:53
* modify logging

* more

* structure logs
* Add gas limit and DA transaction results for tracing

* use result
* Add another builder tx after the first flashblock

* Fix fb test
* Implement bundle reverting hashes

* Merge main

* Fix

* Add min_block_number

* fix litn

* Fix

* Fix comment

* Mark invalid

* Rename reverting_hashes

* Remove Option

* Revert "Remove Option"

This reverts commit 4087d35.
…GE_BLOCKS (flashbots#128)

If a user only specifies the min block number, the max block number is set to the
current block number + MAX_BLOCK_RANGE_BLOCKS; however, there is no check that
the min block is less than the newly set max block number.
* Fix bundle type reverting hashes optional param

* Fix
Rebase

Remove custom logic

Custom Engine API support + engine call propagation
* Move bundle validation to primitives folder

* Add another check

* Fix
* Make op-rbuilder a lib

* Fix lint

* Two more fixes

* Move alloc

---------

Co-authored-by: Solar Mithril <solarmithril@pm.me>
* Validation node works and tests are passing using the new test infra

* revert_protection_monitor_transaction_gc passes

* revert_protection_disabled passes

* ordering tests are passing

* all tests are passing

* ready

* lint

* Github Action login to GHCR.io

* testing Github Actions ghcr access

* testing Github Actions ghcr access

* lint

* Closes issue 133

* review feedback

* review feedback

* Review feedback - ctrl-c

* Review feedback

* review feedback

* Review feedback

* review feedback

* lint

* macos compatibility

* lint

* lint
Logic

Add extended flashblocks tracing
…bots#141)

* Add minTimestamp and maxTimestamp as optional fields to bundle

* Test that bundles with min timestamp wait aren't included until the block time exceeds it
* Remove extra generic

* Fix fmt
* quick bugfix

Account for dynamic lag in the beginning of building process

* More improvements

* More improvements

* More improvements

* More improvements

* Wrap everything into the config

* Review

* Review
…lla builder (flashbots#145)

* Applied 68 on top of latest main

* Update crates/op-rbuilder/src/tests/smoke.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* lint

* port new revert unit test

* lint

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ts#163)

* Add ci workflow to build independdent docker images + nightly

* Update

* More fixes
SozinM and others added 30 commits July 1, 2025 17:13
* Use reth 1.5.0

* Bump reth to 1.5.0

---------

Co-authored-by: Solar Mithril <mikawamp@gmail.com>
* Reth 151

* Add debug bounds
* Add a test to validate that no-tx-pool works

* Fix lint
* introduce gauge metrics and fix naming for histogram metrics

* fix a couple of flashblocks metrics

* add fn to set payload builder metrics
* Add flashblocks index to payload building context

* refactor

* fix index
…shbots#219)

* Less confusing naming, state is called db and db is called state

* Use renaming destructuring
* add min and max flashblock number fields to bundle

* add min and max flashblock number to FBPooledTransaction

* filter based on flashblock number

* wrap best txs iterator to consider flashblock number

* fix map structure and wrap better

* integration tests
* WIP
right now it has consensus error
2025-08-01T16:10:44.956046Z ERROR engine::persistence: Persistence service failed err=ProviderError(Database(Write(DatabaseWriteError { info: DatabaseErrorInfo { message: "the given key value is mismatched to the current cursor position", code: -30418 }, operation: CursorAppendDup, table_name: "AccountChangeSets", key: [0, 0, 0, 0, 0, 0, 0, 9] })))

* Hacky solution to mergin state

* fmt

* fmt

* remove config.toml

* Update crates/op-rbuilder/src/builders/flashblocks/payload.rs

---------

Co-authored-by: shana <avalonche@protonmail.com>
* WIP
right now it has consensus error
2025-08-01T16:10:44.956046Z ERROR engine::persistence: Persistence service failed err=ProviderError(Database(Write(DatabaseWriteError { info: DatabaseErrorInfo { message: "the given key value is mismatched to the current cursor position", code: -30418 }, operation: CursorAppendDup, table_name: "AccountChangeSets", key: [0, 0, 0, 0, 0, 0, 0, 9] })))

* fmt

* cache reth db reads in flashblocks payload generation

* save tip to cache on new committed state

---------

Co-authored-by: Solar Mithril <mikawamp@gmail.com>
Co-authored-by: Ash Kunda <18058966+akundaz@users.noreply.github.com>
* record missing flashblocks in more places

* code cleanup

* edit log message
* record num txs built correctly with flashblocks enabled

* Fix metrics

---------

Co-authored-by: Solar Mithril <mikawamp@gmail.com>
* feat: add transaction gas limit

* fix: update default

* fix: update best txns

* chore: add test for max txn gas

* fix: apply suggestions

* fix: tests

* chore: update tests

* fix: failing tests
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

Successfully merging this pull request may close these issues.