Skip to content

Conversation

@mirgee
Copy link
Contributor

@mirgee mirgee commented Oct 29, 2025

This refactor replaces the maybeStateRootFuture mechanism with StateRootCommitter abstraction with implementation dependent on whether BALs are enabled or not, simplifying the persistence and block processing logic.

StateRootCommitter and StateRootCommitterFactory interfaces are introduced with default and BAL-aware implementations. StateRootCommitterFactory, defined by the current ProtocolSpec, creates a per-block StateRootCommitter, optionally launching a state root computation future. BonsaiWorldState#persist then delegates state root computation logic to the provided StateRootCommitter - either launching a synchronous state root computation or retrieving the pre-computed value.

@matkt matkt enabled auto-merge (squash) October 31, 2025 13:16
Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

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

I like this new implementation. Bal is better integrated into the block import logic.

@matkt matkt merged commit ee7a3de into hyperledger:main Oct 31, 2025
46 checks passed
@mirgee mirgee deleted the state-root-committer branch October 31, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants