Closed garyng2000 closed 2 years ago
Public testnet/mainnet data does persist - mocknet data should always be ephemeral by default, as it never syncs with anything. You can absolutely edit the docker-compose files (and the Config.toml) to support a mocknet with persistent data, but the use case we're aiming for doesn't include that.
I'll look into drawbacks of using persistent data for the private-testnet, however.
I think this is worth pursuing - will have to add a new command to "wipe" the private-testnet data on request though, but shouldn't be too difficult
I have edited the files but they just don't work properly, unfortunately. As for ephemeral, it is really easy given that we are talking about docker, just wipe the mapped volume(or don't map it) and it is gone. So getting things from empty state is easy, getting them persist ? unfortunately I can't find a way.
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.
While this is good for quick getting familiar test, there is no way to persist work. A typical use is I am working on some smart contracts and deployed today. down the road more and more are created and that depends on the states of previous transactions and/or other deployed contracts.
I have tried to persist mocket(which is basically just the postgresql content) as well as private-testnet(which is against a regtest bitcoin network).
both have their issue and doesn't work.
Without a way to persist a local development network, it make the development work 10x harder and almost impossible for any form of team development. In a sense, the whole thing becomes a cache setup and whenever the docker is restart(or host reboot), everything is gone.
The only alternative is just use the public testnet for development.