summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | dev docs: Add key manager API sketch.Gabriela Moldovan2023-04-251-0/+239
|/ / | | | | | | | | | | | | | | | | | | | | | | This is the first draft of the key manager API. I don't expect this to be the final version of the API, and I'm sure there are plenty of improvements to be made. This is mostly a request for comments. Closes #834 Signed-off-by: Gabriela Moldovan <[email protected]>
* | Merge branch 'memchr_upgrade' into 'main'Nick Mathewson2023-04-231-1/+1
|\ \ | | | | | | | | | | | | Bump our own memchr dependency to 2.5 See merge request tpo/core/arti!1151
| * | Bump our own memchr dependency to 2.5Nick Mathewson2023-04-221-1/+1
|/ / | | | | | | | | This appears to be necessary for getting "minimal-versions" to be happy with memchr dependencies between reges and async-compression.
* | Merge branch 'rpc_method_syntax' into 'main'Nick Mathewson2023-04-1916-678/+982
|\ \ | | | | | | | | | | | | | | | | | | RPC: update method declaration syntax and implementation Closes #835 and #821 See merge request tpo/core/arti!1148
| * | RPC: Log all internal errors.Nick Mathewson2023-04-192-4/+13
| | |
| * | rpc: Simplify and clarify SendUpdateError.Nick Mathewson2023-04-191-7/+13
| | |
| * | Arti: Add ability to remember the list of methods names.Nick Mathewson2023-04-195-14/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, this lets us say whether the method was unrecognized or whether the parameter type was incorrect. We'll use this to enforce correct method names later on. (I have to add another `inventory` here, since the `typetag` maintainer does not want to expose this functionality: see https://github.com/dtolnay/typetag/issues/57#issuecomment-1506106290 )
| * | rpc: New syntax for method declarationNick Mathewson2023-04-191-9/+46
| | | | | | | | | | | | | | | Now you just declare your function `my_func` with the right types, and invoke `rpc_invoke_fn!{ my_func(ObjType, MethodType); }`
| * | rpc: impl From<SendUpdateError> for RpcError.Nick Mathewson2023-04-191-0/+14
| | |
| * | rpcserver: Use with_fn.Nick Mathewson2023-04-193-12/+9
| | |
| * | rpcbase: Use with_fn.Nick Mathewson2023-04-194-8/+15
| | |
| * | async-utils: Add a SinkExt with a with_fnNick Mathewson2023-04-192-0/+85
| | | | | | | | | | | | | | | (This function behaves as `futures::sink::SinkExt::with`, except that the function that it takes does not return a future.)
| * | async-utils: rename sinkext to prepare_sendNick Mathewson2023-04-192-2/+2
| | |
| * | async-utils: rename SinkExt to SinkPrepareExtNick Mathewson2023-04-194-13/+14
| | |
| * | rpc: Minor tweaks to get a sink to compile.Nick Mathewson2023-04-191-4/+5
| | |
| * | rpc: Use Method types to determine type of method outputs, updates.Nick Mathewson2023-04-192-81/+142
| | | | | | | | | | | | This lets us do much less in our rpc_invoke_fn functions.
| * | rpc: Split Method into DynMethod and MethodNick Mathewson2023-04-195-42/+86
|/ / | | | | | | | | Now `Method` has an Output and Update associated type, and `decl_method` can do a little more.
* | Merge branch 'post_1145' into 'main'Alexander Færøy2023-04-182-8/+18
|\ \ | | | | | | | | | | | | Followups from !1145 See merge request tpo/core/arti!1146
| * | netdoc: Document that particular bit values for flags are not part of our API.Nick Mathewson2023-04-171-1/+3
| | |
| * | netstatus: re-number routerstatus flags to go in order.Nick Mathewson2023-04-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise there is too much risk of accidentally adding in another 1<<12 when we meant to add a 1<<13. (It would be neat to have an alternative to bitflags here that would auto-number our bitflags for us.)
| * | netdir: more documentation on MIDDLE_ONLY flag.Nick Mathewson2023-04-172-0/+8
| | | | | | | | | | | | Clarify that it isn't anything that most users will need to check.
* | | Merge branch 'rpc_refactoring_v2' into 'main'Ian Jackson2023-04-183-195/+150
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | A few RPC refactorings Closes #817 and #824 See merge request tpo/core/arti!1144
| * | | rpc: simplify API by always providing a sink.Nick Mathewson2023-04-162-26/+18
| | | | | | | | | | | | | | | | | | | | Previously we have two places where we had to do "make a `Drain` sink if updates aren't wanted"; now there's only one.
| * | | rpc: Ensure well-ordering of responses.Nick Mathewson2023-04-161-60/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the main loop received updates via a `mpsc::channel`, and final responses via a `futures::unordered`. This could lead to final responses being transmitted to the user before the updates were all flushed. Now all of the responses are sent to the main loop via the same channel, and they can't get out-of-sequence. Closes #817 and (IMO) simplifies the code a bit.
| * | | rpc: Wire updates into rpc invoke functions again.Nick Mathewson2023-04-161-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the sink is not part of the context, RPC functions that are able to send an update have to declare an `impl Sink` as their fourth argument. This syntax is not final. Part of #824.
| * | | rpc: Move update sink out of context.Nick Mathewson2023-04-163-147/+51
| | | | | | | | | | | | | | | | | | | | Now the update sink is its own boxed object. It is not yet passed to the invoke functions that want it.
* | | | Merge branch 'method_namespace' into 'main'Ian Jackson2023-04-181-5/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpc spec: define method namespacing. Closes #822 See merge request tpo/core/arti!1141
| * | | | rpc spec: define method namespacing.Nick Mathewson2023-04-132-6/+30
| | | | | | | | | | | | | | | | | | | | Closes #822
* | | | | Merge branch 'fix_802_core' into 'main'Ian Jackson2023-04-181-1/+6
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | DirMgr: Detect that directory state is ready if it begins with all MDs Closes #802 See merge request tpo/core/arti!1126
| * | | | DirMgr: Detect that directory state is ready if it begins with all MDsNick Mathewson2023-04-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we'd only call PendingNetDir::upgrade_if_necesessary when adding a microdescriptor. But if it began already having all of its descriptors (because we found them in the cache), we wouldn't actually upgrade it to a PendingNetDir::Yielding, which would make it unusable, and would make us schedule its reset time too far in the future. Fixes #802.
* | | | | Merge branch 'issue833_middleonly' into 'main'Nick Mathewson2023-04-172-0/+8
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netdoc: Add MiddleOnly flag to RelayFlags Closes #833 See merge request tpo/core/arti!1145
| * | | | | netdoc: Add MiddleOnly flag to RelayFlagsjuga2023-04-172-0/+8
|/ / / / / | | | | | | | | | | | | | | | Closes #833
* | | | | Merge branch 'rustdoc-fix' into 'main'Nick Mathewson2023-04-172-3/+5
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | rpcserver: Fix a couple of broken rustdoc links See merge request tpo/core/arti!1143
| * | | | rpcserver: Fix a couple of broken rustdoc linksNick Mathewson2023-04-162-3/+5
|/ / / /
* | | | Merge branch 'fix-macos-repro' into 'main'Nick Mathewson2023-04-161-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix macos reproducible builds Closes #832 See merge request tpo/core/arti!1142
| * | | | fix macos reproducible buildstrinity-1686a2023-04-161-1/+1
|/ / / /
* | | | Merge branch 'fix' into 'main'Nick Mathewson2023-04-131-77/+77
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | Run cargo update See merge request tpo/core/arti!1140
| * | | Run cargo updateIan Jackson2023-04-131-77/+77
|/ / / | | | | | | | | | | | | The lockfile on main seems to be broken. I skim-eyeballed the diff, which is entirely autogenerated.
* | | Merge branch 'use_secmem_proc_03' into 'main'gabi-2502023-04-133-39/+101
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Update our secmem_proc dependency to 0.3.0 Closes #664 See merge request tpo/core/arti!1138
| * | | Update our secmem_proc dependency to 0.3.0Nick Mathewson2023-04-133-56/+118
| | | | | | | | | | | | | | | | | | | | | | | | (This wasn't possible before we updated our MSRV to 1.65.) Closes #664.
* | | | Merge branch 'misc_upgrades' into 'main'gabi-2502023-04-1314-43/+43
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Upgrade a couple more dependencies See merge request tpo/core/arti!1139
| * | | | Upgrade our hex-literal dependencyNick Mathewson2023-04-1313-15/+15
| | | | |
| * | | | Upgrade our num_enum dependency.Nick Mathewson2023-04-133-28/+28
| |/ / /
* | | | Merge branch 'rpc_conformance' into 'main'Nick Mathewson2023-04-1317-172/+703
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPC: Terminology and error-handling conformance Closes #826 and #825 See merge request tpo/core/arti!1136
| * | | | rpc, spec: Document current ObjectError, RequestError behavior as correct.Nick Mathewson2023-04-132-12/+4
| | | | |
| * | | | rpc: Change `id=<SYNTAX>` to "no id".Nick Mathewson2023-04-134-17/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | rpc: Require that errors are RpcError.Nick Mathewson2023-04-133-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | rpc: Improve error reporting for invalid requestsNick Mathewson2023-04-127-17/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | rpc spec: Allocate a special ID for syntax errors.Nick Mathewson2023-04-121-0/+6
| | | | |
| * | | | rpcbase: Use correct error codes, and add tests.Nick Mathewson2023-04-123-7/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.