I rebased everything onto 0.3.6 and organized the commits in a similar order to how we reviewed in Mexico. Strongly recommend reviewing it in commit order.
WARNING: The github PR UI is showing the commits in timestamp or some other random ordering. Reviewing in commit hash order is best. I have no idea how to change the github ordering. :/
I started doing the review, and I put some general comments in github. I'm far from done.
I also started testing it with chutney and it seems to work pretty nicely. I have some local changes that add some extra logs, but I'm gonna push them after I do more testing.
Mike, you have any tips for more effective testing of this feature?
Nickm -- the branch's commits are in recommended review order. Note that github reorders them by timestamp in its UI, which is not the right order to look at it. The right order is in the git hash-parent history.
The last few days I've been focusing on using Riastradh's better probability distribution formulas as part of circuitpadding. Current work can be found in https://github.com/torproject/tor/pull/533.
Next steps in this area:
Fix the remaining compiler warnings.
~~Figure out if we want to keep the stochastic tests or not. Need to understand more about their failure rates, and also they are quite slow. Maybe I can put them into the slow test category which AFAIK is not run by the CI. We still get to run the numerical tests. ~~Moved stochastic warnings to test-slow. I will open a ticket to figure out what to do about them.
~Address various XXXs (e.g. geometric distr needs to conform to the API as well). ~~Resolved a few of them, the rest we can open tickets for.
Do further documentation.
~~Ensure that the API consumer circpad_distribution_sample() works well in terms of using the prob distributions correctly. ~~Added a basic test for uniform distribution circuit padding delay sampling.
Fix coding style of prob distr code because it's different from Tor's and make check-spaces is freaking out.
The new files were ported to Tor quite hastily. Ensure that they are proper wrt header file etc. Also fix the copyrights etc.
All remaining tasks above have been resolved. I pushed the code in !adaptive_padding-prob-distr-tests and pending review from Riastradh. After review has been done, I will squash into something presentable along with the rest of the #28142 (moved) branch. I will also open some tickets for leftover optional work in this area.
FYI: a part of this work, namely the uniform ^^[0,1^^] sampler used throughout, is echoed in #23061 (moved). Just letting you know in case you want to avoid the duplication sooner rather than later.
use separate functions for floor and ceiling instead of one with a boolean parameter; and
convert assert to tor_assert.
With these patches, the only remaining complaints from make check are:
lines that are too long because they contain URLs that are too long; and
includes that are not allowed because of missing .may_include or something.
I'm not sure what the best way to address these is -- break the URLs, or add an override; update .may_include, or move files around -- so I'll leave that up to you folks to decide.