16 + 16
1 * 10^1 + 6 * 10^0 + 1 * 10^1 + 6 * 10^0
res_0 = 12 = 6 + 6
res_1 = 2 + 1 = 10 + 10 + ((12 - 12 mod 10)) / 10
32 = res_1 + res_0
Post hash of calldata of results from several points in the algorithm. Each Randomness payload has the following "randomness": "58b26a65bf4032555748c2949311abb2c4f580e7d7d7f70b13d0533b793c4c7d", "signature": "8434e45af135f363b04b792c1d77b83e36ef66829b0a09f7eed058103429f0e7f759ebf6d001cf73e9138f5b7a7f04b602c4167390c323432562d6367e09169422707a9778eba260c4d6434ea5e1d2c81462a4e3cd430990aebc593f4ae7517c", "runtime_hash": "keccak of several intermediate values in the runtime" "intermediate_values" : "array of intermediate values" The runtime hash is checked against the given intermediate values. Reject the payload if it does not match. Emit an event containing the intermediate values. Store the runtime hash with the randomness signature.
Jul 9, 2022Why Verifiable Randomness Verifiable randomness is a way to secure the result of an off-chain pseudorandom function on-chain. This allows us to have effectivley a random number generator on StarkNet without having to generate the number itself using smart contracts. With a random number generator we can pursue the creation of different games of chance on StarkNet. Drand network Rather than setting up our own infrastructure to generate a random number along with the pieces required for proving, we can leverage the Drand Network In a set interval the Drand network emits a payload that is publicly available via an http call
Feb 14, 2022or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up