Skip to content

apollo_integration_tests: store the commitment infos delta in the dummy recorder - #14935

Merged
itamar-starkware merged 1 commit into
mainfrom
dummy-recorder-stores-commitment-infos-delta
Aug 13, 2026
Merged

apollo_integration_tests: store the commitment infos delta in the dummy recorder#14935
itamar-starkware merged 1 commit into
mainfrom
dummy-recorder-stores-commitment-infos-delta

Conversation

@itamar-starkware

Copy link
Copy Markdown
Contributor

No description provided.

@cursor

cursor Bot commented Aug 9, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are confined to apollo_integration_tests test utilities and dummy HTTP recorder behavior; production sequencer code is untouched.

Overview
Integration tests replace the no-op dummy cende recorder with one that mirrors the production commitment-infos height-offset contract so blob sends advance incrementally instead of always replaying the full recent-blocks window.

On each write_blob, the handler parses recent_state_commitment_infos block numbers, updates a served offset, and records invalid heights when arrivals are not contiguous from the expected offset (retries and empty first blobs are handled). The offset endpoint returns the live offset instead of a fixed null, and axum’s default 2MB body limit is disabled for large blobs.

RecorderStats is returned from spawn_local_success_recorder and exposed on FlowSequencerSetup so flow tests can assert recorder behavior; the shared integration-test manager spawn discards stats for now.

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 3b33448. Configure here.

Comment thread crates/apollo_integration_tests/src/utils.rs Outdated

@itamar-starkware itamar-starkware left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@itamar-starkware made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on yoavGrs).

Comment thread crates/apollo_integration_tests/src/utils.rs Outdated

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on itamar-starkware).


crates/apollo_integration_tests/src/utils.rs line 598 at r1 (raw file):

#[derive(Debug, Default)]
pub struct RecorderStats {
    pub num_blobs_received: AtomicUsize,

Please keep it simple.

I suggest storing the offset and a map from invalid block_number to reason.
Is there any validation that this does not cover?

@itamar-starkware
itamar-starkware force-pushed the dummy-recorder-stores-commitment-infos-delta branch from 3b33448 to a565ff3 Compare August 11, 2026 14:04
@itamar-starkware
itamar-starkware force-pushed the witness-flow-assertions branch from 102079f to 241c722 Compare August 11, 2026 14:04

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs made 1 comment.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on itamar-starkware).


crates/apollo_integration_tests/src/utils.rs line 619 at r2 (raw file):

                        // A blob is prepared before its own height's commitment completes, so
                        // early blobs legitimately carry no commitment infos.
                        if let Some(max_stored_height) = blob["recent_state_commitment_infos"]

I suggested validating the witnesses' heights in the blob against the stored offset.
You can report any issue in a dedicated field.

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs resolved 1 discussion.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on itamar-starkware).

@itamar-starkware
itamar-starkware force-pushed the witness-flow-assertions branch from 241c722 to 36816ef Compare August 12, 2026 09:30
@itamar-starkware
itamar-starkware force-pushed the dummy-recorder-stores-commitment-infos-delta branch from a565ff3 to 062dc69 Compare August 12, 2026 09:30

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs made 1 comment and resolved 1 discussion.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on itamar-starkware).


crates/apollo_integration_tests/src/utils.rs line 608 at r3 (raw file):

        let Some(first_height) = heights.first() else { return };
        let mut height_offset = self.commitment_infos_height_offset.lock().unwrap();
        // Consensus rebuilds its proposal on a later round, re-sending a blob whose heights the
        // Consensus rebuilds its proposal on a later round, re-sending a blob whose heights the
        // recorder already stored.

Does it happen?

@itamar-starkware

Copy link
Copy Markdown
Contributor Author

crates/apollo_integration_tests/src/utils.rs line 619 at r2 (raw file):

Previously, yoavGrs wrote…

I suggested validating the witnesses' heights in the blob against the stored offset.
You can report any issue in a dedicated field.

Done

@itamar-starkware

Copy link
Copy Markdown
Contributor Author

crates/apollo_integration_tests/src/utils.rs line 598 at r1 (raw file):

Previously, yoavGrs wrote…

Please keep it simple.

I suggest storing the offset and a map from invalid block_number to reason.
Is there any validation that this does not cover?

Done, using expected_height

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@yoavGrs reviewed 3 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on itamar-starkware).

@itamar-starkware
itamar-starkware changed the base branch from witness-flow-assertions to graphite-base/14935 August 12, 2026 16:13
@itamar-starkware
itamar-starkware force-pushed the dummy-recorder-stores-commitment-infos-delta branch from 062dc69 to eba828e Compare August 12, 2026 16:13
@itamar-starkware
itamar-starkware changed the base branch from graphite-base/14935 to main August 12, 2026 16:14

@itamar-starkware itamar-starkware left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@itamar-starkware made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on yoavGrs).


crates/apollo_integration_tests/src/utils.rs line 608 at r3 (raw file):

Previously, yoavGrs wrote…
        // Consensus rebuilds its proposal on a later round, re-sending a blob whose heights the
        // recorder already stored.

Does it happen?

The re-send is a real case. The comment was not accurate - changing it now.

@yoavGrs yoavGrs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

@itamar-starkware
itamar-starkware added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 961f125 Aug 13, 2026
24 of 30 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