Skip to content

Commit 6abc5ae

Browse files
authored
Add blob gas used to flashblocks delta (flashbots#325)
* Add blob gas used to delta * update rollup-boost * update rollup-boost tag
1 parent 6cd30b1 commit 6abc5ae

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ alloy-trie = { version = "0.9.1" }
162162
alloy-hardforks = "0.4.4"
163163

164164
# rollup-boost
165-
rollup-boost = { git = "http://github.com/flashbots/rollup-boost", tag = "v0.7.10" }
165+
rollup-boost = { git = "http://github.com/flashbots/rollup-boost", tag = "v0.7.11" }
166166

167167
# optimism
168168
alloy-op-evm = { version = "0.24.1", default-features = false }

crates/op-rbuilder/src/builders/flashblocks/payload.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,10 @@ where
298298

299299
// We log only every 100th block to reduce usage
300300
let span = if cfg!(feature = "telemetry")
301-
&& config.parent_header.number % self.config.sampling_ratio == 0
301+
&& config
302+
.parent_header
303+
.number
304+
.is_multiple_of(self.config.sampling_ratio)
302305
{
303306
span!(Level::INFO, "build_payload")
304307
} else {
@@ -1127,6 +1130,8 @@ where
11271130
block_number: ctx.parent().number + 1,
11281131
};
11291132

1133+
let (_, blob_gas_used) = ctx.blob_fields(info);
1134+
11301135
// Prepare the flashblocks message
11311136
let fb_payload = FlashblocksPayloadV1 {
11321137
payload_id: ctx.payload_id(),
@@ -1155,6 +1160,7 @@ where
11551160
transactions: new_transactions_encoded,
11561161
withdrawals: ctx.withdrawals().cloned().unwrap_or_default().to_vec(),
11571162
withdrawals_root: withdrawals_root.unwrap_or_default(),
1163+
blob_gas_used,
11581164
},
11591165
metadata: serde_json::to_value(&metadata).unwrap_or_default(),
11601166
};

0 commit comments

Comments
 (0)