Skip to content

chore: Upgrade bdk to 2.0.0#494

Merged
binarybaron merged 3 commits intomasterfrom
chore/bdk-2.0.0
Aug 2, 2025
Merged

chore: Upgrade bdk to 2.0.0#494
binarybaron merged 3 commits intomasterfrom
chore/bdk-2.0.0

Conversation

@binarybaron
Copy link
Copy Markdown

@binarybaron binarybaron commented Aug 2, 2025

Summary by CodeRabbit

  • Chores

    • Updated and centralized dependency management across multiple packages to use workspace references, including Bitcoin Dev Kit and related crates.
    • Updated Tor/Arti dependencies to new revisions.
    • Improved formatting and consistency in documentation and configuration examples.
    • Refined and reordered code and import formatting for improved readability.
    • Adjusted template and README formatting for clarity.
    • Simplified internal error construction for improved code conciseness.
  • Refactor

    • Standardized asynchronous trait method signatures in the price feed module to return futures directly.
    • Unified handling of legacy Bitcoin network types during wallet migration for improved consistency.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update primarily consists of dependency management improvements, formatting, and minor code style changes across multiple Rust and documentation files. Notable changes include switching several crate dependencies to workspace-managed versions, updating Tor/Arti git revisions, and minor documentation corrections. A trait in swap-feed is refactored to return explicit futures instead of using async fn, and legacy wallet migration logic in swap is adjusted for consistent network type handling.

Changes

Cohort / File(s) Change Summary
Workspace Dependency Management
Cargo.toml, electrum-pool/Cargo.toml, swap/Cargo.toml, swap-feed/Cargo.toml, monero-sys/Cargo.toml
Shifted multiple dependencies (notably BDK crates, backoff, once_cell) to workspace-managed declarations; updated Tor/Arti git revisions; removed patch overrides for BDK crates.
Documentation Formatting
.github/ISSUE_TEMPLATE/submit_rendezvous_point.md, dev-docs/asb/README.md, libp2p-rendezvous-server/README.md
Minor formatting corrections: added blank lines, fixed markdown emphasis, and corrected TOML syntax.
libp2p-rendezvous-server Code Style
libp2p-rendezvous-server/Cargo.toml, libp2p-rendezvous-server/src/main.rs
Reordered dependencies in Cargo.toml; reformatted imports, function signatures, and method chains for readability in main.rs. No logic changes.
GUI Code Formatting
src-gui/src/renderer/components/pages/help/MoneroPoolHealthBox.tsx, src-gui/src/renderer/components/pages/monero/components/WalletOverview.tsx
Reformatted JSX props, expressions, and added minor spacing for improved readability; logic unchanged.
swap-feed Trait Refactor
swap-feed/src/traits.rs
Refactored the PriceFeed trait: replaced async fn methods with explicit future-returning functions, changing method signatures but preserving async behavior.
swap Legacy Wallet Migration
swap/src/bitcoin/wallet.rs
Adjusted legacy wallet migration to consistently use the legacy network type; updated imports and removed redundant conversions.
electrum-pool Error Construction
electrum-pool/src/lib.rs
Replaced verbose std::io::Error::new calls with concise std::io::Error::other constructor for error creation.
libp2p-rendezvous-server Cargo.toml Dependency Order
libp2p-rendezvous-server/Cargo.toml
Moved tor-hsservice dependency line below tokio dependency without changing versions or features.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant PriceFeedImpl

    Caller->>PriceFeedImpl: connect(url)
    Note right of PriceFeedImpl: Returns Future
    Caller->>PriceFeedImpl: await future

    Caller->>PriceFeedImpl: next_update()
    Note right of PriceFeedImpl: Returns Future
    Caller->>PriceFeedImpl: await future
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • feat(gui): Monero wallet #442: Related to Monero wallet integration, focusing on wallet event listeners and UI updates, complementing the GUI and dependency changes here.

Poem

A bunny hopped through fields of code,
Tidying crates and easing the load.
With futures clear and docs aligned,
The workspace now is well-defined.
Formatting fresh, dependencies neat—
This patch is one clean, clever feat!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4dd9915 and 521e631.

📒 Files selected for processing (1)
  • electrum-pool/src/lib.rs (9 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bdk-2.0.0

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@binarybaron
Copy link
Copy Markdown
Author

bugbot run

@binarybaron binarybaron marked this pull request as ready for review August 2, 2025 23:51
cursor[bot]

This comment was marked as outdated.

@binarybaron binarybaron merged commit d7031fd into master Aug 2, 2025
4 of 30 checks passed
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (9)
src-gui/src/renderer/components/pages/help/MoneroPoolHealthBox.tsx (1)

79-85: Consider extracting the 10 KB/s threshold into a named constant

Hard-coding the numeric literal twice makes the intent less obvious and couples UI logic to magic numbers. A small constant (e.g. HIGH_BW_THRESHOLD_KBPS) declared next to getHealthColor would improve readability and keep the threshold DRY.

src-gui/src/renderer/components/pages/monero/components/WalletOverview.tsx (3)

53-62: Minor: mixed %/Math logic could move to a helper

The multi-line reformatted calculation is correct, but this fairly heavy expression is now embedded in the component body twice (here and in the buffer logic). Extracting calc_progress_percentage(...) would aid reuse and unit-testing.


64-66: isStuck might mis-classify very low but non-zero bandwidth

Using a fixed < 0.01 cut-off is fine, but consider comparing against a user-visible constant or computing a sliding window average so that short dips don't erroneously trigger a “stuck” state.


199-201: Tiny JSX whitespace nit

The literal {" "} plus / trick works, but a template string (\u00A0 or back-tick) would be slightly clearer and avoids the empty fragment.

swap/src/bitcoin/wallet.rs (1)

2765-2768: OldWallet::new no longer needs to be async

The new parameter is welcome, but the function body still performs only synchronous work; the sole .await in the caller is therefore unnecessary and forces an extra .await? at every call-site.

-pub async fn new(
+pub fn new(
     data_dir: impl AsRef<Path>,
     xprivkey: ExtendedPrivKey,
     network: Network,
-) -> Result<Self> {
+) -> Result<Self> {

After this change, drop the .await in all invocations (currently only one).
Removing the needless async layer avoids spawning a future that immediately blocks on synchronous I/O and simplifies error handling.

.github/ISSUE_TEMPLATE/submit_rendezvous_point.md (2)

9-13: Add language identifier to fenced block

markdownlint flags MD040 here.

-```
+```text

/dns4/your.domain/tcp/8888/p2p/12D3KooWS5RaYJt4ANKMH4zczGVhNcw5W214e2DDYXnAb4dsj3


15-16: Heading style change is fine but keep consistency

You switched to italic-underscore style (*_Who..._*). Other template headings use bold. Consider keeping a uniform style across the file.

libp2p-rendezvous-server/src/main.rs (2)

210-216: Duplicate swarm-creation logic – consider unifying

create_swarm_with_onion repeats most of create_swarm except the transport. Extract a shared helper that accepts an already-built transport to avoid drift.


253-255: Potentially long Tor bootstrap

TorTransport::unbootstrapped().await? can block for many seconds.
Consider spawning the bootstrap in a background task and piping progress to logs to avoid a silent stall on startup.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 84aba17 and 4dd9915.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .github/ISSUE_TEMPLATE/submit_rendezvous_point.md (1 hunks)
  • Cargo.toml (2 hunks)
  • dev-docs/asb/README.md (1 hunks)
  • electrum-pool/Cargo.toml (1 hunks)
  • libp2p-rendezvous-server/Cargo.toml (1 hunks)
  • libp2p-rendezvous-server/README.md (1 hunks)
  • libp2p-rendezvous-server/src/main.rs (4 hunks)
  • monero-sys/Cargo.toml (1 hunks)
  • src-gui/src/renderer/components/pages/help/MoneroPoolHealthBox.tsx (1 hunks)
  • src-gui/src/renderer/components/pages/monero/components/WalletOverview.tsx (4 hunks)
  • swap-feed/Cargo.toml (1 hunks)
  • swap-feed/src/traits.rs (1 hunks)
  • swap/Cargo.toml (2 hunks)
  • swap/src/bitcoin/wallet.rs (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
swap/Cargo.toml

📄 CodeRabbit Inference Engine (AGENT.md)

The swap/Cargo.toml file is frequently edited and should be reviewed carefully for dependency and configuration changes

Files:

  • swap/Cargo.toml
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to swap/Cargo.toml : The `swap/Cargo.toml` file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to src-tauri/Cargo.toml : The `src-tauri/Cargo.toml` file is frequently edited and should be reviewed carefully for dependency and configuration changes
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, use wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns (never expose raw pointers, implement Send and Sync, use Pin for C++ objects requiring stable memory addresses).
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to Cargo.lock : The `Cargo.lock` file is frequently edited and should be reviewed carefully for dependency lock changes
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types and use the OnceLock pattern to ensure WalletManager is a singleton.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: When implementing new wrapper functions: 1. Locate the function in wallet2_api.h, 2. Copy the exact method signature to bridge.rs, 3. Implement the Rust wrapper in lib.rs, 4. Run the build to ensure everything compiles.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the unsafe extern "C++" block in bridge.rs, 3. Create a corresponding Rust wrapper in lib.rs, 4. For functions returning strings or with CXX limitations, add helper functions in bridge.h.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : In src/bridge.rs, when adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, and add wrapping logic in src/lib.rs.
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Use Rust 2021 edition.
📚 Learning: applies to src-tauri/cargo.toml : the `src-tauri/cargo.toml` file is frequently edited and should be...
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to src-tauri/Cargo.toml : The `src-tauri/Cargo.toml` file is frequently edited and should be reviewed carefully for dependency and configuration changes

Applied to files:

  • dev-docs/asb/README.md
  • swap-feed/Cargo.toml
  • libp2p-rendezvous-server/Cargo.toml
  • electrum-pool/Cargo.toml
  • swap/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
  • libp2p-rendezvous-server/src/main.rs
📚 Learning: applies to changelog.md : the `changelog.md` file is frequently edited and should be reviewed for ac...
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to CHANGELOG.md : The `CHANGELOG.md` file is frequently edited and should be reviewed for accurate and clear changelog entries

Applied to files:

  • dev-docs/asb/README.md
  • .github/ISSUE_TEMPLATE/submit_rendezvous_point.md
📚 Learning: applies to swap/cargo.toml : the `swap/cargo.toml` file is frequently edited and should be reviewed ...
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to swap/Cargo.toml : The `swap/Cargo.toml` file is frequently edited and should be reviewed carefully for dependency and configuration changes

Applied to files:

  • swap-feed/Cargo.toml
  • libp2p-rendezvous-server/Cargo.toml
  • electrum-pool/Cargo.toml
  • swap/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
  • libp2p-rendezvous-server/src/main.rs
📚 Learning: applies to cargo.lock : the `cargo.lock` file is frequently edited and should be reviewed carefully ...
Learnt from: CR
PR: eigenwallet/core#0
File: AGENT.md:0-0
Timestamp: 2025-07-23T20:01:42.422Z
Learning: Applies to Cargo.lock : The `Cargo.lock` file is frequently edited and should be reviewed carefully for dependency lock changes

Applied to files:

  • swap-feed/Cargo.toml
  • libp2p-rendezvous-server/Cargo.toml
  • electrum-pool/Cargo.toml
  • swap/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
📚 Learning: applies to monero-sys/src/lib.rs : in src/lib.rs, provide idiomatic rust interfaces to the c++ code,...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/lib.rs : In src/lib.rs, provide idiomatic Rust interfaces to the C++ code, use wrapper types (WalletManager, Wallet) with safer interfaces, and handle memory management and safety concerns (never expose raw pointers, implement Send and Sync, use Pin for C++ objects requiring stable memory addresses).

Applied to files:

  • swap-feed/Cargo.toml
  • swap/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
  • swap/src/bitcoin/wallet.rs
📚 Learning: applies to monero-sys/src/lib.rs : implement proper deref for wrapper types and use the oncelock pat...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/lib.rs : Implement proper deref for wrapper types and use the OnceLock pattern to ensure WalletManager is a singleton.

Applied to files:

  • swap-feed/Cargo.toml
  • electrum-pool/Cargo.toml
  • swap/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
  • swap/src/bitcoin/wallet.rs
📚 Learning: applies to monero-sys/**/build.rs : in build.rs, compile the monero c++ code with cmake targeting wa...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/**/build.rs : In build.rs, compile the Monero C++ code with CMake targeting wallet_api, set up include paths and library linking, configure CXX to build the bridge, and link required static and dynamic libraries.

Applied to files:

  • swap-feed/Cargo.toml
  • swap/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
📚 Learning: use rust 2021 edition....
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Use Rust 2021 edition.

Applied to files:

  • electrum-pool/Cargo.toml
  • monero-sys/Cargo.toml
  • Cargo.toml
📚 Learning: applies to monero-sys/src/{bridge.rs,lib.rs} : in src/bridge.rs, when adding a new function to the b...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : In src/bridge.rs, when adding a new function to the bridge, copy its definition from monero/src/wallet/api/wallet2_api.h into bridge.rs, and add wrapping logic in src/lib.rs.

Applied to files:

  • monero-sys/Cargo.toml
  • libp2p-rendezvous-server/src/main.rs
  • swap/src/bitcoin/wallet.rs
📚 Learning: applies to monero-sys/src/bridge.rs : in src/bridge.rs, use the `cxx::bridge` macro to define the ff...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/bridge.rs : In src/bridge.rs, use the `cxx::bridge` macro to define the FFI interface, declare C++ types and functions, and wrap static C++ methods as free functions.

Applied to files:

  • monero-sys/Cargo.toml
📚 Learning: applies to monero-sys/src/{bridge.rs,lib.rs} : use `unsafe` only for ffi interactions with monero c+...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : Use `unsafe` only for FFI interactions with Monero C++ code.

Applied to files:

  • monero-sys/Cargo.toml
📚 Learning: applies to monero-sys/src/{bridge.rs,lib.rs} : raw pointers must be wrapped in safe rust types, and ...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Applies to monero-sys/src/{bridge.rs,lib.rs} : Raw pointers must be wrapped in safe Rust types, and `unsafe` is only used at the FFI boundary.

Applied to files:

  • monero-sys/Cargo.toml
📚 Learning: when implementing new wrapper functions: 1. locate the function in wallet2_api.h, 2. copy the exact ...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: When implementing new wrapper functions: 1. Locate the function in wallet2_api.h, 2. Copy the exact method signature to bridge.rs, 3. Implement the Rust wrapper in lib.rs, 4. Run the build to ensure everything compiles.

Applied to files:

  • swap/src/bitcoin/wallet.rs
📚 Learning: when adding new functionality: 1. find the function in wallet2_api.h, 2. add its declaration to the ...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: When adding new functionality: 1. Find the function in wallet2_api.h, 2. Add its declaration to the unsafe extern "C++" block in bridge.rs, 3. Create a corresponding Rust wrapper in lib.rs, 4. For functions returning strings or with CXX limitations, add helper functions in bridge.h.

Applied to files:

  • swap/src/bitcoin/wallet.rs
📚 Learning: check wallet2_api.h for the correct function names, parameters, and return types before implementing...
Learnt from: CR
PR: eigenwallet/core#0
File: monero-sys/CLAUDE.md:0-0
Timestamp: 2025-07-23T20:01:33.031Z
Learning: Check wallet2_api.h for the correct function names, parameters, and return types before implementing FFI bindings.

Applied to files:

  • swap/src/bitcoin/wallet.rs
🪛 markdownlint-cli2 (0.17.2)
.github/ISSUE_TEMPLATE/submit_rendezvous_point.md

11-11: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (16)
src-gui/src/renderer/components/pages/monero/components/WalletOverview.tsx (1)

77-81: Division by zero already guarded – good

bandwidth_kb_per_sec > 0 prevents a crash when computing estimatedTimeRemaining. 👍

Cargo.toml (1)

50-56: Pinning Arti git revs – sanity-check the commit hashes

The new hash 1811128… must exist on the fork and include the upstream fix for stream padding that landed after 5db9ecb…. If that was the motivation, great; otherwise confirm you did not inadvertently downgrade.

swap-feed/Cargo.toml (1)

17-17: Good move to workspace-managed backoff

Centralising the version & features reduces duplication. 👍

monero-sys/Cargo.toml (1)

8-8: Workspace backoff inherits futures/tokio features

Just confirm that the root backoff declaration kept both features; monero-sys’ async code relies on them for retry logic.

electrum-pool/Cargo.toml (1)

8-12: LGTM! Workspace dependency consolidation is well-executed.

The migration to workspace-managed dependencies for backoff, bdk_electrum, and once_cell is consistent with the BDK 2.0.0 upgrade objective. The retention of the use-rustls-ring feature for bdk_electrum is appropriate for maintaining the desired TLS backend configuration.

swap/Cargo.toml (4)

15-21: LGTM! BDK dependency migration is properly structured.

The consolidation of all BDK crates (bdk, bdk_chain, bdk_core, bdk_electrum, bdk_wallet) under workspace management aligns perfectly with the BDK 2.0.0 upgrade objective. All necessary features are preserved, including use-rustls-ring for electrum and rusqlite/test-utils for wallet functionality.


28-28: Workspace migration for backoff dependency looks good.

The migration of backoff to workspace management is consistent with the broader dependency consolidation effort.


55-55: once_cell workspace migration is appropriate.

The change aligns with the workspace dependency consolidation pattern seen throughout the codebase.


15-55: Workspace dependencies verified.
All migrated dependencies (bdk, bdk_chain, bdk_core, bdk_electrum, bdk_wallet, backoff, once_cell) are defined under [workspace.dependencies] in the root Cargo.toml with the expected versions.

swap-feed/src/traits.rs (1)

14-19: Verify all PriceFeed implementors are updated for the signature change

I didn’t find any impl PriceFeed for … blocks in the swap-feed crate itself, which implies implementations may live in other workspace crates or downstream consumers. Since this is a breaking change, please:

• Search the entire repo (and any dependent crates) for impl PriceFeed to locate all implementors.
• Confirm each implementation’s connect and next_update methods now return impl Future<Output = Result<…, …>> + Send.
• Update any client code or examples that invoke PriceFeed::connect or PriceFeed::next_update to handle the new return type.

For example, you can run:

rg -nP "impl\s+PriceFeed\s+for" -t rust

Only once all implementors are verified and updated can this change be considered safe.

swap/src/bitcoin/wallet.rs (1)

417-418: Legacy network now injected explicitly – good improvement

Passing legacy_network into OldWallet::new removes the hidden conversion that previously happened inside OldWallet. This makes the migration flow easier to reason about and prevents accidental mismatches.

libp2p-rendezvous-server/README.md (1)

38-40: Pure formatting change looks good

The extra blank line cleanly separates the explanatory sentence from the bullet list and improves readability. No further action required.

dev-docs/asb/README.md (1)

61-66: Comma restores valid TOML – thanks

TOML 1.0 permits a trailing comma in arrays, so the example now parses without error.

libp2p-rendezvous-server/Cargo.toml (1)

12-14: Dependency line re-ordering only

Moving tor-hsservice below tokio has no functional impact but keeps the heavier async deps grouped. Looks fine.

libp2p-rendezvous-server/src/main.rs (2)

14-15: Import addition OK

TorTransport utilities are now required by refactored helpers; the import is correct and scoped.


22-23: Prefer explicit feature gates

OnionServiceConfigBuilder import is fine. Ensure tor-hsservice is compiled with the builder feature when bumping versions in the future.

Comment on lines 20 to +30
[workspace.dependencies]
anyhow = "1"
# Bitcoin Dev Kit
bdk = "0.28"
bdk_chain = "0.23.0"
bdk_core = "0.6.0"
bdk_electrum = { version = "0.23.0", default-features = false }
bdk_wallet = "2.0.0"
bitcoin = { version = "0.32", features = ["rand", "serde"] }

anyhow = "1"
backoff = { version = "0.4", features = ["futures", "tokio"] }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Version skew within the BDK crate family may break the build

bdk = "0.28" (pre-0.30 API) is listed alongside the new split-out crates bdk_wallet = "2.0.0", bdk_chain = "0.23.0", etc. Mixing major versions of the same project is risky:

  • Duplicate type definitions (Wallet, KeychainKind, etc.) lead to trait-coherence errors.
  • bdk 0.28 internally depends on older bdk_chain, so two different versions of the same crate end up in the dependency graph.

Please verify that every workspace crate now depends exclusively on the 2.x line (or, if you are still in transition, keep the old crate on a separate branch). A quick check:


🏁 Script executed:

#!/bin/bash
# Detect multiple versions of any bdk* crate pulled in
cargo tree -p eigenwallet-core --edges normal | grep -E 'bdk(_| )'

Length of output: 178


🏁 Script executed:

#!/bin/bash
set -e
# Extract all bdk* crate versions from Cargo.lock to detect duplicates
python3 - << 'EOF'
import re
versions = {}
with open('Cargo.lock') as f:
    content = f.read()
for block in content.split('\n\n'):
    name_m = re.search(r'name = "([^"]+)"', block)
    ver_m  = re.search(r'version = "([^"]+)"', block)
    if name_m and ver_m:
        name, ver = name_m.group(1), ver_m.group(1)
        if name.startswith('bdk'):
            versions.setdefault(name, set()).add(ver)
for name in sorted(versions):
    vers = sorted(versions[name])
    print(f"{name}: {', '.join(vers)}")
EOF

Length of output: 123


Inconsistent use of monolithic bdk alongside split-out BDK crates

Cargo.lock shows you’re pulling:

  • bdk v0.28.2
  • bdk_chain v0.23.0
  • bdk_core v0.6.0
  • bdk_electrum v0.23.0
  • bdk_wallet v2.0.0

Mixing the pre-0.30 “bdk” crate with the newer 2.x-line crates risks duplicate types and trait‐coherence errors.

Please update your workspace to use a single major-version line for all BDK components:

  • Either remove the monolithic bdk = "0.28" dependency and import only the split crates, or
  • Upgrade all split crates and the monolithic crate to the same major version (once bdk 2.x is released).

Fixes needed:

  • Cargo.toml [workspace.dependencies] block (lines 20–30): drop or align the bdk entry.
🤖 Prompt for AI Agents
In Cargo.toml lines 20 to 30, the dependency list mixes the monolithic bdk crate
version 0.28 with split BDK crates at different major versions, which can cause
type conflicts. To fix this, remove the monolithic bdk = "0.28" entry from the
workspace.dependencies block and rely solely on the split crates (bdk_chain,
bdk_core, bdk_electrum, bdk_wallet) to ensure consistent major version usage
across all BDK components.

Comment on lines +276 to +279
let combined_transport = tcp_with_dns
.boxed()
.or_transport(tor_transport.boxed())
.boxed();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Propagate errors instead of panicking

Later in this function (Line 281) authenticate_and_multiplex(...).unwrap() will still panic on failure. Since the surrounding function already returns Result, bubble the error up:

-    let transport = authenticate_and_multiplex(combined_transport, &identity).unwrap();
+    let transport = authenticate_and_multiplex(combined_transport, &identity)
+        .context("Authentication / multiplexing failed")?;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let combined_transport = tcp_with_dns
.boxed()
.or_transport(tor_transport.boxed())
.boxed();
let combined_transport = tcp_with_dns
.boxed()
.or_transport(tor_transport.boxed())
.boxed();
let transport = authenticate_and_multiplex(combined_transport, &identity)
.context("Authentication / multiplexing failed")?;
🤖 Prompt for AI Agents
In libp2p-rendezvous-server/src/main.rs around lines 276 to 279, the code
currently uses unwrap() on the result of authenticate_and_multiplex, which
causes a panic on failure. Since the function returns a Result, replace unwrap()
with proper error propagation using the ? operator to bubble the error up to the
caller instead of panicking.

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.

1 participant