-
Notifications
You must be signed in to change notification settings - Fork 529
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
Preload accounts into merkle path for staged ledger diff application #14571
Preload accounts into merkle path for staged ledger diff application #14571
Conversation
!ci-build-me |
!ci-nightly-me |
!ci-build-me |
0dca053
to
5085720
Compare
df57650
to
344a10d
Compare
@@ -613,6 +624,33 @@ module Make (Inputs : Inputs_intf.S) = struct | |||
self_find_or_batch_lookup self_find_location | |||
Base.location_of_account_batch | |||
|
|||
let unsafe_preload_accounts_from_parent t account_ids = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrmr1993 A comment on when this could be used or should not be used would be helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
let sibling_addr = Location.Addr.sibling addr in | ||
let addr = Location.Addr.parent_exn addr in | ||
let hash = match path with `Left hash | `Right hash -> hash in | ||
self_set_hash t sibling_addr hash ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use addr
instead of sibling_addr
here because merkle_path is already the path of siblings. We did it like this here because the merkle_path function itself is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cherry-picked all commits from PR #14586 (which I will close) to this branch and function set_merkle_path_unsafe
stops being used and is completely removed by this change.
So I guess we can close this discussion.
6828275
to
5f56888
Compare
a0c92df
to
576bc95
Compare
5f56888
to
d1e5ed8
Compare
576bc95
to
d530750
Compare
d1e5ed8
to
a636e02
Compare
d530750
to
b3525d3
Compare
b3525d3
to
5e71099
Compare
!ci-build-me |
Includes a bugfix in Merkle_ledger.Database.wide_merkle_path_batch
…eature/merkle-mask-preloading
…k-empty-account-preloading
…ure/sparse-ledger-of-subset-no-mutability
…ture/sparse-ledger-wide-merkle-paths
Replace tables with maps in merkle masks
…e-merkle-paths Use 'wide merkle paths' to optimize `Sparse_ledger.of_ledger_subset_exn`
…subset-no-mutability Avoid ledger copy and mutation in `Sparse_ledger.of_ledger_subset_exn`
…-account-preloading Allow merkle masks to handle empty accounts directly
d9035e7
into
feature/improved-merkle-masks-for-staged-ledger
This PR adds preloading for ledger masks, using batch operations to get merkle paths and accounts for the transactions. This lets us avoid disk IO when applying transactions.
This PR builds upon #14570.
Checklist: