Commit Graph

6452 Commits

Author SHA1 Message Date
Nick Mathewson 0779d405cf rpc: Implement json message types for serde. 2023-04-12 07:34:57 -04:00
Nick Mathewson 3f269449cb tor-proto: Be explicit about an into().
This is a workaround for an issue that I'm about to encounter
somewhere in our pile of dependencies as I add arti-rpcserver, and
somehow make serde_json visible in this test code thereby, making
the PartialEq method resolution ambiguous.
2023-04-12 07:34:57 -04:00
Nick Mathewson d6375ef0fd Add another entry to global semver.md 2023-04-12 07:33:46 -04:00
gabi-250 b93e7bbda5 Merge branch 'audit' into 'main'
Run cargo audit last and in its own job

See merge request tpo/core/arti!1133
2023-04-12 11:32:05 +00:00
gabi-250 77f4e5dc74 Merge branch 'fix' into 'main'
tor-hsclient: Add an allow to this incomplete code

See merge request tpo/core/arti!1134
2023-04-12 11:31:17 +00:00
Ian Jackson 3caa8e61e9 tor-hsclient: Add an allow to this incomplete code
Fixes CI warning.
2023-04-12 11:50:27 +01:00
gabi-250 89cfca3a2e Merge branch 'fix' into 'main'
Apply ProtocolViolation renaming to hs connector code

See merge request tpo/core/arti!1132
2023-04-12 10:09:31 +00:00
Ian Jackson 44d76afa7c Run cargo audit last and in its own job
Recently we had some minor awkwardness due a new advisory.
This may help in future.
2023-04-12 10:55:25 +01:00
Ian Jackson d566502fc3 Apply ProtocolViolation renaming to hs connector code
!1121 renamed *ProtocolFailed to *ProtocolViolation.
!1118 introduced a new reference to a *ProtocolFailed

I rebased !1118 onto main and enabled automerge.  That tested the tip
of !1118.  I assume a similar thing happened to !1121.

The possibility of such regressions is a property of our workflow.
It's rather surprising it doesn't happen more often.
2023-04-12 10:40:29 +01:00
Ian Jackson b6533b31aa Merge branch 'msrv-1.65' into 'main'
Increase Arti MSRV to 1.65

Closes #815

See merge request tpo/core/arti!1131
2023-04-12 09:34:05 +00:00
Nick Mathewson c596ded74a Merge branch 'bug804' into 'main'
s/ProtocolFailed/ProtocolViolation/g where possible

Closes #804

See merge request tpo/core/arti!1121
2023-04-11 21:33:25 +00:00
Nick Mathewson 6f9ceda6ca Add a global semver.md for MSRV break. 2023-04-11 15:38:14 -04:00
Nick Mathewson d2e742f2ef Test with 1.65 in minimal_versions. 2023-04-11 15:34:36 -04:00
Nick Mathewson d34d91a1dc Update MSRV in README 2023-04-11 15:33:49 -04:00
Ian Jackson 05fd027be2 Merge branch 'rpc2' into 'main'
rpc: Proposed error format

See merge request tpo/core/arti!1107
2023-04-11 19:33:45 +00:00
Nick Mathewson e26445b1b0 Use bool::then_some() as appropriate
Now that we require a version of Rust that allows
`b.then_some(v)`, clippy complains about our use of
`b.then(|| v)`.
2023-04-11 15:32:32 -04:00
Nick Mathewson 104d64589d Increment MSRV to 1.65 in every crate. 2023-04-11 15:31:12 -04:00
Ian Jackson b8b02b38f1 Merge branch 'hs' into 'main'
Download HS descriptors

See merge request tpo/core/arti!1118
2023-04-11 19:19:48 +00:00
Ian Jackson 4b28b470a2 Merge branch 'warning' into 'main'
Fix two rustdoc warnings

See merge request tpo/core/arti!1114
2023-04-11 19:02:33 +00:00
Nick Mathewson b9b5e9940a rpc: Fix typos/grammar errors 2023-04-11 20:02:01 +01:00
Ian Jackson 0be641e49a rpc: Rewrite `data` spec in JSON terms 2023-04-11 20:02:01 +01:00
Ian Jackson 3ac94956ef rpc: Clarify that error formatting display is indicative 2023-04-11 20:02:01 +01:00
Ian Jackson 1268223cff Use non-JSON-RPC-reserved values for our own errors 2023-04-11 20:02:01 +01:00
Ian Jackson 1e2a549960 rpc: Fix mistake in "JSON-RPC compatibility" section for errors 2023-04-11 20:02:01 +01:00
Ian Jackson 3d5ef53596 rpc: Discourage use of `code` 2023-04-11 20:02:01 +01:00
Ian Jackson 9c47558b10 rpc: Warn about relying too much about `data` 2023-04-11 20:02:01 +01:00
Ian Jackson 6c5577ab92 rpc: Provide example of an error response 2023-04-11 20:02:01 +01:00
Ian Jackson ef834a2c0b rpc: Provide a list of ErrorKind strings
Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1107#note_2893078
2023-04-11 20:02:01 +01:00
Ian Jackson 9f8ba36814 rpc: Be more explicit about what the string error message is for (typo) 2023-04-11 20:02:01 +01:00
Nick Mathewson 1bc8bb4fb4 rpc: Be more explicit about what the string error message is for 2023-04-11 20:02:01 +01:00
Ian Jackson fca4535066 rpc: Proposed error format 2023-04-11 20:02:01 +01:00
Gabriela Moldovan 631a1e1a86
Remove misleading TODO.
The `superencrypted` blob is, in fact, followed by a newline.

See [core/torspec!122].

[core/torspec!122]: https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/122

Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-04-11 19:44:50 +01:00
Ian Jackson 19799ceea4 dev docs: Make some explanation about semver 2023-04-11 19:41:28 +01:00
Ian Jackson 1c2bc8e92f dev docs: Make a heading a subheading 2023-04-11 19:33:14 +01:00
Ian Jackson ed46998f4a dev docs: Remove an obsolete comment.
I think we've bedded in the new process.
2023-04-11 19:33:07 +01:00
Ian Jackson 24efbf4df7 tor-netdoc: Tidy up and fix some broken intra-doc links
1. Abbreviate the link text, and don't have it contain `crate`
   which is not really great in docs.

2. Use `super::` for the link target, to find the right thing.
   (`crate` doesn't seem to work in rustdoc, perhaps deliberately,
   although the error messages are ridiculous and claim the
   nonexistence of intermediate modules.)

3. Wrap the lines a bit more.
2023-04-11 19:31:10 +01:00
Ian Jackson 23c56db111 tor-netdir: Fix capitalisation of a doc link
Fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson df3e8242ea tor-netdir: Fix link to hs_time_period function
Fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson 7f51394e6e impl_debug_hex: Fix syntax error in usage template
Corrects the doc and fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson 592252ae0a hs connect: Improve a todo and refer to #813 2023-04-11 19:14:01 +01:00
Ian Jackson 26d3bf67e9 hs connect: Add TODOs re improving tests
Aa per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1118#note_2894467
2023-04-11 19:14:01 +01:00
Ian Jackson db457de99b hs connect: Add TODO re multiple parallel hsdir requests 2023-04-11 19:14:01 +01:00
Ian Jackson 7198afa153 hs connect: Improve docs for descriptor_ensure 2023-04-11 19:14:01 +01:00
Ian Jackson b78240131f hs connect: Clarify clientness of Context 2023-04-11 19:14:01 +01:00
Ian Jackson 54bec0bf8d hs connect tests: check that we asked exactly one relay 2023-04-11 19:14:01 +01:00
Ian Jackson 2ac87a6690 hs connect tests: derive Default for MocksGlobal, and use it 2023-04-11 19:14:01 +01:00
Ian Jackson f5a5743468 hs connect: Test descriptor download 2023-04-11 19:14:01 +01:00
Ian Jackson be98cb890d hs connect: Do circuitry etc. via mocks trait
This doesn't change the text of the functional code, but now the
methods are indirected via the Mock* traits.
2023-04-11 19:14:01 +01:00
Ian Jackson e6b8752d98 hs dirs: Initial cut at descriptor downloading
There are many TODOs here.  Some are questions; some are
straightforward and can be done in followups.

With this code, I am able to reach the eprintln! and todo! with
  curl --socks5-hostname localhost:9150 https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/
2023-04-11 19:14:01 +01:00
Ian Jackson 99bc97118f hs desc: Record a Timebound<HsDesc> (but not really for now)
We have a local alias of `HsDesc = String` which needs to be got rid
of.

But, right now the alternative would be to implement all the code for
signature checking and decryption of an `HsDesc`, before we can make a
test case for the downloader part.
2023-04-11 19:14:01 +01:00