Skip to content
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

Expose beacon randomness through new EVM precompile via new runtime method (FIP-0095) #1577

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

anorth
Copy link
Member

@anorth anorth commented Aug 26, 2024

Adds a runtime method for fetching drand beacon randomness without necessarily mixing in additional entropy. Expose beacon randomness through new EVM precompile.

There is some redundancy in the runtime methods here. The mixing of entropy could be factored out of the existing runtime beacon randomness method and into a wrapper function. I have code for this, but it has moderate impact on existing tests, which check randomness values assuming this mixing happened inside the runtime layer.

This is an alternative to #1576.

  • Tests for the EVM precompile

…cessarily mixing in additional entropy. Expose beacon randomness through new EVM precompile.
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the right approach.

Copy link
Contributor

@ZenGround0 ZenGround0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I'll wait on approval until there are some tests

actors/evm/src/interpreter/precompiles/fvm.rs Outdated Show resolved Hide resolved
actors/evm/src/interpreter/precompiles/fvm.rs Outdated Show resolved Hide resolved
actors/evm/src/interpreter/precompiles/mod.rs Show resolved Hide resolved
@anorth anorth marked this pull request as ready for review August 27, 2024 22:19
@anorth
Copy link
Member Author

anorth commented Aug 27, 2024

Now with tests.

@anorth anorth changed the title Expose beacon randomness through new EVM precompile via new runtime method. Expose beacon randomness through new EVM precompile via new runtime method (FIP-0095) Aug 29, 2024
@ZenGround0 ZenGround0 added this pull request to the merge queue Sep 27, 2024
Merged via the queue into master with commit 64391b8 Sep 27, 2024
12 checks passed
@ZenGround0 ZenGround0 deleted the anorth/rand-precompile branch September 27, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants