summaryrefslogtreecommitdiff
path: root/crates/tor-netdir/src/params.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdir: Fix broken links in NetParameters docs.Gabriela Moldovan2024-03-261-3/+3
| | | | Spotted in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2053#note_3012632
* tor-netdir: Use IntegerSeconds for the vanguard lifetime params.Gabriela Moldovan2024-03-261-4/+4
|
* tor-netdir: Use consistent termninology in the vanguard param docs.Gabriela Moldovan2024-03-261-6/+6
|
* tor-netdir: Fix torspec links in vanguard param docs.Gabriela Moldovan2024-03-261-8/+8
|
* tor-netdir: Add the vanguard params to NetParameters.Gabriela Moldovan2024-03-261-0/+70
| | | | | | See also torspec!258 Part of #1272
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Rename parameters for intro-point lifetime to match the spec.Nick Mathewson2024-01-311-4/+4
| | | | | | | | | | (Also, correct the comments that describe them.) We may as well match the spec names when they aren't completely bogus. We are already renaming these parameters for this release, so it isn't an additional breaking change.
* Rename our aliases for hs_intro_*_lifetime.Nick Mathewson2024-01-251-2/+2
| | | | | | The old names were somewhat inaccurate. (I would have considered keeping and deprecating the old names, but we already have breaking changes in tor-netdir.)
* clippy: Add an allow to work around a clippy bugIan Jackson2024-01-021-0/+3
| | | | | | | | | | clippy in current stable thinks |(a, b)| (a, b) is always the identity function, but due to match ergonomics, it might be an implicit copy. This is fixed in nightly by https://github.com/rust-lang/rust-clippy/pull/11792
* Improve documentation in/around DosParams extensionNick Mathewson2023-11-201-6/+13
| | | | | | It does not help that C tor has a set of parameters and a set of configuration options with exactly the same names which configure the same thing in two slightly different ways.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* netdir: add network parameters related to onion servicesNick Mathewson2023-01-111-1/+80
| | | | | | | These are available unconditionally, since they represent comparatively little storage and processing effort. See param-spec.txt section 8 for the original information here.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* tor-netdoc: if_ito: Add expansion of acronymIan Jackson2022-08-171-0/+2
|
* tor-congestion: implement the RTT estimation algorithm from prop#324eta2022-08-111-0/+21
| | | | | | | | | | | This commit implements the round-trip-time estimation algorithm from Tor proposal 324, validating the implementation against the test vectors found in C tor. (Note that at the time of writing, the new test vectors may not be committed to C tor yet, but they will be soon.) This also adds the necessary consensus parameters to `NetParameters`. Some of them have been renamed in order to (hopefully) make them more understandable.
* Finish implementation of params() for DirMgr.Nick Mathewson2022-08-021-0/+8
| | | | | | | Now it maintains an up-to-date set of default parameters to be handed out if there is no directory. Closes #528.
* channel padding: Use IntegerMilliseconds in netdirIan Jackson2022-06-211-8/+8
|
* tor-netdir: Make CHANNEL_PADDING_TIMEOUT_UPPER_BOUND pubIan Jackson2022-06-211-1/+1
| | | | We need this because it is a type parameter for the types of nf_ito_*.
* channel padding: Change timeout to match C TorIan Jackson2022-06-211-1/+6
| | | | Pending an official value from the spec.
* channel padding: Add the parameters from the spec to NetDirIan Jackson2022-06-211-0/+28
|
* Remove some outdated comments.Nick Mathewson2022-06-171-1/+1
| | | | | These all say, in one form or another, "there is no guard filtering; there is only one selection". That's now false.
* squash! Bump every crate's edition to 2021.Nick Mathewson2022-04-251-2/+0
| | | | | Remove all `use` statements for `TryFrom` and `TryInto`. These are now redundant in Rust 2021.
* tor-netdir: Resolve an XXXX about type uglinessNick Mathewson2021-12-081-1/+1
| | | | | | | | | | | | | | | We had no function to infallibly convert BoundedInt32<{0 or 1},H> into a u32, even though we could have. Because of that, we were treating weight_scale as an i32 when logically it's a u32 or a NonZeroU32. Moreover, it turns out we were using an incorrect minimum for the bwweightscale param, which would in theory have allowed the authorities to make us divide by zero. This patch introduces the necessary From<> implementation and uses it. It corrects the binimum bwweightscale, and prevents a division-by-zero issue in case weight_scale is zero.
* Remove a couple of spec-related XXXXs in tor-netdir.Nick Mathewson2021-12-081-2/+0
| | | | | I've opened torspec!54 to fill in the missing parts of the spec about these issues.
* add semicolons if nothing returnedDaniel Eades2021-11-251-1/+1
|
* More typo fixes that I forgot to save :(Nick Mathewson2021-11-241-2/+2
|
* Allow type of timeout estimator to change at runtime.Nick Mathewson2021-10-201-0/+9
| | | | | | This is a big change, but it does simplify the type of Builder a little, and isolates locking across different (potential) timeout estimator types.
* Initial backend implementation for guard node manager.Nick Mathewson2021-10-071-4/+14
| | | | | | | There are some missing parts here (like persistence and tests) and some incorrect parts (I am 90% sure that the "exploratory circuit" flag is bogus). Also it is not integrated with the circuit manager code.
* Typo fix in comment.Nick Mathewson2021-09-291-1/+1
|
* Suppress a cognitive-complexity lint in testsNick Mathewson2021-09-091-0/+1
|
* Add guard-related network parameters.Nick Mathewson2021-09-091-3/+118
|
* Use macros and traits to simplify the declaration of parameters.Nick Mathewson2021-09-091-135/+144
| | | | | | | | | | | | | | | | Previously, we'd have to declare the field for a parameter in one place, its default in a second, and its consensus key in a third. That's error-prone and not so fun! This patch changes the way we declare parameters so that we declare a structure once, and macros expand it to all do the right thing. This required a few new traits and implementations to ensure uniformity across the types that can go in parameters: We need every parameter type to implement TryFrom<i32> and to implement SaturatingFromInt32. Eventually we might want SaturatingFromInt32 to be a more generic SaturatingFrom, but that's not for now.
* Fix/suppress a few more clippy lints in tests.Nick Mathewson2021-09-081-0/+1
| | | | | I'm alright with allowing cognitive-complexity violations in the tests.
* Merge remote-tracking branch 'origin/mr/71'Nick Mathewson2021-09-081-1/+1
|\
| * fix/silence clippy lints in test modulesDaniel Eades2021-09-081-1/+1
| |
* | Check for correct-ish decoding of all parameters.Nick Mathewson2021-09-081-4/+77
|/
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+350
This will cause some pain for now, but now is really the best time to do this kind of thing.