ithacaxyz / op-rs

Apache License 2.0
58 stars 6 forks source link

feat(rollup): abstract L1 cache behind `ExExHeraContext` #91

Closed merklefruit closed 2 months ago

merklefruit commented 2 months ago

This PR introduces a new wrapper struct: ExExHeraContext.

This struct wraps ExExContext with a copy of InMemoryChainProvider, such that every newly committed chain gets automatically injected into the same L1 provider cache that's used by the rollup pipeline when running as ExEx.

This abstraction allows us to stop worrying about caching L1 blocks (which was previously marked as TODO in the derivation loop) and also makes full use of the data inside Arc<Chain>, such as receipts.

Stack