-
Notifications
You must be signed in to change notification settings - Fork 137
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
Update randomness runtime interface method #2706
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit fcb488b Collapsed results for better readability
|
Codecov Report
@@ Coverage Diff @@
## master #2706 +/- ##
=======================================
Coverage 79.10% 79.11%
=======================================
Files 333 333
Lines 78194 78194
=======================================
+ Hits 61855 61861 +6
+ Misses 14046 14041 -5
+ Partials 2293 2292 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Nice!
This PR is part of implementing FLIP onflow/flips#120, specifically the type-generalized random function.
There are no changes in Cadence for now, this is a small internal refactor without impact on Cadence language. However, this is a breaking change for dependencies implementing the runtime
Interface
(flow-go FVM, emulator FVM).Description
unsafeRandom
torandom
unsafeRandom
still returns 64 bitsInterface
methodUnsafeRandom() (uint64, error)
toReadRandom([]byte) error
to allow future flexible implementations of randomness tools.Providing randomness functions with other Cadence types can be built on top of this PR or in a separate PR.
master
branchFiles changed
in the Github PR explorer