<!-- Attention agents and contributors using AI, please see our AI
policy before opening a PR:
https://github.com/n0-computer/iroh/blob/main/AI_POLICY.md -->
<!-- Any PRs violating this policy will be closed. -->
<!-- As per our contributor guidelines, all PRs that do not link to an
issue with the label `ready-for-pr` will be closed:
https://github.com/n0-computer/iroh/blob/main/CONTRIBUTING.md -->
## Description
Fixes: #2440
* Adds `RELAY_RELATIVE_PATH` (`"relay"`) and `RELAY_PROBE_RELATIVE_PATH`
(`"ping"`), which join onto a relay URL that carries a path prefix
(`https://example.com/prefix/`) instead of landing on the host's root.
* `RELAY_PATH` and `RELAY_PROBE_PATH` keep their values and are
deprecated.
* The client and the HTTPS probe join the relative paths onto the relay
URL with `Url::join`; the relay server routes `/{RELAY_RELATIVE_PATH}`
and `/{RELAY_PROBE_RELATIVE_PATH}`.
* `RelayUrl`'s `From<Url>` (and so `FromStr` and `Deserialize`) adds a
trailing `/` to a path that lacks one, with an INFO message, so
`https://example.com/prefix` works too. `iroh-base` now depends on
`tracing` (with the `relay` feature).
* Relay URLs without a path behave as before.
## Breaking Changes
None.
## Notes & open questions
A `RelayUrl` without the trailing slash, serialised before this change,
gains it when read back.
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
---------
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
We had stray headers throughout the file. I thought I fixed this last time, but thankfully the latest version of git-cliff (`2.14`) adds a tag in the file to ensure this does not keep happening.
## Description
Fix serialization of CustomAddr so that the data serializes the same as
a Vec<u8>
This is needed so the inline size remains an implementation detail. It
breaks CustomAddr deser, but that is fine since custom addresses, while
being stable, are only used in conjunction with a feature cleary marked
as experimental.
## Breaking Changes
Does not change the public API, but does change the serialization of
CustomAddrs. I think we don't need a iroh-base 2.0 regardless because
you only create or use CustomAddrs when working with the experimental
custom transports that are explicitly excluded from stability
guarantees. YMMV.
## Notes & open questions
Note for next release: we technically break serialization format for
CustomAddr, so we should add the rationale for not going to 2.0 to the
release notes.
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] This PR was created by a human that thought critically about the
proposed change and wrote an as clear and concise description as
they could.
- [ ] This PR isn't slop, and is carefully crafted to do have the
intented effect.
## Description
This allows all of the -rc0, -rc1 and the GA releases of the
curve25519-dalek and ed25519-dalek crates. Giving downstream users the
flexibility to use either of them.
The pieces that iroh depends on have no breaking changes, so iroh can
work with both.
## Breaking Changes
None.
## Notes & open questions
Alternative to #4407.
Closes#4415.
Tested using this manifest on a new project:
``` toml
[package]
name = "testproj"
version = "0.1.0"
edition = "2024"
[dependencies]
# curve25519-dalek = "5.0.0"
# ed25519-dalek = "3.0.0"
curve25519-dalek = "5.0.0-rc.0"
ed25519-dalek = "3.0.0-rc.0"
iroh = "1.0.2"
[patch.crates-io]
iroh = { path = "/home/flub/n0/iroh/iroh" }
iroh-base = { path = "/home/flub/n0/iroh/iroh-base" }
```
Both versions seem to work. But please check if this makes sense. I
was a little surprise by this myself.
## Change checklist
- [x] Self-review.
- [x] All breaking changes documented.
- [x] This PR was created by a human that thought critically about the
proposed change and wrote an as clear and concise description as
they could.
- [x] This PR isn't slop, and is carefully crafted to do have the
intented effect.
## Description
- Update Apache-2.0 and MIT license URLs in README files from HTTP to
HTTPS.
- Keep the local LICENSE links and license text unchanged.
## Breaking Changes
None.
## Notes & open questions
Docs-only change. Verified both HTTPS license URLs resolve successfully,
and ran `git diff --check`.
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the style guide, if relevant.
- [x] Tests if relevant. Not applicable; link-only documentation update.
- [x] All breaking changes documented. No breaking changes.
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
## Description
This is a cleanup pass over all docs of public items. Fixes typos, odd
grammar, non-adherence to doc guidelines, and other minor things.
## Description
Updates `ed25519-dalek` to `=3.0.0-rc.0` and `curve25519-dalek` to
`=5.0.0-rc.0`. Not sure if the final release will be made in time. We
can do a minor release though once the final version comes out. It will
be "semi-breaking" but there's nothing we can do about it then (builds
will break for people who have `=3.0.0-rc.0` in their *own* Cargo.toml).
## Description
Define the list of allowed types per crate instead of globally, and add
a `cargo make` task to run the checks locally.
## Change checklist
- [x] Self-review.
## Description
* Make `iroh_relay::server::streams::MaybeTlsStream` private. I don't
see it being used in any public API, and it exposes `tokio_rustls` in
the public API
* Add `deny(unreachable_pub)` to all crates and fixup accordingly
## Breaking Changes
* removed: `iroh_relay::server::streams::MaybeTlsStream` is no longer
part of the public API
## Change checklist
- [x] Self-review.
- [x] All breaking changes documented.
## Description
As suggested by @Frando: move more dns related stuff from iroh-relay to
iroh-dns.
Builds on top of https://github.com/n0-computer/iroh/pull/4026
## Breaking Changes
- `iroh_relay::dns`: moved to `iroh_dns::dns`
- `iroh_relay::dns::Resolver`: moved to `iroh_dns::dns::Resolver`
- `iroh_relay::dns::DnsResolver`: moved to `iroh_dns::dns::DnsResolver`
- `iroh_relay::dns::Builder`: moved to `iroh_dns::dns::Builder`
- `iroh_relay::dns::DnsError`: moved to `iroh_dns::dns::DnsError`
- `iroh_relay::dns::DnsProtocol`: moved to `iroh_dns::dns::DnsProtocol`
- `iroh_relay::dns::LookupError`: moved to `iroh_dns::dns::LookupError`
- `iroh_relay::dns::StaggeredError`: moved to
`iroh_dns::dns::StaggeredError`
- `iroh_relay::dns::TxtRecordData`: moved to
`iroh_dns::dns::TxtRecordData`
- `iroh_relay::dns::N0_DNS_ENDPOINT_ORIGIN_PROD`: moved to
`iroh_dns::dns::N0_DNS_ENDPOINT_ORIGIN_PROD`
- `iroh_relay::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING`: moved to
`iroh_dns::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING`
- `iroh_relay::dns::DNS_TIMEOUT`: moved to `iroh_dns::dns::DNS_TIMEOUT`
- `iroh_relay::endpoint_info`: moved to `iroh_dns::endpoint_info`
- `iroh_relay::endpoint_info::EndpointInfo`: moved to
`iroh_dns::endpoint_info::EndpointInfo`
- `iroh_relay::endpoint_info::EndpointData`: moved to
`iroh_dns::endpoint_info::EndpointData`
- `iroh_relay::endpoint_info::AddrFilter`: moved to
`iroh_dns::endpoint_info::AddrFilter`
- `iroh_relay::endpoint_info::UserData`: moved to
`iroh_dns::endpoint_info::UserData`
- `iroh_relay::endpoint_info::MaxLengthExceededError`: moved to
`iroh_dns::endpoint_info::MaxLengthExceededError`
- `iroh_relay::endpoint_info::EncodingError`: moved to
`iroh_dns::EncodingError`
- `iroh_relay::endpoint_info::ParseError`: moved to
`iroh_dns::ParseError`
- `iroh_relay::endpoint_info::IROH_TXT_NAME`: moved to
`iroh_dns::IROH_TXT_NAME`
- `iroh_dns::attrs`: made private
- `iroh_dns::attrs::IrohAttr`: made private
- `iroh_dns::attrs::TxtAttrs`: made private
- `iroh_dns::attrs::endpoint_id_from_txt_name`: made private
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description
We currently abort address lookup on the first error from *any* service.
This is a bug, we should run each service to completion and only abort
once all completed or failed.
Fixes#4125
Turns out our current errors were not equipped to handle this well.
Refactored into
a) The error returned from an individual address lookup service. This is
just a struct now, because `NoServicesConfigured` didn't ever make sense
here, and `NoResults` is expressed by returning `None` without yielding
items.
b) The error returned from a lookup across all services now has
`NoServicesConfigured` and `NoResults` variants only, where the latter
can contain the errors emitted from individual services
## Breaking Changes
* changed: `iroh::address_lookup::Error` is now a struct. Existing
constructor methods are unchanged.
* changed: `iroh::endpoint::ConnectWithOptsError::NoAddress { source }`:
The `source` field now has type `AddressLookupFailed`, which is a new
error type that can hold errors for *all* failed lookup services
## Notes & open questions
It might be more appropriate to move the new format of the stream right
into `ConcurrentAddressLookup`. However, with the different error type,
it could no longer implement `AddressLookup` - which it arguably doesn't
have to. Maybe that would be the cleaner refactor?
See #4130
## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
---------
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
## Description
Move to_z32/from_z32 into iroh-base and remove EndpointIdExt trait
Ext traits are just not very nice for our users.
## Breaking Changes
removed: iroh_relay::endpoint_info::EndpointIdExt trait and its
re-export from iroh_dns. The to_z32 / from_z32 methods are now inherent
on iroh_base::PublicKey (and therefore EndpointId, which is a type
alias). Callers should drop the use
iroh_relay::endpoint_info::EndpointIdExt; import — the methods resolve
without it.
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description
This removes `rand` from the public API of iroh, allowing us to bump
`rand` crates during iroh 1.0.
The only usage in public API was `SecretKey::generate`. This now does
not take a generic arg for the RNG anymore, instead the key is generated
with `rand::rng()`, i.e. rand's default RNG.
Docs are adapted to say that if you want to use a different RNG, use
`SecretKey::from_bytes`.
The downside is that `iroh_base` now depends on `rand` but I think
that's fine I don't see `iroh_base` being used anywhere where rand is
not already in the tree.
## Breaking Changes
* `iroh_base::SecretKey::generate()` does not take a `Rng` generic
argument anymore. Instead, it uses `rand` internally through it default
RNG (`rand::rng`). If you want to use a different RNG, use
`SecretKey::from_bytes` instead.
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] All breaking changes documented.
## Description
* renames `CustomAddr::as_vec` to `CustomAddr::to_vec` because it
allocates and rust naming conventions state that `as_` should be free
* expand docs to detail the string and binary encoding formats for
custom addresses
* remove `pub` from fns on non-public `CustomAddrBytes` type
## Breaking Changes
* renamed: `iroh_base::CustomAddr::as_vec` ->
`iroh_base::CustomAddr::to_vec`
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] All breaking changes documented.
## Description
Changes the `KeyDecodeError` in iroh-base to no longer embed errors from
third-party crates to not leak them in public API surface. Also makes
the enum `non_exhaustive`.
## Breaking Changes
* changed: Variants on `iroh_base::key::KeyDecodeError` changed
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description
Updates the `rand` dependency to version 0.10.
As part of that, this also updates `rand_core`, `rand_chacha`, and a
bunch of cryptography crates like `curve25519-dalek`, `ed25519-dalek`,
`digest`, `sha1` and `sha2`. Some of the latter ones to prerelease
versions to enable compilation.
## Breaking Changes
- `iroh::SecretKey::generate`'s `CryptoRng` parameter is now updated
from rand 0.9 to rand 0.10
## Notes & open questions
Although this is ready for review, it's not ready to be merged yet,
because of patched dependencies.
This is the current TODO list:
- [x] ~~fastbloom needs to update to rand 0.10 and make a new release:
https://github.com/tomtomwombat/fastbloom/pull/27~~ (we can just disable
fastbloom's rand feature)
- [x] noq will need to merge https://github.com/n0-computer/noq/pull/511
once unblocked from fastbloom
- [x] swarm-discovery needs updating to hickory 0.26
https://github.com/rkuhn/swarm-discovery/pull/21
- [x] portmapper will need to merge
https://github.com/n0-computer/net-tools/pull/118
- [x] tokio-websockets has released with rand 0.10 support
- [x] igd-next has released with rand 0.10 support
- [x] And finally, hickory has released [a first beta for version
0.26](https://docs.rs/crate/hickory-resolver/0.26.0-beta.1), but it has
*a lot* of API changes and I'm working towards adjusting iroh code to
them.
## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
## Description
- Introduces a `ring` feature flag that enables turning off the ring
dependency
- Introduces a `aws-lc-rs` feature flag that enables using aws-lc-rs as
the crypto provider for rustls for everything TLS in iroh
- Adds `iroh::endpoint::Builder::crypto_provider` allowing anyone to
configure custom crypto providers beyond ring and aws-lc-rs. This is a
required call when neither `ring` nor `aws-lc-rs` are enabled, but will
default to either (preferring ring) if the features are enabled.
- Adds `presets::Empty` and `presets::Minimal`. The latter sets the
minimal set of required options on the builder, but is only available on
the `ring` or `aws-lc-rs` feature flags.
- Removes `Endpoint::empty_builder` in favor of `Endpoint::builder`
together with either the `presets::Empty` or `presets::Minimal`.
Depends on https://github.com/n0-computer/noq/pull/496
## Breaking Changes
- Added `iroh::endpoint::Builder::crypto_provider` for configuring the
crypto provider. After having built the Endpoint, you can get back the
crypto provider via `endpoint.tls_config().crypto_provider()`.
- Removed `Endpoint::empty_builder`. Use
`Endpoint::builder(presets::Empty)` or
`Endpoint::builder(presets::Minimal)` instead.
- **Behavioral**: If you don't call
`iroh::endpoint::Builder::crypto_provider`, you will get an error when
building in the call `Builder::bind()`.
## Notes & Open Questions
It's probably worth asking ourselves if we want to change the way we run
CI now.
Most of our tests are cfg-ed out when you disable *both* the ring and
aws-lc-rs features.
However, maybe we should add another test category that's like
`--no-default-features --feature ring/aws-lc-rs`?
We could call it `minimal` (and I guess we'd have to decide to use
either ring or aws-lc-rs).
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Typo fix
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description
Adds user defined transports.
Transports have to impl a dynable trait, currently named
CustomTransport. Implementing this requires implementing another dynable
trait CustomSender. Creating a transport requires implementing yet
another dynable trait CustomTransportFactory.
A custom addr is just an opaque blob with an u64 tranport id. Small
blobs will be inlined, but that is an implementation detail.
Formatting currently is "<id hex>-<data hex>"
Replaces https://github.com/n0-computer/iroh/pull/3707
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
- Question: encoding of custom addrs in DNS records.
- Option 1: addr=1_a1b2c3 (tries to parse first as SocketAddr then as
custom addr)
- Option 2: custom=1_a1b2c3 (separate IrohAttr::Custom)
- ~~Question: Feature gate or not? User transports require exposing a
bit more of the guts, e.g. transmit fields, so we might want to put this
behind a feature flag that is documented to be not part of the stable
API.~~
- ~~Question: Path selection.~~
~~Currently in select_best_path we never select an user path. For some
reason it still works, but we probably should put in some logic there.~~
```rust
Some((transports::Addr::User(_), _)) => {
// todo: when should we select an user path?
None
}
```
- DRY the different mapped addrs?
~~We could DRY the 2 differnet mapped addrs a bit more. But once you
start with this you get into a rabbit hole. Should relay transports just
be a special kind of custom transport? If we could abstract the logic
when to choose the relay, this might work. Maybe this is best left for
later.~~
Update: path selection is now taken care of. Basically each path gets a
2-tuple consisting of primary/secondary and biased rtt, then sort and
take the best. There is an API to add a bias for each addr type and also
to configure for each transport if it is a transport of last resort.
Here is how to bias a transport:
```rust
Endpoint::builder()
.transport_bias(
AddrKind::Custom(TEST_TRANSPORT_ID),
TransportBias::primary().with_rtt_advantage(CUSTOM_TRANSPORT_RTT_ADVANTAGE))
.build().await?;
```
I also added some tests to make sure custom transports work if the ip
transport is enabled.
## Description
More improvements to our `transport` example to ease dogfooding:
* new `--logs` flag (for both provide and fetch) for simple file
logging:
- without further config, creates a directory
`./logs/transfer-{cmd}-{date}-{endpoint_id}` and saves logs with
`iroh=trace,transfer=trace` to a `logs` file in that directory.
- different log level can be set with RUST_LOG
- different path can be set with `--logs-path`
- qlog files are also written to that directory if the `qlog` feature is
enabled
* New `--mode ping` option for `fetch` command: instead of transferring
as much data as possible, this just keeps the connection open until the
`--duration` is expired (default: 10s). This gives much smaller log
files (both tracing and qlog) so easier to debug when looking for
connection changes only.
* Regular output now includes the time since start after each line.
Useful to interpret the "switched to direct" etc lines after the fact
(they didn't have any time indication so far)
* Better formatting for durations
* Better spans on accept side. Each connection gets an `id` now that
easily allows to grep for that connection through both iroh and quinn
logs
* Print path ids with the paths stats and changes. This allows to
correlate with the tracing logs now.
With both logs and qlog in a single dir it's now really straightforward
to share it eg with sendme.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Should `--logs` include `iroh_quinn=trace` by default or not?
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description
curve25519-dalek 5.0.0-pre.x for x>1 uses rand 0.10 rc, which we don't
want.
But digest 0.11.0-rc.11 and later no longer work with curve25519-dalek
5.0.0-pre.1
## Breaking Changes
n/a
## Notes & open questions
none
## Description
final release prep!!!
- update to the latest versions of `iroh-quinn`, `iroh-quinn-udp`,
`iroh-quinn-proto`
- update to the latest version of `netwatch`
- update all deps
- update `rust-version` to 1.89
---------
Co-authored-by: Frando <frando@unbiskant.org>
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
## Description
Improves the transfer example we use for dogfooding:
* Change protocol such that the size is client- and not
server-controlled
* Add `--mode` feature on `fetch` side to either download (like
currently), upload, or transfer in both directions
* Add `--duration` feature on `fetch` side to limit by transfer duration
instead of size
* Remove the unordered receive mode. It wasn't used (there was no cli
flag so it was never enabled).
* Add `--output json` to print JSON instead of human-readable text.
* Improve docs
Because the protocol change is wire-breaking the ALPN is updated.
The JSON support was requested @Arqu a couple of time and should make
our integration in netsim easier and less brittle. Output looks like
this atm:
Provide side:
```
{"kind":"EndpointArgs","env":"Staging","relay_url":[],"no_relay":true,"no_discovery":false,"relay_only":false,"pkarr_relay_url":null,"no_pkarr_publish":false,"dns_origin_domain":null,"dns_server":null,"no_dns_resolve":false,"mdns":false,"bind_addr_v4":"127.0.0.1:1234","bind_addr_v4_additional":[],"bind_addr_v6":null,"bind_addr_v6_additional":[],"no_default_bind":false}
{"kind":"EndpointBound","endpoint_id":"5cc1982c0bc2612a2b62e7811242ec317576dace66688af743769e7eebdbb8c7","direct_addresses":["127.0.0.1:1234","[2003:f9:f724:8240:1566:102:9d0d:ea24]:33990","[2003:f9:f724:8240:a6e3:ea7a:0:edb]:33990"],"relay_url":null}
{"kind":"ConnectionAccepted","remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"ConnectionTypeChanged","status":"Selected","addr":{"Ip":"127.0.0.1:47519"},"rtt":2046,"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"HandleRequest","request":{"Download":{"Duration":3000000}},"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"UploadComplete","size":1216070367,"duration":3002590,"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"ConnectionClosed","duration":3002772,"error":null,"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
{"kind":"PathStats","paths":[{"remote_addr":{"Ip":"127.0.0.1:47519"},"rtt":95,"bytes_sent":813274,"bytes_recv":1244335203}],"remote_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed"}
```
Fetch side:
```
{"kind":"EndpointArgs","env":"Staging","relay_url":[],"no_relay":true,"no_discovery":false,"relay_only":false,"pkarr_relay_url":null,"no_pkarr_publish":false,"dns_origin_domain":null,"dns_server":null,"no_dns_resolve":false,"mdns":false,"bind_addr_v4":null,"bind_addr_v4_additional":[],"bind_addr_v6":null,"bind_addr_v6_additional":[],"no_default_bind":false}
{"kind":"SecretGenerated","secret_key":"a0952bebe97106c30d6b22a50402d55d894b8e5e3d5b63d7e643bc5e6ad8f59a"}
{"kind":"EndpointBound","endpoint_id":"f2b872754fcaad0efac0bb57e3f19e38a8c4880f6c2789705f2b69b7a2211bed","direct_addresses":["172.16.10.33:47519","[2003:f9:f724:8240:1566:102:9d0d:ea24]:45524","[2003:f9:f724:8240:a6e3:ea7a:0:edb]:45524"],"relay_url":null}
{"kind":"Connected","remote_id":"5cc1982c0bc2612a2b62e7811242ec317576dace66688af743769e7eebdbb8c7","duration":3820}
{"kind":"StartRequest","mode":"Download","length":{"Duration":3000000}}
{"kind":"ConnectionTypeChanged","status":"Selected","addr":{"Ip":"127.0.0.1:1234"},"rtt":1162}
{"kind":"DownloadComplete","size":1216070367,"time_to_first_byte":5699,"num_chunks":31134,"duration":3004047}
{"kind":"ConnectionClosed","duration":3007952,"error":null}
{"kind":"EndpointClosed","duration":81556,"timed_out":false}
{"kind":"PathStats","paths":[{"remote_addr":{"Ip":"127.0.0.1:1234"},"rtt":84,"bytes_sent":1244335156,"bytes_recv":956724}]}
```
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
This will likely break netsim.
## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
- [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
- [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
- [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
- [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
- [ ] [`sendme`](https://github.com/n0-computer/sendme)
## Description
rename `Discovery` to `AddressLookup`
## Breaking Changes
- `iroh`
- `changed`
- `discovery` -> `address_lookup`
- `Discovery` -> `AddressLookup`
- `Endpoint::discovery` -> `Endpoint::address_lookup`
- `endpoint::Builder::set_user_data_for_discovery` ->
`endpoint::Builder::set_user_data_for_address_lookup`
- `endpoint::Builder::discovery` -> `endpoint::Builder::address_lookup`
- `MdnsDiscovery` -> `MdnsAddressLookup`
- `DhtDiscovery` -> `DhtAddressLookup`
- `StaticDiscovery` -> `MemoryLookup`
- `DynIntoDiscovery` -> `DynIntoAddressLookup`
- `IntoDiscovery` -> `IntoAddressLookup`
- `DnsDiscovery` -> `DnsAddressLookup`
- `DiscoveryError` -> `AddressLookupError`
- `IntoDiscoveryError` -> `IntoAddressLookupError`
- `DiscoveryItem` -> `AddressLookupItem`
- `ConcurrentDiscovery` -> `ConcurrentAddressLookup`
- features renamed:
- `discovery-local-network` -> `mdns`
- `discovery-pkarr-dht` -> `address-lookup-pkar-dht`
## Notes & open questions
~~Very much open to changing some of these from `XEndpointIdResolution`
to `XEir` and `_endpoint_id_resolution` to `_eir`, but wasn't sure if
that would be too confusing. Sometimes it's nice to be explicit, even if
the name is long.~~
We've had many discussions and settled on `AddressLookup` as the proper
name
---------
Co-authored-by: “ramfox” <“kasey@n0.computer”>
## Description
- depends on the latest `iroh-quinn` releases
- adds back `remote_id` methods for `IncomingZeroRttConnection` and
`OutgoingZeroRttConnection`
- adds convenience method `ConnectionInfo::selected_path` to ease the
transition from removing `Endpoint::latency`
---------
Co-authored-by: “ramfox” <“kasey@n0.computer”>
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>