-
Notifications
You must be signed in to change notification settings - Fork 28
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
Allow ostracon to verify the old r2ishiguro vrf proofs #652
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #652 +/- ##
==========================================
+ Coverage 66.16% 66.18% +0.02%
==========================================
Files 275 277 +2
Lines 36930 37001 +71
==========================================
+ Hits 24433 24489 +56
- Misses 10733 10749 +16
+ Partials 1764 1763 -1
|
@0Tech |
The new ostracon must be able to verify the old r2ishiguro proof, because the verification is required in the replay of the last block. I have confirmed the replay was required during in-place migration, and the migration failed without this patch. |
Modify the comments
@0Tech |
I am concerned about the following points.
|
That's the point. A node should keep using the old implementation before it applies a block with the new implementation. Also, "good" validators would not create a proof using the old implementation, which means from some point after the upgrade, the proofs would be of the new implementation, voi vrf. |
Remove old comment
I've tested in-place migration again at this point. |
@ulbqb I don't think so. We know the validator with r2ishiguro on Finschia Network. So this PR is created. But, there is nothing to run the validator with libsodium. I think we don't need to support libsodium at that time. |
@kokeshiM0chi |
It is difficult to manage. Of course, the migration is also difficult. There is no merit to spend the cost here. |
It seems better not to support libsodium. |
@ulbqb |
* Add r2ishiguro implementation as the legacy * Add tests * Lint * Chore * Apply suggestions from code review Modify the comments * Add version control * Refactor * Fix test and refactor * Update crypto/ed25519/migration.go Remove old comment * Fix race * Remove backup file * Use Finschia/r2ishiguro_vrf * Use the tag for Finschia/r2ishiguro_vrf
Description
This patch would allow ostracon to verify the old r2ishiguro vrf proofs. Basically, it would import:
Verify()
andProofToHash()
.prove()
INTO the test.It would also add the routing logic to minimize the changes.
I have checked the patch in finschia in-place migration scenario.
Refer: #633
Closes: #653