-
Notifications
You must be signed in to change notification settings - Fork 65
apollo_batcher: add revert task #11451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: yoav/apollo_batcher/commitment_manager_types/app_input_type
Are you sure you want to change the base?
apollo_batcher: add revert task #11451
Conversation
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
839ce6c to
144ffc1
Compare
ab6ac92 to
69eaf42
Compare
07c1cb2 to
151df5f
Compare
69eaf42 to
7bf23e0
Compare
151df5f to
9ba33a5
Compare
7bf23e0 to
6a5b27c
Compare
9ba33a5 to
adc16a7
Compare
6a5b27c to
1d2982e
Compare
adc16a7 to
7125d3b
Compare
1d2982e to
39094bb
Compare
amosStarkware
left a comment
There was a problem hiding this 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,
});7125d3b to
e7993e4
Compare
39094bb to
11fb788
Compare
e7993e4 to
6dfd4d8
Compare
yoavGrs
left a comment
There was a problem hiding this 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.
11fb788 to
e711805
Compare
amosStarkware
left a comment
There was a problem hiding this 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
yoavGrs
left a comment
There was a problem hiding this 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
dorimedini-starkware
left a comment
There was a problem hiding this 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).
53e20d2 to
fe12c28
Compare
yoavGrs
left a comment
There was a problem hiding this 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_detailsthat cannot be derived fromtask_input?
why not justimpl 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.
fe12c28 to
29216a9
Compare
dorimedini-starkware
left a comment
There was a problem hiding this 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
29216a9 to
07cdd1d
Compare
yoavGrs
left a comment
There was a problem hiding this 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.
dorimedini-starkware
left a comment
There was a problem hiding this 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).
07cdd1d to
59bd0cd
Compare
d6f4045 to
c717bf8
Compare
59bd0cd to
c975df9
Compare
c717bf8 to
30cd3f2
Compare
c975df9 to
8eed9bd
Compare
dorimedini-starkware
left a comment
There was a problem hiding this 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).
30cd3f2 to
57c1215
Compare
8eed9bd to
47b43c1
Compare
57c1215 to
5a2be69
Compare
47b43c1 to
e1be9e8
Compare
dorimedini-starkware
left a comment
There was a problem hiding this 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).
amosStarkware
left a comment
There was a problem hiding this 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:complete! all files reviewed, all discussions resolved (waiting on @yoavGrs).
5a2be69 to
17f6458
Compare
e1be9e8 to
698d72c
Compare
17f6458 to
1e74388
Compare
698d72c to
69f26e1
Compare

No description provided.