## Description
Fixes a typo introduced in a previous PR.
## 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
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Update documentation to RPC's subcommand `docs`.
This partially addresses #2660, and belongs to a series of PRs to
complete it.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
---------
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
## Description
Update documentation to RPC's subcommand `blobs`.
This partially addresses #2660, and belongs to a series of PRs to
complete it
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
---------
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Update documentation to `tags` command.
This partially addresses #2660, and belongs to a series of PRs to
complete it
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Update documentation to `console` commands.
This partially addresses #2660, and belongs to a series of PRs to
complete it
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Removes our custom implementation of `SharedAbortingJoinHandle` in favor
of a combination of
- `futures_util::future::Shared`
- `futures_util::future::MapErr` and
- `tokio_util::task::AbortOnDropHandle`
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
## Breaking Changes
Should all be internal, so none.
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
We need to turn the `JoinError` to a `String`, because `JoinError` is
`!Send`, but `String` is.
This is exactly the same behavior as what our custom
`SharedAbortingJoinHandle` was doing before.
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Update documentation to tags command.
This partially addresses #2660, and belongs to a series of PRs to
complete it.
## 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.
-->
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Update documentation to `start` command.
This partially addresses #2660, and belongs to a series of PRs to
complete it.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Update documentation to `net` command.
This partially addresses #2660, and belongs to a series of PRs to
complete it
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Update documentation to `console` command.
This partially addresses #2660, and belongs to a series of PRs to
complete it
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Update documentation to RPC's subcommand `authors`.
This partially addresses #2660, and belongs to a series of PRs to
complete it.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
The imports have been formatted to join similar `use` paths.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Update documentation to `doctor` command submodule.
This partially addresses #2660, and belongs to a series of PRs to
complete it.
## 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.
-->
Imports have been formated to be grouped.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
## Description
Allows us to rebuild binaries for a release and attach them again.
Fixes docker input passing when doing a workflow call.
## 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
- [ ] 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.
## Description
Add documentation to undocumented items in the entrypoint for the
`iroh-cli` at `iroh/iroh-cli/src/commands.rs`.
This partially addresses #2660, and belongs to a series of PRs to
complete it.
## Breaking Changes
No breaking changes.
## Notes & open questions
No additional notes.
## Change checklist
- [ ] 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.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
---------
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
## Description
This migrates us to tokio's AbortOnDropHandle from the various
versions we had for this ourselves. Only for iroh::node::Node we keep
a local version around since it is both Clone *and* awaits the tasks.
Generally it's probably better to not make this kind of design though,
if possible.
## Breaking Changes
Removes the `iroh_net::util` module. This only contained utilities
that should have been internal in the first place. If you were using
one of the tools to abort tasks on drop, we recommend migrating to
`tokio_util::task::AbortOnDropHandle`.
## 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.
- ~~[ ] Tests if relevant.~~
- [x] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Now, to test relay-only throughput do this:
```sh
$ cd iroh-net/bench
$ DEV_RELAY_ONLY=t cargo run --features local-relay --release -- iroh --with-relay
```
Putting this behind a feature flag means we don't get weird feature flag
workspace unification with the `test-utils` feature. Before this change,
we would basically disable DNS discovery for everything in the
workspace.
## Breaking Changes
None.
<!-- 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.
-->
Quite a few toggles now with `DEV_RELAY_ONLY`, the `local-relay` feature
and the `--with-relay` cli flag. I think each has its own meaning though
(the `--with-relay` meaning can be expanded in the future).
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
## Description
When all the probes time out the reportgen actor went into a hot-loop.
We slow this down by resetting the timer to be in the future again.
This way the actor loop can finish normally from the probes without
entering a hot-loop. The actual timeout doesn't matter too much,
normally it should not happen twice as the actor should be finished by
the time another PROBES_TIMEOUT expires.
## Breaking Changes
None
## Notes & open questions
Fixes#2684.
I've never been very happy with the mainloop of the reportgen actor.
There is too much manual state-tracking also with the way
self.outstanding_tasks is structured. Also the way that
Message::ProbeWouldHelp exists is not nice, the actor should be able
to abort any probes on it's own when they are no longer needed. Maybe
I should sit down again sometime and think better about how to
structure this. Nevertheless, this is a good fix for a real problem.
I'm not sure it's possible to write tests for this in a reasonable way
without manipulating the state entirely artificially. Another reason
that this logic would be better expressed with more typesystem help.
## Change checklist
- [x] 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.~~
- always delete hashes, even if they are protected when calling
`Store::delete`
- move gc loop implementation into the stores
## Breaking Changes
- removed `Store::gc_sweep`
- removed `Store::gc_mark`
- removed `Store::gc_start`
- added `Store::gc_run` which starts the full gc schedule
Closes#2657
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
@divagant-martian noticed there's a `println!` in iroh-blobs. I turned
this into a `tracing::debug!` instead.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
## Description
I don't think these logs were meant to be `warn!` logs. I suspect those
were originally added for debugging.
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None.
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
Should we remove them altogether?
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
## Description
Since republish occurs more or less every second, for every peer in the
local network, every second we insert it in the node_map (which includes
locking), print a debug line, and for requesters, re-send a value that
was previously sent (since every time a new sender is added we
immediately send known values). This pr makes it so that we do all this
only when new values are found.
## Breaking Changes
- swarm discovery will no longer send consecutive repeated values
## Notes & open questions
the typo is unrelated to the pr but was flagged by ci
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
## Description
iroh-gossip has a direct dependency on Quinn but does not need it.
Remove this.
## Breaking Changes
none
## Notes & open questions
Please do not merge before #2595 is merged. I'm trying to not modify
that PR any further.
## Change checklist
- [x] 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.~~
## Description
Since we have made MagicSock private it should always be created via the
Endpoint, unless we are internally messing around with tests or so.
Because of this we can make sure that the Endpoint always attaches the
correct "me" field to the span. Reducing the amount of noise in the
default log output.
## Breaking Changes
None
## Notes & open questions
Please do not merge before #2595 is merged. I'm trying to not add any
further changes to that PR.
## Change checklist
- [x] 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.~~
## Description
Upgrades the Quinn and Rustls dependencies. This touches a lot of
dependencies and affects a lot of the internal API due to the changes in
Quinn.
## Breaking Changes
- `iroh::net::endpoint::Endpoint::accept` now returns `Incoming` instead
of `Connecting`. This allows rejecting incoming connections earlier,
notify the initiating side to retry later and more. To get back
`Connecting`, simply use `Incoming::accept()`. If all you did with
`Connecting` before was to `.await` it, you can do the same with
`Incoming`, too, and get back a `Connection`.
- Removed `iroh::net::endpoint::Builder::concurrent_connections`. The
amount of concurrent connections is now controlled by either calling
`Incoming::accept` or `Incoming::refuse` after `Endpoint::accept`.
## Notes & open questions
See #2273 for the tracking issue coordinating all this work. This is the
last piece of the puzzle.
## 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: dignifiedquire <me@dignifiedquire.com>
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
These are the quinn docs for `RecvMeta::stride`:
```rs
/// The size of a single datagram in the associated buffer
///
/// When GRO (Generic Receive Offload) is used this indicates the size of a single
/// datagram inside the buffer. If the buffer is larger, that is if [`len`] is greater
/// then this value, then the individual datagrams contained have their boundaries at
/// `stride` increments from the start. The last datagram could be smaller than
/// `stride`.
///
/// [`len`]: RecvMeta::len
```
So, `meta.len` isn't necessarily evenly divided by `meta.stride`, and
the last packet could be smaller than the stride.
The previous code assumed so, however. I think that's a bug. Not bad
enough that this caused issues, but still bad.
## Breaking Changes
None
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
## Notes & open questions
What are the exact effects of this code having been incorrect before?
I guess one piece is that the metrics for computing the # received bytes
was way off.
Should we test this somehow specifically?
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
---------
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Previously, when I edited the iroh-net benchmark to print metrics, it'd
show (on a 1GB transfer):
```rs
// ...
send_ipv4: 1104880201,
// ...
recv_data_ipv4: 88912756736,
```
Clearly, the 89GB received data is wrong. The reason is that we record
the *buffer size* when we record metrics instead of recording the
*received packet size*.
The buffer tends to be around ~90kB for me, while the received packets
are around 1-2kB. This explains the 90x factor.
With this fix, I now get:
```rs
// ...
send_ipv4: 1104885110,
// ...
recv_data_ipv4: 1104882621,
```
## Breaking Changes
None.
<!-- 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
- [x] 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.~~
- [x] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
I did these changes to allow me to test relay throughput differences
between the `dig/quinn11` and `main` branches.
The way I test relay throughput now is:
```sh
$ cd iroh-net/bench
$ DEV_RELAY_ONLY=true cargo run --release -- iroh --with-relay
```
Otherwise it simply allows testing iroh with a relay enabled, too, which
is nice I think.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
I think it's pretty obvious one could expand this to enable testing
throughput not only with local relays, but also with any relay one wants
to test with (e.g. testing euw1 relay for fun). I worked on this for a
couple of minutes, then deemed it out of scope.
## Change checklist
- [x] 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.~~
- [x] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
Just a tiny change that improves performance from ~1s -> ~0.4s on my
machine.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
None
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
One could argue we shouldn't make this change, because it doesn't cause
that much erratic behavior. We should rather write tests that fail on
"more bugs".
I'm not sure. Perhaps the gossip smoke test shouldn't be the test that
we use to stress network edge cases.
## Change checklist
- [x] 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.~~
- [x] Tests if relevant.
- [x] All breaking changes documented.
## Description
- We now build the docker test CI jobs in a way that more closely
resembles the release process. It should compile the binaries and build
the image significantly faster now. (down from 8+ min to 2 min)
- Secrets are properly passed in to the reusable workflow so [release
docker builds should no longer
fail](https://github.com/n0-computer/iroh/actions/runs/10473026816/job/29005092378)
## 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
- [x] 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.
## Description
Also log the fact this is enabled on WARN level. This is pretty
important to notice.
## Breaking Changes
none
## 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.
- ~~[ ] Tests if relevant.~~
- ~~[ ] All breaking changes documented.~~
## Description
Removes items deprecated in the last release.
## Breaking Changes
### iroh-blobs
- `iroh_blobs::store::fs::Store::import_flat_store` was previously
deprecated and is now removed. Use iroh <= `0.22.0` to migrate.
- `iroh_blobs::store::fs::FlatStorePaths` is removed. This was only used
for importing flat stores, which were previously deprecated. Use iroh <=
`0.22.0` to migrate.
### iroh
- Automatic migration from flat stores is no longer possible. This was
previously deprecated. Use iroh <= `0.22.0` to migrate.
### iroh-net
- `iroh_net::endpoint::RemoteInfo::last_alive_relay` was previously
deprecated and it's now removed.
## Notes & open questions
n/a
## Change checklist
- [x] 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.~~
- [x] Tests if relevant.
- [x] All breaking changes documented.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
`iroh node status` changed to `iroh status` after
https://github.com/n0-computer/iroh/pull/2642
The `cli_provide_addresses` command wasn't set up correctly for that.
## 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
- [x] 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.~~
- [x] All breaking changes documented.
## Description
Extend iroh-blobs docs a bit
## Breaking Changes
- There are some fn name changes, but they are for unpublished fns.
- transfer_collection has been removed. It was very lowlevel and used in
none of the examples, so I doubt anybody was using it outside.
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [ ] 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.
---------
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
## Description
Co-locates all timeout defaults that have to do with making connections
or running netcheck.
closes#2602
## Notes & open questions
I nested some of the timeouts in another module (specifically the ones
pertaining to the relay) but I could do this more for other sections,
ie, the portmapper timeouts could be nested in a `portmapper` module.
## 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.
---------
Co-authored-by: Kasey Huizinga <ramfox@Kaseys-MBP.lan>
## Description
Converts the `node` module to the `net` module (`iroh` and `iroh-cli`)
Closes#2639
## Breaking Changes
- No more `deref` of `iroh::net::Client` to `iroh::client::node::Node`
- `iroh::client::node` -> `iroh::client::net`
- `iroh::client::node::Node::shutdown` ->
`iroh::client::Client::shutdown`
## 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.
- [ ] Tests if relevant.
- [x] All breaking changes documented.
---------
Co-authored-by: Kasey <kasey@n0.computer>
## Description
Rename the local-swarm-discovery feature to discovery-local-network to
be consistent with discovery-pkarr-dht
## Breaking Changes
renames the `local-swarm-discovery` feature flag in iroh-net to
`discovery-local-network`
## Notes & open questions
Naming is hard. Pretty sure the ff should start with `discovery-`, but
should it be `discovery-local-network` or `discovery-local-swarm` or
just -local...?
## Change checklist
- [ ] 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.
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
## Description
The pkarr dht publisher has two delays, the initial delay and the
republish delay. These were constants so far, but now are configurable
in the builder.
This allows us to set the delay to 0s in the dht_discovery_smoke test.
## Breaking Changes
None
## Notes & open questions
Will this fix the flakiness?
## 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.
- [ ] Tests if relevant.
- [x] All breaking changes documented.
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
## Description
This renames remote_infos_iter to remote_info_iter. This returns an
iterator of remote_info items. Using plural for "info" adds a double
plural together with "iter", creating something of a pleonasm.
## Breaking Changes
None right now, this is unreleased.
But `Endpoint::remote_infos_iter` -> `Endpoint::remote_info_iter` from
previous breaking changes.
## 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.
- ~~Tests if relevant.~~
- [x] All breaking changes documented.
## Description
cargo-ndk has [known
issues](https://github.com/bbqsrc/cargo-ndk/issues/137) with workspace
setups for versions 3.5.5 and up.
Ensuring docker test runs start with a fresh docker setup.
## 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
- [ ] 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.
## Description
Moves some functions and types to use `remote` to describe the
information we know about a node,
instead of connections. This, based on the fact that iroh-net does not
itself handle connections,
making the wording misleading at best.
## Breaking Changes
### iroh
- `client::node::Client::connection_info` ->
`client::node::Client::remote_info`
- `client::node::Client::connections` ->
`client::node::Client::remote_infos_iter`
### iroh-net
- `endpoint::ConnectionInfo` -> `endpoint::RemoteInfo`
- `endpoint::ConnectionInfo::id` is removed since it's internal
information.
- `endpoint::ConnectionInfo::last_alive_relay` is deprecated. Use
`.relay_url.last_alive`
- `endpoint::Endpoint::connection_info` ->
`endpoint::Endpoint::remote_info`
- `endpoint::Endpoint::connection_infos` ->
`endpoint::Endpoint::remote_infos_iter`
### iroh-cli (bin)
- `node connection-info` -> `node remote-info`
- `node connections` -> `node remote-list`
## Notes & open questions
1. We decided to also move many of the (currently) node commands that
come directly from iroh-net to
a new `net` top level api. Doing so we should aim as well to move the
cli to the more gracious
`remote <node-id>` and `remote list`. In summary:
- we have `iroh node remote <node-id>` and we want `iroh net remote
<remote-id>`
- we have `iroh node remote-list` and we want `iroh net remote list`
Issue #2639 is created for this
2. This adds a deprecation that needs to be removed later. Issue #2640
is created for this.
## 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.
- [ ] ~~Tests if relevant.~~
- [x] All breaking changes documented.
---------
Co-authored-by: Diva M <divma@protonmail.com>
Co-authored-by: Kasey <kasey@n0.computer>
## Description
In several places we need a oneshot channel to communicate between sync
and async code. In particular, there is one place where we intentionally
block inside async code to be able to implement a sync callback (in the
docs code, will go away at some point hopefully).
So far we have used flume and now async_channel channels with capacity 1
for this, which is quite wasteful.
This replaces all oneshot use in the fs store with the oneshot channel
from the oneshot crate, which is pretty minimal and does not panic when
calling blocking_recv from a tokio context.
## Breaking Changes
None
## Notes & open questions
Note: this was part of an attempt to get rid of async_channel in
iroh-blobs. We still need it for sync interactions with the blob store
from inside tokio tasks, for the current docs impl. But hopefully we
should be able to replace the channel for the redb actor with a mpsc
channel once that is sorted out.
## 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.
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
## 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
- [ ] 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.
Co-authored-by: Friedel Ziegelmayer <me@dignifiedquire.com>
## Description
When iroh is running in a docker container, not being able to specify
the full address is an issue. This aligns with the rpc-addr flag.
at the same time–but for different reasons–I'd also like to disable
surfacing metrics by default. My primary reason for this is an
experience I've had numerous times using iroh:
1. Start an initial node
2. Start a second node, on the same machine (usually while debugging or
following a tutorial)
3. See a "can't bind to port" error from the iroh metrics crate
4. Wonder to myself what metrics do, and if they're being sent anywhere
(I know they by default are not)
I think metrics should be treated as an advanced, opt-in feature that
power users discover and are delighted to find. As tribute to this work
I offer to write a docs page about enabling metrics to get this merged.
## Breaking Changes
* `--metrics-port` flag on the iroh cli is now `--metrics-addr`, eg:
specify `127.0.0.1:9090` instead of `9090`
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [ ] 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.
## Description
Deprecate iroh-pkarr-node-discovery and add the full dht based node
discovery to iroh itself.
## Breaking Changes
None
## Notes & open questions
PkarrNodeDiscovery does both resolution and publishing in one thing,
which is different to the two relay based versions.
Should we keep it this way? I think yes, given that we are instantiating
a full dht client and we don't want 2 of them...
Should we keep in the relay options, or remove them and make this one a
pure DHT one?
I copied the example from iroh-pkarr-node-discovery as well.
## 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.