Nick Mathewson
8bcf037c9d
Merge branch 'fix' into 'main'
...
Run cargo update
See merge request tpo/core/arti!1140
2023-04-13 15:13:33 +00:00
Nick Mathewson
e524f05aa9
rpc spec: define method namespacing.
...
Closes #822
2023-04-13 10:50:30 -04:00
Ian Jackson
6cdd7cc884
Run cargo update
...
The lockfile on main seems to be broken. I skim-eyeballed the diff,
which is entirely autogenerated.
2023-04-13 15:46:00 +01:00
gabi-250
31b6c9243d
Merge branch 'use_secmem_proc_03' into 'main'
...
Update our secmem_proc dependency to 0.3.0
Closes #664
See merge request tpo/core/arti!1138
2023-04-13 14:26:06 +00:00
gabi-250
da790e4b78
Merge branch 'misc_upgrades' into 'main'
...
Upgrade a couple more dependencies
See merge request tpo/core/arti!1139
2023-04-13 14:25:13 +00:00
Nick Mathewson
cf00fd8e8a
Merge branch 'rpc_conformance' into 'main'
...
RPC: Terminology and error-handling conformance
Closes #826 and #825
See merge request tpo/core/arti!1136
2023-04-13 13:45:40 +00:00
Nick Mathewson
8dd65dcd5f
rpc, spec: Document current ObjectError, RequestError behavior as correct.
2023-04-13 09:03:52 -04:00
Nick Mathewson
ea77f959fb
rpc: Change `id=<SYNTAX>` to "no id".
...
Now instead of hoping that buggy clients will detect a magic `id`,
we can simply tell them that they will get no `id` at all. If they
can't handle that case, no major harm is done: the connection will
get closed anyway.
2023-04-13 09:03:52 -04:00
Nick Mathewson
5041b51498
rpc: Require that errors are RpcError.
...
Since we're serializing everything in this format, let's enforce it.
With this change, we can no longer cram arbitrary junk into an
RPC error, so we have to clean up our handling of cancelled requests.
2023-04-13 09:03:52 -04:00
Ian Jackson
056f8a746e
Merge branch 'repro_msrv_update' into 'main'
...
Bump Rust version in reproducible build scripts
See merge request tpo/core/arti!1137
2023-04-13 11:59:39 +00:00
Nick Mathewson
4efb423947
Upgrade our hex-literal dependency
2023-04-13 07:51:26 -04:00
Nick Mathewson
50d95964d1
Upgrade our num_enum dependency.
2023-04-13 07:50:11 -04:00
Nick Mathewson
6e83139fc7
Update our secmem_proc dependency to 0.3.0
...
(This wasn't possible before we updated our MSRV to 1.65.)
Closes #664 .
2023-04-13 07:41:46 -04:00
Nick Mathewson
a9b1d8f612
Bump Rust version in reproducible build scripts
...
Now that we require 1.65, Rust 1.63 is no longer sufficient.
2023-04-13 07:31:20 -04:00
Nick Mathewson
99c64abb6a
Merge branch 'devdoc' into 'main'
...
Document some properties of semver
See merge request tpo/core/arti!1129
2023-04-12 20:37:25 +00:00
Nick Mathewson
767c91557e
rpc: Improve error reporting for invalid requests
...
This is a bit big, but it's not that _complicated_.
The idea here is that we use serde's "untagged" enum facility
when parsing our `Request`s, such that if parsing as a `Request`
fails, we parse as an `InvalidRequest` and try to report
what the problem was exactly.
This lets us determine the ID of a request (if it had one),
so we can report that ID in our error message. We can also
recover from a much broader variety of errors.
We now also conform with the spec reporting errors about
completely wrong json, requests without IDs, and so on.
2023-04-12 16:21:34 -04:00
Nick Mathewson
89568ead54
rpc spec: Allocate a special ID for syntax errors.
2023-04-12 15:17:15 -04:00
Nick Mathewson
739561b2cb
rpcbase: Use correct error codes, and add tests.
...
Well, mostly correct. Our current serde implementation doesn't
tell us much about what went wrong with the object, so we can't
tell why we couldn't convert it into a Request.
Also, our output for the data field is not as the spec says:
we should bring them into conformance.
Part of #825 .
2023-04-12 13:32:15 -04:00
Nick Mathewson
e37b017342
tor-error: Add ErrorKinds for RPC errors.
...
These are experimental for now so that we can change them without
breaking semver.
2023-04-12 13:30:24 -04:00
Ian Jackson
1d0fae5467
dev docs: Reference semver trick
...
Discussion
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895839
2023-04-12 18:06:30 +01:00
Ian Jackson
5ae7e3c3f8
dev docs: Adding missing footnote
...
Discussion
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895837
2023-04-12 18:06:30 +01:00
Ian Jackson
09c7efe4a4
dev docs: Avoid main-verb-less sentence
...
Discussion
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895835
2023-04-12 18:06:30 +01:00
Ian Jackson
25b89af11c
dev docs: Add missing word
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1129#note_2895834
2023-04-12 18:06:30 +01:00
Nick Mathewson
81368f2b5b
dev docs: Clarify that it's two instances of the crate
2023-04-12 17:04:59 +00:00
Nick Mathewson
72277b902e
dev docs: Clarify wording re who is exporting what
2023-04-12 17:03:46 +00:00
Ian Jackson
1d2514a06e
Merge branch 'ticket_785' into 'main'
...
ExitPath: Add an explanation of WeightRole::Exit on non-exit circs
Closes #785
See merge request tpo/core/arti!1135
2023-04-12 17:00:36 +00:00
Ian Jackson
835480e98f
Merge branch 'remove-hsdesc-todo' into 'main'
...
Remove misleading TODO.
See merge request tpo/core/arti!1130
2023-04-12 16:52:59 +00:00
Nick Mathewson
2e017d3575
tor-rpcbase: Create error kinds properly.
...
The field is called "kinds", it is a list, and it holds strings
beginning with "arti:".
2023-04-12 12:27:16 -04:00
Nick Mathewson
873f9285af
rpc spec: Change arti_kinds => kinds per discussion.
2023-04-12 12:20:24 -04:00
Nick Mathewson
6bdfc5740f
arti-rpcserver: Be careful about saying "result".
...
Even though json-rpc uses "result" to mean "a successful return value
from a method", we can't: Rust's `Result` type is so pervasive
that confusion would be inevitable.
2023-04-12 12:08:53 -04:00
Nick Mathewson
4d82bf4b98
arti-rpcserver: Rename Authentication{Method => Scheme}.
2023-04-12 11:53:50 -04:00
Nick Mathewson
4327276922
arti-rpcserver: rename cmd to method.
2023-04-12 11:51:48 -04:00
Nick Mathewson
b2b0a0dd83
arti-rpcserver: rename command to method.
2023-04-12 11:51:37 -04:00
Nick Mathewson
193253a158
tor-rpcbase: rename cmd to method everywhere.
2023-04-12 11:45:30 -04:00
Nick Mathewson
224b919835
tor-rpcbase: Rename cmd.rs to method.rs.
2023-04-12 11:26:12 -04:00
Nick Mathewson
c5b70224b2
tor-rpcbase: Rename and rephrase "command" to "method"
2023-04-12 11:25:03 -04:00
Nick Mathewson
ee5478ed40
rpc: terminology edits around "method" in spec draft
...
Always "method", never "command".
Always "authentication scheme", never "authentication method".
2023-04-12 11:11:01 -04:00
Nick Mathewson
d492e644ab
Merge branch 's101-q1' into 'main'
...
Update s101 values.
See merge request tpo/core/arti!1128
2023-04-12 14:53:36 +00:00
Nick Mathewson
2efdcd38ff
ExitPath: Add an explanation of WeightRole::Exit on non-exit circs
...
In one case, we use WeightRole::Exit on circuits that can't
actually be used to exit. This commit adds a comment to explain
why, so that we don't wonder about it in the future, and we have
some indication of whether it's still appropriate.
Closes #785
2023-04-12 09:50:16 -04:00
gabi-250
d72c794632
Merge branch 'bug805' into 'main'
...
s/Manager/Mgr/g in codebase
Closes #805
See merge request tpo/core/arti!1122
2023-04-12 13:18:33 +00:00
Neel Chauhan
be78062bb6
s/BridgeDescManager/BridgeDescMgr/g in codebase
2023-04-12 05:49:11 -07:00
Nick Mathewson
6d401f67bb
Merge branch 'rpc-hack' into 'main'
...
Initial hacking on RPC server
See merge request tpo/core/arti!1092
2023-04-12 12:48:16 +00:00
Nick Mathewson
8e6848b965
rpc: Try to fix rustdoc errors.
2023-04-12 08:02:30 -04:00
Nick Mathewson
44fbd87208
rpc: Use empty structs in test code.
2023-04-12 07:35:07 -04:00
Nick Mathewson
9a5f319a84
Rename tor-rpccmd to tor-rpcbase.
2023-04-12 07:34:57 -04:00
Nick Mathewson
5979272cc4
rpc: Make AuthenticationMethod an enum.
2023-04-12 07:34:57 -04:00
Nick Mathewson
0eb15ae592
rpc: Reify and expose DispatchTable.
2023-04-12 07:34:57 -04:00
Nick Mathewson
ec247856fb
rpc: Change ConstTypeId_ to be a function that gets called
...
We now _use_ the function pointers rather than comparing them; this
lets us drop our Eq/PartialEq/Hash implementations for
`ConstTypeId_` and instead just use `TypeId`s once we're in run-time
code.
2023-04-12 07:34:57 -04:00
Nick Mathewson
a02a200ccd
rpc: Use Pin<Box<Stream/Sink>> for run_loop
2023-04-12 07:34:57 -04:00
Nick Mathewson
3ad5d2f6ea
rpc: Import Pin/Context/Poll.
...
(Except for one case where we are using crate::Context and
task::Context at the same time.)
2023-04-12 07:34:57 -04:00