when chutney makes a Tor network, it sets the following options in the dirauth torrc:
TestingDirAuthVoteExit *TestingDirAuthVoteGuard *
which results in a network where all nodes are guards and exits.
This results in totally unbalanced bandwidths (0 guard bandwidth, 0 middle bandwidth, full guard+exit bandwidth) and authorities will not generate bandwidth weights:
[warn] Consensus with empty bandwidth: G=0 M=0 E=0 D=65770 T=65770
This is quite different from the real Tor network.
It would be great if chutney could assign Exit/Guard flag in a smarter way to only a few nodes, so that bandwidth can be allocated more widely.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
This would vote relays m to n (by fingerprint) as Exits, and relays p% to q% as Guards. We'd probably want to make a similar change to the corresponding TestingDirAuthVoteHSDir flag as well, even if we didn't use it.
We could implement this feature in chutney or in tor:
In chutney, we could perhaps do this as part of the templating system, or maybe it could wait for chutney 2?
In tor, we could allow the TestingDirAuthVote... parameters to take a m-n or p%-q% argument, by modifying routerset_contains_routerstatus. I'd want to ensure this was only active in test networks, of course.
I am in favour of making this change in tor, where it might assist a wider range of users. And it would work in chutney 2 for free. But I'd want to get nickm's advice.
We could implement this feature in chutney or in tor:
In chutney, we could perhaps do this as part of the templating system, or maybe it could wait for chutney 2?
In tor, we could allow the TestingDirAuthVote... parameters to take a m-n or p%-q% argument, by modifying routerset_contains_routerstatus. I'd want to ensure this was only active in test networks, of course.
I am in favour of making this change in tor, where it might assist a wider range of users. And it would work in chutney 2 for free. But I'd want to get nickm's advice.
Hehe. My initial intuition would be to build this feature in chutney.
I prefer our intrusions to the Tor codebase for the purposes of testing networks to be minimal, if it can be helped. Also, chutney is in Python and I imagine that editing the templating logic of chutney shouldn't be too hard for this purpose.
However, if there is indeed a wider range of users, then we should think about it more. Who is doing testing networks with something other than chutney and why? Maybe Shadow needs this feature, but I'm not sure.
I agree - I'd prefer testing infrastructure to be external as much as possible. Makes it easier to deploy and change.
However, this feature could be useful for Shadow, and various people on tor-dev and tor-relays who seem to enjoy setting up test networks without using TestingTorNetwork or chutney. It's almost a requirement to use TestingDirAuthVote... if you want a Tor network to bootstrap in a few seconds rather than minutes.
I'd hate to exclude guardfraction and similar features from testing, just because we don;t have sufficient support in the tor codebase to make them work in test networks. (Does that make sense?)
I'd be happy to prototype it in chutney and see if that's sufficient, or ask on tor-dev - I don't know, what do you think?
I think the second issue here, is that by default chutney relays will publish zero bandwidth. That's because there are no bwauths, and they also don't see any traffic so their bandwidth self-evaluation fails.
My dirty fix is to make each relay publish a random value as its self-reported bandwidth, but it's a bad fix.
Have you tried using CHUTNEY_DATA_BYTES=104857600 chutney verify?
(That command sends 100MB through each client and HS. It was merged to chutney in #14175 (moved).)
Although, I wonder how often the self-reported bandwidths are reported.
Maybe we need to add them to #13976 (moved) to get fixed up in test networks.
This ticket may also be related to #14034 (moved) (which is about making test networks behave more like the real thing).
I think we need to reduce CHECK_DESCRIPTOR_INTERVAL and perhaps BANDWIDTH_RECHECK_INTERVAL in test networks. They should probably get a Testing* option and be defaulted to their current values (1 minute, 12 hours); but be ~4 seconds and ~16 seconds by default (and configurable) in test networks.
This will allow us to:
Use TestingDirAuthVoteExit, TestingDirAuthVoteGuard, and TestingDirAuthVoteGuardIsStrict to set up the network (#14882 (moved), git 359faf5e4b4a88663201c2b42dd89a6f77569856)
Run CHUTNEY_DATA_BYTES=104857600 ./chutney verify to add some data to the network (this step might be able to be skipped if self-testing adds enough data by itself)
Wait a few seconds for the values to be included in the consensus
We should only implement early bandwidth reporting for test networks, or networks with no -default authority sets. Implementing in the real network can expose client guards (#23856 (moved)), but if we only do fast reporting in the first 24 hours, it might be ok (#24104 (moved)).