summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Rename arti::trace module to arti::loggingIan Jackson2022-03-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | We are going to move LoggingConfig here. We should follow the already-public name IMO.
* | | | | Move ArtiConfig to new arti::cfg moduleIan Jackson2022-03-2110-266/+286
| | | | | | | | | | | | | | | | | | | | Code motion and import fixups.
* | | | | Merge branch 'accessors' into 'main'Nick Mathewson2022-03-183-44/+26
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Abolish some accessors in drmgr See merge request tpo/core/arti!423
| * | | | dirmgr: Authority: Abolish v3ident accessorIan Jackson2022-03-182-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This makes this information crate-private. The crate can reasonably just access it.
| * | | | dirmgr: Authority: Move a method used only for testingIan Jackson2022-03-181-6/+9
| | | | |
| * | | | dirmgr: Authority: Abolish two unused accessorsIan Jackson2022-03-181-9/+1
| | | | |
| * | | | dirmgr: NetworkConfig: Abolish accessorsIan Jackson2022-03-181-16/+8
| | | | | | | | | | | | | | | | | | | | Using accessors for crate-only fields is otiose.
| * | | | dirmgr: NetworkConfig: Rename fallbacks struct fieldIan Jackson2022-03-181-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename this to be named the same as its accessor, and use the rename feature of builder and serde. (The shorter name is nicer in the code IMO.)
* | | | | Actually throw an anyhowIan Jackson2022-03-181-1/+1
|/ / / / | | | | | | | | | | | | Prompted by a compiler warning which I weirdly can't seem to reproduce?
* | | | Merge branch 'circ_path_api' into 'main'Ian Jackson2022-03-186-40/+133
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | ClientCirc: add functions to return the circuit's actual path Closes #415 See merge request tpo/core/arti!419
| * | | Define accessors for circuit hops.Nick Mathewson2022-03-172-0/+39
| | | | | | | | | | | | | | | | Closes #415
| * | | tor-proto: Remember peer information in circuit and channelNick Mathewson2022-03-176-36/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each channel now remembers an OwnedChanTarget. Each circuit now remembers a vector of OwnedChanTarget to represent the path that it was constructed for. Part of #415.
| * | | ClientCirc: Move n_hops into a new Path type.Nick Mathewson2022-03-173-14/+36
| | | | | | | | | | | | | | | | This will help with #415
* | | | Merge branch 'md_allocation' into 'main'Nick Mathewson2022-03-172-126/+116
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use less space in hashtables for microdescriptors Closes #386 See merge request tpo/core/arti!415
| * | | | Run rustfmtIan Jackson2022-03-171-5/+6
| | | | |
| * | | | GetMicrodescsState: Abolish separate n_missing field inIan Jackson2022-03-171-12/+12
| | | | |
| * | | | GetMicrodescsState: Break out with_mdreceiver_for_missingIan Jackson2022-03-171-13/+23
| | | | |
| * | | | GetMicrodescsState: Dedupe slightlyIan Jackson2022-03-171-8/+9
| | | | |
| * | | | netdir: Use an even smaller rep for list of microdescsNick Mathewson2022-03-161-55/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every time we want a microdescriptor, we know the index of that microdesc's corresponding routerstatus within the consensus. Therefore, we can use that index to store `Arc<Microdesc>`s in a dense array, and not have to use a HashSet here at all.
| * | | | tor-dirmgr: Remove redundant hashtable.Nick Mathewson2022-03-162-22/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using a hashtable to keep track of missing microdescriptor digests. But this information is redundant with the NetDir state, and there's now no longer any performance benefit to keeping a separate copy. Part of #386.
| * | | | NetDir: Use less space in hash tablesNick Mathewson2022-03-161-61/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously kept missing-MD entries and present-MD entries all in the same HashSet, which resulted in using more slack space than we need. Now we use separate tables, so we can drop missing-MD entries as we move forward. Also, when constructing a NetDir, set its hash tables to their final capacities. This also lets us simplify some of our missing-md-listing code a lot.
* | | | | Alternative API for set_isolation_group().Nick Mathewson2022-03-175-5/+13
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of requiring a `Box<dyn Isolation>`, it now takes either a `Box<dyn Isolation>`, or an arbitrary `T` that implements `Isolation`. This API still allows the user to pass in a `Box<dyn Isolation>` if that's what they have, but it doesn't require them to Box the isolation on their own. Part of #414.
* | | | Merge branch 'test-isolation' into 'main'Nick Mathewson2022-03-1711-214/+440
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | new api for isolation See merge request tpo/core/arti!377
| * | | | replace TODOs with documentationtrinity-1686a2022-03-162-3/+2
| | | | |
| * | | | add isolation to dns requeststrinity-1686a2022-03-162-9/+35
| | | | |
| * | | | accept boxed isolation in StreamPref::set_isolation_grouptrinity-1686a2022-03-163-4/+4
| | | | |
| * | | | add trait to help test isolation related codetrinity-1686a2022-03-163-49/+182
| | | | |
| * | | | add tests on Isolation and fix conditional compilation issuestrinity-1686a2022-03-163-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it seems I added conditional compilation without noticing it?? and there was some errors when choosing a prefered runtime depending on feature flags
| * | | | replace IsolationMap with new Isolation traittrinity-1686a2022-03-162-102/+15
| | | | |
| * | | | refactor restrict_muttrinity-1686a2022-03-161-14/+15
| | | | |
| * | | | replace Arc with Box and use dyn-clonetrinity-1686a2022-03-163-95/+62
| | | | | | | | | | | | | | | | | | | | this also removes JoinResult
| * | | | replace result with eithertrinity-1686a2022-03-161-5/+6
| | | | |
| * | | | add some documentation for new traitstrinity-1686a2022-03-161-12/+18
| | | | |
| * | | | replace isolated with compatibletrinity-1686a2022-03-161-13/+13
| | | | | | | | | | | | | | | | | | | | the inverted logic was too easy to mess up
| * | | | use downcast-rs instead of our own AsAnytrinity-1686a2022-03-162-15/+4
| | | | |
| * | | | fix existing teststrinity-1686a2022-03-162-68/+62
| | | | |
| * | | | add a join() on Isolationtrinity-1686a2022-03-161-4/+65
| | | | |
| * | | | testing new api for isolationTrinity Pointard2022-03-163-45/+124
| | | | |
* | | | | Merge branch 'config-partials-transparent' into 'main'Ian Jackson2022-03-1711-153/+199
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Absolish builders for CircMgrConfig and DirMgrConfig See merge request tpo/core/arti!417
| * | | | | DirMgrConfig: abolish builder; make it transparent and exhaustiveIan Jackson2022-03-165-82/+61
| | | | | | | | | | | | | | | | | | | | | | | | See rationale in the comment.
| * | | | | Add rationale for CircMgrConfig transparency and traitIan Jackson2022-03-161-1/+22
| | | | | |
| * | | | | Provide define_accessor_trait and use it to generate CircMgrConfigIan Jackson2022-03-163-20/+81
| | | | | |
| * | | | | Make CircMgrConfig transparent (and make it a trait)Ian Jackson2022-03-164-68/+47
| | | | | | | | | | | | | | | | | | | | | | | | See commentary for the rationale.
| * | | | | Change type of TorClientConfig::override_net_paramsIan Jackson2022-03-163-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we use NetParams. That implies making its constructor public, which I think it fine. This is related to #413 but is far from completing that ticket.
| * | | | | Actually honour preemptive circuits configurationIan Jackson2022-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This handwritten conversion function omitted a field. There was nothing to spot this mistake. IMO this shows why these particular types ought not to use builders, but instead, should cause API breaks when things change. Adding this line here to explicitly fix the bug, although we are about to abolish this function completely almost right away.
* | | | | | Merge branch 'always-ims' into 'main'eta2022-03-161-10/+49
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dirmgr: Always send if-modified-since on consensus documents. Closes #403 See merge request tpo/core/arti!412
| * | | | | | dirmgr: Always send if-modified-since on consensus documents.Nick Mathewson2022-03-161-10/+49
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We never want a consensus document that's super-old, since we would reject it immediately for being too old. Also, never send an if-modified-since that's so old that we'd reject the response. Closes #403
* | | | | | Fix typoDimitris Apostolou2022-03-161-1/+1
| |_|/ / / |/| | | |
* | | | | Merge branch 'derive-builder' into 'main'Ian Jackson2022-03-169-14/+14
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | derive_builder: Switch to upstream 0.11 See merge request tpo/core/arti!414
| * | | | derive_builder: Switch to upstream 0.11Ian Jackson2022-03-169-14/+14
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has the different syntax for builder field attributes than what I originally proposed in my MR, and which therefore is in the pinned branch. My upstream MR for the field attributes feature was morged: https://github.com/colin-kiegel/rust-derive-builder/issues/239