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
Problem: when performing transaction application, all merkle ledger
hashes are recomputed for every account update. This is wasteful for a
number of reasons:
1. Transactions normally contain more than one account update and
hashes computed by an account update are overwritten by a
subsequent account update
2. Ledger's depth is 35, whereas only around 2^18 are actually
populated. This means that each account update induces a wasteful
overhead of at least 17 hashes
Solution: defer computation of hashes in mask. When an account is added,
it's stacked in a list `unhashed_accounts` of masks which is processed
at the time of next access to hashes.
This fix improved performance of handling 9-account-update transactions
by ~60% (measured on a laptop).
0 commit comments