Add a local DA provider for optimism bedrock chains. This requires a single network call per block to calculate the required DA gas for every user operation.
The DA provider contains an LRU cache to ensure that we only issue 1 network call update per block.
Compression happens locally now, via a fastlz binding at a specific commit. This commit is specifically the same used by LibZip.sol, which is used by the optimism DA oracle contract.
TODO:
[x] Utilize a helper contract to get all of the BlockDAData in a single eth_call
[x] Consider the implications of running the fastlz compression on each block for each user operation. Its highly likely we need the following:
[x] Cache the result of the fastlz compressed size for each UO by hash. This only needs to be done once.
[x] Consider moving the fastlz compression to a specific threadpool for blocking operations.
Related to #744
Proposed Changes
fastlz
binding at a specific commit. This commit is specifically the same used byLibZip.sol
, which is used by the optimism DA oracle contract.TODO:
BlockDAData
in a singleeth_call
fastlz
compression on each block for each user operation. Its highly likely we need the following:fastlz
compressed size for each UO by hash. This only needs to be done once.fastlz
compression to a specific threadpool for blocking operations.