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

Extract "scan arbitrary block range" function from scan_cached_blocks #728

Closed
str4d opened this issue Dec 9, 2022 · 1 comment
Closed
Assignees

Comments

@str4d
Copy link
Contributor

str4d commented Dec 9, 2022

scan_cached_blocks has a specific interaction pattern with other chain scanning functions like validate_chain, and is built around an assumption of linear scanning. For DAGSync we want to be able to perform "random-access scanning", with the ability to handle contiguous batches of blocks (to optimise network access patterns and note commitment tree update patterns).

As a stepping stone towards this, we want to enable scanning the last 100 blocks as a batch (this being the section of the chain that can encounter reorgs during steady state operations). Rather than expanding or adapting scan_cached_blocks for this purpose, we should extract a new function that can perform this operation.

This may or may not be reusable for DAGSync itself (where we will be using a BatchScanner that processes more than just a contiguous batch), but we can adapt it at that point (vs scan_cached_blocks which should have its semantics preserved until we can remove it entirely).

@nuttycom nuttycom added this to the Pre-DAG-Sync milestone Jan 26, 2023
@nuttycom nuttycom modified the milestones: Pre-DAG-Sync, Release 5.5.0, Release 5.6.0 Mar 9, 2023
@nuttycom nuttycom modified the milestones: Release 5.6.0, Pre-DAG-Sync Mar 23, 2023
@nuttycom
Copy link
Contributor

This was completed by the changes in #831 and #872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants