Skip to content

Conversation

@yoavGrs
Copy link
Contributor

@yoavGrs yoavGrs commented Jan 6, 2026

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

yoavGrs commented Jan 6, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yoavGrs yoavGrs requested a review from amosStarkware January 6, 2026 12:47
@yoavGrs yoavGrs self-assigned this Jan 6, 2026
@yoavGrs yoavGrs marked this pull request as ready for review January 6, 2026 12:47
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 839ce6c to 144ffc1 Compare January 7, 2026 09:31
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from ab6ac92 to 69eaf42 Compare January 7, 2026 09:32
@yoavGrs yoavGrs changed the base branch from yoav/apollo_batcher/commitment_manager/perform_commitment_tasks to yoav/apollo_batcher/commitment_manager/wait_for_revert January 7, 2026 09:32
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/wait_for_revert branch from 07c1cb2 to 151df5f Compare January 7, 2026 13:47
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 69eaf42 to 7bf23e0 Compare January 7, 2026 13:47
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/wait_for_revert branch from 151df5f to 9ba33a5 Compare January 7, 2026 13:52
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 7bf23e0 to 6a5b27c Compare January 7, 2026 13:52
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/wait_for_revert branch from 9ba33a5 to adc16a7 Compare January 7, 2026 14:05
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 6a5b27c to 1d2982e Compare January 7, 2026 14:06
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/wait_for_revert branch from adc16a7 to 7125d3b Compare January 7, 2026 15:16
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 1d2982e to 39094bb Compare January 7, 2026 15:17
Copy link
Collaborator

@amosStarkware amosStarkware left a comment

Choose a reason for hiding this comment

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

@amosStarkware reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @yoavGrs).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 268 at r1 (raw file):

    // Associated functions.

    pub(crate) async fn add_revert_task(

please decrease task offset. and please add a unit test for this method

Code quote:

pub(crate) async fn add_revert_task(

crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 280 at r1 (raw file):

                actual: height,
                state_diff_commitment: None,
            });

This error is specific to commitment task (see its message) - please rename this error and add a variant for reverts.

Code quote:

            return Err(CommitmentManagerError::WrongTaskHeight {
                expected: expected_height,
                actual: height,
                state_diff_commitment: None,
            });

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/wait_for_revert branch from 7125d3b to e7993e4 Compare January 8, 2026 10:02
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 39094bb to 11fb788 Compare January 8, 2026 10:02
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/wait_for_revert branch from e7993e4 to 6dfd4d8 Compare January 8, 2026 10:58
Copy link
Contributor Author

@yoavGrs yoavGrs left a comment

Choose a reason for hiding this comment

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

@yoavGrs made 2 comments.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @amosStarkware).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 268 at r1 (raw file):

Previously, amosStarkware wrote…

please decrease task offset. and please add a unit test for this method

IMO, we update the offset when we are ready for the next block.
In revert, we decrease when we have a valid result.


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 280 at r1 (raw file):

Previously, amosStarkware wrote…

This error is specific to commitment task (see its message) - please rename this error and add a variant for reverts.

Done.

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 11fb788 to e711805 Compare January 8, 2026 10:58
Copy link
Collaborator

@amosStarkware amosStarkware left a comment

Choose a reason for hiding this comment

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

@amosStarkware reviewed 3 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yoavGrs).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 268 at r1 (raw file):

Previously, yoavGrs wrote…

IMO, we update the offset when we are ready for the next block.
In revert, we decrease when we have a valid result.

We currently update the offset when we add a commitment task - not sure what you mean by ready for the next block

Copy link
Contributor Author

@yoavGrs yoavGrs left a comment

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: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @amosStarkware and @dorimedini-starkware).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 268 at r1 (raw file):

Previously, amosStarkware wrote…

The commitment task offset is the batch ID of the next task the commitment manager expects - So if a commitment task was added, it is immediately increased. and when a revert task is added, the next task the commitment manager expects is (offset -1), so IMO it should be immediately decreased.
Note that this offset is only in memory - it is distinct from the global root offset, which lives in storage, and is only updated once the results are written to storage (or, in case of revert - deleted from storage).

@dorimedini-starkware
https://reviewable.io/reviews/starkware-libs/sequencer/11496

Copy link
Collaborator

@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 1 file and all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @amosStarkware and @yoavGrs).

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 53e20d2 to fe12c28 Compare January 11, 2026 14:13
@yoavGrs yoavGrs changed the base branch from yoav/apollo_batcher/commitment_manager/wait_for_revert to yoav/apollo_batcher/commitment_manager_types/app_input_type January 11, 2026 14:13
Copy link
Contributor Author

@yoavGrs yoavGrs left a comment

Choose a reason for hiding this comment

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

@yoavGrs made 2 comments.
Reviewable status: 2 of 3 files reviewed, 3 unresolved discussions (waiting on @amosStarkware and @dorimedini-starkware).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 113 at r2 (raw file):

Previously, dorimedini-starkware wrote…

what data is in task_details that cannot be derived from task_input?
why not just impl Display for CommitterTaskInput?

Done.


crates/apollo_batcher/src/commitment_manager/commitment_manager_test.rs line 214 at r2 (raw file):

Previously, dorimedini-starkware wrote…

block height is no longer part of the panic message?

It is part of the error message:

Commit block 4, state diff commitment: Some(StateDiffCommitment(PoseidonHash(0x0))).. The channel is full. channel size: 1. Consider increasing the channel size or enabling waiting in the config.

I don't want to include the state root in the expected message.

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from fe12c28 to 29216a9 Compare January 11, 2026 14:25
Copy link
Collaborator

@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 1 file and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware and @yoavGrs).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 113 at r2 (raw file):

Previously, yoavGrs wrote…

Done.

did you push? don't see it here

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 29216a9 to 07cdd1d Compare January 11, 2026 14:47
Copy link
Contributor Author

@yoavGrs yoavGrs left a comment

Choose a reason for hiding this comment

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

@yoavGrs made 2 comments.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @amosStarkware and @dorimedini-starkware).


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 268 at r1 (raw file):

Previously, yoavGrs wrote…

@dorimedini-starkware
https://reviewable.io/reviews/starkware-libs/sequencer/11496

Added.


crates/apollo_batcher/src/commitment_manager/commitment_manager_impl.rs line 113 at r2 (raw file):

Previously, dorimedini-starkware wrote…

did you push? don't see it here

Sorry, now.

Copy link
Collaborator

@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 1 file and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware).

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 07cdd1d to 59bd0cd Compare January 11, 2026 14:59
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/app_input_type branch from d6f4045 to c717bf8 Compare January 11, 2026 15:19
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 59bd0cd to c975df9 Compare January 11, 2026 15:19
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/app_input_type branch from c717bf8 to 30cd3f2 Compare January 12, 2026 08:17
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from c975df9 to 8eed9bd Compare January 12, 2026 08:18
Copy link
Collaborator

@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 1 file and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware).

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/app_input_type branch from 30cd3f2 to 57c1215 Compare January 12, 2026 09:02
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 8eed9bd to 47b43c1 Compare January 12, 2026 09:02
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/app_input_type branch from 57c1215 to 5a2be69 Compare January 13, 2026 14:14
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 47b43c1 to e1be9e8 Compare January 13, 2026 14:15
Copy link
Collaborator

@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 2 files and all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware).

Copy link
Collaborator

@amosStarkware amosStarkware left a comment

Choose a reason for hiding this comment

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

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

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/app_input_type branch from 5a2be69 to 17f6458 Compare January 13, 2026 14:54
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from e1be9e8 to 698d72c Compare January 13, 2026 14:54
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/app_input_type branch from 17f6458 to 1e74388 Compare January 14, 2026 09:33
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/add_revert_task branch from 698d72c to 69f26e1 Compare January 14, 2026 09:33
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.

5 participants