titanoboa icon indicating copy to clipboard operation
titanoboa copied to clipboard

feat: cache network deployments

Open DanielSchiavini opened this issue 8 months ago • 0 comments

Fixes #82 and #231

What I did

Updated the existing cache mechanism to also cache deployments to the network.

How I did it

  • Implement a cache in sqlite DB
  • When the user passes a deploy_id to a network deployment:
    • The network env first checks whether the deployment was done before
    • If so: The deployment is done again to pyevm, but not to the RPC
    • Otherwise: The deployment is done to both pyevm and RPC, and saved in the DB
  • The cache key is sha256(source_code, bytecode, chain_id) + deploy_id

How to verify it

  • Tests are included

Description for the changelog

  • Allow deployments to be restarted by passing a deploy_id

Cute Animal Picture

image

DanielSchiavini avatar May 28 '24 16:05 DanielSchiavini