-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ephemeral local fork mode #1613
Comments
Maintaining ephemeral database while still staying in sync with the mainnet is going to require opening a long-lived read-transaction, and cause a rapid database bloat. However, such ephemeral database would be possible if turbo-geth stopped being in sync with the mainnet and just "froze" itself. Then, only ephemeral part will grow, until it is discarded, at which point turbo-geth proceeds with catching up again |
@AlexeyAkhunov 1. We don’t need transaction if can use GetAsOf 2. Does this require writable ephemeral overlay? |
@AskAlexSharov As far as I understand, the overlay is indeed writable. Yes, I think you are right, we could use |
Hi @AlexeyAkhunov @banteg @AskAlexSharov , was there any further discussion about supporting mainnet forks in the client? Or is it shelved for now? |
Would also like to know if this is a planned feature. Existing fork modes are comparatively very slow. |
isn't that how existing forks work? they freeze the DB, sync tx pool and mine on their own. |
I agree it could be a very cool feature, if we can piggy-back on our dev network |
@mandrigin FYI:
|
could be, @banteg do you need this to be persistent across Erigon launches? |
+1 this would be helpful. At least from my limited point of view, stateless ephemeral forks would be a good first step. |
This is the only viable method in reality. |
This would be a fantastic feature. Tools like tx2uml require transaction traces like |
This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Rationale
A very common pattern (1, 2) for testing contract integrations is to run them against a forked mainnet environment using ganache-cli, hardhat or hevm. It would be useful to have this functionality built in the client itself as it would work much faster and would follow consensus rules more precisely.
Implementation
Similarly to rpcdaemon, a process could connect to the existing database, and maintain an ephemeral overlay database on top.
Additionally, it'll need to support ability to control chain state, advance time and unlock arbitrary accounts. Hardhat and ganache-cli use custom RPC methods and hevm uses cheat codes.
The text was updated successfully, but these errors were encountered: