taikoxyz / raiko

Multi-proofs for Taiko. SNARKS, STARKS and Trusted Execution Enclave. Our previous ZK-EVM circuits are deprecated.
Apache License 2.0
124 stars 91 forks source link

optimistic execution for even more RPC batching #112

Closed Brechtpd closed 6 months ago

Brechtpd commented 7 months ago

We can batch the accounts and storage data accesses if we optimistically execute transactions without waiting on the data, and keeping a list of all data that was accessed. Afterwards we can then batch request all accessed data and then re-execute the transactions to incrementally get the actual required data for a block.

So this trades off local CPU processing for more efficient RPC requests because now transactions need to be executed multiple times. For remote node accesses, this seems to be very much worth it with 5x - 10x faster input gathering compared to #111.

CeciliaZ030 commented 6 months ago

Just tried it out, RPC pretty fast 👌