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

refactor: batched trees to 2 batches #1492

Merged
merged 8 commits into from
Jan 21, 2025
Merged

Conversation

ananas-block
Copy link
Contributor

@ananas-block ananas-block commented Jan 19, 2025

Issue:

  • Merkle trees from_account_info took 1.5k CU
  • rust ci tests were not executing test_e2e and test_simulate_transactions

Solution:

  • reduce the number of Ref casts -> reduces from_account_info calls to 800-900 CU
    1. bloom filter stores are just bytes slices no need to wrap these into a zero copy slice)
    2. make two Batch structs part of BatchMetadata -> removes 2 casts
    3. remove unnecessary account size check in from_bytes (saves 200 CU)

@ananas-block ananas-block marked this pull request as draft January 19, 2025 21:25
@ananas-block ananas-block force-pushed the jorrit/chore-batched-cleanup6 branch from 6b30abd to 84d3a51 Compare January 20, 2025 01:01
@ananas-block ananas-block marked this pull request as ready for review January 20, 2025 01:28
@ananas-block ananas-block force-pushed the jorrit/chore-batched-cleanup6 branch from 6a5d610 to a4ac68d Compare January 20, 2025 01:38
@ananas-block ananas-block force-pushed the jorrit/chore-batched-cleanup6 branch from 9506e4b to 923c2fb Compare January 20, 2025 22:13
@ananas-block ananas-block merged commit 9054b6f into main Jan 21, 2025
24 checks passed
@ananas-block ananas-block deleted the jorrit/chore-batched-cleanup6 branch January 21, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants