Skip to content

HIP-1056: Block Streams #1056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
May 20, 2025
Merged

HIP-1056: Block Streams #1056

merged 36 commits into from
May 20, 2025

Conversation

rbair23
Copy link
Contributor

@rbair23 rbair23 commented Oct 1, 2024

Abstract

This HIP introduces a new output data format for consensus nodes, called Block Streams, that replaces the existing
event streams, record streams, state files, and signature files with one single stream.
Each block within the block stream is a self-contained entity, including every event and all transactions that were
part of the block, the state changes as a result of those transactions, and a
network signature (using a BLS threshold signature scheme we call TSS) that proves the block was signed by a
threshold of the network.

By including state changes, downstream services can seamlessly maintain and verify state alongside consensus nodes. This
enhancement fosters greater transparency and trust within the Hedera network. Any downstream service can independently
rebuild and verify the state of consensus nodes at the time of the block, verified by the TSS network signature. Using
this state, they can provide additional services such as state proofs, state snapshots, and more.

With the event information within blocks, downstream services can be reconstructed and the hashgraph algorithm replayed,
permitting anyone to verify the correct execution of the consensus algorithm and removes the need for the extra event
stream. In doing so Hedera users gain comprehensive visibility into network activities through an easily consumable
format that can be delivered with low latency.

A key design criteria is for the block stream to be easily consumed by any programming language, and with minimal
complexity or dependencies. For example, state data can be utilized for basic queries without having to reconstruct a
merkle tree.

Block streams are an upgrade to the existing RecordStream V6. Block streams restructure and aggregate the multiple
record types in record streams, including EventStream, RecordStream, and Hedera state data to produce a single
unified stream of items.

The key enhancements offered by block streams include:

  • Unified Data Stream: Block stream consolidates event streams, record streams, sidecars, and signature files into a
    single cohesive data stream.
  • State Change Data: Each block will include state change data for the given round of consensus.
  • Verifiable Proof: Each block will be independently verifiable, containing a full proof of transactions, network
    consensus and state changes.
  • Comprehensive Protobuf specification By defining blocks in protobuf, the inputs, outputs, and state changes of
    consensus nodes are clearly specified, paving the way for future implementations and greater client diversity.

With the adoption of block streams, data output by Hedera consensus nodes will be consolidated into a single, verifiable
chronicle of the network, thereby strengthening the integrity and transparency of the Hedera ecosystem.

Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
@rbair23 rbair23 requested a review from mgarbs as a code owner October 1, 2024 20:21
Copy link

netlify bot commented Oct 1, 2024

Deploy Preview for hedera-hips ready!

Name Link
🔨 Latest commit 5e49ad5
🔍 Latest deploy log https://app.netlify.com/sites/hedera-hips/deploys/67e3ff093b6b270008ecdd91
😎 Deploy Preview https://deploy-preview-1056--hedera-hips.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

rbair23 and others added 2 commits October 1, 2024 13:21
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
@rbair23 rbair23 changed the title Block Streams HIP-1056: Block Streams Oct 1, 2024
@rbair23 rbair23 marked this pull request as draft October 1, 2024 20:25
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
@Nana-EC Nana-EC self-assigned this Oct 15, 2024
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
Copy link
Contributor

@jsync-swirlds jsync-swirlds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few typos and wording suggestions.

Copy link
Contributor

@poulok poulok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got to Design for Verifiability. Will finish the rest when I can.

@derektriley
Copy link
Contributor

Should this HIP at all mention/reference the behaviors around consensus node to block node communication? Will this information be covered in the block node HIP?

Copy link
Contributor

@poulok poulok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got further, but still not done.

@jsync-swirlds
Copy link
Contributor

Should this HIP at all mention/reference the behaviors around consensus node to block node communication? Will this information be covered in the block node HIP?

This is currently documented in the block node codebase, and should be included, to the extent appropriate, in the forthcoming "Block Node" HIP. That HIP will cover all of the Block Node APIs, not just the publishBlockStream API used by consensus nodes.

@Nana-EC
Copy link
Contributor

Nana-EC commented Apr 16, 2025

Hi everyone,

I hope this message finds you in good spirits. We've definitely made progress on this PR, so great job! However, I've noticed there are still about 280 discussions that need to be resolved.

Given the importance of this PR, it's crucial that we address these concerns and move forward. I encourage everyone to revisit these discussions and extract the necessary actions to resolve them.

I'd like to extend my thanks and appreciation to all of you for your relentless effort and high-quality insights. Together, we're making our project better. Let's continue resolving these discussions so we can push towards our goal. Remember, every contribution makes a difference and sets us one step closer to the finish line.

Have a productive day!

Best regards, Michael

@jasperpotts @edwin-greene @IvanKavaldzhiev @jsync-swirlds @Nana-EC @poulok @tinker-michaelj @derektriley @tinker-michaelj @xin-hedera @steven-sheehy @jasperpotts

Addressing a lot of these in the next 1-2 weeks.
Started with #1173

Update HIP with details of
- Update `EventDescriptor` index replacement with correct integer size
- Add identical bool flag that can be used to highlight that a state change wrote the same value for a given entity, in which case the `MapChangeValue` value can be optimized
- Update block proof description with 8 leaf logic
- Add `TraceData` block item to capture trace data, initially smart contract `EVMTraceData` only. Also update description and protobuf
- Update Smart Contract Service protobuf with optimization and simplification of output using an `EVMActivity`
- Update images with changes to block streams items and merkle trees

Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
@mgarbs mgarbs force-pushed the block-streams branch 2 times, most recently from f40d3ef to eeb9e68 Compare May 19, 2025 23:28
@Nana-EC Nana-EC requested a review from steven-sheehy May 20, 2025 01:08
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Joseph S <121976561+jsync-swirlds@users.noreply.github.com>
@mgarbs mgarbs marked this pull request as ready for review May 20, 2025 01:21
@mgarbs mgarbs requested a review from a team as a code owner May 20, 2025 01:21
mgarbs
mgarbs previously approved these changes May 20, 2025
@mgarbs mgarbs requested a review from a team as a code owner May 20, 2025 02:00
@mgarbs mgarbs requested review from leninmehedy and removed request for jasperpotts and edwin-greene May 20, 2025 02:00
mgarbs
mgarbs previously approved these changes May 20, 2025
Signed-off-by: Michael Garber <michael.garber@hashgraph.com>
@mgarbs mgarbs dismissed steven-sheehy’s stale review May 20, 2025 11:19

All conversations appear to be resolved. If they are not, we will continue the discussion on this page after the merge

@mgarbs mgarbs merged commit 3e79785 into main May 20, 2025
10 of 12 checks passed
@mgarbs mgarbs deleted the block-streams branch May 20, 2025 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.