| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
This silences a new warning on nightly.
|
| |
|
|
|
|
|
| |
tor_bytes also has a write_onto method. And types (especially utility
types like `Ignored`) might conceivably implement both!
No need for semver update since this was pub(crate) in the previous release.
|
| |
|
|
|
|
|
| |
Since we expose the relay_flags module, it makes sense to give this a
shorter name.
(It had a longer name when it was part of the netstatus module.)
|
| |
|
|
| |
The generic parser type is easy enough to name now.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-llcrypto: Stop deriving Deref in CtByteArray
Closes #2172
See merge request tpo/core/arti!3432
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Make much more of encode module public
See merge request tpo/core/arti!3471
|
| | | |
| | |
| | |
| | |
| | | |
My planned encoding derive macro is not going to use `decl_keyword!`
but will need to call `NetdocEncoder::item`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Abolish the constants with the transitional names.
This also abolishes the controversial name `H_S_DIR`, which Rust case
transformation rules generated from `HSDir`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're going to separate RelayFlag from RelayFlags.
We could continue to provide a bunch of constant values for
RelayFlags, for each individual type, but that would involve an ad-hoc
derive, and would still be a bit of an unusual API.
Instead, we're going to make ``RelayFlag` a normal enum.
In this commit, we change everyone to refer to it by its singular
name. Hopefully separating out this bulk change makes both this, and
the core commit, easier to review.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Many call sites pass one flag. We're going to have a type-level
distinction between a single flag and a set. But that's annoying at
many of the call sites which want to specify a fixed single flag.
Note that `set_flags` doesn't only set flags. It replaces them.
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Implement this on DocRelayFlags instead, since that's what it returns.
And change the name to from_item_consensus to highlight its semantic
restriction. (It's not generic over the implied flags, so it can only
do one thing.)
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
We're going to add options arguments, effectively, to the parsing
entrypoints. To avoid a proliferation of entrypoints (eg,
parse_multiple_with_options), encapsulate the run-time input values in
this structure.
|
| | |
| |
| |
| | |
I would do `#[deprecated]` but empirically that has no effect...
|
| | |
| |
| |
| | |
This will have space for unknown flags.
|
| | |
| |
| |
| |
| | |
Provide a per-variety alias and use it for parsing; no longer impl
ItemValueParseable for RelayFlags.
|
| | |
| |
| |
| |
| | |
Add underscores so that the spec keywords and the flag constants
correspond (according to `paste`'s case-changing rules).
|
| | |
| |
| |
| |
| | |
We're going to do a lot more with this and it's less confusing to have
it all together.
|
| | | |
|
| | |
| |
| |
| |
| | |
The word "build" so often in Rust means builder pattern. This module
contains functions for encoding.
|
| |/
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3378#note_3277957
|
| |
|
|
| |
This makes it match the protocol and the spec.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We should use the same name everywhere, even if the name in the spec
is clumsy (as it is here).
|
| |
|
|
|
|
| |
We're going to want to apply the parse2 derive to Preamble, but this
field is anomalous. Rather than trying to make it regular, simply
move it to the old-parser-specific Consensus struct.
|
| |
|
|
|
|
|
| |
Consensus is not going to be easy to square with parse2 - especially,
signature handling is very different between the two parsers.
Instead, we'll have a new NetworkStatus type.
|
| |
|
|
|
| |
There is no such thing as the "header" according to the spec. We mean
the preamble.
|
| |\
| |
| |
| |
| | |
impl ItemValueParseable for SharedRandStatus
See merge request tpo/core/arti!3380
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
These fields aren't public so this doesn't have semver impacts.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In a moment, we're going to want to transform the field arguments.
That would leave us open to bugs like this:
valid_after: valid_after.into(),
fresh_until: fresh_until.into(),
valid_until: valid_after.into(),
We'll sort out the indentation later in this branch.
|
| | |
| |
| |
| |
| | |
This (briefly) regresses the documentation, but it's going to appear
again when we derive the methods.
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add links to torspec, and other cross-references.
Change heading fof `IgnoredPublicationTimeSp` to `publication` to
match spec and distinguish it from the `published` item in netstatus
docs.
Align several descriptions with the wording from torspec.
Remove a restatement of a fact from the spec, on the `valid_until`
field in `Lifetime`.
|
| | |
|
| |
|
|
|
|
|
| |
I have eyeballed the output and it seems to look right.
Eventually we'll have encoing code and then we'll be able to check
that things round-trip.
|
| |
|
|
|
| |
This is a test of real document structs now, albeit that it still uses
one of the types from `poc`.
|
| | |
|