-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments
+1 |
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 :) |
anvil
): option to persist all archive data
+1 |
Am I misinterpreting or is this already solved as of #3730 (comment) ? |
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)
The text was updated successfully, but these errors were encountered: