Commit Graph

2728 Commits

Author SHA1 Message Date
Ian Jackson ebfd734956 Move skip_fmt into tor-basic-utils
Code motion and the minimal mechanical changes.

As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/375#note_2783078
2022-03-04 11:45:24 +00:00
Ian Jackson aba68088d1 Introduce tor-basic-utils
Empty crate right now
2022-03-04 11:45:24 +00:00
Ian Jackson eb66d0af6f Merge branch 'derive-traits' into 'main'
Tidy up many open-coded trait impls

See merge request tpo/core/arti!374
2022-03-04 11:25:57 +00:00
Ian Jackson 64cc5b8537 Move educe to dev-dependencies of tor-bytes
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.
2022-03-04 11:03:04 +00:00
eta e9f8ddfb9c Fix introduced junk in doc comment. 2022-03-04 10:56:40 +00:00
Ian Jackson 2a7915e6f6 Merge branch 'return_ref_arc' into 'main'
arti-client: Make dirmgr() and circmgr() return &Arc<..>

Closes #369

See merge request tpo/core/arti!379
2022-03-04 10:55:21 +00:00
Nick Mathewson a4914b990b arti-client: Make dirmgr() and circmgr() return &Arc<..>
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
2022-03-03 14:08:27 -05:00
Nick Mathewson 06f0339b97 Allow println in arti-testing. 2022-03-03 14:01:44 -05:00
Nick Mathewson 9329c7b878 arti-testing: Initial implementation
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.
2022-03-03 13:05:30 -05:00
eta 64c8ee0d1f Merge branch 'shellexpand' into 'main'
Switch to shellexpand-fork version of shellexpand

See merge request tpo/core/arti!373
2022-03-03 14:31:52 +00:00
Ian Jackson b27ffe14fb Merge branch 'dir-provider-redux' into 'main'
Alternative DirProvider setup

See merge request tpo/core/arti!347
2022-03-02 18:41:50 +00:00
Ian Jackson daa44df221 Replace manual Default impls with educe in tor-guardmgr 2022-03-02 18:06:37 +00:00
Ian Jackson 738f7efa3d Replace manual Default impl with educe in tor-dirmgr 2022-03-02 18:06:37 +00:00
Ian Jackson 4fbb088907 Replace manual Default impl with educe+std in tor-dirmgr 2022-03-02 18:06:37 +00:00
Ian Jackson bb1d59e073 Replace manual Default impl with educe in tor-cell 2022-03-02 18:06:37 +00:00
Ian Jackson ac0ed6ab65 Replace manual Default impls on enums with educe in arti-client 2022-03-02 18:06:37 +00:00
Ian Jackson 2a782a71c0 Refrain from replacing manual with educe Debug impl in caret
Instead, leave a comment saying we have left it this way deliberately.
2022-03-02 18:06:37 +00:00
Ian Jackson 1b8a8f933a Replace manual Debug impl with educe in arti-client 2022-03-02 18:06:37 +00:00
Ian Jackson decdd05ec5 Replace manual Clone impl with educe in arti-hyper 2022-03-02 18:06:37 +00:00
Ian Jackson ea03cc4084 Replace manual Clone impl with educe in tor-rtcompat 2022-03-02 18:06:37 +00:00
Ian Jackson 9dca756e23 Replace manual Debug impls with educe in tor-proto
We now print slighly more information.
2022-03-02 18:06:37 +00:00
Ian Jackson 210b9b70a8 Replace manual Debug impl with educe in tor-dirmgr 2022-03-02 18:06:37 +00:00
Ian Jackson f467f4666e Replace manual Debug impl with educe in tor-chanmgr 2022-03-02 18:06:37 +00:00
Ian Jackson 1c44dfa595 Replace manual Debug impl with educe in tor-cell 2022-03-02 18:03:00 +00:00
Ian Jackson b2d8c14c90 Replace manual Debug impl with educe in tor-guardmgr 2022-03-02 18:03:00 +00:00
Ian Jackson f474a583f1 Replace manual Debug impl with educe in tor-circmgr 2022-03-02 18:03:00 +00:00
Ian Jackson c1b80d6503 Import educe into tor-bytes and provide skip_fmt
Preparatory work for getting rid of some manual Debug impls
2022-03-02 18:03:00 +00:00
Ian Jackson 42f9b3c186 Replace manual Default, and abolish new, in tor-rtcompat
The Default impl was the only call site for new()
2022-03-02 18:01:18 +00:00
Ian Jackson 89074a1326 Replace manual Default and new with std derive in tor-proto 2022-03-02 18:01:08 +00:00
Ian Jackson 535e4ff118 Replace manual Default and new with std derive in tor-netdoc 2022-03-02 18:01:08 +00:00
Ian Jackson 4dfd1ef9cd Replace manual Default and new with std derive in tor-dirclient 2022-03-02 18:01:08 +00:00
Ian Jackson e45a95f65a Replace manual Default impl with std derive in tor-config 2022-03-02 18:01:08 +00:00
Ian Jackson 2becfcf894 Replace manual Default impl with std derive in tor-cell 2022-03-02 18:01:08 +00:00
Ian Jackson 486c73b6b7 Replace manual Clone impl with std derive in retry-error
This just clones the fields.  It is not clear to me why it was
written this way in be86df631d
   Remove anyhow dependency from tor-retry, and rename it to retry-error

Previously, I think, RetryError wasn't Clone.
2022-03-02 17:04:07 +00:00
Ian Jackson 90f86b47e4 Replace manual Debug impl with std derive in tor-circmgr
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.
2022-03-02 17:04:07 +00:00
Ian Jackson d1e8aa1dbd tor-llcrypto: Replace a tiny bit of code duplication with a call
No functional change.
2022-03-02 17:04:07 +00:00
Nick Mathewson 241fbd8746 Have caller of dirmgr_builder() provide Arc. 2022-03-02 12:01:26 -05:00
Ian Jackson 7a4369e240 tor-llcrypto: Add test case for RsaIdentity formatting
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.
2022-03-02 16:25:01 +00:00
Ian Jackson 72bb8e7f28 Switch to shellexpand-fork version of shellexpand
Apropos discussion in
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/274
2022-03-02 12:14:51 +00:00
Nick Mathewson f7009e238a add_warning: remove clone_on_ref_ptr
See !352
2022-03-01 15:38:46 -05:00
Nick Mathewson 83c8b11c2c Merge branch 'clippy-allow-arc-clone' into 'main'
Disable clippy::clone_on_ref_ptr

See merge request tpo/core/arti!352
2022-03-01 20:38:05 +00:00
Nick Mathewson e8e9791a97 Bump all crates to 0.1.0 2022-03-01 08:59:34 -05:00
Nick Mathewson 06f5580c8a Whoops I forgot to a verb. 2022-03-01 08:54:27 -05:00
Nick Mathewson b97fb211a0 Finish the changelog for 0.1.0 2022-03-01 08:47:47 -05:00
Nick Mathewson 8a5b766539 Final "cargo update" before relase. 2022-03-01 08:36:31 -05:00
Nick Mathewson 5735222691 Update README.md files from rustdoc. 2022-03-01 08:30:53 -05:00
eta c8f617c85e Merge branch 'integration_fix' into 'main'
chutney/setup: Wait for port 9150 to open after launching arti

Closes #367

See merge request tpo/core/arti!370
2022-03-01 13:26:31 +00:00
Nick Mathewson 57a8fe5f55 Fix rustdoc errors. 2022-03-01 08:16:02 -05:00
Nick Mathewson 224252f082 Run rustfmt. 2022-03-01 08:13:05 -05:00
Nick Mathewson f4a0aefae5 Merge remote-tracking branch 'origin/mr/371' 2022-03-01 08:12:51 -05:00