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(anvil): be able to specify a prefix path for temp disk storage #3512

Closed
Tracked by #8269
kahuang opened this issue Oct 18, 2022 · 6 comments · Fixed by #9343
Closed
Tracked by #8269

feat(anvil): be able to specify a prefix path for temp disk storage #3512

kahuang opened this issue Oct 18, 2022 · 6 comments · Fixed by #9343
Assignees
Labels
C-anvil Command: anvil first issue A good way to start contributing P-normal Priority: normal T-feature Type: feature
Milestone

Comments

@kahuang
Copy link

kahuang commented Oct 18, 2022

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.

@kahuang kahuang added the T-feature Type: feature label Oct 18, 2022
@gakonst gakonst added this to Foundry Oct 18, 2022
@gakonst gakonst moved this to Todo in Foundry Oct 18, 2022
@gakonst
Copy link
Member

gakonst commented Oct 19, 2022

@mattsse PTAL^

@mattsse mattsse self-assigned this Oct 19, 2022
@mattsse
Copy link
Member

mattsse commented Oct 19, 2022

Does this also concern the RPC cache dir @kahuang ?

@kahuang
Copy link
Author

kahuang commented Oct 19, 2022

Anywhere that disk space can grow unbounded!

@rkrasiuk rkrasiuk added the C-anvil Command: anvil label Oct 19, 2022
@kahuang
Copy link
Author

kahuang commented Nov 4, 2022

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

@emilianobonassi
Copy link

I need it too to be able to restart a session from a specific state.

@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@zerosnacks zerosnacks changed the title Be able to specify a prefix path for temp disk storage feat(anvil): be able to specify a prefix path for temp disk storage Aug 23, 2024
@grandizzy
Copy link
Collaborator

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

@zerosnacks zerosnacks added P-normal Priority: normal first issue A good way to start contributing labels Oct 22, 2024
@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Nov 5, 2024
@zerosnacks zerosnacks reopened this Nov 5, 2024
@zerosnacks zerosnacks moved this from Done to Todo in Foundry Nov 5, 2024
@yash-atreya yash-atreya self-assigned this Nov 18, 2024
@yash-atreya yash-atreya moved this from Todo to Ready For Review in Foundry Nov 18, 2024
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Foundry Nov 21, 2024
@grandizzy grandizzy moved this from Done to Completed in Foundry Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil first issue A good way to start contributing P-normal Priority: normal T-feature Type: feature
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

8 participants