-
Notifications
You must be signed in to change notification settings - Fork 664
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
store partial encoded chunks #1975
Conversation
Codecov Report
@@ Coverage Diff @@
## staging #1975 +/- ##
===========================================
+ Coverage 87.17% 87.55% +0.38%
===========================================
Files 167 167
Lines 31625 31759 +134
===========================================
+ Hits 27569 27807 +238
+ Misses 4056 3952 -104
Continue to review full report at Codecov.
|
c5bf04b
to
15b166f
Compare
.store_partial_encoded_chunk(&block.header, partial_encoded_chunk.clone()); | ||
assert_eq!(env.clients[0].shards_mgr.get_stored_partial_encoded_chunks(1).len(), 1); | ||
assert_eq!( | ||
env.clients[0].shards_mgr.get_stored_partial_encoded_chunks(1)[&0], |
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.
How does this work, you changed the hash but not the signature, right?
Or is it becaues signature verification is disabled in tests?
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.
verify_validator_signature
is always true in KV-runtime.
@@ -61,6 +63,9 @@ pub enum ProcessPartialEncodedChunkResult { | |||
/// The Header is the header of the current chunk, which is unknown to the caller, to request | |||
/// parts / receipts for | |||
NeedMorePartsOrReceipts(ShardChunkHeader), | |||
/// PartialEncodedChunkMessage is received earlier than Block for the same height. | |||
/// Without the block we cannot restore the epoch and save encoded chunk data. |
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.
How is epoch relevant here?
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.
In process_partial_encoded_chunk
we run get_epoch_id_from_prev_block
. This means we can't get epoch without having received Block and cannot store the chunk. In this case process_partial_encoded_chunk
returns NeedBlock
.
15b166f
to
272b182
Compare
* store partial encoded chunks * num_chunks_for_block fixing * fixes * fixes and sanity test * minor fixes * processing accepted_blocks after process_partial_encoded_chunk * increasing max_wait_ms * removed into_iter in accepted blocks * verbose
Fixes #1971.
Also fixes calculation of
encoded_chunks.num_chunks_for_block()
.