Open kahuang opened 2 years ago
@mattsse PTAL^
Does this also concern the RPC cache dir @kahuang ?
Anywhere that disk space can grow unbounded!
Actually after reading the code, it seems like this always mounts at /tmp
then generate a random filename.Although it may be nice to be able to specify a dir specifically for this data: https://docs.rs/tempdir/latest/tempdir/struct.TempDir.html
Not high pri IMO
I need it too to be able to restart a session from a specific state.
I need it too to be able to restart a session from a specific state.
@emilianobonassi this is possible in latest versions by using
--state <PATH>
This is an alias for both --load-state and --dump-state.
It initializes the chain with the state and block environment stored
at the file, if it exists, and dumps the chain's state on exit.
https://book.getfoundry.sh/reference/anvil/
We're also going to look into implementing the original cache dir request
Component
Anvil
Describe the feature you would like
When anvil state grows, it persists it temporarily to disk. I'd like to be able to specify a prefix path for the directory that gets created by anvil for this state.
Additional context
I am running Anvil in the cloud, and want to attach a persistent disk to the instance and mount it at the path anvil will use for storing state. Because it's a random directory each time, there's no way for me to programatically mount my disk at that location before anvil starts.