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

Complete end-to-end walkthrough #1

Open
sisyphusSmiling opened this issue Oct 4, 2023 · 2 comments
Open

Complete end-to-end walkthrough #1

sisyphusSmiling opened this issue Oct 4, 2023 · 2 comments
Labels

Comments

@sisyphusSmiling
Copy link
Contributor

Description

Complete an end-to-end walkthrough demonstrating onchain randomness and PRG implementation building on the RandomBeaconHistory contract & heartbeat.

Dependency

The current CoinToss contract depends on the existence of a blockwise source of randomness in the RandomBeaconHistory contract. In order to test the application level contract, we need a way to commit that source of randomness at every block; however, the emulator increments the block height with every transaction submission.

This means that end-to-end testing of the CoinToss contract, demonstrating a commit-reveal mechanic along with PRG implementation, is dependent on the RandomBeaconHistory heartbeat submission being embedded in at least a preview version of the emulator.

@tarakby
Copy link
Collaborator

tarakby commented Oct 27, 2023

Thanks for creating this new repo. I was wondering where does the PRG contract itself live (in case it already exists)? Thanks

@sisyphusSmiling
Copy link
Contributor Author

sisyphusSmiling commented Oct 27, 2023

@tarakby this is the initial implementation with just a single nextUInt64() method at the moment. I'm in the process of building out some statistical tests (#3). Any feedback on the implementation is welcome ofc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants