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

chore: replace the simulated backend with live Geth #28573

Closed
karalabe opened this issue Nov 21, 2023 · 0 comments · Fixed by #28202
Closed

chore: replace the simulated backend with live Geth #28573

karalabe opened this issue Nov 21, 2023 · 0 comments · Fixed by #28202
Assignees
Milestone

Comments

@karalabe
Copy link
Member

Our simulated backend reimplements/duplicates a lot of API and functional code pointlessly, the origin of which was mostly due to the evolution of Geth:

  • 2015: Ship dev mode in ethash
  • 2016: Ship abigen and the simulated backend with chain makers (dev mode / ethash unfeasible)
  • 2017: Ship Clique enabling a lightweight dev mode

At this point it was "don't touch if it ain't broken". Still, time went on:

  • 2022: Ship The Merge, making both ethash/clique unable to follow recent forks

At this point, it "was broken", as the simulated backend cannot enable recent hard forks, so it fails to be usable as a contract testing backend. Solving the issue is not trivial though, because there's nothing to replace it with.

  • 2023: Ship a simulated beacon chain and replace dev mode with it

Now we're in a better position, Geth is able to run a self-contained chain that can follow all the latest hard forks. Whilst we could maybe try and mush into a simulated beaconchain into the simulated backend, that would make it duplicate even more code. The alternative proposal is to wrap a dev mode internally inside the simulated backend, which would instantly nuke out all code duplication and have our simulated backend act exactly as a production Geth... because it is... a production Geth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants