| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
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.
|
| |/ |
|
| |\
| |
| |
| |
| |
| |
| | |
Put most non-universally-needed functionality behind features
Closes #125
See merge request tpo/core/arti!129
|
| | |
| |
| |
| |
| |
| | |
Clients never need these.
Part of #125.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Nothing in arti currently uses this document type. Eventually it
will be useful for relays and for bridge clients.
I've left the "SHA1 digest of a router descriptor" type available
unconditinoally, however, since it does get used in a few places.
Part of #125.
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
This field isn't used in modern Tor, and has never been used in
Arti. If tor!489 is merged, then it will no longer contain a useful
value in future consensuses. We shouldn't store it, or else
somebody else will get the smart idea of using it for something.
This commit breaks API compatibility for tor-netdoc with the
`build_docs` feature enabled. I haven't entered that into the
semver_status.md file, since we already have a pending tor-netdoc
API breaker in !129.
|
| | |
|
| | |
|
| |
|
|
| |
(One represents code that I forgot to write.)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
(The nightly version of clippy now includes macros for its
missing_docs_in_private_items lint.)
|