-
Notifications
You must be signed in to change notification settings - Fork 4
Extract wire protocol to ant-protocol; bump to 0.11.0 #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to the `ant-node` crate will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [0.11.0] — Unreleased | ||
|
|
||
| ### Changed | ||
|
|
||
| The wire-protocol surface previously owned by `ant-node` has moved to | ||
| the new [`ant-protocol`] crate. All previously-exported paths continue | ||
| to resolve via re-exports, so existing downstream imports keep working | ||
| unchanged. | ||
|
|
||
| [`ant-protocol`]: https://crates.io/crates/ant-protocol | ||
|
|
||
| - `ant_node::ant_protocol` — now re-exports from `ant_protocol::chunk`. | ||
| Both `ant_node::ant_protocol::ChunkMessage` and | ||
| `ant_node::ant_protocol::chunk::ChunkMessage` resolve. | ||
| - `ant_node::client` — `compute_address`, `peer_id_to_xor_name`, | ||
| `xor_distance`, `DataChunk`, `ChunkStats`, `XorName`, and | ||
| `send_and_await_chunk_response` now re-export from | ||
| `ant_protocol::{data_types, chunk_protocol}`. | ||
| `hex_node_id_to_encoded_peer_id` stays as node-owned code. | ||
| - `ant_node::payment::proof`, `ant_node::payment::single_node` — now | ||
| re-export from `ant_protocol::payment::{proof, single_node}`. | ||
| - `ant_node::payment::{verify_quote_content, verify_quote_signature, | ||
| verify_merkle_candidate_signature}` — now re-export from | ||
| `ant_protocol::payment::verify`. | ||
| - `ant_node::devnet::{DevnetManifest, DevnetEvmInfo}` — now re-export | ||
| from `ant_protocol::devnet_manifest`. JSON format unchanged. | ||
|
|
||
| ### Security | ||
|
|
||
| - `ant_protocol::SingleNodePayment::verify` (used via | ||
| `ant_node::payment::PaymentVerifier`) now rejects proofs whose median | ||
| quote has zero price or zero paid amount. Previously a malicious | ||
| client could have submitted a zero-priced median, and the on-chain | ||
| `completedPayments >= 0` check would have trivially succeeded. | ||
| - `ant_node::payment::PaymentVerifier` now rejects unknown | ||
| `ProofType` tag bytes (including future variants added on an | ||
| `ant-protocol` minor bump) instead of silently accepting them. | ||
|
|
||
| ### Added | ||
|
|
||
| - Re-export of the `chunk` submodule from `ant-protocol` so | ||
| `ant_node::ant_protocol::chunk::<item>` paths keep resolving for | ||
| downstream callers that used the longer path. | ||
|
|
||
| ### Deprecation notice | ||
|
|
||
| `ant_node::ant_protocol`, `ant_node::client` (except for the node-only | ||
| `hex_node_id_to_encoded_peer_id`), `ant_node::payment::{proof, | ||
| single_node}`, and `ant_node::payment::verify_*` will be removed in a | ||
| future 0.x release once the wider ecosystem has migrated to | ||
| `ant_protocol::*` directly. No timeline yet. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||||||||||||||
| [package] | ||||||||||||||||||
| name = "ant-node" | ||||||||||||||||||
| version = "0.10.0" | ||||||||||||||||||
| version = "0.11.0" | ||||||||||||||||||
| edition = "2021" | ||||||||||||||||||
| authors = ["David Irvine <david.irvine@maidsafe.net>"] | ||||||||||||||||||
| description = "Pure quantum-proof network node for the Autonomi decentralized network" | ||||||||||||||||||
|
|
@@ -23,6 +23,19 @@ name = "ant-devnet" | |||||||||||||||||
| path = "src/bin/ant-devnet/main.rs" | ||||||||||||||||||
|
|
||||||||||||||||||
| [dependencies] | ||||||||||||||||||
| # Wire protocol — the single version-pin shared with ant-client. | ||||||||||||||||||
| # Bumping ant-protocol's `evmlib`/`saorsa-core`/`saorsa-pqc` pins ripples | ||||||||||||||||||
| # through here automatically; we keep a direct saorsa-core dep for | ||||||||||||||||||
| # node-only DHT internals (DHTNode, TrustEvent, DhtNetworkEvent), which | ||||||||||||||||||
| # Cargo unifies with ant-protocol's version constraint. | ||||||||||||||||||
| # | ||||||||||||||||||
| # TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io. | ||||||||||||||||||
| # The git ref is the tagged `main` commit at the time of this PR and | ||||||||||||||||||
| # stays byte-for-byte identical to what will be published. | ||||||||||||||||||
| # TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io. | ||||||||||||||||||
| # The pinned commit matches the current `WithAutonomi/ant-protocol` main. | ||||||||||||||||||
|
Comment on lines
+35
to
+36
|
||||||||||||||||||
| # TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io. | |
| # The pinned commit matches the current `WithAutonomi/ant-protocol` main. |
Copilot
AI
Apr 17, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ant-protocol is currently pulled via a git dependency. If ant-node is intended to be published to crates.io as 0.11.0, cargo publish will fail because published crates cannot depend on git (or path) dependencies. Please switch this to a crates.io version requirement (e.g. 2.0.0) before merge/release, and if you still need the pinned revision for development, consider using a temporary [patch.crates-io] override in a non-published workspace context instead.
| # | |
| # TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io. | |
| # The git ref is the tagged `main` commit at the time of this PR and | |
| # stays byte-for-byte identical to what will be published. | |
| # TODO: swap to `ant-protocol = "2.0.0"` once 2.0.0 is on crates.io. | |
| # The pinned commit matches the current `WithAutonomi/ant-protocol` main. | |
| ant-protocol = { git = "https://github.com/WithAutonomi/ant-protocol", rev = "597dbdb1b680a43d80a082d77076ff2080444079" } | |
| ant-protocol = "2.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment above the
ant-protocoldependency mentions using a "git ref" / "tagged main commit", but the manifest currently uses a localpathdependency. Please update the comment to match the actual dependency strategy (path vs git vs crates.io) to avoid confusion during release/publish steps.