Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1e2ac9b
refactor(gateway): unused Arc'ed tokio runtime
mempirate Dec 9, 2025
b02c95f
feat(rpc): initial mev API skeleton
mempirate Dec 10, 2025
fee5d61
feat(common): add bundle type
mempirate Dec 10, 2025
cbf4c42
feat(rpc): bundle decoding and related errors
mempirate Dec 10, 2025
b527628
feat(common): add order enum
mempirate Dec 10, 2025
4c77944
feat(rpc): bundle validation, clean up
mempirate Dec 10, 2025
04f5e7b
feat(common): update spine with new order type
mempirate Dec 10, 2025
9fb93e3
feat(rpc): update RPC with new order type
mempirate Dec 10, 2025
2620974
feat(rpc): move supervisor validation into RPC
mempirate Dec 12, 2025
f94c759
refactor: rm supervisor from sequencer, change order type
mempirate Dec 14, 2025
b3d5d2e
refactor: finish Order type change
mempirate Dec 14, 2025
3376d17
feat(common): fix tx type in bundle
mempirate Dec 15, 2025
b53a788
wip
mempirate Dec 15, 2025
12deb2f
feat(txpool): refactor into order pool
mempirate Dec 16, 2025
2386e98
feat(txpool): more refactoring
mempirate Dec 16, 2025
643ab88
feat: checkpoint
mempirate Dec 17, 2025
cdfff7b
fix: handle sender nonces for bundles
mempirate Dec 17, 2025
21e8c92
chore: rm leftover todo comments
mempirate Dec 17, 2025
e7ae4a3
feat: fix telemetry for bundles
mempirate Dec 17, 2025
0135a33
chore: clippy
mempirate Dec 17, 2025
5b7fb53
chore: ignore failing test
mempirate Dec 18, 2025
a970a81
feat: update bundle telemetry
mempirate Dec 18, 2025
2397028
feat: txspammer send bundle
BrycePy Dec 22, 2025
ebd99e7
fix: more robust wallet keys
Karrq Dec 29, 2025
eaefe15
feat: add log
mempirate Dec 30, 2025
8f108bd
fix: nonce issue
mempirate Dec 30, 2025
e54ec00
fix: dropped bundle issues
mempirate Dec 30, 2025
374f3df
chore: fmt Justfile
mempirate Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 31 additions & 15 deletions based/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 21 additions & 25 deletions based/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ version = "0.1.0"
alloy-consensus = "1.0.41"
alloy-eips = "1.0.41"
alloy-network = "1.0.41"
alloy-primitives = { version = "1.0.41", default-features = false, features = [
"getrandom",
] }
alloy-primitives = { version = "1.0.41", default-features = false, features = ["getrandom"] }
alloy-provider = "1.0.41"
alloy-rlp = "0.3.12"
alloy-rpc-types = { version = "1.0.41", features = ["engine"] }
alloy-rpc-types = { version = "1.0.41", features = ["engine", "mev"] }
alloy-signer = "1.0.41"
alloy-signer-local = "1.0.41"
alloy-transport = "1.0.41"
Expand All @@ -41,30 +39,28 @@ either = "1.15.0"
ethereum_ssz = "0.9.0"
eyre = "0.6.12"
futures = "0.3.31"
hickory-resolver = "=0.25.0-alpha.5" # Use the exact version reth expects
hickory-resolver = "=0.25.0-alpha.5" # Use the exact version reth expects
http = "1.3.1"
hyper = "1.5.2"
jsonrpsee = { version = "0.26", features = ["http-client", "macros", "server", "jsonrpsee-client-transport"] }
indexmap = "2.12"
jsonrpsee = { version = "0.26", features = ["http-client", "jsonrpsee-client-transport", "macros", "server"] }
metrics = "0.24.1"
metrics-exporter-prometheus = "0.16.2"
mio = { features = ["net", "os-poll"], version = "1.0.4" }
mio_httpc = { features = ["native"], version = "0.10.6" }
moka = "0.12.10"
op-alloy-consensus = { version = "0.22.0", default-features = false, features = [
"k256",
] }
op-alloy-consensus = { version = "0.22.0", default-features = false, features = ["k256"] }
op-alloy-flz = { version = "0.13.1", default-features = false }
op-alloy-network = "0.22.0"
op-alloy-rpc-types = "0.22.0"
op-alloy-rpc-types-engine = { version = "0.22.0", default-features = false, features = [
"serde",
] }
op-alloy-rpc-types-engine = { version = "0.22.0", default-features = false, features = ["serde"] }
op-revm = "12.0.1"
parking_lot = "0.12.3"
paste = "0.1.18"
quanta = "0.12.3"
rand = "0.9.0"
reqwest = { version = "0.12.12", features = ["blocking", "json"] }
wyhash = "0.6.0"

reth-chain-state = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-chain-state" }
reth-chainspec = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-chainspec" }
Expand All @@ -73,10 +69,12 @@ reth-consensus = { git = "https://github.com/gattaca-com/based-op-reth", rev = "
reth-db = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-db" }
reth-db-api = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-db-api" }
reth-db-common = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-db-common" }
reth-engine-tree = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-engine-tree" }
reth-evm = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-evm" }
reth-execution-errors = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-execution-errors" }
reth-engine-tree = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-engine-tree" }
reth-node-ethereum = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-node-ethereum", features = ["test-utils"] }
reth-node-ethereum = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-node-ethereum", features = [
"test-utils",
] }
reth-node-types = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-node-types" }
reth-optimism-chainspec = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-chainspec" }
reth-optimism-cli = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-cli" }
Expand All @@ -85,33 +83,31 @@ reth-optimism-evm = { git = "https://github.com/gattaca-com/based-op-reth", rev
reth-optimism-forks = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-forks" }
reth-optimism-node = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-node" }
reth-optimism-payload-builder = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-payload-builder" }
reth-optimism-txpool = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-txpool" }
reth-optimism-primitives = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-primitives" }
reth-optimism-txpool = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-optimism-txpool" }
reth-primitives = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-primitives" }
reth-primitives-traits = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-primitives-traits" }
reth-provider = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-provider", features = ["test-utils"] }
reth-provider = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-provider", features = [
"test-utils",
] }
reth-revm = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-revm" }
reth-rpc-builder = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-rpc-builder" }
reth-rpc-layer = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-rpc-layer" }
reth-stages-types = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-stages-types" }
reth-storage-api = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-storage-api" }
reth-storage-errors = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-storage-errors" }
reth-trie = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-trie" }
reth-trie-common = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-trie-common", features = ["test-utils"] }
reth-trie-common = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-trie-common", features = [
"test-utils",
] }
reth-trie-db = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-trie-db" }
reth-trie-parallel = { git = "https://github.com/gattaca-com/based-op-reth", rev = "b053849462eb48e61b24d965cfee59cead7f8a3b", package = "reth-trie-parallel" }

revm = { version = "31.0.1", features = [
"optional_balance_check",
"secp256k1",
"std",
], default-features = false }
revm = { version = "31.0.1", features = ["optional_balance_check", "secp256k1", "std"], default-features = false }
revm-handler = "12.0.0"
revm-inspector = "12.0.1"
revm-interpreter = "29.0.1"
revm-primitives = { version = "21.0.2", features = [
"std",
], default-features = false }
revm-primitives = { version = "21.0.2", features = ["std"], default-features = false }

rustc-hash = "2.0.0"
serde = { version = "1.0.217", features = ["derive"] }
Expand Down
8 changes: 2 additions & 6 deletions based/bin/gateway/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::sync::Arc;

use bop_common::{
actor::{Actor, ActorConfig},
communication::Spine,
Expand Down Expand Up @@ -88,12 +86,11 @@ fn run(mut args: GatewayArgs) -> eyre::Result<()> {
let gossip_signer_private_key = args.gossip_signer_private_key().map(|key| ECDSASigner::new(key).unwrap());

std::thread::scope(|s| {
let rt: Arc<Runtime> = tokio::runtime::Builder::new_current_thread()
let rt: Runtime = tokio::runtime::Builder::new_current_thread()
.worker_threads(10)
.enable_all()
.build()
.expect("failed to create runtime")
.into();
.expect("failed to create runtime");

if args.enable_metrics {
s.spawn(move || {
Expand All @@ -105,7 +102,6 @@ fn run(mut args: GatewayArgs) -> eyre::Result<()> {
}

s.spawn({
let rt = rt.clone();
start_rpc(&args, &spine, &rt, frag_broadcast_tx.clone(), args.da_config.clone());
move || rt.block_on(wait_for_signal())
});
Expand Down
14 changes: 13 additions & 1 deletion based/bin/overseer/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ use bop_common::{
walkie_talkie::{self, RpcResponse},
},
signing::ECDSASigner,
telemetry::{Telemetry, frag::Frag, order::Tx, system::SystemNotification},
telemetry::{
Telemetry,
frag::Frag,
order::{Bundle, Tx},
system::SystemNotification,
},
time::{Duration, TimingMessage},
typedefs::HashMap,
};
Expand Down Expand Up @@ -804,6 +809,13 @@ impl Data {
}
self.insert_transaction(key, t, tx_update);
}
Telemetry::Bundle(bundle_update) => {
if let Bundle::Included(included) = &bundle_update {
if let Some(frag) = self.frags.get_mut(&included.frag) {
frag.add_bundle(key, included.clone());
}
}
}
Telemetry::Frag(update) => {
self.insert_frag(t, key, update);
}
Expand Down
16 changes: 14 additions & 2 deletions based/bin/overseer/src/data/frag.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use bop_common::{
eth::MicroEth,
telemetry::{Frag, order::IncludedInFrag},
telemetry::{
Frag,
order::{BundleInclusion, TransactionInclusion},
},
time::Nanos,
};
use ratatui::text::Text;
Expand All @@ -14,6 +17,7 @@ pub struct FragData {
pub uuid: Uuid,
pub updates: Vec<(Nanos, Frag)>,
pub txs: Vec<Uuid>,
pub bundles: Vec<Uuid>,
pub payment: MicroEth,
pub gas_used: u64,
pub sim_time: Nanos,
Expand All @@ -28,13 +32,21 @@ impl FragData {
self.updates.push((t, update))
}

pub fn add_tx(&mut self, uuid: Uuid, included: IncludedInFrag) {
pub fn add_tx(&mut self, uuid: Uuid, included: TransactionInclusion) {
self.txs.push(uuid);
self.payment += included.payment;
self.gas_used += included.gas_used;
self.sim_time += included.sim_time;
}

pub fn add_bundle(&mut self, uuid: Uuid, included: BundleInclusion) {
self.bundles.push(uuid);
self.txs.extend(included.txs.iter().map(|tx| tx.0));
self.payment += included.payment();
self.gas_used += included.gas_used();
self.sim_time += included.sim_time();
}

pub fn block_table_header() -> impl ExactSizeIterator<Item = Text<'static>> {
["Timestamp", "Seq", "# T", "Payment", "Gas", "Simtime"].into_iter().map(|t| t.into())
}
Expand Down
4 changes: 2 additions & 2 deletions based/bin/overseer/src/data/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloy_primitives::{Address, B256};
use bop_common::{
telemetry::order::{IncludedInFrag, Ingested, Tx},
telemetry::order::{Ingested, TransactionInclusion, Tx},
time::{Duration, Nanos, Repeater},
};
use ratatui::{
Expand Down Expand Up @@ -35,7 +35,7 @@ impl TransactionData {
})
}

pub fn included_in_frags(&self) -> impl Iterator<Item = (&Nanos, &IncludedInFrag)> {
pub fn included_in_frags(&self) -> impl Iterator<Item = (&Nanos, &TransactionInclusion)> {
self.updates.iter().filter_map(|(t, u)| match u {
Tx::Included(included) => Some((t, included)),
_ => None,
Expand Down
Loading
Loading