Skip to content

central_systest_blobs: implement preconfirmed block creation#13964

Merged
dorimedini-starkware merged 1 commit intomainfrom
04-30-central_systest_blobs_implement_preconfirmed_block_creation
May 6, 2026
Merged

central_systest_blobs: implement preconfirmed block creation#13964
dorimedini-starkware merged 1 commit intomainfrom
04-30-central_systest_blobs_implement_preconfirmed_block_creation

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
Medium risk because it changes how preconfirmed test blocks are constructed by actually executing transactions and deriving receipts/state diffs, which could affect regression expectations and blob generation outputs.

Overview
Implements preconfirmed block creation in cende_blob_regression_test.rs by executing remaining pending transactions in a BlockContext, then populating the CendeWritePreconfirmedBlock with derived transactions, transaction_receipts, and transaction_state_diffs (instead of returning an empty placeholder block).

Updates regression fixtures to match the new metadata/output, including bumping the blobs generation marker and adjusting preconfirmed_block.json timestamp/sequencer fields.

Reviewed by Cursor Bugbot for commit 883b371. 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 74bea58. Configure here.

Comment thread crates/central_systest_blobs/src/cende_blob_regression_test.rs Outdated
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 reviewed 2 files and all commit messages, and made 3 comments.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on dorimedini-starkware and yoavGrs).


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

        let mut transaction_state_diffs = vec![];

        for (tx_index, (executable, internal)) in self.next_txs.iter().enumerate() {

I would expect self.next_txs to be consumed here (i.e taken and replaced with an empty vec).
I think std::mem::take can do that

Code quote:

for (tx_index, (executable, internal)) in self.next_txs.iter().enumerate() {

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

            };

            let mut tx_state = CachedState::new(self.state.clone());

Do you have to use CachedState here? Isn't it better to simply send self.state?

Code quote:

let mut tx_state = CachedState::new(self.state.clone());

Comment thread crates/central_systest_blobs/src/cende_blob_regression_test.rs Outdated
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_first_two_bootstrap_declares branch from cfef6e4 to e018c29 Compare May 5, 2026 11:56
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_preconfirmed_block_creation branch from 74bea58 to eb6fe34 Compare May 5, 2026 11:56
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_preconfirmed_block_creation branch from eb6fe34 to 6115833 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 3 comments and resolved 1 discussion.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on nimrod-starkware and yoavGrs).


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

Previously, nimrod-starkware wrote…

I would expect self.next_txs to be consumed here (i.e taken and replaced with an empty vec).
I think std::mem::take can do that

nice!


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

Previously, nimrod-starkware wrote…

Do you have to use CachedState here? Isn't it better to simply send self.state?

I need a way to create a state diff for the tx only. the way to do that is by using a cached state

Comment thread crates/central_systest_blobs/src/cende_blob_regression_test.rs Outdated
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 reviewed all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 261 at r3 (raw file):

    /// Creates a preconfirmed block for the given block. Should be called for the last block only -
    /// no commitment is computed.
    fn make_preconfirmed_block_from_remaining_txs(self) -> CendeWritePreconfirmedBlock {

are you sure you should consume self here?

Code quote:

(self)

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 1 comment.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on nimrod-starkware and yoavGrs).


crates/central_systest_blobs/src/cende_blob_regression_test.rs line 261 at r3 (raw file):

Previously, nimrod-starkware wrote…

are you sure you should consume self here?

yes, after you make a preconfirmed block from the remaining txs, you shouldn't be producing any more blocks.

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

@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_preconfirmed_block_creation branch from 6115833 to 3ffa587 Compare May 5, 2026 14:17
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_first_two_bootstrap_declares branch from e018c29 to 206c9b8 Compare May 5, 2026 14:17
@dorimedini-starkware dorimedini-starkware changed the base branch from 04-30-central_systest_blobs_first_two_bootstrap_declares to main May 6, 2026 07:17
@dorimedini-starkware dorimedini-starkware force-pushed the 04-30-central_systest_blobs_implement_preconfirmed_block_creation branch from 3ffa587 to 883b371 Compare May 6, 2026 07:17
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 6, 2026

Merge activity

  • May 6, 7:18 AM 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 6, 2026
Merged via the queue into main with commit 7bd0e75 May 6, 2026
16 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