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

Simulator randomness per module #4390

Closed
rigelrozanski opened this issue May 21, 2019 · 4 comments
Closed

Simulator randomness per module #4390

rigelrozanski opened this issue May 21, 2019 · 4 comments

Comments

@rigelrozanski
Copy link
Contributor

Currently within the simulator we really only have a single random number generator which gets used for creating random params for all the different modules. Due to this design, whenever we integrate in a new module into the simulation, the random parameter generation is totally thrown off from previous simulations on that same seed prior to integrating in the new module.

If we instead deterministically create a series of random generators (still from one seed) for each module, we can avert this problem, the params will be generated with independant randomness for each module, hence, when we integrate in a new module it will not affect the deterministic creation of other modules params.

This is seen recently when a bug has been found for a commit series (#4383 (comment)) however the bug is no longer found after a new module was integrated into the simulation. I would like it if the simulation was failing after the new simulation modifications were made here.

It gets a bit more complicated with transaction creation ideally this would be the scenario: In original simulator the following transactions are created for let's say Seed 100:

  1. Module A: Transaction 123
  2. Module A: Transaction 13
  3. Module B: Transaction 12
  4. Module D: Transaction 1231
  5. Module C: Transaction 124
  6. Module A: Transaction 14

Now after a new module, say Module E was integrated into the simulator, its functions will still need to be included in list, however, ideally the order and "value" of each transaction will not be affected, new transactions from Module E will simply be inserted into the simulators list:

  1. Module A: Transaction 123
  2. Module A: Transaction 13
  3. Module E: Transaction 145
  4. Module B: Transaction 12
  5. Module D: Transaction 1231
  6. Module E: Transaction: 545
  7. Module C: Transaction 124
  8. Module A: Transaction 14

This could be accomplished by having independent random generators for each modules when generating transaction input. I'm not totally positive on the solution for the ordering of transactions remaining as I've described, but I'm sure it's possible, just going to think about it a bit more.

CC: @cwgoes @alexanderbez

@rigelrozanski
Copy link
Contributor Author

CC @npinto

@alexanderbez
Copy link
Contributor

alexanderbez commented May 21, 2019

I think this is entirely possible and ideal. As you've already mentioned, the only corner case is tx/op generation which may be dependent on state and other modules. Regardless, this should be pretty trivial.

@rigelrozanski rigelrozanski added this to the v1.0 LTS milestone Jun 20, 2019
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 13, 2020
@tac0turtle tac0turtle removed the stale label Apr 3, 2023
@tac0turtle
Copy link
Member

we are redoing the simiuator, this is being taken into consideration

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

No branches or pull requests

3 participants