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: Restucturing Part7 Handler and Context rework #1865

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

rakita
Copy link
Member

@rakita rakita commented Nov 19, 2024

Handle becomes list of traits.

Context:

  • goes full generic on every field (Tx/Cfg/Block/Journal/Db/Chain).
  • It is flattened. There is no InnerEvmContext and other things. It is easier to use

EvmWiring got removed.

cargo depgraph --no-default-features --workspace-only --exclude example-block-traces,example-contract-deployment,example-database-components,example-database-ref,example-uniswap-get-reserves,example-uniswap-v2-usdc-swap | dot -Tpng > graph.png
Graph generated by the command above:
graph

Dependency graph took a good shape. Still needs a lot of cleanup but the major things look really good

  • Split between context and context-interface and handler and handler-interface
  • How Handler uses context-interface and not the context.
  • Small pending things that would make this even better:
    • revm-state/revm-bytecode needs to be included from database-interface/context-interface
    • Interpreter needs to be split, dependency is on InterpreterResult
    • Precompiles needs to be split, dependency is on precompile result.
  • Thing that i am unsure yet, should i introduce revm-ethereum and revm-context and revm-handler are ethereum specific. Not an important decision, and goal should be to clean/merge this asap as it is massive.

Copy link
Contributor

github-actions bot commented Nov 21, 2024

Valgrind Results:

==4489== Cachegrind, a cache and branch-prediction profiler
==4489== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==4489== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==4489== Command: target/release/revme bench snailtracer
==4489== 
--4489-- warning: L3 cache found, using its data for the LL simulation.
Running snailtracer example!
elapsed: 1.922807454s
==4489== 
==4489== I   refs:      464,097,521
==4489== I1  misses:          4,292
==4489== LLi misses:          3,852
==4489== I1  miss rate:        0.00%
==4489== LLi miss rate:        0.00%
==4489== 
==4489== D   refs:      213,060,577  (134,999,210 rd   + 78,061,367 wr)
==4489== D1  misses:        338,298  (    198,450 rd   +    139,848 wr)
==4489== LLd misses:        137,050  (      3,789 rd   +    133,261 wr)
==4489== D1  miss rate:         0.2% (        0.1%     +        0.2%  )
==4489== LLd miss rate:         0.1% (        0.0%     +        0.2%  )
==4489== 
==4489== LL refs:           342,590  (    202,742 rd   +    139,848 wr)
==4489== LL misses:         140,902  (      7,641 rd   +    133,261 wr)
==4489== LL miss rate:          0.0% (        0.0%     +        0.2%  )

@rakita rakita changed the title feat: Restucturing Handler and Context feat: Restucturing Part7 Handler and Context rework Nov 21, 2024
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 this pull request may close these issues.

1 participant