summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Add "full" and "experimental" features to arti.Nick Mathewson2022-06-101-0/+7
| | | | | |
* | | | | | Add "full" and "experimental" features to arti-client and below.Nick Mathewson2022-06-109-4/+30
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "full" feature is a catch-all for all features, _except_: * Those that select a particular implementation (like tor-llcrypto/with-openssl) or build flag (like "static") * Those that are experimental or unstable (like "experimental-api") * Those that are testing-only.
* | | | | Merge branch 'nested-read-write' into 'main'Nick Mathewson2022-06-102-40/+61
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | tor-bytes: read_nested_*: Take a closure Closes #498 See merge request tpo/core/arti!579
| * | | | tor-bytes: read_nested_*: rustfmtIan Jackson2022-06-101-13/+23
| | | | | | | | | | | | | | | | | | | | I disagree with almost all of these layout decisions...
| * | | | tor-bytes: read_nested_*: Take a closureIan Jackson2022-06-102-40/+51
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This eliminates the possibility of writing the bug of failing to call `should_be_exhausted`. As per this discussion https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/572#note_2811464 Fixes #498
* | | | Merge branch 'channel' into 'main'Nick Mathewson2022-06-105-10/+606
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Have channel reactor able to send channel padding See merge request tpo/core/arti!574
| * | | | channel padding timer: Explain why next() in select_biased!Ian Jackson2022-06-091-0/+7
| | | | |
| * | | | channel padding timer: document state invariantsIan Jackson2022-06-091-2/+24
| | | | | | | | | | | | | | | | | | | | There aren't very many.
| * | | | Fix more typos in comments, from a spellcheckerIan Jackson2022-06-091-6/+6
| | | | |
| * | | | Fix typo in commentNick Mathewson2022-06-091-1/+1
| | | | |
| * | | | Fix erroneous commentNick Mathewson2022-06-091-1/+1
| | | | |
| * | | | Fix typos in commentsNick Mathewson2022-06-091-3/+3
| | | | |
| * | | | tor-proto: padding: Test padding timer distributionIan Jackson2022-06-082-0/+125
| | | | |
| * | | | tor-proto: channel: Use padding::TimerIan Jackson2022-06-083-12/+44
| | | | |
| * | | | tor-proto: channel: Provide padding::TimerIan Jackson2022-06-084-0/+410
| | | | |
* | | | | Merge branch 'format-ids' into 'main'Ian Jackson2022-06-102-28/+51
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Replace four very similar "ids in request" See merge request tpo/core/arti!577
| * | | | dirclient: Fix comments re conssensus request without authoritiesIan Jackson2022-06-101-5/+3
| | | | |
| * | | | dirclient: Replace four very similar "ids in request"Ian Jackson2022-06-092-28/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In reviewing !553 I noticed that the empty digest list error had to be handled in two places. I filed #492 about the duplication. In fact it turns out to have been quadruplication. The new code also avoids cloning the underlying objects, instead sorting a Vec of references.
| * | | | dirclient: Test consensus request based on empty ConsensusRequestIan Jackson2022-06-091-0/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | I'm not sure this is right. But providing a test case for it before my next change ensures that my refactoring doesn't change the behaviour.
* | | | Fix typosDimitris Apostolou2022-06-102-4/+4
| | | |
* | | | Fix typos in docs and commentsNick Mathewson2022-06-091-2/+2
| | | |
* | | | tor-cell: udp: Remove manual length calculationsIan Jackson2022-06-092-23/+11
| | | | | | | | | | | | | | | | | | | | This does away entirely with `wire_addr_len`, which recapitulates the length calculation.
* | | | tor-bytes: Provide nested writersIan Jackson2022-06-092-1/+117
| | | |
* | | | tor-bytes: Provide nested readersIan Jackson2022-06-092-0/+70
| | | |
* | | | tor-bytes: Reader: Provide take_restIan Jackson2022-06-092-0/+20
| | | | | | | | | | | | | | | | We'll want this in a moment.
* | | | tor-bytes: Prepare errors for nested reader/writerIan Jackson2022-06-091-1/+5
| | | | | | | | | | | | | | | | Writing is going to be able to give errors too.
* | | | Merge branch 'less-servfail' into 'main'Ian Jackson2022-06-097-15/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | return nodata instead of servfail in some instances See merge request tpo/core/arti!564
| * | | | Change to exhaustive match.Ian Jackson2022-06-081-1/+2
| | | | |
| * | | | update semver.mdtrinity-1686a2022-06-081-0/+1
| | | | |
| * | | | try to differentiate transient from nontransient errortrinity-1686a2022-06-086-14/+33
| | | | |
| * | | | return nodata instead of servfail in some instancestrinity-1686a2022-06-081-3/+13
| |/ / /
* | | | Fix a second docs linkIan Jackson2022-06-081-1/+1
| | | |
* | | | Fix a doc linkIan Jackson2022-06-081-1/+1
|/ / /
* | | Merge branch 'sleep' into 'main'Ian Jackson2022-06-0813-64/+143
|\ \ \ | | | | | | | | | | | | | | | | Plumb a SleepProvider (now Clone + ....) into Channel See merge request tpo/core/arti!569
| * | | Document semver changesIan Jackson2022-06-082-0/+2
| | | |
| * | | Plumb a SleepProvider into the channel reactorIan Jackson2022-06-086-58/+122
| | | | | | | | | | | | | | | | | | | | The channel reactor is going to want to be able to sleep so that it can do padding, so it needs a SleepProvider.
| * | | rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-085-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make it much more convenient for code that only wants one of these traits (or a subset of them). This is a good thing to support because it will allow us to use a ZST in places that do not need an actual async runtime handle (typically, the runtime handle is needed only for spawn).
* | | | Fix a rustdoc link.Nick Mathewson2022-06-071-1/+1
| | | |
* | | | Merge branch 'use-testing-rng'Nick Mathewson2022-06-0729-123/+128
|\ \ \ \
| * | | | Sort tor-rtmock dependencies.Nick Mathewson2022-06-071-1/+1
| | | | |
| * | | | Rewrite tests in tor-netdir to use testing_rng()Nick Mathewson2022-06-023-76/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The randomized tests in this crate take a lot of iterations to converge, so they default to using a deterministic PRNG seed with few iterations and higher tolerance, and they only randomize the tests (with more iterations and tighter tolerances) when you explicitly opt in to randomization. (If you specify a seed explicitly, you're doing that to reproduce a randomized case, so we use the same behavior.)
| * | | | Refactor fallback-set tests to work with deterministic PRNG.Nick Mathewson2022-06-021-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | The trouble was that one of the helper functions they used did not take a PRNG as an argument.
| * | | | Use testing_rng() in tests throughout our crates.Nick Mathewson2022-06-0228-41/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This only affects uses of thread_rng(), and affects them all more or less indiscriminately. One test does not work with ARTI_TEST_PRNG=deterministic; the next commit will fix it.
* | | | | Merge branch 'netdir_provider_in_guardmgr_v2' into 'main'Nick Mathewson2022-06-077-66/+190
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use NetDirProvider in GuardMgr Closes #93 See merge request tpo/core/arti!568
| * | | | | GuardMgr: Use installed netdir provider when we want a netdirNick Mathewson2022-06-071-20/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of our existing code optionally takes a netdir from the caller. When it doesn't give us one, use the netdir from the installed NetDirProvider. (Possibly someday we should remove the NetDir arguments entirely. I'm deferring that because there are only two APIs affected, and because making this change would force us to rewrite a pretty large mess of unit tests.)
| * | | | | Move responsibility for GuardMgr NetDir updates to GuardMgr.Nick Mathewson2022-06-074-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was the job of a task in CircMgr to do this; but we're going to want to give GuardMgr full access to the latest NetDir for this, and for other code-simplification reasons. With this change I'm deprecating a couple of functions in tor-circmgr. It's no longer necessary for us to have an artificial external way for you to feed new NetDirs to a circmgr. (I could just remove them, but I want practice deprecating.)
| * | | | | Remove now-redundant Send+Sync constraints alongside NetDirProviderNick Mathewson2022-06-073-8/+8
| | | | | |
| * | | | | Make NetDirProvider require Send and Sync.Nick Mathewson2022-06-072-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our own code is the only stuff that consumes NetDirProvider, and all the code that consumes it wants it to be Send and Sync. Making this change avoids our having to define a new function to upcast Arc<dyn Foo> to Arc<dyn NetDirProvider + Send + Sync>.
| * | | | | Add an upcast_arc function to NetDirProvider.Nick Mathewson2022-06-021-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses some apparently-standard trickery to implement a function that lets us upcast from Arc<dyn Subtrait> to Arc<dyn Supertrait>. I considered as alternatives `as_dyn_trait` and `cast_dyn_object`. Both were nice, but generated a far larger interface than this.
* | | | | | Merge branch 'tor-netdoc-tests' into 'main'Nick Mathewson2022-06-0712-24/+199
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scattered tests throughout tor-netdoc See merge request tpo/core/arti!562