Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Build artifacts
target/

# Git
.git/
.gitignore

# IDE
.idea/
.vscode/
*.swp
*.swo

# Documentation
*.md
!crates/*/Cargo.toml

# CI/CD
.github/

# Miscellaneous
.DS_Store
18 changes: 9 additions & 9 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-nightly-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-rust-nightly-fmt-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Rust Nightly
uses: actions-rs/toolchain@v1
with:
Expand All @@ -41,15 +41,15 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-rust-stable-clippy-all-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- name: Run Clippy with stable
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

clippy-no-default:
name: Clippy (no default features)
Expand All @@ -63,15 +63,15 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-rust-stable-clippy-nodefault-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- name: Run Clippy with stable
run: cargo clippy --all-targets --no-default-features -- -D warnings
run: cargo clippy --workspace --all-targets --no-default-features -- -D warnings

typos:
name: Typos
Expand All @@ -96,14 +96,14 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-rust-stable-test-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Rust Stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Run tests with stable
run: cargo test --all-targets --all-features
run: cargo test --workspace --lib --bins --tests --examples --all-features

doc:
name: Docs
Expand All @@ -117,7 +117,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-rust-stable-doc-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Rust Stable
uses: actions-rs/toolchain@v1
with:
Expand All @@ -126,4 +126,4 @@ jobs:
- name: Build documentation
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --document-private-items --all-features --examples
run: cargo doc --workspace --no-deps --document-private-items --all-features --examples
170 changes: 50 additions & 120 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[workspace]
members = [
".", # The main rblib library
"src/pipelines/macros",
"src/test_utils/macros",
]
resolver = "2"

[workspace.package]
version = "0.4.1"
edition = "2024"
rust-version = "1.91"
rust-version = "1.92"
license = "MIT"
homepage = "https://github.com/flashbots/rblib"
repository = "https://github.com/flashbots/rblib"
authors = ["Flashbots <info@flashbots.net>", "Karim Agha <karim@flashbots.net>"]
authors = ["Flashbots <info@flashbots.net>", "Karim Agha <karim@flashbots.net>", "Jules Doumeche <jules@flashbots.net>"]
exclude = [".github/"]

[workspace]
members = [
"crates/rblib",
"crates/core",
"crates/pipeline",
"crates/pipeline-macros",
"crates/test-utils-macros",
]
resolver = "2"

[workspace.lints.rust]
type_alias_bounds = "allow"
unreachable_pub = "warn"
Expand All @@ -33,73 +35,8 @@ cast_precision_loss = "allow"
[workspace.metadata.scripts]
lint = "cargo clippy --all-targets -- -D warnings"

[package]
name = "rblib"
description = "Modular SDK for building ethereum block builders."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
authors.workspace = true
exclude.workspace = true

[lib]
doctest = false

[features]
default = ["optimism", "jemalloc"]

jemalloc = [
"dep:tikv-jemallocator",
"reth-origin/jemalloc",
"reth-optimism-cli?/jemalloc",
]

jemalloc-prof = [
"jemalloc",
"tikv-jemallocator?/profiling",
"reth-origin/jemalloc-prof",
]

optimism = [
"op-alloy",
"op-alloy-rpc-types-engine",
"reth-optimism-node",
"reth-optimism-chainspec",
"reth-optimism-forks",
"reth-optimism-primitives",
"reth-optimism-txpool",
"reth-optimism-rpc",
"reth-optimism-consensus",
"reth-optimism-evm",
"reth-node-builder/op",
"reth-payload-util",
"reth-optimism-cli",
"rblib-tests-macros?/optimism",
]

test-utils = [
"nanoid",
"tokio/full",
"alloy-genesis",
"reth-ipc",
"reth-ethereum/test-utils",
"reth-optimism-rpc/client",
"rblib-tests-macros",
"jsonrpsee-core",
"tracing-subscriber",
"ctor",
]

long-pipelines-syntax = []

[dependencies]
# internal dependencies
pipelines-macros = { path = "src/pipelines/macros" }

# Common dependencies
[workspace.dependencies]
# Common
itertools = "0.14"
eyre = "0.6"
thiserror = "2.0"
Expand All @@ -118,16 +55,13 @@ metrics = "0.24.0"
priority-queue = "2.0.0"
rand = "0.9"

# Alloy dependencies
alloy-origin = { version = "1.0.41", package = "alloy", features = [
"k256",
"rpc-types-mev",
] }
# Alloy
alloy-origin = { version = "1.0.41", package = "alloy", features = ["k256", "rpc-types-mev"] }
alloy-evm = "0.23.0"
alloy-serde = "1.0.41"
alloy-json-rpc = "1.0.41"

# Reth dependencies
# Reth
reth-origin = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", package = "reth" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
Expand All @@ -137,10 +71,7 @@ reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", features = [
"node",
"evm",
] }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", features = ["node", "evm"] }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
Expand All @@ -150,48 +81,47 @@ reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-network = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-node-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }

# Revm dependencies
# Revm
revm-database = "9.0"

# Reth-optimism dependencies (optional)
op-alloy = { version = "0.22.4", features = ["full"], optional = true }
op-alloy-rpc-types-engine = { version = "0.22.4", default-features = false, optional = true }
# Reth-optimism
op-alloy = { version = "0.22.4", features = ["full"] }
op-alloy-rpc-types-engine = { version = "0.22.4", default-features = false }
op-alloy-flz = "0.13.1"
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3", optional = true }

# test-utils
rblib-tests-macros = { path = "src/test_utils/macros", optional = true }
jsonrpsee-core = { version = "0.26.0", optional = true, features = ["client"] }
nanoid = { version = "0.4", optional = true }
alloy-genesis = { version = "1.0", default-features = false, optional = true }
ctor = { version = "0.5", optional = true }
tracing-subscriber = { version = "0.3.20", features = [
"env-filter",
"json",
], optional = true }

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { version = "0.6", optional = true }

[dev-dependencies]
rblib = { path = ".", features = ["test-utils"] }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }

[lints]
workspace = true
# test-utils
criterion = { version = "0.8", features = ["html_reports"] }
gungraun = "0.17.0"
jsonrpsee-core = { version = "0.26.0", features = ["client"] }
nanoid = "0.4"
alloy-genesis = { version = "1.0", default-features = false }
ctor = "0.5"
tracing-subscriber = { version = "0.3.20", features = ["env-filter", "json"] }

# unix-only allocator
tikv-jemallocator = "0.6"

# macro
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "2.0", features = ["full"] }
proc-macro-crate = "3.3.0"
Loading
Loading