<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/arti-rpcserver/src/msgs.rs, branch arti-v1.1.6</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.6</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.6'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2023-04-19T16:38:26Z</updated>
<entry>
<title>Arti: Add ability to remember the list of methods names.</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-18T22:43:16Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=accd3d858f9812eba326306014a9543590d93dad'/>
<id>urn:sha1:accd3d858f9812eba326306014a9543590d93dad</id>
<content type='text'>
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
)
</content>
</entry>
<entry>
<title>rpc: Split Method into DynMethod and Method</title>
<updated>2023-04-19T16:38:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-18T17:04:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7dcfb02c2201c29cb3237f5921a4130e6fcd567a'/>
<id>urn:sha1:7dcfb02c2201c29cb3237f5921a4130e6fcd567a</id>
<content type='text'>
Now `Method` has an Output and Update associated type, and
`decl_method` can do a little more.
</content>
</entry>
<entry>
<title>rpc: Change `id=&lt;SYNTAX&gt;` to "no id".</title>
<updated>2023-04-13T13:03:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-13T12:40:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ea77f959fb567b495c1faa0cf3349cbfb86a3b58'/>
<id>urn:sha1:ea77f959fb567b495c1faa0cf3349cbfb86a3b58</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>rpc: Require that errors are RpcError.</title>
<updated>2023-04-13T13:03:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T20:30:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5041b51498b9854a10f822dd50cc2f0239d586f7'/>
<id>urn:sha1:5041b51498b9854a10f822dd50cc2f0239d586f7</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>rpc: Improve error reporting for invalid requests</title>
<updated>2023-04-12T20:21:34Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T19:59:47Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=767c91557e6b6bc5429f30b886f8a314df2ddf22'/>
<id>urn:sha1:767c91557e6b6bc5429f30b886f8a314df2ddf22</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>arti-rpcserver: Be careful about saying "result".</title>
<updated>2023-04-12T16:08:53Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T16:08:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6bdfc5740f7244dc05faa5c5a199b94294923f2f'/>
<id>urn:sha1:6bdfc5740f7244dc05faa5c5a199b94294923f2f</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>arti-rpcserver: rename command to method.</title>
<updated>2023-04-12T15:51:37Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T15:49:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b2b0a0dd838d1218a4a1a7cb8a184c56064d39ee'/>
<id>urn:sha1:b2b0a0dd838d1218a4a1a7cb8a184c56064d39ee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-rpcbase: Rename and rephrase "command" to "method"</title>
<updated>2023-04-12T15:25:03Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-12T15:23:13Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c5b70224b25c42ed8152527e0308bbbbde2b5624'/>
<id>urn:sha1:c5b70224b25c42ed8152527e0308bbbbde2b5624</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename tor-rpccmd to tor-rpcbase.</title>
<updated>2023-04-12T11:34:57Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-11T19:13:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9a5f319a840bbbd906d64803a4992ea1e21b7d1f'/>
<id>urn:sha1:9a5f319a840bbbd906d64803a4992ea1e21b7d1f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rpc: Rename BoxedResponseBody =&gt; ResponseBody</title>
<updated>2023-04-12T11:34:57Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-04-11T12:14:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=03937e35b28247dfedbdf0a8153e501b746a620d'/>
<id>urn:sha1:03937e35b28247dfedbdf0a8153e501b746a620d</id>
<content type='text'>
</content>
</entry>
</feed>
