Open atanmarko opened 6 days ago
Isn't it what https://github.com/0xPolygonZero/zk_evm/issues/282 was supposed to do already? Or do you mean if you kick of a job proving blocks 1
to 10
. And then a next job proving blocks 11
to 30
, the latter should retrieve the previously fetched hashes?
@Nashtare #282 just halved the number of calls to retrieve the previous 256 hashes. We still call fetch_other_block_data
for every block. We also call provider.get_block
on multiple places for the same block. Everything should be cached.
Ah ok. I got confused because the linked issue in #282 wasn't about going from 256
to 128
RPC calls but really about caching previously fetched block hashes (effectively what this new issue wants to address). But thanks for clarifying.
@Nashtare aha, OK. I opened the #282 to port https://github.com/0xPolygonZero/zero-bin/pull/62 to alloy and it didn't implement cache.
EDIT: it did in some capacity. Anyway it has to be done with current zero-bin setup ASAP.
When proving consecutive blocks, we should reuse already retrieved data.