summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Use new upstream humantime_serde_option featureIan Jackson2022-03-142-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Replace all uses of our copy of this code.
| * | | | | humantime: Update to humantime-serde 1.1.1Ian Jackson2022-03-144-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has the humantime_serde::option module, which we have upstreamed and are about to switch to. The remaining dependency with version = "1" is going to be removed in a moment.
* | | | | | Canonicalize and intern protover lines on descriptorsNick Mathewson2022-03-115-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should save around 1MB per consensus, since every relay has a 'protocols' lines, but there are only a few distinct possibilities for such a line. Closes #385.
* | | | | | Canonicalize and intern family representations to save memory.Nick Mathewson2022-03-114-9/+57
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | This should save 1-3 MB of ram on each running arti client. Closes #384. See also tor#27359 and proposal 298.
* | | | | Merge branch 'arti-lib' into 'main'Ian Jackson2022-03-117-268/+325
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | arti: Move all code from binary crate to library crate See merge request tpo/core/arti!403
| * | | | | arti library crate: Add another note about panickingIan Jackson2022-03-111-0/+4
| | | | | |
| * | | | | arti library crate: re-add clippy lintsIan Jackson2022-03-111-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I ought to have c&p these. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/403#note_2786099
| * | | | | arti library crate: Add note about panickingIan Jackson2022-03-111-0/+4
| | | | | |
| * | | | | arti: Make main module entrypoints pubIan Jackson2022-03-116-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not constitute any kind of stable API promise. But it might allow people to use our arti client code in novel ways.
| * | | | | arti: Provide some rubric docs.Ian Jackson2022-03-111-0/+8
| | | | | |
| * | | | | arti: Move all code from binary crate to library crateIan Jackson2022-03-112-261/+269
| | | | | | | | | | | | | | | | | | | | | | | | This is just code motion and the minimal fixups.
* | | | | | Merge branch 'smaller_routerstatus' into 'main'Nick Mathewson2022-03-116-32/+91
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-netdoc: Save allocation space in GenericRouterstatus Closes #387 See merge request tpo/core/arti!400
| * | | | | Add a more generic implementation of intern-by-refNick Mathewson2022-03-112-4/+12
| | | | | |
| * | | | | netdoc: Call shrink_to_fit() when we're done parsing rs sectionsNick Mathewson2022-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Once we're done parsing these, the vector will never get any longer.)
| * | | | | netdoc: allocate no extra space for RouterStatus addresses.Nick Mathewson2022-03-111-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This should save around 181K of heap on a current directory.
| * | | | | netdoc: Make versions smaller in GenericRouterStatusNick Mathewson2022-03-114-11/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the version is a Tor version, we can just parse it; otherwise, we can intern it. This shrinks GenericRouterStatus and avoids a lot of extra help allocations.
| * | | | | tor-netdoc: reformat cargo.toml.Nick Mathewson2022-03-111-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the default vscode format, and seems popular elsewhere. This commit does nothing but reformat.
| * | | | | tor-netdoc: Remove unused or_port field from RS.Nick Mathewson2022-03-112-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | Part of #387
* | | | | | Merge branch 'config-flatten' into 'main'Ian Jackson2022-03-112-136/+35
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Make ArtiConfigBuilder contain a TorClientConfigBuilder See merge request tpo/core/arti!401
| * | | | | rustfmtIan Jackson2022-03-112-12/+16
| | | | | |
| * | | | | Make ArtiConfigBuilder contain a TorClientConfigBuilderIan Jackson2022-03-111-135/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an API break: now one must use `.tor()` to access the Tor configuration parts. But it is not a config file format break, because `#[serde(flatten)]`.
| * | | | | Make TorClientConfigBuilder DeserializeIan Jackson2022-03-111-0/+11
| |/ / / / | | | | | | | | | | | | | | | As per #371
* | | | | Follow-up from arti!318Nick Mathewson2022-03-112-2/+11
| | | | | | | | | | | | | | | | | | | | Make update_config only conditionally exported; add semver-status update.
* | | | | Merge branch 'add-flatfile-dirmgr' into 'main'Nick Mathewson2022-03-116-12/+54
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Add flatfile DirMgr See merge request tpo/core/arti!318
| * | | | Expose APIs for external DirProviderChristian Grigis2022-03-114-12/+23
| | | | |
| * | | | Add methods to `UnverifiedConsensus`Christian Grigis2022-03-102-0/+31
| | | | |
* | | | | Merge branch 'config-no-retcon' into 'main'Ian Jackson2022-03-1016-284/+106
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Drop config back-conversion from FooConfig to FooConfigBuilder See merge request tpo/core/arti!391
| * | | | Drop remaining conversion from FooConfig to FooConfigBuilderIan Jackson2022-03-074-151/+0
| | | | |
| * | | | Have ArtiConfig contain a TorClientConfig, and drop builder retconIan Jackson2022-03-072-140/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the recapitulation of TorClientConfig fields in ArtiConfig and instead just have it contain one. This is part of #374. The conversions from ArtiConfig back to ArtiConfigBuilder and TorClientConfigBuilder would need to change, but, since we don't want them anyway, No longer impl Deserialize for ArtiConfig. (As per #371 this will want to become a private type.) No longer impl From<ArtiConfig> for ArtiConfigBuilder and TorClientConfigBuilder. And abolish tests of that code. (This all has to be in one commit, because previously ArtiConfig::tor_client_config used the validated-to-builder config retcon.)
| * | | | Provide way to get TorConfigBuilder from ArtiConfigBuilderIan Jackson2022-03-071-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed according to #372, where we observe that builders ought not to be generated from validated structs. So we need this conversion.
| * | | | Derive Deserialize for handwritten ArtiConfigBuilderIan Jackson2022-03-071-1/+16
| | | | |
| * | | | Derive Deserialize for derive-builder-generated config buildersIan Jackson2022-03-076-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I used git-grep -P '\#\[serde\((?!default|deny_unknown)' to find places where I needed to add additional attributes on the builder method fields. This is currently a bit duplicative, but when #371 is completely done, the validated (non-builder) configs won't need to be Deserialize any more. This is part of #371 and #372.
| * | | | Use git source for derive_builder for now, for attrs featureIan Jackson2022-03-077-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to want to specify custom attributes on fields of the builder struct. This feature was missing from derive_builder. This commitid is the current head of my MR branch https://github.com/colin-kiegel/rust-derive-builder/pull/237 https://github.com/ijackson/rust-derive-builder/tree/builder-field-attrs Using the commitid prevents surprises if that branch is updated. We will require this newer version of derive_builder. The version will need to be bumped again later, assuming the upstream MR is merged and upstream do a release containing the needed changes.
| * | | | humantime_serde_option: New module in tor-basic-utilsIan Jackson2022-03-073-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | This will be used to allow our config *builder* structs to be Deserialize.
* | | | | Merge branch 'arti-testing-part2' into 'main'Nick Mathewson2022-03-105-10/+416
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | arti-testing: support for simulated TCP breakage See merge request tpo/core/arti!392
| * | | | arti-testing: Make Action implement CopyNick Mathewson2022-03-101-2/+2
| | | | |
| * | | | arti-testing: reverse two more attrs in attempt to fix min-versionsNick Mathewson2022-03-071-1/+1
| | | | |
| * | | | arti-testing: reverse two attrs in attempt to fix min-versionsNick Mathewson2022-03-071-1/+1
| | | | |
| * | | | arti-testing: todo comment cleanupNick Mathewson2022-03-071-8/+1
| | | | |
| * | | | arti-testing: support for conditional TCP failure.Nick Mathewson2022-03-073-9/+89
| | | | |
| * | | | arti-testing: add support for black-holing TCP connections.Nick Mathewson2022-03-073-7/+112
| | | | |
| * | | | arti-testing: CLI for making TCP connections break.Nick Mathewson2022-03-073-9/+146
| | | | |
| * | | | arti-testing: Initial support for broken TCP.Nick Mathewson2022-03-074-7/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for a BrokenTcp provider that can make connection attempts fail or time out. It doesn't yet have a way to turn on the failure.
* | | | | Merge branch 'ticket_391' into 'main'eta2022-03-091-9/+26
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arti-bench: don't allocate a separate receive-buffer for each job Closes #391 See merge request tpo/core/arti!395
| * | | | | arti-bench: don't allocate a separate receive-buffer for each jobNick Mathewson2022-03-081-9/+26
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | This makes heap profiling more viable. Closes #391.
* | | | | Merge branch 'ticket_383' into 'main'Ian Jackson2022-03-091-5/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-chanmgr: Do not allocate an Internal error unless we mean it. Closes #383 See merge request tpo/core/arti!394
| * | | | | tor-chanmgr: Do not allocate an Internal error unless we mean it.Nick Mathewson2022-03-081-5/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we'd allocate an error as a place-holder here, but it's not a great idea to do that with a `Bug`: each `Bug` stores a whole stack trace, which uses a whole pile of allocations to construct. Now we keep an `Option<Error>` instead. Found while heap profiling. Closes #383.
* | | | | Merge branch 'fix-expand-tilde-on-windows' into 'main'Ian Jackson2022-03-071-2/+24
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix expand tilde and invalid path chars on windows See merge request tpo/core/arti!274
| * | | | | Test shell variable expansion on windowsMichael2022-03-051-2/+24
| | |/ / / | |/| | |
* | | | | Merge branch 'moderately-enthused-eyeballs' into 'main'eta2022-03-072-21/+84
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | Implement a basic form of RFC 8305 ("happy eyeballs") for channels See merge request tpo/core/arti!382