-
Notifications
You must be signed in to change notification settings - Fork 549
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
Avoid ledger copy and mutation in Sparse_ledger.of_ledger_subset_exn
#14587
Avoid ledger copy and mutation in Sparse_ledger.of_ledger_subset_exn
#14587
Conversation
!ci-build-me |
!ci-nightly-me |
!ci-build-me |
From what I understand, There are multiple PRs opened to optimize transaction applications by avoiding access to disk, but I don't think that the slowness comes from those DB access. The slowest part is that every modification to a |
Indeed, we already knew and were working on a fix. To keep the PRs small and testing more modular, it's in its own PR here: #14594 |
!ci-build-me |
cd8f02c
to
10fe9b6
Compare
d2f3c8d
to
dbfe750
Compare
src/lib/mina_ledger/sparse_ledger.ml
Outdated
non_empty_locations | ||
in | ||
let merkle_paths = Ledger.merkle_path_batch oledger merkle_path_locations in | ||
(let rec pop_empties num_empties merkle_paths locations acc = |
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.
Can't we just do a list.split here? We don't use the location
of empty accounts later.
I think we could just have List.split merkle_paths num_new_accounts
here.
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.
@ghost-not-in-the-shell do you mind implementing this change and committing to this PR?
2120e7c
to
44c86cc
Compare
44c86cc
to
a8b5b8e
Compare
!ci-build-me |
!ci-nightly-me |
!ci-build-me |
!ci-nightly-me |
c86eced
to
9c89cca
Compare
Includes a bugfix in Merkle_ledger.Database.wide_merkle_path_batch
!ci-nightly-me |
…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`
dc434fa
into
feature/merkle-mask-empty-account-preloading
This PR builds upon #14586, removing the
Ledger.copy
andLedger.create_empty_exn
calls fromSparse_ledger.of_ledger_subset_exn
. This function takes a significant amount of time in staged ledger diff application, and so this PR should further improve performance there.Checklist: