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
* fix(dash-spv): correct NetworkMessage enum variant name from GetMnListD to GetMnListDiff
Fix compile error by using the correct enum variant GetMnListDiff instead of GetMnListD
in masternodes sync code.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): add explicit error handling to find_chain_lock_quorum function
Replace silent None returns with descriptive SyncError::Validation errors for:
- Missing masternode list at or before height
- Missing quorums for required LLMQ type
- Missing quorum entries for LLMQ type
This addresses CodeRabbitAI review comment to improve error visibility
and debugging when chain lock validation fails due to missing data.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): align block message expectations with runtime behavior in MnList phase
- Remove block message expectation during DownloadingMnList phase in is_message_expected_in_phase
- Clarify comment to explicitly state blocks are intentionally ignored during MnList sync
- Ensures expectation check matches actual runtime behavior where blocks are ignored
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): resolve storage handle shadowing in chainlock validation test
Remove shadowing of storage handle by using the previously created mutable
Box<DiskStorageManager> instead of calling client.storage(). This ensures
proper borrowing and avoids variable shadowing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): use actual block height in MnListDiff validation errors
Replace hardcoded placeholder height value of 0 with actual block height
resolved from MnListDiff's block_hash via the MasternodeListEngine's
block_container.get_height() method. This provides more accurate error
reporting and improves debugging capabilities.
Changes:
- Resolve block height from diff.block_hash in validate_qr_info method
- Update ValidationCacheKey to use actual block height instead of 0
- Update validation function comments to reflect height resolution capability
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): replace MemoryStorage with MemoryStorageManager in validation tests
Replace MemoryStorage::new() with MemoryStorageManager::new().await in validation_test.rs
to use the correct async constructor and storage manager implementation that matches
the expected StorageManager trait interface.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): correct test assertion for qr_info_extra_share default
Update test in qrinfo_integration_test.rs to assert that
config.qr_info_extra_share is false by default, matching
ClientConfig::default() implementation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): add bounds checking to sync phase completion methods
Add bounds checking to complete_qr_info_request and complete_mn_diff_request
methods in phases.rs to prevent qr_info_completed and mn_diff_completed
counters from exceeding their planned totals. The methods now only increment
counters when below the planned limits and clamp requests_completed to not
exceed requests_total.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(sml): use per-window mining_start for LLMQ type skip check
Move the should_skip_quorum_type check inside the per-window loop and use
window.mining_start instead of the outer range start. This prevents
incorrectly skipping all windows when a range straddles activation height.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(docs): update API documentation to match actual dash-spv implementation
Replace placeholder get_header_height with actual get_header_height_by_hash
API name and update behavior description to match the real implementation
in dash-spv/src/storage/mod.rs, memory.rs, and disk.rs.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): replace hardcoded quorum size with dynamic LLMQ size
Replace hardcoded array size of 50 in smart_fetch_integration_test.rs with
dynamic quorum size from LLMQ type parameters. This ensures the signers
and valid_members vectors match the actual quorum size and prevent panics
if LLMQ type parameters change.
The fix extracts the quorum size using `llmq_type.size()` and uses it to
create vectors of the correct length, making the test more robust and
maintainable.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): update MockStorageManager to match current StorageManager trait
Update MockStorageManager implementation in error_handling_test.rs to match
the current StorageManager trait methods:
- Replace get_headers_range -> load_headers
- Replace get_header_by_hash -> get_header_height_by_hash (returns Option<u32>)
- Replace store_filter_header -> store_filter_headers (&[FilterHeader])
- Replace store_header -> store_headers (&[BlockHeader])
- Replace get_stats -> stats (async)
- Replace get_utxos_by_address -> get_utxos_for_address
- Replace get_chain_state -> load_chain_state
- Replace get_masternode_state -> load_masternode_state
- Replace get_mempool_state -> load_mempool_state
- Remove impl-only methods (compact_storage, get_utxo)
- Add missing trait methods (clear, clear_mempool, clear_sync_state,
get_headers_batch, get_all_mempool_transactions, get_chain_locks,
load_filter*, store_filter, store_metadata, load_metadata, etc.)
- Update remove_utxo signature to return () instead of Option<Utxo>
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace todo!() with real QRInfo response correlation implementation
- Implement wait_for_qr_info_response with proper async channel handling
- Add request/response correlation using QRInfoCorrelationManager
- Include configurable timeout (30s) with proper error mapping
- Add response validation to ensure tip_hash and base_hash match request
- Implement cleanup_request method for resource management
- Add global correlation manager accessor for dependency injection
- Handle all error paths: timeout, channel closure, validation failures
- Ensure cleanup occurs on both success and error paths
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(phase-3): correct processing_time to store elapsed duration instead of instant
Fix processing_time field in QRInfoResult to properly capture and store elapsed
duration from start to completion of QRInfo request processing. Changed field
type from Instant to Duration and updated all usage sites to calculate elapsed
time from captured start_time.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace todo!() with real QRInfo response correlation implementation
- Implement wait_for_qr_info_response with proper async channel handling
- Add request/response correlation using QRInfoCorrelationManager
- Include configurable timeout (30s) with proper error mapping
- Add response validation to ensure tip_hash and base_hash match request
- Implement cleanup_request method and global manager accessor
- Handle all error paths: timeout, channel closure, validation failures
- Ensure cleanup occurs on both success and error paths
- Fix QRInfoResult processing_time field to use Duration instead of Instant
Addresses CodeRabbitAI review comment by replacing placeholder todo!()
with complete implementation that correlates responses to requests and
returns appropriate errors instead of panicking.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(qr_info_spv_plan): replace send_error with proper Result type handling
Replace oneshot::Sender<QRInfo> with oneshot::Sender<Result<QRInfo, CorrelationError>>
to enable proper error propagation in timeout cleanup. This fixes the invalid
send_error method call by using standard Result error handling patterns.
Changes:
- Update PendingQRInfoRequest.response_sender type to Result<QRInfo, CorrelationError>
- Update register_request return type to match
- Replace send_error call with send(Err(CorrelationError::Timeout))
- Update successful response handling to send(Ok(qr_info))
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(qr_info_spv_plan): replace trait object Vec with enum-based recovery strategies
- Replace Vec<Box<dyn RecoveryStrategy>> with Vec<RecoveryStrategyEnum>
- Define RecoveryStrategyEnum with variants for all strategy types
- Implement forwarding execute method on enum to avoid trait object issues
- Add concrete implementations for all strategy types
- Resolves async method safety problems with trait objects
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix QRInfoCorrelationManager pending_requests field synchronization
- Wrap pending_requests HashMap in Mutex<HashMap<RequestId, PendingQRInfoRequest>>
- Update all methods to acquire mutex lock for thread safety
- Make methods async and change &mut self to &self where appropriate
- Update test methods to use await for new async method signatures
- Minimize locked sections to necessary operations only
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: integrate Phase 3 with existing dash-spv interfaces instead of duplicating
Rewrite PHASE_3.md to follow integration rather than replacement approach:
- Extend existing MasternodeSyncManager with feature-gated parallel QRInfo support
- Enhance RequestController to add parallel scheduling while preserving validation
- Augment RecoveryManager with parallel-aware strategies using existing patterns
- Consolidate parallel config with existing ClientConfig structure and validation
- Integrate QRInfo correlation into existing message handler routing
- Reuse existing MockNetworkManager and storage for testing
Key integration principles:
- All parallel features behind #[cfg(feature = "parallel-qrinfo")]
- Sequential sync remains unchanged and default
- Existing APIs only extended, never replaced
- Full backward compatibility maintained
- Conservative defaults and adaptive concurrency limits
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(dash-spv): correct NetworkMessage enum variant to GetMnListD
The NetworkMessage enum uses GetMnListD not GetMnListDiff as the variant name.
This fixes the compilation error that was preventing the build from completing.
* fix(build): resolve compilation errors in key-wallet-ffi and dash-spv
- Fixed NetworkMessage enum variant from GetMnListDiff to GetMnListD
- Removed non-existent address module import from key-wallet
- Fixed AddressType conversion to use dashcore types
- Commented out AddressGenerator as it doesn't exist in dashcore
- Added missing Error enum pattern matches
- Fixed InvalidAddress error variant usage
The build now succeeds for all main packages except dash-fuzz and key-wallet-ffi
which have deeper issues that need separate attention.
* revert: undo extra changes to dash-spv/src/sync/sequential/mod.rs from commit 6be28eb
Reverted the unintended changes to sequential/mod.rs that were included in
commit 6be28eb. These changes modified:
- Comment text about blocks during MnList phase
- Removed the Block(_) pattern match for DownloadingMnList phase
The original behavior has been restored where blocks are allowed during
masternode sync phase.
* revert: restore KeyWalletFFI targets in Package.swift from commit 5786b78
Reverted the unintended removal of KeyWalletFFI targets that were
removed in commit 5786b78. Restored:
- KeyWalletFFISwift product library
- KeyWalletFFI target with its linker settings
- KeyWalletFFISwift target
These targets are needed for the key wallet FFI functionality.
* chore: remove qr_info_spv_plan folder
Removed the qr_info_spv_plan planning documentation folder as requested.
This folder contained phase planning documents that are no longer needed.
* revert: uncomment AddressGenerator interface in key_wallet.udl
Restored the AddressGenerator interface definition that was commented out.
This interface is needed for the FFI bindings to work properly.
* revert: restore original key-wallet-ffi/src/lib.rs implementation
Reverted all recent changes that replaced kw_address with dashcore types:
- Restored 'address as kw_address' import
- Reverted AddressType conversions back to kw_address types
- Removed extra Error enum match cases (CoinJoinNotEnabled, Serialization, InvalidParameter)
- Restored Address struct to use kw_address::Address
- Uncommented AddressGenerator struct and all its methods
- Restored generate() and generate_range() method implementations
This brings the file back to its original working state with proper
key-wallet address handling.
* fix: restore working versions from v0.40-dev to fix build and test compilation
- Restored key-wallet-ffi/src/lib.rs with correct imports (Address/AddressType from key_wallet)
- Restored fuzz/Cargo.toml with required key-wallet dependency
- Restored fuzz/fuzz_targets/dash/deserialize_psbt.rs to use key_wallet::psbt
- Restored dash-spv-ffi test files with correct struct field initializations
- Added sync_base_height and synced_from_checkpoint to ChainState tests
- Added connected_peers, total_peers, header_height, filter_height to SpvStats tests
These files were incorrectly modified in previous commits, causing build failures.
Restoring them from origin/v0.40-dev resolves all compilation issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: add missing UnconfirmedTransaction import in error_handling_test.rs
Added the missing import for UnconfirmedTransaction type which is used in the
StorageManager trait implementation. This prevents compilation failure when
the cfg gate is eventually removed.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: dcg <dcg@dcgs-Mac-Studio.local>
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments