Skip to content

Commit

Permalink
feat(driver): BundleDriver for driving bundles to completion (#34)
Browse files Browse the repository at this point in the history
* feat: BundleDriver

* run txs -> run bundle

* chore: install mev alloy types

* bundle impl sketch

* chore: unrelated error

* chore: add to macro arms

* chore: respect reverts/halts, handle tx decoding errors

* manually impl debug

* cleanup

* feat: reverse params on with_block/try_with_block

* switch to eip2718 decode

* chore: dep cleanup

* ethsendbundle impl

* chore: bump to 0.5.0, make all with_ fns consistent

* feat: greedily deser txs, avoid clones, and accept state if revert is allowed

* wip: blocksimulator impl

* refactor: remove clone (#35)

* feat: accumulate bundle results

* chore: light refactor

* chore: refactor

* feat: extra checks

* feat: eip4844 checks

* fix: if timestamp is not set in bundle, increase for sim

* feat: ethsendbundle/ethbundle hash impl, bundlesimulator -> blockprocessor

* chore: switch from memtake to clone to avoid setting default values on new blocks

* feat: new macros

* feat: use macros

* chore: refactor tx processing to a function

* chore: simplify decoding and validating transactions

* chore: simplify reading initial balance

* feat: add new try_with_ fns, use clone

* fix: properly restore block env

---------

Co-authored-by: James Prestwich <[email protected]>
  • Loading branch information
Evalir and prestwich authored Aug 12, 2024
1 parent 2f202db commit fe82c5a
Show file tree
Hide file tree
Showing 8 changed files with 861 additions and 17 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trevm"
version = "0.4.0"
version = "0.5.0"
rust-version = "1.79.0"
edition = "2021"
authors = ["init4"]
Expand Down Expand Up @@ -31,10 +31,13 @@ alloy-consensus = { version = "0.2", features = ["k256"] }
alloy-eips = "0.2.0"
alloy-primitives = "0.7.6"
alloy-rpc-types-eth = "0.2.0"
alloy-rpc-types-mev = "0.2.0"
alloy-sol-types = "0.7.7"
revm = { version = "12.0.0", default-features = false, features = ["std"] }
zenith-types = "0.3"

thiserror = "1.0"

[dev-dependencies]
revm = { version = "12.0.0", features = ["test-utils", "serde-json", "std", "alloydb"] }
tokio = { version = "1.39", features = ["macros", "rt-multi-thread"] }
Expand Down
Loading

0 comments on commit fe82c5a

Please sign in to comment.