Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Tighten next bottom up checkpoint height #824
Tighten next bottom up checkpoint height #824
Changes from all commits
f5b1ae0
a4cf6a2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
For the future, #791 and this PR are closely interrelated. The former is adding checks that this PR is now deleting. It would've been simpler to push these changes to the previous PR, to prevent reviewers from reviewing stale logic.
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.
ok so if I understand this right, then in case we had an early submission due to reaching msg size limit then we still continue to do checkpoints at multiples of
bottomUpCheckPeriod
after the early submission?So for example if both
bottomUpCheckPeriod
and maxMsgsPerBottomUpBatch is 10, and we had the following checkpoints and msg sizes:chk 10 and 2 msg
chk 20 and 3 msg
chk 25 and 10msg -> here we had 10 msg already at height 25 causing early submission
chk 30 and 2 msg
...
I s this correctly understood? I may have this wrong though as the screenshot that raul shares does not show that this is the case :S
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.
I thought the above screenshot is aligned with what you described? Just the above screenshot has checkpoint period 60. Am I missing sth?
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.
This does not line up with my understanding Fendermint, which is also not being updated in this PR. So I think this will PR will break checkpointing.
ipc/fendermint/vm/interpreter/src/fvm/checkpoint.rs
Line 328 in 9509c75
I believe Fendermint produces checkpoints every
bottomUpCheckPeriod
from genesis. If an early checkpoint was produced due to reaching the msg batch limit, Fendermint will still produce the next checkpoint at the original schedule, but this contract change will expect it at exactlybottomUpCheckPeriod
epochs after the last checkpoint.Test screenshot you shared with me also confirms my understanding is correct:
Did you verify that the checkpoint at 1500 was accepted by the subnet actor at the parent?
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.
I think the confusion comes from this line:
This function basically deduces the next checkpoint height, see test cases added.
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.
Logic seems correct, apologies for the false alarm! I'd suggest improving the naming of the method at least (
LibGateway.getNextEpoch()
is missing information).