Skip to content

Pin Saorsa dependencies to stability-improvements branches#93

Open
mickvandijke wants to merge 3 commits into
mainfrom
fix/stability-improvements
Open

Pin Saorsa dependencies to stability-improvements branches#93
mickvandijke wants to merge 3 commits into
mainfrom
fix/stability-improvements

Conversation

@mickvandijke
Copy link
Copy Markdown
Collaborator

Summary

  • switch ant-protocol and saorsa-core to their fix/stability-improvements git branches
  • refresh Cargo.lock for the updated dependency graph, including the matching saorsa-transport git source
  • pick up current transitive dependency updates from the resolved lockfile

Testing

  • Not run; PR opened from existing branch.

Copilot AI review requested due to automatic review settings May 10, 2026 08:05
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 switches ant-protocol and saorsa-core from crates.io releases to git branch pins (fix/stability-improvements) and refreshes Cargo.lock to reflect the new resolution (including updated transitive dependencies and a matching git-sourced saorsa-transport).

Changes:

  • Pin ant-protocol and saorsa-core to fix/stability-improvements branches via git dependencies.
  • Update Cargo.lock to capture the resulting git sources and transitive dependency updates.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
Cargo.toml Replaces crates.io version dependencies with git branch pins for ant-protocol and saorsa-core.
Cargo.lock Updates resolved dependency graph to include git sources and transitive version bumps/removals.

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

Comment thread Cargo.toml
Comment on lines +36 to +39
ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol", branch = "fix/stability-improvements" }

# Core (provides EVERYTHING: networking, DHT, security, trust, storage)
saorsa-core = "0.24.2"
saorsa-core = { git = "https://github.com/saorsa-labs/saorsa-core", branch = "fix/stability-improvements" }
Comment thread Cargo.toml
Comment on lines 32 to +36
# TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io.
# Until then, the git pin tracks the matching saorsa-core lineage
# (the rc-2026.4.2 branch) so Cargo can unify the wire types here
# with ant-protocol's re-exports.
ant-protocol = "2.0.3"
ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol", branch = "fix/stability-improvements" }
@mickvandijke mickvandijke force-pushed the fix/stability-improvements branch from c9a6e53 to 0865750 Compare May 10, 2026 16:40
@mickvandijke mickvandijke force-pushed the fix/stability-improvements branch from 0865750 to 4920a47 Compare May 10, 2026 20:34
Copilot AI review requested due to automatic review settings May 10, 2026 20:34
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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Comment thread Cargo.toml
Comment on lines 32 to +36
# TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io.
# Until then, the git pin tracks the matching saorsa-core lineage
# (the rc-2026.4.2 branch) so Cargo can unify the wire types here
# with ant-protocol's re-exports.
ant-protocol = "2.0.3"
ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol", branch = "fix/stability-improvements" }
Comment thread Cargo.toml
Comment on lines +36 to +39
ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol", branch = "fix/stability-improvements" }

# Core (provides EVERYTHING: networking, DHT, security, trust, storage)
saorsa-core = "0.24.2"
saorsa-core = { git = "https://github.com/saorsa-labs/saorsa-core", branch = "fix/stability-improvements" }
`ChunkPutRequest.content` is now `bytes::Bytes` upstream
(WithAutonomi/ant-protocol#6) so that close-group fan-out on the client
side can share one refcounted buffer across N peer sends instead of
deep-copying the 4 MB chunk per peer.

ant-node is on the receiving side of that wire format. The storage
handler's existing reads — `.len()`, `compute_address(&request.content)`,
`self.storage.put(&address, &request.content)` — all coerce
`Bytes`/`&Bytes` to `&[u8]` transparently, so the production hot path
needs no change. Two adjustments cover the remaining call sites:

- `FreshWriteEvent.data: Vec<u8>` still owns the chunk for replication
  fan-out. Materialise once at the boundary via `request.content.to_vec()`
  on the success path. This is one copy on a node that has already
  accepted the chunk — node VMs aren't memory-constrained the way the
  client VMs are. Propagating `Bytes` deeper into the replication path
  is a worthwhile follow-up but out of scope for this fix.

- Test sites that constructed `ChunkPutRequest::new(addr, content.to_vec())`
  from byte-string literals now use `Bytes::copy_from_slice(content)`,
  and the one site with an owned `Vec<u8>` uses `Bytes::from(content)`.

[patch.crates-io] and [patch."https://github.com/WithAutonomi/ant-protocol"]
override the dep with the jacderida/ant-protocol perf branch commit so
ant-node builds against the new field type both from `main` (crates.io)
and from testnet branches like `fix/stability-improvements` (which
resolve ant-protocol via saorsa-core's git-source patch). The pin should
be removed once a crates.io release including the ant-protocol change
is published.

Test plan
---------
- `cargo check --lib` — clean
- `cargo test --lib storage::handler` — 14/14 pass

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@grumbach grumbach left a comment

Choose a reason for hiding this comment

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

Approving. The pinned saorsa-transport / saorsa-core / ant-protocol stability branches built and ran cleanly on my 210-node 7-region anselme-testnet 2026-05-12. Storer-side Merkle payment verified fires per chunk, no unexpected protocol errors, no panics on the stability-bundle code paths.

This is #4 in the merge chain (transport -> core -> protocol -> node -> client). Should ideally land alongside ant-client#78 to keep the cross-repo pins consistent.

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.

4 participants