-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix verify challenge smart contract #1850
Conversation
Codecov Report
@@ Coverage Diff @@
## staging #1850 +/- ##
===========================================
+ Coverage 26.43% 26.57% +0.13%
===========================================
Files 370 370
Lines 61261 61364 +103
===========================================
+ Hits 16192 16305 +113
+ Misses 43145 43116 -29
- Partials 1924 1943 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
cb9136b
to
8ce165e
Compare
Set current round on StartNextRound before adding the VRF to lock the current round. Otherwise, we will miss one future VRF, and if that's the last ticket to meet threshold, we will have to wait soft round timeout. - on round 100, receive future VRF for round 101, cache it - start next round (still on round 100 at the moment), create VRF for round 101, and broadcast it to others - add the created VRF to local meanwhile checking if there are cached future VRF, and process it. So now, we have 2 tickets - received another ticket, but since the current round is still on 100, we will cache it instead of processing it. - set current round to 101 when start next round process is finished. - wait soft round time out to re do the VRF process So if in StartNextRound method, we set current round to 101 before creating local VRF, the last ticket will not be treated as future ticket and we will process it immediately, and meet the threshold
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.
lgtm
af108e2
to
547fc65
Compare
Fixes
Changes
required challenge.TotalValidators/2
TODO
Need to be mentioned in CHANGELOG.md?
Tests
Tasks to complete before merging PR:
Associated PRs (Link as appropriate):