Skip to content

Commit 532fe41

Browse files
authored
chore: add jovian fields to flashblocks (#45)
1 parent 00466e3 commit 532fe41

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/primitives.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ pub struct ExecutionPayloadFlashblockDeltaV1 {
6262
pub withdrawals: Vec<Withdrawal>,
6363
/// The withdrawals root of the block.
6464
pub withdrawals_root: B256,
65+
/// The blob gas used
66+
#[serde(
67+
default,
68+
skip_serializing_if = "Option::is_none",
69+
with = "rblib::alloy::serde::quantity::opt"
70+
)]
71+
pub blob_gas_used: Option<u64>,
6572
}
6673

6774
#[derive(Clone, Debug, PartialEq, Default, Deserialize, Serialize)]

src/publish.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use {
1717
parking_lot::RwLock,
1818
rblib::{
1919
alloy::{consensus::BlockHeader, eips::Encodable2718, primitives::U256},
20-
prelude::*,
20+
prelude::{ext::CheckpointOpExt, *},
2121
reth::node::builder::PayloadBuilderAttributes,
2222
},
2323
std::{io, net::TcpListener, sync::Arc, time::Instant},
@@ -101,6 +101,7 @@ impl Step<Flashblocks> for PublishFlashblock {
101101
// the block_base.
102102
// TODO: Consider moving this into its own step
103103
let base = self.block_base.write().take();
104+
let (_excess_blob_gas, blob_gas_used) = payload.blob_fields();
104105
let diff = ExecutionPayloadFlashblockDeltaV1 {
105106
state_root: sealed_block.block().state_root,
106107
receipts_root: sealed_block.block().receipts_root,
@@ -113,6 +114,7 @@ impl Step<Flashblocks> for PublishFlashblock {
113114
.block()
114115
.withdrawals_root()
115116
.expect("withdrawals_root is present"),
117+
blob_gas_used,
116118
};
117119

118120
let flashblock_number = payload.context();

0 commit comments

Comments
 (0)