Skip to content

central_systest_blobs: implement blob creation from blocks#13967

Merged
dorimedini-starkware merged 1 commit into
mainfrom
04-30-central_systest_blobs_implement_blob_creation_from_blocks
May 8, 2026
Merged

central_systest_blobs: implement blob creation from blocks#13967
dorimedini-starkware merged 1 commit into
mainfrom
04-30-central_systest_blobs_implement_blob_creation_from_blocks

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
Implements real blob/commitment construction logic used by regression tests; mistakes could produce incorrect commitments or blob contents and cause flaky/invalid test fixtures.

Overview
Implements end-to-end blob generation in cende_blob_regression_test.rs by converting finalized BlockData into BlobParameters (including proposal/parent commitments and recent block hashes) and creating AerospikeBlobs via a shared MockClassManagerClient.

finalize() now returns a populated blobs vector for all closed blocks (instead of an empty placeholder) and refactors preconfirmed-block creation to take explicit context/state/tx inputs while improving parent-hash tracking during block closure.

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

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 c0d0ac9. 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_blob_creation_from_blocks branch from c0d0ac9 to 0e56d10 Compare May 5, 2026 11:18
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 resolved 1 discussion.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on nimrod-starkware and yoavGrs).

@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_blob_creation_from_blocks branch from 0e56d10 to 99fd2d7 Compare May 5, 2026 11:56
@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
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 made 4 comments.
Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on dorimedini-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 132 at r2 (raw file):

impl From<BlockData> for BlobParameters {
    /// If this is not the first block, also sets the parent proposal commitment and populates the
    /// recent block hashes with the last block hash (of the previous block).

Suggestion:

    /// If this is not the first block, also sets the parent proposal commitment and populates the
    /// recent block hashes only with the hash of the previous block.

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 134 at r2 (raw file):

    /// recent block hashes with the last block hash (of the previous block).
    fn from(block: BlockData) -> Self {
        let commitment_state_diff = CommitmentStateDiff::from(block.state_maps.clone());

works?

Suggestion:

let commitment_state_diff = CommitmentStateDiff::from(block.state_maps);

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 163 at r2 (raw file):

        };

        BlobParameters {

Suggestion:

 Self {

crates/central_systest_blobs/src/cende_blob_regression_test.rs line 475 at r2 (raw file):

            transaction_receipts.push(Some(receipt));
            transaction_state_diffs.push(Some(tx_state_diff));
        }

The changes of these txs are not applied on the state (not even between txs), is this intentional?

Code quote:

        for (tx_index, (executable, internal)) in txs.into_iter().enumerate() {
            let tx_hash = match &internal {
                InternalConsensusTransaction::RpcTransaction(tx) => tx.tx_hash,
                InternalConsensusTransaction::L1Handler(_) => {
                    panic!("unexpected L1Handler in test")
                }
            };

            let mut tx_state = CachedState::new(state.clone());
            let execution_info = BlockifierAccountTx::new_for_sequencing(executable)
                .execute(&mut tx_state, &block_context)
                .unwrap();

            let state_changes = tx_state.to_state_diff().unwrap();

            let receipt = StarknetClientTransactionReceipt::from((
                tx_hash,
                TransactionOffsetInBlock(tx_index),
                &execution_info,
                None,
            ));
            let tx_state_diff = StarknetClientStateDiff::from(state_changes.state_maps).0;

            transactions.push(CendePreconfirmedTransaction::from(internal));
            transaction_receipts.push(Some(receipt));
            transaction_state_diffs.push(Some(tx_state_diff));
        }

@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
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_blob_creation_from_blocks branch from 99fd2d7 to 35f0f1b 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 4 comments.
Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on nimrod-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 134 at r2 (raw file):

Previously, nimrod-starkware wrote…

works?

no, there is no impl From<&StateMaps> for CommitmentStateDiff, only impl From<StateMaps> for CommitmentStateDiff


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 475 at r2 (raw file):

Previously, nimrod-starkware wrote…

The changes of these txs are not applied on the state (not even between txs), is this intentional?

discussed in the PR that added this function, and fixed there (not intentional)


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 132 at r2 (raw file):

impl From<BlockData> for BlobParameters {
    /// If this is not the first block, also sets the parent proposal commitment and populates the
    /// recent block hashes with the last block hash (of the previous block).

Done.


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 163 at r2 (raw file):

        };

        BlobParameters {

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.

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


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 132 at r2 (raw file):

Previously, dorimedini-starkware wrote…

Done.

almost :)


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 134 at r2 (raw file):

Previously, dorimedini-starkware wrote…

no, there is no impl From<&StateMaps> for CommitmentStateDiff, only impl From<StateMaps> for CommitmentStateDiff

If block is owned (and it is), then block.state_maps type should be StateMaps not &StateMaps... no?

@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-central_systest_blobs_implement_blob_creation_from_blocks branch from 35f0f1b to 9c6fcc0 Compare May 5, 2026 14:17
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 2 comments.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on nimrod-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 132 at r2 (raw file):

Previously, nimrod-starkware wrote…

almost :)

whoops :P


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 134 at r2 (raw file):

Previously, nimrod-starkware wrote…

If block is owned (and it is), then block.state_maps type should be StateMaps not &StateMaps... no?

right you are, of course!
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, made 1 comment, and resolved 2 discussions.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on yoavGrs).

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 all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on yoavGrs).

@graphite-app graphite-app Bot changed the base branch from 04-30-central_systest_blobs_implement_block_production_given_txs to graphite-base/13967 May 8, 2026 10:23
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_blob_creation_from_blocks branch from 9c6fcc0 to c7be52a Compare May 8, 2026 13:49
@dorimedini-starkware dorimedini-starkware changed the base branch from graphite-base/13967 to 04-30-central_systest_blobs_implement_block_production_given_txs May 8, 2026 13:49
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-30-central_systest_blobs_implement_block_production_given_txs to main May 8, 2026 14:21
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_blob_creation_from_blocks branch from c7be52a to ad30ccf Compare May 8, 2026 14:21
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 8, 2026

Merge activity

  • May 8, 2:22 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@dorimedini-starkware dorimedini-starkware added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit b871242 May 8, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants