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

feat: increase simulation likelihood of low probability events #68

Merged
merged 7 commits into from
May 19, 2022

Conversation

bhgomes
Copy link
Contributor

@bhgomes bhgomes commented May 16, 2022

This PR adds some simulation hooks for sampling events that are unlikely in the current simulation:

  • Adds SelfTransfer simulation action for an actor to perform a private transfer to itself
    • unlikely to happen in the normal simulation because an actor choosing its own receiving key from the pool goes down with time
  • Adds FlushToPublic simulation action to reclaim all private assets
    • unlikely to happen in the normal simulation because the random sampling for asset withdrawal is uniform over the current balance, so it is unlikely to hit the maximum value
  • Adds MintZero, PrivateTransferZero, and ReclaimZero environments for testing
    • for the same reason FlushToPublic is unlikely
  • Upgrades GenerateReceivingKeys to sample a number of keys to generate from a Poisson distribution with λ = 1
    • want to increase the number of receiving keys to stress-test signer storage maps

@bhgomes bhgomes marked this pull request as ready for review May 17, 2022 05:49
@bhgomes bhgomes requested review from BoyuanFeng, Kevingislason, tsunrise and GhostOfGauss and removed request for Kevingislason May 17, 2022 05:52
@bhgomes bhgomes self-assigned this May 17, 2022
@bhgomes bhgomes changed the title Upgrade Simulation Upgrade Simulation to Increase Likelihood of Low Probability Events May 17, 2022
@bhgomes bhgomes changed the title Upgrade Simulation to Increase Likelihood of Low Probability Events feat: increase likelihood of low probability events May 17, 2022
@bhgomes bhgomes changed the title feat: increase likelihood of low probability events feat: increase simulation likelihood of low probability events May 17, 2022
@bhgomes bhgomes marked this pull request as draft May 17, 2022 06:00
@bhgomes bhgomes marked this pull request as ready for review May 17, 2022 16:16
@bhgomes bhgomes merged commit 358f6e3 into main May 19, 2022
@bhgomes bhgomes deleted the feat/sim-upgrade branch May 19, 2022 17:09
BoyuanFeng pushed a commit that referenced this pull request Jun 2, 2022
* feat: add self-transfers to simulation
* feat: add GenerateReceivingKeys, FlushToPublic, and SelfTransfer to sim
* feat: add zero-transaction to simulation
* feat: add simulation action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants