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

Do not recompute hashes on ledger commit #15979

Merged

Conversation

georgeee
Copy link
Member

Problem: recomputation of hashes is costly and is absolutely nonsensical when we commit child ledger to parent.

Solution: provide hashes map from child to parent to be used in operation of hash recomputation for the accounts being added.

This change improved performance of transaction application for 9-account-update transactions by ~20% (as measured by #14582).

Explain how you tested your changes:

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? None

Problem: recomputation of hashes is costly and is absolutely nonsensical
when we commit child ledger to parent.

Solution: provide hashes map from child to parent to be used in
operation of hash recomputation for the accounts being added.

This change improved performance of transaction application for
9-account-update transactions by ~20% (as measured on a laptop).
@georgeee
Copy link
Member Author

!ci-build-me

@mrmr1993 mrmr1993 merged commit f6cb2f8 into compatible Aug 26, 2024
42 of 44 checks passed
@mrmr1993 mrmr1993 deleted the georgeee/do-not-recompute-hashes-on-ledger-commit branch August 26, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants