Skip to content

Commit 813a074

Browse files
authored
Clickhouse backup on rbuilder-utils (#117)
Created a new crate on rbuilder and moved the clickhouse back stuff and some other basic things there. This PR should go after we merge flashbots/rbuilder#780
1 parent 07c4e33 commit 813a074

File tree

20 files changed

+352
-2648
lines changed

20 files changed

+352
-2648
lines changed

Cargo.lock

Lines changed: 136 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ revm-primitives = { version = "20.2.1", default-features = false }
1919
revm-interpreter = { version = "25.0.2", default-features = false }
2020

2121
# rbuilder
22-
rbuilder-primitives = { git = "https://github.com/flashbots/rbuilder", rev = "a21de88" }
22+
rbuilder-primitives = { git = "https://github.com/flashbots/rbuilder", rev = "332b00ceeb960cfa27278c020f0f8b299f928982" }
23+
rbuilder-utils = { git = "https://github.com/flashbots/rbuilder", rev = "332b00ceeb960cfa27278c020f0f8b299f928982", features = ["test-utils"] }
24+
25+
2326

2427
# rt
2528
tokio = { version = "1", default-features = false, features = [

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
22
channel = "stable"
3-
version = "1.89.0"
3+
version = "1.89.0"

src/cli.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ use std::path::PathBuf;
33
use alloy_primitives::Address;
44
use alloy_signer_local::PrivateKeySigner;
55
use clap::{Args, Parser, ValueHint};
6+
use rbuilder_utils::clickhouse::indexer::{
7+
default_disk_backup_database_path, MAX_DISK_BACKUP_SIZE_BYTES, MAX_MEMORY_BACKUP_SIZE_BYTES,
8+
};
69

710
use crate::{
8-
indexer::{
9-
click::{
10-
default_disk_backup_database_path, MAX_DISK_BACKUP_SIZE_BYTES,
11-
MAX_MEMORY_BACKUP_SIZE_BYTES,
12-
},
13-
BUNDLE_RECEIPTS_TABLE_NAME, BUNDLE_TABLE_NAME,
14-
},
11+
indexer::{BUNDLE_RECEIPTS_TABLE_NAME, BUNDLE_TABLE_NAME},
1512
SystemBundleDecoder,
1613
};
1714

src/forwarder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use crate::{
1212
UtcInstant, WithEncoding,
1313
},
1414
priority::{pchannel, Priority},
15-
tasks::TaskExecutor,
1615
utils::UtcDateTimeHeader as _,
1716
};
1817
use alloy_primitives::Address;
@@ -22,6 +21,7 @@ use axum::http::HeaderValue;
2221
use dashmap::DashMap;
2322
use futures::{stream::FuturesUnordered, StreamExt};
2423
use hyper::{header::CONTENT_TYPE, HeaderMap, StatusCode};
24+
use rbuilder_utils::tasks::TaskExecutor;
2525
use reqwest::Url;
2626
use revm_primitives::keccak256;
2727
use serde_json::json;
@@ -68,7 +68,7 @@ impl IngressForwarders {
6868
}
6969

7070
/// Broadcast bundle to all forwarders.
71-
pub fn broadcast_bundle(&self, bundle: SystemBundle) {
71+
pub(crate) fn broadcast_bundle(&self, bundle: SystemBundle) {
7272
let encoded_bundle = bundle.encode();
7373

7474
// Create local request first

0 commit comments

Comments
 (0)