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

@yoavGrs yoavGrs self-assigned this Jan 6, 2026
@yoavGrs yoavGrs requested a review from amosStarkware January 6, 2026 09:54
@yoavGrs yoavGrs marked this pull request as ready for review January 6, 2026 09:54
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager_types/use_committer_types branch from fd812d6 to 2e05557 Compare January 6, 2026 12:29
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from ac457db to 839ce6c Compare January 6, 2026 12:30
@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 changed the base branch from yoav/apollo_batcher/commitment_manager_types/use_committer_types to yoav/apollo_batcher/committer_input_type January 7, 2026 09:32
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/committer_input_type branch from 4c0792e to be8f623 Compare January 7, 2026 13:46
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 144ffc1 to a75f4b6 Compare January 7, 2026 13:46
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/committer_input_type branch from be8f623 to 4f4475a Compare January 7, 2026 13:52
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from a75f4b6 to 6a9a2d4 Compare January 7, 2026 13:52
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/committer_input_type branch from 4f4475a to b4d8a3a Compare January 7, 2026 14:05
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 6a9a2d4 to 2fd00f8 Compare January 7, 2026 14:05
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 1 file and all commit messages, and made 4 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @yoavGrs).


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 49 at r2 (raw file):

impl StateCommitter {
    /// Repeatedly performs any task in the channel.

Suggestion:

/// Performs the tasks in the channel. Retries at recoverable errors.

crates/apollo_batcher/src/commitment_manager/state_committer.rs line 50 at r2 (raw file):

impl StateCommitter {
    /// Repeatedly performs any task in the channel.
    pub(crate) async fn perform_commitment_tasks(

the original name was before we decided to add revert tasks. please also rename perform_commitment_task.
you can also add a TODO on me if it's a lot of work

Suggestion:

perform_tasks

crates/apollo_batcher/src/commitment_manager/state_committer.rs line 58 at r2 (raw file):

            let output = perform_commitment_task(request, &committer_client).await;
            // TODO(Yoav): wait for task channel by config.
            results_sender.send(output).await.unwrap();

I don't think we need a config here:
the tasks channel may grow very large if the committer is lagging behind the batcher.
but the results channel shouldn't grow very large. I'll keep this discussion open in case Dori thinks otherwise.
please change to try_send, match on errors (for more descriptive panic messages), and log when a result is added. similar to this

Suggestion:

            // TODO(Yoav): wait for task channel by config.
            results_sender.try_send(output).await.unwrap();

crates/apollo_batcher/src/commitment_manager/state_committer.rs line 107 at r2 (raw file):

/// Panics on unrecoverable errors.
async fn handle_task_error(error: CommitterClientError) {

is this more descriptive?

Suggestion:

log_errors_and_maybe_panic

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/committer_input_type branch from b4d8a3a to c1961fb Compare January 7, 2026 15:16
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 2fd00f8 to 38f59ce Compare January 7, 2026 15:16
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 4 comments.
Reviewable status: 0 of 1 files reviewed, 4 unresolved discussions (waiting on @amosStarkware).


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 50 at r2 (raw file):

Previously, amosStarkware wrote…

the original name was before we decided to add revert tasks. please also rename perform_commitment_task.
you can also add a TODO on me if it's a lot of work

Done.


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 58 at r2 (raw file):

Previously, amosStarkware wrote…

I don't think we need a config here:
the tasks channel may grow very large if the committer is lagging behind the batcher.
but the results channel shouldn't grow very large. I'll keep this discussion open in case Dori thinks otherwise.
please change to try_send, match on errors (for more descriptive panic messages), and log when a result is added. similar to this

Done.


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 107 at r2 (raw file):

Previously, amosStarkware wrote…

is this more descriptive?

Done.


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 49 at r2 (raw file):

impl StateCommitter {
    /// Repeatedly performs any task in the channel.

Done.

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, 4 unresolved discussions (waiting on @amosStarkware).

@graphite-app graphite-app bot changed the base branch from yoav/apollo_batcher/committer_input_type to graphite-base/11442 January 8, 2026 07:27
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 1 file and all commit messages, made 1 comment, and resolved 4 discussions.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @yoavGrs).


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 67 at r3 (raw file):

                }
                Err(TrySendError::Full(_)) => panic!("Results channel is full."),
                Err(err) => panic!("Failed to send results. error: {err}"),

please add the results height to the error messages

Code quote:

                Err(TrySendError::Full(_)) => panic!("Results channel is full."),
                Err(err) => panic!("Failed to send results. error: {err}"),

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


-- commits line 2 at r3:
Also - please add a unit test.
Can also add a TODO, if you're short on time

Code quote:

- 38f59ce: apollo_batcher: perform commitment tasks

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


crates/apollo_batcher/src/commitment_manager/state_committer.rs line 122 at r9 (raw file):

Previously, dorimedini-starkware wrote…

still relevant?

Maybe change to:
// TODO(Amos): If the task performer panics, the Batcher will panic when it attempts to add tasks to the commitment manager. In this case, print an informative message.

@yoavGrs yoavGrs force-pushed the yoav/apollo_committer/use_mock_commit_block branch from a582fd9 to 881dce6 Compare January 12, 2026 12:48
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from c7dec77 to be58b49 Compare January 13, 2026 14:14
@yoavGrs yoavGrs changed the base branch from yoav/apollo_committer/use_mock_commit_block to main-v0.14.1-committer January 13, 2026 14:14
@github-actions
Copy link

Artifacts upload workflows:

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

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from be58b49 to 49937fa Compare January 13, 2026 14:53
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, 2 unresolved discussions (waiting on @amosStarkware).

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 49937fa to fc6eeaa Compare January 13, 2026 15:05
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, 2 unresolved discussions (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 7 files and all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @yoavGrs).

@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch 3 times, most recently from e4c4f95 to 67c7585 Compare January 15, 2026 08:55
@yoavGrs yoavGrs changed the base branch from main-v0.14.1-committer to yoav/apollo_committer/use_rocks_db_storage January 15, 2026 08:55
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, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware).


crates/apollo_batcher/src/batcher.rs line 1162 at r16 (raw file):

        for commitment_task_output in commitment_results.into_iter() {
            let height = commitment_task_output.height;
            info!("Writing commitment results to storage for height {}.", height);

non-blocking

Suggestion:

info!("Writing commitment results to storage for height {height}.");

@yoavGrs yoavGrs force-pushed the yoav/apollo_committer/use_rocks_db_storage branch from 5df3bd2 to ba57132 Compare January 15, 2026 09:10
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 67c7585 to 0150673 Compare January 15, 2026 09:10
@yoavGrs yoavGrs force-pushed the yoav/apollo_committer/use_rocks_db_storage branch from ba57132 to 6f0400c Compare January 15, 2026 10:48
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from 0150673 to feb1959 Compare January 15, 2026 10:48
@yoavGrs yoavGrs force-pushed the yoav/apollo_committer/use_rocks_db_storage branch from 6f0400c to c7cd8e0 Compare January 15, 2026 11:05
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from feb1959 to 2dcf469 Compare January 15, 2026 11:05
@yoavGrs yoavGrs force-pushed the yoav/apollo_committer/use_rocks_db_storage branch from c7cd8e0 to 090af3f Compare January 15, 2026 11:19
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch 2 times, most recently from c8e17ba to c476ae8 Compare January 15, 2026 12:35
@yoavGrs yoavGrs changed the base branch from yoav/apollo_committer/use_rocks_db_storage to main-v0.14.1-committer January 15, 2026 12:35
@yoavGrs yoavGrs force-pushed the yoav/apollo_batcher/commitment_manager/perform_commitment_tasks branch from c476ae8 to 2fb3447 Compare January 15, 2026 12:46
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 3 files and all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @amosStarkware).

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