Skip to content

Update Subduction dependencies#23

Merged
expede merged 6 commits intomainfrom
update-0-7
Mar 15, 2026
Merged

Update Subduction dependencies#23
expede merged 6 commits intomainfrom
update-0-7

Conversation

@expede
Copy link
Copy Markdown
Member

@expede expede commented Mar 15, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates darn to newer subduction_*/sedimentree_* crate versions and adjusts the core/CLI code to the new connection + sync APIs, including a refactor of Subduction initialization/hydration.

Changes:

  • Bump workspace + crate versions (0.5.10.6.0) and update Rust dependency versions (subduction_*, sedimentree_*), including lockfiles.
  • Migrate from register/full_sync/sync_all APIs to add_connection/full_sync_with_all_peers/sync_with_all_peers.
  • Refactor Subduction creation to use SubductionBuilder and implement a manual hydration path that pre-populates a ShardedMap.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
flake.lock Updates pinned Nix inputs (nixpkgs + rust-overlay revisions/hashes).
darn_core/src/subduction.rs Moves Subduction initialization to SubductionBuilder; rewrites hydration to pre-load sedimentrees into a ShardedMap; updates error aliasing.
darn_core/src/serde_base58.rs Adjusts imports for Audience/DiscoveryId module path changes.
darn_core/src/peer.rs Adjusts Audience import path.
darn_core/src/darn.rs Migrates connection registration + sync calls to new Subduction API; updates error types and some logging call sites.
darn_core/Cargo.toml Bumps crate version to 0.6.0.
darn_cli/src/commands.rs Migrates CLI flows to new Subduction API (add connection + sync-with-all-peers).
darn_cli/Cargo.toml Bumps crate version to 0.6.0.
Cargo.toml Updates workspace dependency versions for darn_core, sedimentree_*, subduction_*.
Cargo.lock Lockfile updates reflecting dependency/version changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread darn_cli/src/commands.rs Outdated
@@ -316,8 +316,8 @@ pub(crate) async fn clone_cmd(root_id_str: &str, path: &Path, out: Output) -> ey
match darn.connect_peer(peer).await {
Ok((connection, peer_id)) => {
// Register connection (without auto-syncing - we sync specific sedimentrees below)
Comment on lines 241 to +250
/// Create a new Subduction instance and spawn its background tasks.
///
/// The listener and manager futures are spawned onto the tokio runtime.
/// The listener, handler, and manager futures are spawned onto the tokio runtime.
#[must_use]
pub fn spawn(signer: MemorySigner, storage: FsStorage) -> Arc<DarnSubduction> {
let (subduction, listener_fut, manager_fut) = DarnSubduction::new(
None, // discovery_id - not using mDNS discovery yet
signer,
storage,
OpenPolicy,
NonceCache::default(),
CountLeadingZeroBytes,
ShardedMap::new(),
TokioSpawn,
DEFAULT_MAX_PENDING_BLOB_REQUESTS,
);
let (subduction, _handler, listener_fut, manager_fut) = SubductionBuilder::new()
.signer(signer)
.storage(storage, Arc::new(OpenPolicy))
.spawner(TokioSpawn)
.build::<Sendable, DarnConnection>();
Comment on lines +311 to +316
let (subduction, _handler, listener_fut, manager_fut) = SubductionBuilder::new()
.signer(signer)
.storage(storage, Arc::new(OpenPolicy))
.spawner(TokioSpawn)
.sedimentrees(sedimentrees)
.build::<Sendable, DarnConnection>();
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the workspace to newer sedimentree_* and subduction_* crate versions and updates darn’s integration code to the updated Subduction APIs (builder-based construction, connection add, and new sync helpers).

Changes:

  • Bump darn_core / darn_cli versions to 0.6.0 and update workspace dependency versions/locks (Cargo + Nix).
  • Migrate Subduction initialization to SubductionBuilder and rework hydration to explicitly load sedimentree state into a ShardedMap.
  • Update connection/sync call sites and handshake type imports to match the new subduction_core module layout.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
flake.lock Updates Nix inputs (nixpkgs, rust-overlay) to newer locked revisions.
darn_core/src/subduction.rs Switches Subduction creation to SubductionBuilder and replaces prior hydrate flow with explicit storage loading into a ShardedMap.
darn_core/src/serde_base58.rs Fixes import paths for Audience/DiscoveryId after handshake module refactor.
darn_core/src/peer.rs Updates Audience import path to new handshake layout.
darn_core/src/darn.rs Migrates to add_connection, updated sync APIs, and adjusts peer-id access/logging for new connection types.
darn_core/Cargo.toml Bumps darn_core version to 0.6.0.
darn_cli/src/commands.rs Updates CLI to add_connection and new sync helpers; removes no-longer-needed Connection import.
darn_cli/Cargo.toml Bumps darn_cli version to 0.6.0.
Cargo.toml Updates workspace dependency versions (notably sedimentree_* and subduction_*) and darn_core version reference.
Cargo.lock Refreshes lockfile for upgraded crate versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread darn_core/src/darn.rs
Comment on lines 1268 to 1276
tokio::spawn(async move {
if let Err(e) = accept_result.listener_task.await {
tracing::error!(%peer_id, "Iroh listener error: {e:?}");
tracing::error!("Iroh listener error: {e:?}");
}
});
tokio::spawn(async move {
if let Err(e) = accept_result.sender_task.await {
tracing::error!(%peer_id, "Iroh sender error: {e:?}");
tracing::error!("Iroh sender error: {e:?}");
}
@expede expede merged commit db1f4dd into main Mar 15, 2026
15 checks passed
@expede expede deleted the update-0-7 branch March 15, 2026 21:12
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