leo icon indicating copy to clipboard operation
leo copied to clipboard

[Feature] Randomness in Leo core

Open howardwu opened this issue 3 years ago • 7 comments

🚀 Feature

Add support for a (seeded) random number generator.

Motivation

From developer feedback, a simple RNG would be helpful for developers to get started with building a simple "high-or-low" game.

Design

Ideally, we should provide support for this in a core.rand package as part of Leo core.

Here's an example (that isn't intended to be prescriptive) of how the syntax could look and be used is:

import core.rand.ChaChaRng;

function main(seed: [u8; 32]) -> u32 {
    return ChaChaRng::new(seed);
}

howardwu avatar May 14 '21 00:05 howardwu

Hey @gluax, I know some devs who'd be interested in working on this. Do you have a budget for it? I can put this issue up on OpenQ, free of charge.

Thanks!

ef3n9r98 avatar Dec 02 '22 18:12 ef3n9r98

@ef3n9r98 I no longer work on this project, you'd have to ask someone else!

gluax avatar Dec 02 '22 19:12 gluax

Gotcha, thanks! Would @howardwu know?

ef3n9r98 avatar Dec 05 '22 19:12 ef3n9r98

Hey @gluax, I know some devs who'd be interested in working on this. Do you have a budget for it? I can put this issue up on OpenQ, free of charge.

Thanks!

Hi @ef3n9r98 we are open to this. Can you write up a proposal and link it in this issue?

collinc97 avatar Dec 05 '22 19:12 collinc97

Thanks @collinc97! I'll send over a proposal in a few days from now.

The tl;dr of OpenQ is that once you assign a dev to your issue and you merge his PR, he'll automatically get access to the crypto bounty you pre-loaded automatically.

I've added this particular (#958) issue to OpenQ here with a budget of $5 just to demo how it'd work.

Will get back to you with a proposal soon!

ef3n9r98 avatar Dec 07 '22 00:12 ef3n9r98

Hi @collinc97, thanks for your patience.

Here's the gdoc proposal for Aleo, as promised.

ef3n9r98 avatar Dec 12 '22 18:12 ef3n9r98

can i take on this ?

mahmudsudo avatar Oct 23 '23 12:10 mahmudsudo