Skip to content

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

Open
itamar-starkware wants to merge 1 commit into
witness-flow-assertionsfrom
dummy-recorder-stores-commitment-infos-delta
Open

apollo_integration_tests: store the commitment infos delta in the dummy recorder#14935
itamar-starkware wants to merge 1 commit into
witness-flow-assertionsfrom
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 harness wiring; no production sequencer or recorder code paths are modified.

Overview
The integration-test dummy cende recorder no longer always returns a fixed null commitment-infos height offset. It now parses incoming blob JSON, advances an internal offset from recent_state_commitment_infos block numbers (matching production’s “first height not yet stored” contract), and returns that offset on the GET endpoint so blob senders can avoid resending the full recent-blocks window.

A new RecorderStats type tracks blob receive counts and that offset; spawn_success_recorder_with_stats implements the behavior, with spawn_local_success_recorder returning Arc<RecorderStats> alongside the URL and join handle. FlowSequencerSetup exposes recorder_stats for flow tests; integration test manager ignores the shared recorder stats with _recorder_stats.

The write-blob handler accepts Json<serde_json::Value> for inspection, and the router uses DefaultBodyLimit::disable() so large cende blobs are accepted like before validation.

Reviewed by Cursor Bugbot for commit a565ff3. 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.

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