You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sdk: stop the private document page walk from starting chunk fetches past a read's page budget #6071
Sdk::private_document_pages walks a private type's store with private_document_page_walk. Once a proof sets the chunk size, whole_chunk_pages fetches the remaining chunks through .buffered(max_concurrent), which starts a new fetch each time one is yielded. A caller that takes only max_pages pages (IdentityWallet::read_private_document_entries from #6052) drops the stream afterwards. By then up to min(max_pages, 16) - 1 fetches have already started, and their proofs are thrown away. An 8-page read can start 14 chunk fetches and use 7.
Suggested change
Give private_document_page_walk and whole_chunk_pages an optional page limit applied to the chunk starts (starts.take(n)). Pass no limit from private_document_pages_with_heights, which the DashPay sync and the shielded coordinator use, so they are unchanged. Pass the read's budget from private_document_pages. Test the started positions with the existing InFlight helper.
This costs traffic and node work, not correctness. Raised in the review of #6052.
Activity