-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Save RNG for generating random storage sampling offsets #4450
Conversation
@sagar-solana FYI |
Cool, looks good. We'll need to integrate with storage stage as well at some point but this should be fine for now. |
Codecov Report
@@ Coverage Diff @@
## master #4450 +/- ##
========================================
+ Coverage 77.5% 79.3% +1.8%
========================================
Files 176 176
Lines 31970 31286 -684
========================================
+ Hits 24789 24824 +35
+ Misses 7181 6462 -719 |
@@ -457,6 +466,7 @@ impl Replicator { | |||
self.hash, | |||
self.slot, | |||
Signature::new(&self.signature.to_bytes()), | |||
proof_index, |
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.
What is proof_index for?
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.
It can be used by the new validators to figure out how many random numbers to generate before they can start validating replicator proofs (i.e. catch up to replicator's random number)
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. I see, it could allow for missing transactions.
Problem
Replicators are supposed to generate new samples of the segment they're storing. Currently they seem to be coming up with the same sampled hash every time.
Summary of Changes
Save RNG so that a new random number is generated.
Fixes #4353