-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rust simulator L1 scaffolding #36
Conversation
sim-rs/src/sim.rs
Outdated
|
||
impl Simulation { | ||
pub fn new(config: SimConfiguration) -> Self { | ||
let mut rng = ChaChaRng::from_rng(thread_rng()).expect("couldn't initialize RNG"); |
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.
probably want the seed as part of the SimConfiguration
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.
@Quantumplation I don't want to make guarantees of determinism unless it's necessary. The ce_netsim
library forces everything to be "realtime", and I'm worried that determinism will be hard to maintain if actual threads are interacting.
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.
Even outside of making it deterministic, just generating things like the same slot schedule, connections, topology, etc. over multiple runs is super useful.
|
I merged it, but developing against main on a shared repo feels icky |
Scaffolding for (a command-line version of) the L1 chain for the rust Leios simulator. This is very WIP (I'm still trying to understand a lot about the problem, including what input/output should even look like), but I'm opening a PR in the interest of transparency.
This isn't a long-lived branch, I expect to merge (or discard) these changes after a week or two.
Fixes #34
So far, this has a fake-VRF lottery for block production, and logs stats about how many blocks were published and by which pools.