From 7e9ef5f5fbfee0a29257052c3c1087f1d613d523 Mon Sep 17 00:00:00 2001 From: larchonte <126833829+larchonte@users.noreply.github.com> Date: Thu, 9 Oct 2025 19:39:08 +0200 Subject: [PATCH] Update subscription.rs --- crates/flashblocks-rpc/src/subscription.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/flashblocks-rpc/src/subscription.rs b/crates/flashblocks-rpc/src/subscription.rs index 750c9b0..c602ddc 100644 --- a/crates/flashblocks-rpc/src/subscription.rs +++ b/crates/flashblocks-rpc/src/subscription.rs @@ -34,12 +34,24 @@ pub struct Metadata { pub block_number: u64, } +/// The canonical in-memory representation of a flashblock notification +/// +/// A flashblock describes a delta over an execution payload (and optionally the +/// full base payload) plus structured metadata. +/// +/// - `base` may be `None` when only deltas are supplied. +/// - `diff` carries the incremental changes on top of the base payload. #[derive(Debug, Clone)] pub struct Flashblock { + /// Identifier assigned by the engine for the target payload. pub payload_id: PayloadId, + /// Monotonic index of this delta within the flashblock stream for the payload. pub index: u64, + /// Optional base payload (present when upstream chooses to include it). pub base: Option, + /// Delta that mutates state relative to `base` or previous deltas. pub diff: ExecutionPayloadFlashblockDeltaV1, + /// Parsed metadata such as receipts and balance updates. pub metadata: Metadata, }