central_systest_blobs: implement blob creation from blocks#13967
Conversation
PR SummaryMedium Risk Overview This adds block-linking metadata to the generated blob inputs (proposal commitment, optional parent proposal commitment, and Reviewed by Cursor Bugbot for commit 9c6fcc0. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
c0d0ac9 to
0e56d10
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware resolved 1 discussion.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on nimrod-starkware and yoavGrs).
0e56d10 to
99fd2d7
Compare
c72a3dc to
31f9d81
Compare
nimrod-starkware
left a comment
There was a problem hiding this comment.
@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));
}31f9d81 to
b86febd
Compare
99fd2d7 to
35f0f1b
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@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.
nimrod-starkware
left a comment
There was a problem hiding this comment.
@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, onlyimpl From<StateMaps> for CommitmentStateDiff
If block is owned (and it is), then block.state_maps type should be StateMaps not &StateMaps... no?
b86febd to
eb6a3de
Compare
35f0f1b to
9c6fcc0
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@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
blockis owned (and it is), thenblock.state_mapstype should beStateMapsnot&StateMaps... no?
right you are, of course!
done
nimrod-starkware
left a comment
There was a problem hiding this comment.
@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).


No description provided.