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): option to persist all archive data #3760

Open
Tracked by #8269
fubhy opened this issue Nov 24, 2022 · 4 comments
Open
Tracked by #8269

feat(anvil): option to persist all archive data #3760

fubhy opened this issue Nov 24, 2022 · 4 comments
Labels
A-reth-anvil Area: reth-anvil C-anvil Command: anvil T-feature Type: feature

Comments

@fubhy
Copy link
Contributor

fubhy commented Nov 24, 2022

Component

Anvil

Describe the feature you would like

As described here it would be great if there was an option for Anvil to act as a full-blown a archive node, persisting all data also between restarts.

This would be required for using Anvil in a local or shared development environment with Subgraphs, Substreams, Firehose, etc. but would also be useful in development environments without these components.

The ability to restart Anvil without losing any data is crucial for a smooth developer experience from back to front and would enable Anvil to be used in similar fashion to how Ganache and Hardhat are being used today to develop and test dApp frontends and data pipelines.

Additional context

Original discussion: #3730 (comment)

@fubhy fubhy added the T-feature Type: feature label Nov 24, 2022
@rkrasiuk rkrasiuk added the C-anvil Command: anvil label Nov 28, 2022
@fubhy fubhy mentioned this issue Apr 23, 2023
8 tasks
@desi
Copy link

desi commented May 5, 2023

+1

@golden-expiriensu
Copy link
Contributor

Hi guys! Is this still planned? We use anvil as a private testnet to develop our application in the context of the mainnet. We fork mainnet and deploy a ton of contracts on that fork and then set up dozens of integrations with protocols (CurveFi, UniV3, Aave and others). Anvil node runs in the cloud 24/7 and obviously after a certain time all information about old transactions (made on the fork) removes from memory cache => disappears forever. At the moment we use hardhat-deploy (unfortunately we are still dependent on hardhat, but we are trying to switch completely to foundry) to deploy contracts. The problems start when we need to update/deploy contracts without redeploying the whole system, as the information about the old contracts (transactions are checked by the hh-deploy library) being deleted from memory. It turns out that if we need to update one facet in Diamond, we need to redeploy entire system :(. Why is this not a solution? If you update contracts, you have to drop all the data on dev databases on the backend, because they store data relevant to previous version of contracts, and if you leave everything as it is, there will be a disynchronisation with the blockchain. I hope I have described why persistent transactions would be incredibly helpful to our project. By the way, for us, it would be enough that in addition to state.json foundry would also write a transaction.json file with all transactions made after forking. Maybe you would consider this as a one step of making everything persistent? Thanks in advance :)

@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@zerosnacks zerosnacks added the A-reth-anvil Area: reth-anvil label Aug 23, 2024
@zerosnacks zerosnacks changed the title Option to persist all archive data feat(anvil): option to persist all archive data Aug 23, 2024
@zerosnacks zerosnacks removed this from the v1.0.0 milestone Aug 23, 2024
@vseae
Copy link

vseae commented Sep 14, 2024

+1

@naps62
Copy link
Contributor

naps62 commented Sep 26, 2024

Am I misinterpreting or is this already solved as of #3730 (comment) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-reth-anvil Area: reth-anvil C-anvil Command: anvil T-feature Type: feature
Projects
None yet
Development

No branches or pull requests

7 participants