Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Enhance the database to allow for better UX and determinism #756

Open
mikeseese opened this issue Jan 26, 2021 · 0 comments
Open

Enhance the database to allow for better UX and determinism #756

mikeseese opened this issue Jan 26, 2021 · 0 comments

Comments

@mikeseese
Copy link
Contributor

Ideally, running ganache-cli <flavor> --database.dbPath <path> should just pick up where you left off, including all of your accounts (either auto generated or manually generated), options, and even random number generator state (in the event that the DB gets copied and reused or to support deterministic behavior when you revert [aka reseed the RNG with the state at the block you're reverting to]).

This is not a Filecoin-specific issue, but a generic design flaw from the beginning.

Reasons why this is important:

  • If the user originally had miner.blockTime set to a positive number and doesn't provide it after running from a prior DB, they will now automine
  • If the user uses evm_revert in their tests, and their tests trigger internal RNG calls, the RNG state is not replicable without saving and reverting/restoring it.
  • If the user doesn't provide their original --wallet.mnenomic|seed|deterministic|accounts settings in the subsequent run, they will not generate the same accounts (we shouldn't be generating them anyway, we should be restoring them)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Backlog
Development

No branches or pull requests

3 participants