Closed xrvdg closed 1 month ago
Attention: Patch coverage is 84.90566%
with 24 lines
in your changes missing coverage. Please review.
Project coverage is 80.73%. Comparing base (
6eb75c0
) to head (6572fc6
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@xrvdg could you link the Juno branch that comes in tandem with this PR here. So far are using the same name for both, but just for reference for the future.
@xrvdg could you link the Juno branch that comes in tandem with this PR here. So far are using the same name for both, but just for reference for the future.
It looks good, left some questions. Also, you got me wondering how is cache working. I cannot find the logic but it is a fact that it is happening
get_compiled_contract_class
drives the caching and is central to the execution of contracts. The block-level cache that Juno uses is defined in the blockifier (CachedState
). CachedState
uses interior mutability to satisfy the StateReader
trait while still being able to populate the cache.
By storing the native executor with the contract class we can leverage the cache state reader to do the caching via
get_compiled_contract_class
instead of having to add another layer of caching. The main changes are incrates/blockifier/src/execution/contract_class.rs
,