Skip to content

Conversation

@xdustinface
Copy link
Collaborator

@xdustinface xdustinface commented Jan 29, 2026

The actual fix is more demonstration since the relevant code will be gone soon but i need the functions in the sync rewrite.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Enhanced filter header storage handling during blockchain synchronization for more reliable checkpoint processing.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

The changes introduce a new async method store_filter_headers_at_height() to the storage layer, enabling height-aware storage of filter headers. The method is defined in the FilterHeaderStorage trait, implemented in PersistentFilterHeaderStorage and DiskStorageManager through delegation, and utilized in the legacy filters sync module to store checkpoint headers at specific heights.

Changes

Cohort / File(s) Summary
Storage trait and implementations
dash-spv/src/storage/filter_headers.rs, dash-spv/src/storage/mod.rs
Added new public async method store_filter_headers_at_height() to FilterHeaderStorage trait and implemented it in PersistentFilterHeaderStorage and DiskStorageManager via delegation to the underlying storage component.
Sync module usage
dash-spv/src/sync/legacy/filters/download.rs
Updated checkpoint header storage to use the new store_filter_headers_at_height() method instead of store_filter_headers(), explicitly specifying the height parameter for stored headers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A new path for headers we've laid,
At heights they shall rest, unafraid,
Through storage it flows, a delegation refrain,
From sync to persist, crystal plain,
Height-aware storage has come to stay! 📦

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding height-aware storage for checkpoint filter headers through the new store_filter_headers_at_height method.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/store-checkpoint-filter-header

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.

@xdustinface xdustinface merged commit 166354f into v0.42-dev Jan 30, 2026
53 checks passed
@xdustinface xdustinface deleted the fix/store-checkpoint-filter-header branch January 30, 2026 00:22
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.

3 participants