| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
and propagate to other affected crates
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Some of these were for decoding particular objects (we now say
what kind of objects), and some were unrelated tor_cert errors that
for some reason we had shoved into a tor_bytes::Error.
There is now a separate tor_cert::CertError type, independent from
tor_cert's use of `tor_bytes::Error` for parsing errors.
|
| |
|
|
|
|
|
|
| |
(This is slightly different from recovering from errors in the
middle of a list of mds, since in this case we _can't_ advance to the
next md.)
Also, note that a given branch is probably not reachable.
|
| |
|
|
|
| |
The "bad-id" microdescriptor is hand-edited based on one from a
Chutney network.
|
| | |
|
| |
|
|
| |
It's a little overzealous sometimes, but it's mostly to the good.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Relay nicknames are always between 1 and 19 characters long, and
they're always ASCII: That means that storing them in a [u8;19] will
always be possible, and always use less resources than storing them
in a String.
Fortunately, the tinystr crate already helps us with this kind of
thing.
|
| | |
|
| |
|
|
|
| |
Remove all `use` statements for `TryFrom` and `TryInto`. These are
now redundant in Rust 2021.
|
| | |
|
| |
|
|
|
|
|
|
| |
This commit uses the `visibility` and `visible` crates to
conditionally make certain structs and their fields public
(respectively). This is incredibly dangerous to use for anything
besides testing, and I've tried to write the documentation for the
feature accordingly.
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Don't use SystemTime::now()
Closes #306
See merge request tpo/core/arti!365
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Now we use NetParams. That implies making its constructor public,
which I think it fine.
This is related to #413 but is far from completing that ticket.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This should save around 1MB per consensus, since every relay has a
'protocols' lines, but there are only a few distinct possibilities
for such a line.
Closes #385.
|
| | |
| |
| |
| |
| |
| | |
This should save 1-3 MB of ram on each running arti client.
Closes #384. See also tor#27359 and proposal 298.
|
| | | |
|
| | |
| |
| |
| |
| | |
(Once we're done parsing these, the vector will never get any
longer.)
|
| | |
| |
| |
| | |
This should save around 181K of heap on a current directory.
|
| | |
| |
| |
| |
| |
| | |
When the version is a Tor version, we can just parse it; otherwise,
we can intern it. This shrinks GenericRouterStatus and avoids a lot
of extra help allocations.
|
| | |
| |
| |
| | |
Part of #387
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This error type doesn't impement HasKind, since the kind will depend
on context.
However, the existing implementation was pretty messy and inconsistent:
Some errors had positions, some didn't.
Some took messages as str, some as String.
Some had internal errors that were somewhat orthogonal to their actual
types.
This commit refactors tor_netdoc::Error to use a ParseErrorKind, and
adds a set of convenience functions to add positions and
messages to the errors that need them.
|
| |
|
|
|
| |
Every other case of tor_netdoc::Error means a parse failure. This one,
though, means a failure to construct a document.
|
| |\
| |
| |
| |
| | |
address clippy's latest lint
See merge request tpo/core/arti!205
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Our behavior in handling not-yet-valid router descriptors doesn't match
the C Tor implementation, but it's not a big deal:
we don't currently use router descriptors at all.
|
| | |
| |
| |
| |
| |
| | |
If we fail to convert a curve25519 key to an ed25519 key for checking
the onion-key crosscert, don't call that an internal error: it means
that something is wrong with the provided ntor key.
|
| |/
|
|
|
| |
As of tor-spec commit 01122c5bd7d2f0f, the spec is no longer ambiguous
on this point.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
We want to only use TODO in the codebase for non-blockers, and open
tickets for anything that is a bigger blocker than a TODO. These
XXXXs seem like definite non-blockers to me.
Part of arti#231.
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Also fix a couple of warnings introduced by now-unneeded imports
with new ed25519 crate.
This is part of the process for releasing our next version.
|
| |\ \ |
|
| | | | |
|
| | |/ |
|
| |/ |
|
| |\
| |
| |
| |
| | |
Further configuration refactoring
See merge request tpo/core/arti!137
|
| | |
| |
| |
| |
| | |
Doing this is necessary for reconfiguration support, and will help a lot
with testing, too.
|
| |/ |
|