Skip to content

Sergey/opt nullify#2346

Draft
sergeytimoshin wants to merge 12 commits intomainfrom
sergey/opt-nullify
Draft

Sergey/opt nullify#2346
sergeytimoshin wants to merge 12 commits intomainfrom
sergey/opt-nullify

Conversation

@sergeytimoshin
Copy link
Contributor

No description provided.

SwenSchaeferjohann and others added 11 commits March 15, 2026 17:22
- Replace mwmatching crate with internal Blossom algorithm (matching.rs)
- Remove bincode dep; compute tx size natively via wire-format calculation
- Align pair_fits_transaction_size with create_smart_transaction path
- Add 32-byte safety margin to transaction size check
- Use HashSet for O(1) proof-node overlap instead of linear scan
- Eliminate instruction clones via Option::take()
- Sort state nullifies by leaf_index before pairing for better overlap
- Add pairs_only mode to BuildTransactionBatchConfig for fullness-based foresting
- Add merkle_tree field to StateNullifyInstruction for future multi-tree grouping
- Remove redundant EmptyProofAccounts error (subsumed by InvalidProofAccountsLength)
- Fix stale "30 seconds" comment (actual timeout is 15s)
- Add unit tests for pair_state_nullify_batches with realistic fixtures
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8c0eea17-38ee-4432-9232-41fb1c59fc2c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sergey/opt-nullify
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Enhanced the transaction building process in `tx_builder.rs` to support paired nullify_2 instructions, improving efficiency.
- Updated the instruction batching logic to separate address updates from state nullifications, allowing for better transaction management.
- Introduced a new method for estimating transaction sizes without cloning instructions, optimizing performance.
- Modified the nullify_2 instruction validation to streamline input checks and ensure proper proof account lengths.
- Improved test coverage for nullify_2 functionality, including tests for paired transactions and validation scenarios.
- Removed redundant validation functions and adjusted error handling for clarity and consistency.
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