HerodotusDev / hdp

Herodotus Data Processor Toolkit. Enhance zk-offchain compute for verifiable onchain data using zkVMs
https://docs.herodotus.dev/herodotus-docs/developers/herodotus-data-processor-hdp
GNU General Public License v3.0
25 stars 4 forks source link

feat: Optimize account and storage fetching as much as possible #36

Open rkdud007 opened 6 months ago

rkdud007 commented 6 months ago

Context

As can see #35 most of the latency on hdp-cli is from fetching account proof and storage proof. Currently we didn't implemented persistent db & Currently those rpc calls are not handled in parallel.

Yes, hdp-cli fetcher is really dumb implementation atm.

Some Steps

Another approach

http requet cache

rkdud007 commented 4 months ago

update: current limitation of storage slot (note : might different per account/slot) cargo run -- encode -a -o output.json -c input.json "max" -b 4952200 4952900 "account.0x7f2c6f930306d3aa736b3a6c6a98f512f74036d4.balance" 10 is this

with error :

2024-05-10T07:18:15.905986Z ERROR hdp_provider::evm: Failed to fetch account in block 4952870: RPC request `eth_getProof` failed with status: 429 Too Many Requests

optimization and plus 429 error should be important priority to make Provider Solid