summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Provide an error variant for external directory providersIan Jackson2022-03-041-0/+12
| | | | | |
* | | | | | Merge branch 'educe-traits' into 'main'Ian Jackson2022-03-0430-161/+258
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Replace many manual trait impls with use of educe See merge request tpo/core/arti!375
| * | | | | tor-basic-utils: copy the README into lib.rsIan Jackson2022-03-041-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The doc include rune does not work with our MSRV; it needs 1.54. The alternative would be some kind of cfg() but that would - not provide the crate-level doc on Rust 1.53 - involve the use of cfg_attr Instead, just do it the old way.
| * | | | | Remove now-obsolete note about location of skip_fmtIan Jackson2022-03-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | Now the diff from the merge base does not contain any hits for ^\+.*bytes
| * | | | | Move skip_fmt into tor-basic-utilsIan Jackson2022-03-0418-54/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code motion and the minimal mechanical changes. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/375#note_2783078
| * | | | | Introduce tor-basic-utilsIan Jackson2022-03-045-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | Empty crate right now
| * | | | | Move educe to dev-dependencies of tor-bytesIan Jackson2022-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/375#note_2783080 This is going to move to a new crate, but doing this now makes things slightly clearer for me.
| * | | | | Replace manual Default impls with educe in tor-guardmgrIan Jackson2022-03-023-21/+13
| | | | | |
| * | | | | Replace manual Default impl with educe in tor-dirmgrIan Jackson2022-03-021-10/+5
| | | | | |
| * | | | | Replace manual Default impl with educe+std in tor-dirmgrIan Jackson2022-03-021-8/+4
| | | | | |
| * | | | | Replace manual Default impl with educe in tor-cellIan Jackson2022-03-021-6/+4
| | | | | |
| * | | | | Replace manual Default impls on enums with educe in arti-clientIan Jackson2022-03-021-14/+7
| | | | | |
| * | | | | Refrain from replacing manual with educe Debug impl in caretIan Jackson2022-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead, leave a comment saying we have left it this way deliberately.
| * | | | | Replace manual Debug impl with educe in arti-clientIan Jackson2022-03-023-9/+9
| | | | | |
| * | | | | Replace manual Clone impl with educe in arti-hyperIan Jackson2022-03-023-7/+5
| | | | | |
| * | | | | Replace manual Clone impl with educe in tor-rtcompatIan Jackson2022-03-023-10/+5
| | | | | |
| * | | | | Replace manual Debug impls with educe in tor-protoIan Jackson2022-03-023-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | We now print slighly more information.
| * | | | | Replace manual Debug impl with educe in tor-dirmgrIan Jackson2022-03-023-8/+9
| | | | | |
| * | | | | Replace manual Debug impl with educe in tor-chanmgrIan Jackson2022-03-023-7/+9
| | | | | |
| * | | | | Replace manual Debug impl with educe in tor-cellIan Jackson2022-03-023-7/+7
| | | | | |
| * | | | | Replace manual Debug impl with educe in tor-guardmgrIan Jackson2022-03-023-11/+11
| | | | | |
| * | | | | Replace manual Debug impl with educe in tor-circmgrIan Jackson2022-03-023-12/+9
| | | | | |
| * | | | | Import educe into tor-bytes and provide skip_fmtIan Jackson2022-03-023-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Preparatory work for getting rid of some manual Debug impls
* | | | | | Merge branch 'hex_decode' into 'main'Ian Jackson2022-03-048-27/+38
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up RsaIdentity decoding Closes #377 See merge request tpo/core/arti!381
| * | | | | Use RsaIdentity::from_hex() and hex::decode_to_slice in more placesNick Mathewson2022-03-044-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | These aren't critical-path, but they do make the code a little nicer.
| * | | | | tor-netdoc: Use RsaIdentity::from_hex() in critical path.Nick Mathewson2022-03-041-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the main parsing code for RsaIdentity in tor-netdoc, and . Previously, parse_hex_ident was something like 10% of our startup CPU time; now it's only like ~2%. (Still not perfect, but way better.) Closes #377.
| * | | | | Add a from_hex method for RsaIdentity.Nick Mathewson2022-03-043-5/+29
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We perform this operation in a bunch of places, and most of them use hex::decode(). That's not great, since hex::decode() has to do heap allocation. This implementation uses hex::decode_to_slice(), which should be faster. (In the future we might choose to use one of the faster hex implementations, but I'm hoping that this change will be sufficient to get hex decoding out of our profiles.) Part of #377.
* | | | | Merge branch 'arti-testing-part1' into 'main'eta2022-03-048-0/+717
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | arti-testing: Initial implementation See merge request tpo/core/arti!378
| * | | | Allow println in arti-testing.Nick Mathewson2022-03-031-0/+2
| | | | |
| * | | | arti-testing: Initial implementationNick Mathewson2022-03-038-0/+715
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new program to try to implement the ideas behind experimentation in arti#329. In particular, it tries to implement basic client "can I bootstrap and connect" functionality testing, with a lot of instrumentation, and support for breaking things. So far, the instrumentation is limited to counting TCP bytes and connections, and counting events. Still, this is enough to measure behavior on some of the incorrect-clock tests. NOTE: For now, you are _required_ to pass in an explicit configuration, in hopes that this will lead you to override your storage directories for doing specific experiments.
* | | | Merge branch 'upgrade_repro_rust' into 'main'eta2022-03-042-2/+6
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | docker_reproducible_build: Bump to Rust 1.59 Closes #376 See merge request tpo/core/arti!380
| * | | Reproducible build: Bump to Rust 1.59 and Alpine 3.15Nick Mathewson2022-03-042-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Rust upgrade is necessary since our Cargo.lock file now requires `ed25519` 1.4.0, which requires edition2021, which requires Rust 1.56 or later. The Alpine upgrade is opportunistic: we might as well. I've also added comments to remind us to keep the .gitlab-ci.yml and docker_reproducible_build files in sync, since my first version of this commit messed that up. Closes #376.
* | | | Merge branch 'derive-traits' into 'main'Ian Jackson2022-03-0412-112/+41
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Tidy up many open-coded trait impls See merge request tpo/core/arti!374
| * | | | Fix introduced junk in doc comment.eta2022-03-041-1/+1
| | | | |
| * | | | Replace manual Default, and abolish new, in tor-rtcompatIan Jackson2022-03-021-13/+1
| | | | | | | | | | | | | | | | | | | | The Default impl was the only call site for new()
| * | | | Replace manual Default and new with std derive in tor-protoIan Jackson2022-03-022-18/+4
| | | | |
| * | | | Replace manual Default and new with std derive in tor-netdocIan Jackson2022-03-022-17/+5
| | | | |
| * | | | Replace manual Default and new with std derive in tor-dirclientIan Jackson2022-03-021-30/+6
| | | | |
| * | | | Replace manual Default impl with std derive in tor-configIan Jackson2022-03-021-7/+1
| | | | |
| * | | | Replace manual Default impl with std derive in tor-cellIan Jackson2022-03-021-6/+1
| | | | |
| * | | | Replace manual Clone impl with std derive in retry-errorIan Jackson2022-03-021-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This just clones the fields. It is not clear to me why it was written this way in be86df631dec Remove anyhow dependency from tor-retry, and rename it to retry-error Previously, I think, RetryError wasn't Clone.
| * | | | Replace manual Debug impl with std derive in tor-circmgrIan Jackson2022-03-021-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I wrote this, I arranged to skip dumping the field `pending`. This must have been because I thought that either (a) PendingEntry couldn't `#[derive(Debug)]` (but it can) and/or (b) Some of the fields of PendingEntry ought not to be dumped because they might contain (eg) packet data. But I think they don't: there's just the spec, and the Result which is (basically) a Circ. I tried preseving something closer to the original using educe, but educe gets somehow tangled up with the generics, and the result fails to compile. I haven't investigated this further.
| * | | | tor-llcrypto: Replace a tiny bit of code duplication with a callIan Jackson2022-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | tor-llcrypto: Add test case for RsaIdentity formattingIan Jackson2022-03-021-0/+19
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | I'm going to change the code that does this, so add a test first to check the output doesn't change. At some point we should have more RSA tests.
* | | | Merge branch 'return_ref_arc' into 'main'Ian Jackson2022-03-042-5/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti-client: Make dirmgr() and circmgr() return &Arc<..> Closes #369 See merge request tpo/core/arti!379
| * | | | arti-client: Make dirmgr() and circmgr() return &Arc<..>Nick Mathewson2022-03-032-5/+12
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously they returned an Arc, which wasn't necessary unless the client actually _wanted_ a new Arc. This would be an API break, except that these functions are marked 'experimental-api', so semver does not apply; nonetheless I've noted the break in semver_status.md, just in case we care. Closes #369
* | | | Merge branch 'shellexpand' into 'main'eta2022-03-032-5/+5
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Switch to shellexpand-fork version of shellexpand See merge request tpo/core/arti!373
| * | | Switch to shellexpand-fork version of shellexpandIan Jackson2022-03-022-5/+5
| |/ / | | | | | | | | | | | | Apropos discussion in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/274
* | | Merge branch 'dir-provider-redux' into 'main'Ian Jackson2022-03-026-27/+158
|\ \ \ | |/ / |/| | | | | | | | Alternative DirProvider setup See merge request tpo/core/arti!347
| * | Have caller of dirmgr_builder() provide Arc.Nick Mathewson2022-03-021-2/+2
| | |