| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | | |
This name reflects its purpose better than the original one,
since it includes required protocols as well as recommended ones.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Also move the comment outside the block it documents,
to prevent a too-long line.
|
| | | |
| | |
| | |
| | | |
Also wait a little so logs can flush.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This rule makes PartialEq more sensible.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the directory code, we have functionality to advance the
consensus download state whenever possible, even if there is more we
could download in the current state.
That's fine, but when we're in this position, we need to be sure
that we're taking any action based on the current state (such as
installing notably parameters or, notably, protocol recommendations)
before we move on.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
(This isn't a boolean, because we really don't want people ignoring
all possible required protocols.)
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This doesn't need to be perfect, but we need to use it to see
if a consensus is new enough that we should obey its
recommendations.
This commit also adds a script to update or check our release date,
and calls this script from our cargo-publish script.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This is the major part of #1849.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
We want to store this separately from the consensus,
because we want to access it very early in our load-from-cache
process, without checking the consensus that contains it
for timeliness.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
We'll want this so that we can expose them before we expose the rest
of the consensus (which we need to do for spec conformance).
|
| | | |
| | |
| | |
| | | |
Also, add a new ErrorKind for this sort of error.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Part of #1849.
Note that these functions are distributed across crates,
so that if (in the future) we stop doing API breaks
with every release, we will get the right outputs.
Note also that these functions build the list of protocols
out of specific symbolic features, rather than numbers:
this makes it easier to avoid errors about "which feature was
Relay=4 again", and easier to avoid accidentally referring to a
protocol that doesn't exist, like "Consensus" (should be "Cons")
or "HsDir" (case is wrong).
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Closes #1923
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have places where, if we were to create certain ProtoKinds
or NamedProtos with invalid values, we could cause a panic.
This isn't remotely triggerable, or even triggerable from outside
the protover crate, but it's best to avoid the possibility
of future mistakes.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This will be helpful in building a list of protocols
from several crates.
|
| | | |
| | |
| | |
| | |
| | | |
This will be helpful in building a list of protocols
from several crates.
|
| | |/
| |
| |
| |
| | |
This will be helpful in checking whether a list of protocols
has any unsupported members.
|
| | |
| |
| |
| | |
Whoops! Missed that.
|
| | |
| |
| |
| |
| | |
- [`once_cell::sync::OnceCell`] should be replaced by [`std::sync::OnceLock`]
once the blocking methods are stabilized and within our MSRV.
|
| | |
| |
| |
| |
| | |
- [`once_cell::sync::OnceCell`] should be replaced by [`std::sync::OnceLock`]
once the blocking methods are stabilized and within our MSRV.
|
| | |
| |
| |
| |
| | |
- [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`],
removing the need for the once_cell dependency.
|
| | |
| |
| |
| |
| | |
- [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`],
resolving a TODO.
|
| | |
| |
| |
| | |
- [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`].
|
| | |
| |
| |
| |
| | |
- [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`],
removing the need for the `once_cell` dependency.
|
| |/
|
|
|
|
|
|
|
|
| |
- Replaced single quotes in [`hashx::rand`] documentation link to
[`hashx::rand::RngBuffer`] with backticks so it actually works.
- Added a missing backtick to the link to
[`tor_persist::state_dir::StateDirectory::instance_peek_storage`] in the
documentation of
[`tor_persist::state_dir::StateDirectory::with_instance_path_pieces`].
|
| |
|
|
|
|
| |
Instead of having a StreamIdReq that indicates
"None in V1, Any in V0", take an optional RelayCellFormat
as an argument.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since v1 cells have a longer tag, they can fit less data into a
single cell. Ah well, that's the cost of improved security.
The code in data.rs is a little wonky, in that it currently requires
its buffer to be exactly the maximum size for a data cell. We have
a TODO about fixing that in the future, but for now I've moved it to
use a boxed slice rather than a boxed array.
Part of #1944.
|
| | |
|
| |
|
|
| |
This is the main part of #1944, and will be needed for CGO.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Fortunately, the type is crate-internal, so this is not a breaking
change.
The key insight with this change is that, from the _caller's_ POV,
the set of cells that are allowed to have StreamIDs has not changed.
The only difference is that the V1 relay cell code needs to
distinguish unrecognized commands from the SENDME case.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This will let us actually _send_ messages in the right format.
This approach is not ideal for packed/fragmented messages;
they will need a separate RelayCellEncoder.
part of #1944.
|