Skip to content
Merged
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
3,623 changes: 1,371 additions & 2,252 deletions Cargo.lock

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ members = [
rollup-boost = { path = "crates/rollup-boost" }

tracing = "0.1.4"
tracing-subscriber = { version = "0.3.11", features = ["env-filter", "json"] }
tracing-subscriber = { version = "0.3.20", features = ["env-filter", "json"] }
clap = { version = "4", features = ["derive", "env"] }
futures = "0.3.31"
thiserror = "2.0.11"
Expand All @@ -25,24 +25,24 @@ url = "2.2.0"
sha2 = { version = "0.10", default-features = false }

# Reth deps
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }

# Alloy libraries
alloy-rpc-types-engine = "1.0.23"
alloy-rpc-types-eth = "1.0.23"
alloy-rpc-types-engine = "1.0.30"
alloy-rpc-types-eth = "1.0.30"
alloy-primitives = { version = "1.2.0", features = ["rand"] }
alloy-serde = "1.0.23"
alloy-eips = "1.0.23"
alloy-json-rpc = "1.0.23"
alloy-consensus = "1.0.23"
alloy-rpc-types = "1.0.23"
alloy-genesis = "1.0.23"
alloy-rpc-client = "1.0.23"
alloy-provider = "1.0.23"
op-alloy-network = "0.18.7"
op-alloy-rpc-types-engine = "0.18.7"
op-alloy-consensus = "0.18.7"
op-alloy-rpc-types = "0.18.7"
alloy-serde = "1.0.30"
alloy-eips = "1.0.30"
alloy-json-rpc = "1.0.30"
alloy-consensus = "1.0.30"
alloy-rpc-types = "1.0.30"
alloy-genesis = "1.0.30"
alloy-rpc-client = "1.0.30"
alloy-provider = "1.0.30"
op-alloy-network = "0.19.1"
op-alloy-rpc-types-engine = "0.19.1"
op-alloy-consensus = "0.19.1"
op-alloy-rpc-types = "0.19.1"
tokio-tungstenite = { version = "0.26.2", features = ["native-tls"] }
testcontainers = "0.23"
testcontainers-modules = { version = "0.11", features = ["redis"] }
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Based on https://depot.dev/blog/rust-dockerfile-best-practices
#
FROM rust:1.87.0 AS base
FROM rust:1.88.0 AS base

ARG FEATURES
ARG RELEASE=true
Expand Down
1 change: 0 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ build-debug:
docker buildx build --build-arg RELEASE=false -t flashbots/rollup-boost:develop .

kurtosis-spawn:
# Pinning to this commit until https://github.com/ethpandaops/optimism-package/issues/349 is fixed
kurtosis run github.com/ethpandaops/optimism-package@452133367b693e3ba22214a6615c86c60a1efd5e --args-file ./scripts/ci/kurtosis-params.yaml --enclave op-rollup-boost
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,21 @@ To run rollup-boost in an op-stack devnet first make sure you have [just](https:
Then run the following command to start the devnet:

```sh
just devnet-up
just kurtosis-devnet-up
```

To stop the devnet run:

```sh
just devnet-down
just kurtosis-devnet-down
```

To run a stress test against the devnet with [contender](https://github.com/flashbots/contender) first make sure you have docker installed.

Then run the following command:

```sh
just stress-test
just kurtosis-stress-test
```

## License
Expand Down
40 changes: 20 additions & 20 deletions crates/flashblocks-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ license = "MIT"
[dependencies]
rollup-boost.workspace = true

reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0", features = [
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0", features = [
"test-utils",
] }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.5.0" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.7.0" }

alloy-eips.workspace = true
alloy-primitives.workspace = true
Expand All @@ -54,7 +54,7 @@ metrics-derive.workspace = true
serde_json.workspace = true
serde.workspace = true

jsonrpsee = { version = "0.25.1" }
jsonrpsee = { version = "0.26.0" }
futures-util = "0.3.31"
brotli = "8.0.1"
arc-swap = "1.7.1"
Expand Down
45 changes: 34 additions & 11 deletions crates/flashblocks-rpc/src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use alloy_consensus::BlockHeader;
use alloy_consensus::Transaction as _;
use alloy_consensus::TxReceipt;
use alloy_consensus::transaction::SignerRecoverable;
use alloy_consensus::transaction::TransactionMeta;
use alloy_primitives::{Address, Sealable, TxHash, U256};
Expand All @@ -11,16 +13,19 @@ use op_alloy_rpc_types::OpTransactionReceipt;
use op_alloy_rpc_types::Transaction;
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_evm::extract_l1_info;
use reth_optimism_primitives::OpPrimitives;
use reth_optimism_primitives::{OpBlock, OpReceipt, OpTransactionSigned};
use reth_optimism_rpc::OpReceiptBuilder;
use reth_primitives::Recovered;
use reth_primitives_traits::block::body::BlockBody;

use reth_rpc_eth_api::transaction::ConvertReceiptInput;
use reth_rpc_eth_api::{RpcBlock, RpcReceipt};
use rollup_boost::{
FlashblockBuilder, FlashblocksPayloadV1, OpExecutionPayloadEnvelope, PayloadVersion,
};
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
use std::{collections::HashMap, str::FromStr, sync::Arc};

#[derive(Debug, Deserialize, Serialize, Clone, Default)]
Expand Down Expand Up @@ -199,25 +204,43 @@ impl FlashblocksCacheInner {
// The first transaction in an Op block is the L1 info transaction.
let mut l1_block_info =
extract_l1_info(&block.body).expect("failed to extract l1 info");
let block_number = block.number();
let base_fee = block.base_fee_per_gas();
let block_hash = block.hash_slow();
let excess_blob_gas = block.excess_blob_gas();
let timestamp = block.timestamp();
let mut gas_used = 0;
let mut next_log_index = 0;

// build the receipts
for (indx, tx) in block.body.transactions.iter().enumerate() {
let receipt = all_receipts
.get(indx)
.expect("Receipt should exist for transaction");
let meta = TransactionMeta {
tx_hash: tx.tx_hash(),
index: indx as u64,
block_hash,
block_number,
base_fee,
excess_blob_gas,
timestamp,
};
let input: ConvertReceiptInput<'_, OpPrimitives> = ConvertReceiptInput {
receipt: Cow::Borrowed(receipt),
tx: tx.try_to_recovered_ref()?,
gas_used: receipt.cumulative_gas_used() - gas_used,
next_log_index,
meta,
};

let meta = TransactionMeta::default();
gas_used = receipt.cumulative_gas_used();
next_log_index += receipt.logs().len();

let rpc_receipt = OpReceiptBuilder::new(
&self.chain_spec.clone(),
tx,
meta,
receipt,
&all_receipts,
&mut l1_block_info,
)
.expect("failed to build receipt")
.build();
let rpc_receipt =
OpReceiptBuilder::new(&self.chain_spec.clone(), input, &mut l1_block_info)
.expect("failed to build receipt")
.build();

self.receipts_cache
.insert(tx.tx_hash(), rpc_receipt.clone());
Expand Down
4 changes: 2 additions & 2 deletions crates/rollup-boost/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ tokio-util = { version = "0.7.13" }
[dev-dependencies]
rand = "0.9.0"
time = { version = "0.3.36", features = ["macros", "formatting", "parsing"] }
op-alloy-consensus = "0.17.2"
op-alloy-consensus.workspace = true
alloy-eips = { version = "1.0.9", features = ["serde"] }
alloy-consensus = { version = "1.0.9", features = ["serde"] }
alloy-consensus = { workspace = true, features = ["serde"] }
anyhow = "1.0"
assert_cmd = "2.0.10"
predicates = "3.1.2"
Expand Down
2 changes: 1 addition & 1 deletion crates/websocket-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.85 AS builder
FROM rust:1.88 AS builder

WORKDIR /app

Expand Down
33 changes: 0 additions & 33 deletions docs/local-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,6 @@ To run a local development network, you can use either Kurtosis or docker compos

Kurtosis is a tool to manage containerized services. To run the devnet with Kurtosis, you can follow the instructions first to [install kurtosis](https://docs.kurtosis.com/quickstart).

Then to run the devnet:

```bash
kurtosis run github.com/ethpandaops/optimism-package '{
"optimism_package": {
"chains": [
{
"participants": [
{
"el_type": "op-geth"
}
],
"network_params": {
"name": "op-rollup-one"
},
"additional_services": [
"rollup-boost"
]
}
]
}
}'
```

You can input your own configuration for the network. Available options are:

- `el_builder_type` - builder execution engine client to be run.
- `el_builder_image` - the docker image used to run the builder
- `mev_params`:
- `rollup_boost_image` - the docker image used to run rollup boost
- `builder_host` - the host to an external builder on outside of kurtosis
- `builder_port` - the port to an external builder on outside of kurtosis

See the [optimism package](https://github.com/ethpandaops/optimism-package/blob/main/README.md#configuration) for the full set of configuration options.

To clean up the devnet, you can run:
Expand Down
10 changes: 8 additions & 2 deletions scripts/ci/kurtosis-params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ optimism_package:
image: "flashbots/rollup-boost:develop"
additional_services:
- rollup-boost
op_contract_deployer_params:
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-deployer:v0.4.0-rc.2
l1_artifacts_locator: https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-02024c5a26c16fc1a5c716fff1c46b5bf7f23890d431bb554ddbad60971211d4.tar.gz
l2_artifacts_locator: https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-02024c5a26c16fc1a5c716fff1c46b5bf7f23890d431bb554ddbad60971211d4.tar.gz

ethereum_package:
participants:
- el_type: geth
cl_type: teku
- el_type: geth
cl_type: lighthouse
cl_image: "ethpandaops/lighthouse:stable-e21198c"
network_params:
preset: minimal
genesis_delay: 5
Expand Down
Loading