Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache prev_hashes input prover data #325

Closed
atanmarko opened this issue Jun 25, 2024 · 4 comments · Fixed by #346
Closed

Cache prev_hashes input prover data #325

atanmarko opened this issue Jun 25, 2024 · 4 comments · Fixed by #346
Assignees
Labels
crate: zero_bin Anything related to the zero-bin subcrates.
Milestone

Comments

@atanmarko
Copy link
Member

When proving consecutive blocks, we should reuse already retrieved data.

@atanmarko atanmarko added the crate: zero_bin Anything related to the zero-bin subcrates. label Jun 25, 2024
@atanmarko atanmarko self-assigned this Jun 25, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Zero EVM Jun 25, 2024
@Nashtare
Copy link
Collaborator

Isn't it what #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?

@atanmarko
Copy link
Member Author

@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.

@Nashtare
Copy link
Collaborator

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.

@atanmarko
Copy link
Member Author

atanmarko commented Jun 25, 2024

@Nashtare aha, OK. I opened the #282 to port 0xPolygonZero/zero-bin#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: zero_bin Anything related to the zero-bin subcrates.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants