## 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
<!-- 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
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
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
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
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
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
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
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
This is the third attempt to add a batch API for adding blobs. Previous
one was https://github.com/n0-computer/iroh/pull/2339
The basic idea is the following: all changes to the store happen in the
context of a _batch_. All write operations within a batch produce temp
tags. These temp tags are scoped to the batch and keep the data alive as
long as the batch exists.
At some point, the API user has to upgrade one or more temp tags to
permanent tags.
All non-batch operations would long term be implemented in terms of
batch operations.
In a second step, the following rpc calls would be replaced by their
batch equivalent.
- AddStream
- AddPath
- CreateCollection
The third one is very nice, since it means that the notion of a
collection (as in a special kind of hashseq) no longer has to even exist
in the node code.
## Breaking Changes
- iroh::client::blobs::BlobStatus has a new case NotFound
- iroh::client::blobs::BlobStatus::Partial: size is now a BaoBlobSize
instead of a u64
All other public changes are adding of new APIs.
## Notes & open questions
Note: in the previous version I had an optimisation to avoid storing
TempTags in the case where there are multiple TempTags with the same
hash. I removed this to keep things simple. We can add it back later.
## 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: Philipp Krüger <philipp.krueger1@gmail.com>
## Description
Aligns the help text for `blobs list incomplete-blobs` with the docs in
iroh.computer.
## Breaking Changes
n/a
## Notes & open questions
n/a
## 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
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
The `cli_provide_one_file_large` test takes multiple minutes to
complete.
We talked about removing it altogether in the discord.
The reasoning for removing it is that we already exercise big file
provide & get loops via netsim. So there is no need to run the same code
in debug mode taking >3 minutes in CI.
However, I ended up not removing the test but instead changing it,
because the other tests test really small file sizes, e.g. `1000` bytes.
At those sizes, outboards aren't even generated and files are put inline
into the database.
So instead I worked out the file size required for exercising the whole
external-outboard (and external-file) machinery of iroh-blobs.
The cutoff point is at ~4.1MB, which is really far away from the 1GB
size and should transfer within seconds.
## 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 just delete the test altogether?
## 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
When a blob found during migration is missing an outboard, according to
the
`cli_bao_store_migration` test, we should still migrate it. Before this
change
the blob would be ignored. This makes the test no longer broken.
## Breaking Changes
n/a
## Notes & open questions
1. I can reproduce the failure 100% of the time, so before this change
**I consider the test broken, not flaky.**
2. I reproduced the failure by running an iroh node with the exact v0
data the test uses. After the change, I did this again, and also ran
both `validate` and `consistency-check` and got no errors.
## 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
This PR changes the main public `iroh_gossip` to keep track of
client-side gossip subscriptions. The `net::Gossip` struct now keeps
track of client-side subscribers per topic, which are made up of a pair
of two streams/channels: from the client to the actor a stream of
updates (outgoing messages) and from the actor to the client a stream of
events (incoming messages). Once all client streams&sinks for a topic
are dropped, the topic is being quit.
This builds on the client API added in #2258, but completely removes the
`dispatcher` module, integrating its features directly into the gossip
actor. See below for a short list of the API changes. The new API can be
browsed
[here](https://n0-computer.github.io/iroh/pr/2570/docs/iroh/gossip/net/index.html).
The refactor turned out bigger than initially intended, sorry for that,
but I did not see a good way to reduce the scope.
What's still missing (can also be follow-ups)?:
- [ ] Review the new public API
- [ ] Align the client API to the iroh_gossip API. The `GossipTopic` can
be made to work on both the client and the native API, as it only deals
with streams and sinks.
## Breaking Changes
* `iroh_gossip::dispatcher` is removed with everything that was in it.
use the new API from `iroh_gossip::net::Gossip` instead (see below).
* `iroh_gossip::net::Gossip` methods changed:
* changed: `join` now returns a `GossipTopic`
* removed: `broadcast`, `broadcast_neighbors`, `subscribe`,
`subscribe_all`, `quit`.
* for `subscribe` use `join` instead, which returns a `GossipTopic`
* for `broadcast` and `broadcast_neighbors` use the respective methods
on `GossipTopic` .
* `quit` is obsolete now, the topic will be quitted once all
`GossipTopic` handles are dropped.
* `subscribe_all` is no longer available
* `iroh_gossip::net::JoinTopicFut` is removed (is now obsolete)
## 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
refactor(iroh): remove flume from iroh-cli and iroh
Removes most usages of flume from iroh and all usages of flume from
iroh-cli.
## Breaking Changes
None
## Notes & open questions
Note: this does not remove all usages because we need the iroh docs
purge PR to be merged before that.
## 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: Philipp Krüger <philipp.krueger1@gmail.com>
Co-authored-by: Kasey <kasey@n0.computer>
Co-authored-by: Kasey Huizinga <ramfox@Kaseys-MBP.lan>
## Description
#2537 mentions someone not finding the configuration options after
running `iroh start --help`. `iroh --help` already mentions both
<https://iroh.computer/docs> in the second line and
<https://iroh.computer/docs/reference/config> in the config flag (this
one
being fairly recent addition to the help text). I'd say the only thing
missing here is to be able to see the docs from the subcommands, which
is what this pr does.
## Breaking Changes
n/a
## 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.~~
- [ ] ~~Tests if relevant.~~
- [ ] ~~All breaking changes documented.~~
## Description
Takes a different approach to tests by doing the setup for them all
first
before running the tests, to prevent windows from whining about a locked
blobs.db used by the provider. This still requires an ephemeral iroh to
obtain
the blobs.db but does not require much re-starting, making it less prone
to
weird shutdown issues.
## Breaking Changes
n/a
## Notes & open questions
Note that there is sleep as a synchronization point because otherwise
the
folder for the tests will not have the correct contents. Unexpected but
have
seen it happen a lot. We also use a different folder for the iroh
instance
that actually is providing during the tests, in case shutdown is not
done
for the instance that produces the blobs.db, when the one that provides
is
started.
## 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.
- [ ] ~~All breaking changes documented.~~
## Description
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
This is moving around the relay modules a bit. Mostly so that all
server-specific code is under `iroh-net/src/relay/server/`.
This means there's only a handful of `#[cfg(feature = "iroh-relay")]`s
in `relay.rs` and a bunch of other places due to unused warnings
otherwise.
I've also renamed what was previously `iroh::relay::client::{Client,
ClientBuilder, ClientReceiver, ...}` to
`iroh::relay::client::conn::{Conn, ConnBuilder, ConnReceiver, ...}`,
because otherwise the `Client*` names were duplicated in two modules
that were in a parent-child relationship, which is super confusing.
And really, the inner `Client`s are more about individual connections.
I also resolved a TODO around moving to an `AbortingJoinHandle` in favor
of a custom `RelayHttpServerGuard`.
## Breaking Changes
<!-- Optional, if there are any breaking changes document them,
including how to migrate older code. -->
- Refactored the module structure for users of the `iroh-relay` feature
in iroh-net.
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
I realize the diff here is quite substantial. Unfortunately the diff is
mostly just bad because I ended up "swapping places" for modules in two
cases, which ended up creating really bad diffs.
I know the diff is quite sad, so it's fair if we say "this is
unreviewable" and I scrap this piece of work. I'm not blocked on this
merging, and I only fairly quickly knocked this out today.
As Mark Twain famously said
> I apologize for such a long PR - I didn't have time to write a short
one.
Or sth like that.
## 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. Yeah? Kinda?
## Description
In windows there is no way to copy a file being accessed by another
process in an accessible way. This is what makes this test fail since it
attempt to copy the blobs.db folder a couple of times while the iroh
instance that handles is running.
The change is simple: shutdown the provider, copy the files, re-start
the provider. From my perspective, this does not affect what the test is
attempting to assert.
Now, since this includes re-starting the iroh instance that provides the
files several times, and we match on output, sometimes we can get weird
logs related to shutdown. One of those (and the only one I have seen so
far) is for a netcheck report and didn't finish on time. Instead of
logging this in the reportgen actor, the error is bubbled up to be
handled by the netcheck actor (which will have shutdown by then) thus
reducing noise and allowing for better error handling in the future
## Breaking Changes
n/a
## 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.
- [ ] ~~All breaking changes documented.~~
## Description
I have not seen these tests fail for at least the past two weeks. I
think they might no longer be flaky. I suspect much of the flakiness
came from quinn's logging errors on shutdown, which no longer happens.
## Breaking Changes
n/a
## 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.~~
- [ ] ~~Tests if relevant.~~
- [ ] ~~All breaking changes documented.~~
## Description
While I'm not a huge fan of this piece of code, I don't really see much
of an alternative as we want to be able to force the override to use
staging relays even in "prod" environments or when it's deeply
integrated such as the FFI library cases.
This should allow us to override the default relay maps for all of our
CI setups in all of our repos.
## 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
The configuration file behaviour is improved:
- Unknown fields will now cause an error rather than be silently
ignored.
- Make it possible to express GcPolicy in the TOML config file. This
was not possible before. It was possible to disable it before, but
it was disabled by default so that was rather moot.
The --help output is improved:
- Update header of iroh.
- Directly point to config file docs.
- Use consistent style.
<!-- A summary of what this pull request achieves and a rough list of
changes. -->
## Breaking Changes
- Unknown fields in the configuration file will now cause an error.
- Configuring the GC Policy in the configuration file has changed.
<!-- 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.
- [x] Tests if relevant.
- [x] All breaking changes documented.
## Description
We recently update the api from `blob` to `blobs`, and `tag` to `tags`.
This adjusts the tests.
## Breaking Changes
n/a
## 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.~~
- [ ] ~~Tests if relevant.~~
- [ ] ~~All breaking changes documented.~~
## Description
- Cleans up stale counters
- Introduces unique daily node counts on relays
- Introduces a metrics dumper so we can create dumps of metrics and also
view them in doctor plot
- Introduces new trace level counters
## Breaking Changes
- Introduces `metrics_dump_path` on the top level CLI parameters, which
if set will make sure metrics are collected at regular intervals and
written to the provided path in CSV format.
## 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
Instead introduces
- `endpoint::Builder::known_nodes` to provide existing `NodeAddr`s
- you can use `endpoint::Endpoint::connection_infos` to retrieve the
current list of known nodes that can be persisted
## Notes
- `prune_inactive` is not called anymore when storing, only on the
heartbeat, and so there is a chance of storing uninteresting addresses
- the logic of filtering nodes has changed a little bit, to simplify the
code paths
## Breaking Changes
- `endpoint::Builder::peers_path` is removed
- no automatic storage of known peers in `iroh-net`
## TODO
- [x] Recreate automatic storage and loading of peers inside of `iroh`
## Description
The tokio_util LocalPoolHandle does not properly handle Drop during
shutdown. Its threads are just spawned as detached. So any drop impl
that runs in a local pool thread will be stopped as soon as the process
terminates. This can have some bad consequences if that drop operation
performs IO, like closing files and committing database transactions.
Here is where the threads get spawned. The `std::thread::JoinHandle`s
are just dropped.
https://docs.rs/tokio-util/latest/src/tokio_util/task/spawn_pinned.rs.html#381
Here is some discussion of the observed effects:
https://discord.com/channels/949724860232392765/1260571544414064670
LocalPoolHandle also, of course, is using an unbounded channel:
https://docs.rs/tokio-util/latest/src/tokio_util/task/spawn_pinned.rs.html#372
## Breaking Changes
Public interfaces using tokio_util::task::LocalPoolHandle will now use
our own LocalPool/LocalPoolHandle.
## Notes & open questions
Should we use an unbounded channel like tokio::spawn or
LocalPoolHandle::spawn_pinned? Seems like a big footgun. But if not, we
need to somehow handle when the queue is full.
<!-- 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] Tests if relevant.
- [x] All breaking changes documented.
## Description
We didn't get good logs on the `cli_bao_store_migration` test so far.
Here's what it's output was in a failure case:
```
--- STDOUT: iroh-cli::cli cli_bao_store_migration ---
running 1 test
|Iroh is running
|Node ID: cnzuojj4sbo2ulpqoo2riyrdsn2j4pnp3b5bgrjubsft72nutlca
iroh started up.
test cli_bao_store_migration ... FAILED
failures:
failures:
cli_bao_store_migration
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 12 filtered out; finished in 2.71s
--- STDERR: iroh-cli::cli cli_bao_store_migration ---
thread 'cli_bao_store_migration' panicked at iroh-cli/tests/cli.rs:394:5:
assertion `left == right` failed
left: ""
right: "4yny3v7anmzzsajv2amm3nxpqd2owfw4dqnjwq6anv7nj2djmt2q (0 B)\n"
```
This was only capturing stdout from one of the four iroh commands.
This PR changes that. Now stdout and stderr are captured by all iroh commands in the `cli_bao_store_migration` test.
## Breaking Changes
None
## Notes & open questions
I've also switched `PathBuf::to_string_lossy()` calls to be `PathBuf::display()` calls.
## 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
Windows CI was so slow, the transfer was measured in *minutes*, not
*seconds* and printed as such to the CLI.
The CLI tests only expected "seconds" to be printed though. 😬
Also went ahead and improved performance of `make_test_file` because
damn this test is already slow enough.
## Breaking Changes
None
## Notes & open questions
Idk, do you have any? :P
## 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
We had some CLI tests that had `#[cfg(feature = "fs-store")]`, but that
feature doesn't exist in `iroh-cli`... so they were never compiled (and
some related code needed for these tests was deleted. I reintroduced
it).
This also fixes what is likely a bug, where `#[cfg(target_arch =
"netbsd")]` was used, but there is no "architecture" netbsd. Only an
*OS* netbsd.
## Breaking Changes
None
## Notes & open questions
--
## 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
- Enable binding of the RPC endpoint to arbitrary addresses
- Add Dockerfile for iroh
## Breaking Changes
- changed `iroh::node::Node::my_rpc_port` is now `my_rpc_addr` and
returns `Option<SocketAddr>`
- `iroh::node::Builder::rpc_endpoint` takes `Option<SocketAddr> instead
of `Option<u16>`
- added `iroh::node::Builder::enable_rpc_with_addr` allowing to specify
on which address + port to bind to
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [x] Self-review.
- [x] Documentation updates if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
---------
Co-authored-by: dignifiedquire <me@dignifiedquire.com>