Skip to content

central_systest_blobs: implement block production, given txs#13966

Merged
dorimedini-starkware merged 1 commit intomainfrom
04-30-central_systest_blobs_implement_block_production_given_txs
May 8, 2026
Merged

central_systest_blobs: implement block production, given txs#13966
dorimedini-starkware merged 1 commit intomainfrom
04-30-central_systest_blobs_implement_block_production_given_txs

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator Author

dorimedini-starkware commented May 5, 2026

@cursor
Copy link
Copy Markdown

cursor Bot commented May 5, 2026

PR Summary

Medium Risk
Adds non-trivial block execution/commitment and block-hash calculation logic in a regression-test data generator; correctness depends on multiple consensus-critical libraries (blockifier/committer), though the changes are limited to test utilities.

Overview
Implements BlobFactory::close_block to actually produce a finalized block from the queued transactions: executes txs via TransactionExecutor, applies writes to the in-memory state, commits the resulting state diff to committer storage, and computes block commitments + the final block hash before appending a new BlockData entry.

Updates the systest blob crate dependencies to enable blockifier reexecution support and adds starknet_transaction_prover for committing state diffs used during block production.

Reviewed by Cursor Bugbot for commit aecc100. Bugbot is set up for automated code reviews on this repo. Configure here.

@dorimedini-starkware dorimedini-starkware self-assigned this May 5, 2026
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_block_production_given_txs branch from c72a3dc to 31f9d81 Compare May 5, 2026 11:56
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-blockifier_implement_conversion_from_commitment_state_diff_to_state_maps branch from d63278f to 6c9bcb1 Compare May 5, 2026 11:56
Copy link
Copy Markdown
Contributor

@nimrod-starkware nimrod-starkware left a comment

Choose a reason for hiding this comment

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

@nimrod-starkware partially reviewed 3 files and made 5 comments.
Reviewable status: 2 of 3 files reviewed, 5 unresolved discussions (waiting on dorimedini-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 57 at r1 (raw file):

use starknet_api::executable_transaction::{
    AccountTransaction as ExecutableAccountTx,
    DeclareTransaction as ExecutableDeclareTransaction,

Suggestion:

DeclareTransaction as ExecutableDeclareTx

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 85 at r1 (raw file):

use starknet_committer::db::forest_trait::StorageInitializer;
use starknet_patricia_storage::map_storage::MapStorage;
use starknet_transaction_prover::running::committer_utils::commit_state_diff;

consider moving commit_state_diff into the starknet_committer crate. (not in this PR)
I don't think the depndency in starknet_transaction_prover makes sense here...

Code quote:

use starknet_transaction_prover::running::committer_utils::commit_state_diff;

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 156 at r1 (raw file):

    /// Executes the unblocked transactions and applies the changes to the state.
    /// Any subsequent tx added will end up in the next block.

Suggestion:

    /// Executes the unblocked transactions and applies the changes to the state.
    /// Any subsequent transaction added will end up in the next block.

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 197 at r1 (raw file):

                execution_info,
            });
        }

same as few PR's before.
shouldn't self.next_txs be consumed using std::mem::take?

Code quote:

        for (executable, internal) in self.next_txs.iter() {
            let (execution_info, _state_changes) = executor
                .execute(&BlockifierTx::new_for_sequencing(ExecutableTx::Account(
                    executable.clone(),
                )))
                .unwrap();
            assert!(!execution_info.is_reverted(), "Got a reverted tx: {execution_info:?}");

            transactions_with_receipts.push(InternalTransactionWithReceipt {
                transaction: internal.clone(),
                execution_info,
            });
        }

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 255 at r1 (raw file):

            state_roots,
        });
        self.next_txs.clear();

see above comment re this.

Code quote:

self.next_txs.clear();

@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_block_production_given_txs branch from 31f9d81 to b86febd Compare May 5, 2026 12:31
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware made 5 comments.
Reviewable status: 2 of 3 files reviewed, 5 unresolved discussions (waiting on nimrod-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 85 at r1 (raw file):

Previously, nimrod-starkware wrote…

consider moving commit_state_diff into the starknet_committer crate. (not in this PR)
I don't think the depndency in starknet_transaction_prover makes sense here...

not sure why this was moved to the prover crate, but we will probably need to depend on this crate soon anyway: need to create a proof-tx to complete the system test blobs


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 197 at r1 (raw file):

Previously, nimrod-starkware wrote…

same as few PR's before.
shouldn't self.next_txs be consumed using std::mem::take?

Done.


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 255 at r1 (raw file):

Previously, nimrod-starkware wrote…

see above comment re this.

Done.


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 156 at r1 (raw file):

    /// Executes the unblocked transactions and applies the changes to the state.
    /// Any subsequent tx added will end up in the next block.

Done.


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 57 at r1 (raw file):

use starknet_api::executable_transaction::{
    AccountTransaction as ExecutableAccountTx,
    DeclareTransaction as ExecutableDeclareTransaction,

Done.

Copy link
Copy Markdown
Contributor

@nimrod-starkware nimrod-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@nimrod-starkware reviewed 1 file and all commit messages, made 2 comments, and resolved 5 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 85 at r1 (raw file):

Previously, dorimedini-starkware wrote…

not sure why this was moved to the prover crate, but we will probably need to depend on this crate soon anyway: need to create a proof-tx to complete the system test blobs

oh ok, nvm

@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_block_production_given_txs branch from b86febd to eb6a3de Compare May 5, 2026 14:17
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-blockifier_implement_conversion_from_commitment_state_diff_to_state_maps branch from 502ad26 to ac58318 Compare May 5, 2026 14:17
@graphite-app graphite-app Bot changed the base branch from 04-30-blockifier_implement_conversion_from_commitment_state_diff_to_state_maps to graphite-base/13966 May 6, 2026 07:31
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_block_production_given_txs branch from eb6a3de to f5aa05a Compare May 8, 2026 10:23
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

@graphite-app graphite-app Bot changed the base branch from graphite-base/13966 to main May 8, 2026 10:24
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 8, 2026

Merge activity

  • May 8, 10:24 AM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f5aa05a. Configure here.

Comment thread crates/central_systest_blobs/src/cende_blob_regression_test.rs
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_block_production_given_txs branch from f5aa05a to aecc100 Compare May 8, 2026 13:49
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

@dorimedini-starkware reviewed 2 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on yoavGrs).

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit 7595ce7 May 8, 2026
40 checks passed
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.

3 participants