CHANGELOG.rst 51.4 KB
Newer Older
juga's avatar
juga committed
1
2
3
4
5
6
7
8
9
Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on `Keep a
Changelog <http://keepachangelog.com/en/1.0.0/>`__ and this project
adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`__.

juga's avatar
juga committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
v1.5.2 (2022-05-17)
-------------------

Changes
~~~~~~~
- When an exit fail to exit, check CC.
  before selecting other exits as helpers.
  In #40136 we forgot to consider the corner case in #40041, discovered
  thanks to analysis#36.
  This was causing that sometimes a CC circuit was built when
  bwscanner_cc wasn't equal or greater than 1 or the other way around.
  We didn't realize about this cause this part of the code is very
  confusing. To don't make it even more confusing, i've changed the
  internal API:

  - `select_helper_candidates`: split function into one to select the
    helper candidates, knowing whether to use the relay as exit or not
    and other function `use_relay_as_entry` to decide whether to use the
    relay as entry or not checking CC params.
    Also pass a new arg `relay_as_entry`.
  - `create_path_relay`: remove not used `cb` arg, add `candidates` arg
    to stop having to select them again later on. Move the no
    `candidates` condition here instead of checking it in
    `pick_ideal_second_hop`.
  - `_pick_ideal_second_hope: remove unneeded `dest` and `cont arguments,
    rename `is_exit` to `helper_is_exit`. Use the candidates instead of
    selecting them again.
  - `measure_relay`: in the case an exit fails to exit, select the
    candidates knowing that they have to be exits and checking CC.
  - `only_relays_with_bandwidth`: remove unneeded arg `controller` so
    that there is no need to pass it through several functions.

  Closes #40138
- Consensus weight fraction of CC exits.
  Closes #40139
- Scanner: check `bwscanner_cc` and `FlowCtrl`
  before measuring an exit as exit.
  Closes #40136

Fix
~~~
- Doc: changelog indentation and new lines
- Relaylist: Comment too verbose logs.
  And log consensus params items instead of just keys.

juga's avatar
juga committed
55
56
57
58
59
60
61
62
63
v1.5.1 (2022-05-10)
-------------------

Changes
~~~~~~~
- Change `cc_alg` and `bwscanner_cc` values to int.
  Because consensus parameters are strings in stem.
  Closes #40134.

juga's avatar
juga committed
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
v1.5.0 (2022-04-26)
-------------------

New
~~~
- Choose exits that implement congestion control.
  and create methods to check that the consensus implements congestion
  control.
  Closes #40125

Changes
~~~~~~~
- Add subcommand to show exits with 2 in FlowCtrl.
  Closes #40132

Fix
~~~
- Update authors.

juga's avatar
juga committed
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
v1.4.0 (2022-02-14)
-------------------

Changes
~~~~~~~
- Remove support for Python 3.6.
  because it's already EOL. Also update dates other python releases.
- Config: Stop printing which config file is used.
  sbws doesn't use default logging configuration until it tries to read
  configuration files. However it prints to stdout which configuration
  file is being used before that.
  If an sbws' operator wish to only receive emails on warnings, they'll
  still receive emails because of the print line. Therefore stop printing
  before configuring logging.
  Closes #40110.
- Clarify stats and units in the logs.
  to make them less confusing.
  Closes #40109.
- Create home directory after reading config.
  Otherwise it'd create a `.sbws` directory even when it's run as
  a supervised service.
  Closes #40108

Fix
~~~
- Maint: Require mako library to create release.
- Meta: Upgrade stem version.
  that was long ago released
- CI: Update comments about tor releases.
  Remove comment about tor 0.3.5, already EOL and update dates other tor
  releases become stable or EOL.
  No need to remove tests with tor 0.3.5, since there wasn't anymore.
- CI: Stop allowing python 3.10 to fail.
  Also:
  - add Python 3.10 as supported version.
  - target Python 3.10 in black
- CI: Update Python default version to 3.9.
  Also:
  - remove redundant image variable
  - build docs with python 3.9 too
  - Add python 3.9 as target-version for black
- Style: Remove spaces around power operators.
  if both operands are simple. To make CI tests pass with new black
  version 22.1 (#2726).
  Closes #40123
- Clarify log level to use for alerts.
  If a bwauth operator wish to receive (email) alerts, it might be more
  convenient to set the log level to error.
  Closes #40121
- V3bwfile: Lower log level about no observed bw.
  Because it might happen due fetching "early", "useless" descriptors or
  non running relays, so that there aren't too many warnings.
  Closes #40116.
- V3bwfile: Clarify percent warning.
  about the difference between the sum of the last consensus weight and
  the sum of the reported weight in the just generated Bandwidth File.
  Otherwise, when looking at the warnings only, it's not explained what
  the percentage is about.
  Closes #40115
- Improve coverage timestamps.py.
- Correct metadata urls and files.
  The readme a and license files changed to restructured text and the
  urls were missing `https`.
  Also add maintainer and contact metadata and remove travis link since
  travis is not being used anymore.
  Closes #40100.
- CI: tor-nightly-0.3.5.x-bullseye release is empty.
  and it is not used by any bwauth.
  Closes #40114.
- CI: Replace Debian package name.
  that changed from master to main.
- Comment about keep-alive timeout.
  in the Web server.
  Closes #40112
- Make CDN more optional.
- CI: update python versions.
  because bullseye is the new Debian stable, has by default python3.9
  amd tests using buster dependencies fail.
  Closes #40099.

Other
~~~~~
- Remove userquery code.
- Change default country to AA for [scanner]
167
168
  SN was set as default value instead of AA
  according to ISO 3166, SN refers to Senegal.
juga's avatar
juga committed
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
- Update scanner.country's comment.
  - sbws.example.ini described destination's country inside of scanner's
- Improvements and being inline with pep8.
  As juga suggested in the commits, I've done.
  I tried to figure out another way instead of manually defining the value but couldn't figure it out
- Line length was too long.
  line 64 was too long
- Changed variables to PEP 8 standard.
  I didn't see the link https://tpo.pages.torproject.net/network-health/sbws/contributing.html#code-style
  changed the variables
- Heartbeat coverage improvement.
  This should increase the coverage to 100% and should be passing the tests/commands when running tox
- Heartbeat coverage improvement.
  This should increase the coverage to 100% and should be passing the tests/commands when running tox
  Changed variables to PEP 8 standard
  I didn't see the link https://tpo.pages.torproject.net/network-health/sbws/contributing.html#code-style
  changed the variables
  line length was too long
  line 64 was too long
  improvements and being inline with pep8
  As juga suggested in the commits, I've done.
  I tried to figure out another way instead of manually defining the value but couldn't figure it out

juga's avatar
juga committed
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
v1.3.0 (2021-08-09)
-------------------

Changes
~~~~~~~
- Split dumpstacks into handle_sigint.
  stop exiting when there's a possible exception that makes sbws stalled
  and instead just dump the stack. Additionally, call pdb on sigint.
- Scanner: Move to concurrent.futures.
  away from multiprocessing, because it looks like we hit python bug
  22393, in which the pool hangs forever when a worker process dies.
  We don't know the reason why a worker process might due, maybe oom.
  See https://stackoverflow.com/questions/65115092/occasional-deadlock-in-multiprocessing-pool,
  We also run into several other issues in the past with multiprocessing.
  Concurrent.futures has a simpler API and is more modern.
  Closes #40092.
- V3bwfile: Stop scaling with consensus weight.
  because when the observed bandwidth is higher than the consensus (for
  example when the relay is new or was some time down), it's limited by
  the previous consensus, not allowing it to grow.
  Since the size of the data to download depends also on the consensus
  weight, this results on lower measured bandwidth too.
  Closes #40091.

Fix
~~~
- Add the tag `v` in gitchangelog template.
- Add missing date to last release.
- Recommend system timezone in UTC.
- Tests: Consensus bandwidth might not be 0.
  Since tor version 0.4.7.0-alpha-dev with #40337 patch, chutney relays
  notice bandwidth changes.
- Scanner: Rename functions.
  to more appropriate names, after switching to concurrent. futures.
- Typos.
- CI: Install tor specifying release.
  instead of version, so that it's more clear which version is being installed.
- CI: Really test tor stable.
  since the default tor with deb.tpo repository is master
- CI: Really test tor 0.4.6.
  since master is the default and add test for master.
- CI: Change indentation to 2 chars.
- Scanner: Increase time getting measurements.
235

juga's avatar
juga committed
236
237
238
239
240
241
242
243
244
245
246
247
248
  - Increase the time waiting for the last measurements queued, to avoid
    canceling unfinished measurements and gc maybe not releasing thread
    variables
  - Use the already declared global pool instead of passing it by args
  - Log more information when the last measuremetns timeout
- Reformat docstrings for black.
  To pass tox tests.
  This seems to have changed in black from version 20.8b1 to 21.4b2.
- Update python version for rtfd.io.
- CI: Build docs automatically in Gitlab.
  also replace the links to Read the Docs to pages.torproject.net
  and add redirect to it.

juga's avatar
juga committed
249
250
v1.2.0 (2021-04-14)
-------------------
juga's avatar
juga committed
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855

New
~~~
- Docs: Include script on how to release.
- Scripts: Add script to help new releases.
- Add gitchangelog template.
- Add gitchangelog configuration file.
- Docs: Add bwauths list image.
- Relaylist: Keep relays not in last consensus.
  Keep the relays that are not in the the last consensus, but are not
  "old" yet.
- Util: Add function to know if timestamp is old.
  Part of #30727.

Changes
~~~~~~~
- Stem: Set default torrc options.
  when connecting to an external tor and they are not already set.
- Generate, cleanup: Use 28 days of measurements.
  When generating the Bandwidth File as Torflow, use 28 days of past raw
  measurements instead of 5, by default.
  Also keep the raw measurements for that long before compressing or
  deleting them.
  And stop checking whether the compression and delete
  periods are valid, without checking defaults first and based on
  arbitrary values.
- Stem: Add function to connect or start tor.
  Move initialization via existing socket to this new function and start
  tor only when it fails.
- Stem, scanner: Change args initializing controller.
  to check whether the external control port configuration is set.
  There is no need to assert all argument options nor to return the error.
- Config: Add option to connect to external tor.
  via control port.
- Circuitbuilder: Remove not used attributes.
  and make argument optional.
- Circuitbuilder: Simplify building circuit.
  Since sbws is only building 2 hop paths, there is no need to add random
  relays to the path, or convert back and forth between fingerprint and
  ``Relay`` objects.
  This will eliminate the circuit errors:
  - Tor seems to no longer think XXX is a relay
  - Can not build a circuit, no path.
  - Can not build a circuit with the current relays.
  If a relay is not longer running when attempting to build the circuit,
  it will probably fail with one of the other circuit errors: TIMEOUT,
  DESTROYED or CHANNEL_CLOSED.
- Scanner: Stop storing recent_measurement_attempt.
  because it stores a timestamp for each attempt, which makes state.dat
  grow thousand of lines (json).
  Closes #40023, #40020
- V3bwfile: Exclude relays without observed bw.
  and without consensus bw from scaling.
  Part of #33871, closes #33831.
- V3bwfile: Percentage difference with consensus.
- V3bwfile: Calculate hlimit from scaled sum bw.
  instead of bw before scaling.
  Tests have finally correct value.
  For 1 result, only when the cap is 1, the value will be equal to the
  rounded bw because the cap does not limit it.
- V3bwfile: Obtain consensus values from last consensus.
- V3bwfile: Round scaled bandwidth after capping.
  Make tests pass because the high limit change the expected values,
  but the final value still needs to be fixed.
- V3bwfile: Change logic obtaining min bandwidth.
  Take either the consenus bandwidth or the descriptor bandwidth if
  one of them is missing, do not scale when both are missing and
  ignore descriptor average and burst when they are missing.
- V3bwfile: Scale relays missing descriptor bws.
  Scale relays without average or observed bandwidth.
  Later it will be check what to do if their values are None or 0
- V3bwfile: Stop making mean minimum 1.
- V3bwfile: Calculate filtered bandwidth.
  for each relay, calculate the filtered mean for all relays and
  calculate the filtered ratio for each relay.
- Scaling: Add filtered bandwidth function.
  to calculate the filtered bandwidth for each relay.
- Bwfile: Test KeyValues in a bandwidth file.
  Added:
  - library to check whether the KeyValues make sense
  - test an example bandwidth file
  - a command to check an arbitrary bandwidth file
  Finally, doing something with all these KeyValues!
  (Quarantine day 7th)
- V3bwfile: Count recent relay's monitoring numbers.
  using timestamps class.
  Also add one more result to the tests data and change the
  test accordingly.
- Tests: Remove `_count` from attr.
- Resultdump: Add missing attrs to errors.
- Resultdump: Remove `_count` from attributes.
  Tests wont' pass with this commit, they'll be fixed in the next commits
- Relayprioritizer: Count priorities with timestamps.
  in RelayPrioritizer:

  - Rename recent_priority_list_count to recent_priority_list when
    there is no counting
  - Rename recent_priority_relay_count to recent_priority_relay
    when there is no counting
  - Use the timestamps class to manage/count priority lists/relays
- Relaylist: Count measurements with timestamps.
  in RelayList:

  - Rename recent_measurement_attempt_count to recent_measurement_attempt when
    there is no counting
  - Use the timestamps class to manage/count measurement attempts
- Relaylist, v3bwfile: Count consensus with timestamps.
  in RelayList:

  - Rename consensus_timestamps to recent_consensus
  - Rename recent_consensus_count to recent_consensus when there is
    no counting
  - Use the timestamps class to manage/count consensuses
  - Remove method not needed anymore
- V3bwfile: Convert datetime to str.
- Resultdump: Use custom json encoder/decoder.
- State: Encode/decode datetimes.
- Json: Create custom JSON encoder/decoder.
  to be able to serialize/deserialize datetime in the state file.
- Timestamps: Add module to manage datetime sequences.
- State: Add method to count list values.

Fix
~~~
- Clarify release script dependencies.
- Use rst changelog template.
  and put in the same entry commit subject and body removing new lines.
- Correct network stream and filtered bw.
  because Torflow is not using them by relay type.
- V3bwfile: network means without relay type.
  This reverts commit fc3d3b992ada601a6255f8a6889179abd4b7e55e and partially
  reverts a82c26184097bea3ca405ae19773de7c4354a541.
  It was a mistake to think torflow was using the means by relay type,
  it actually sets the same networks means for all relay types.
  Closes #40080.
- Semi-automatic correction of typos.
  Closes #33599.
- Tests: Add codespell configuration.
- Tests: Additional security tests.
- CI: Use all tox environments for python 3.8.
- 2nd round of automatic format.
  black insists to keep one long line and flake complain, therefore make
  flake to ignore it.
- Flake8 errors.
- Reorder imports with isort.
- Reformat all with black.
- Move to declarative setup.cfg.
  Also:
  - Update versioneer
  - And include other source distribution files in MANIFEST.in
  - Add project URLs
  - Add formatter and linter dependencies and configurations.
  - tox: Remove travis, fix python environments
  - tox: Remove extra coverage options and add them in .coveragerc.
- Indent by default to 2 except python files.
  also uncomment final newline. Can be commented again in case it fails
- V3bwfile: network means by relay type.
  Calculate network stream and filtered bandwidth averages per relay
  type, to obtain bandwidth weights the same way as Torflow.
  Closes #40059.
- Scaling: Return mean if no bw >= mean.
- Scaling: Stop returning 1 as the means minima.
  since they are used as the numerator when calculating the ratio and the
  rounding already returns a minimum of 1.
- Scaling: Return if there are no measurements.
  it should not be the case because the measurements come from
  successful results, but otherwise it'd throw an exception.
- Tests: Add bw filtered from results.
- Scaling: round bandwidth filtered.
  because Torflow does it.
- Scanner: Return from measure if no helper.
  After refactoring in #40041, it was forgotten to return the error in
  the case a helper was not found, what can happen in test networks.
  Closes #40065.
- Tests: debug log for tests by default.
  and fix test that didn't consider that there might be other logs from
  other threads.
  Closes #33797.
- Scanner: Log times kept.
  not only the times that are not kept.
  Closes #40060
- CI: Temporal workaround for #40072.
- Relalist: Use the consensus timestamp.
  to the relay consensus timestamps list, so that it can be
  tested it was in a concrete consensus.
- CI: Exit from integration script.
  when any of the commands fail.
- CI: Update Python versions.
  Closes #40055.
- CI: Update tor versions.
- System physical requirements.
  After fixing #40017, the datadir files are compressed after 29 days and
  deleted after 57. However the total used disk space is less than 3G,
  leaving 3G as precaution.
  Closes #40044.
- Scanner: Return from measure if no helper.
  After refactoring in #40041, it was forgotten to return the error in
  the case a helper was not found, what can happen in test networks.
  Closes #40065.
- Update differences Torflow/sbws.
  Closes #40056
- Reorganize Torflow aggregation.
  - reorganize sections
  - add diagrams and links
  - add pseudocode
  - remove math
  - correct statements
  So that it's more accurate and easier to understand.
- Docs: Rename section, add diagrams.
- Separate Torflow/sbws differences.
  into a new file.
- Add target to call plantuml.
  and generate .svg from .puml files.
  Do not add to the html target since the generated svg images are
  not deterministic and will change every time `plantuml` is call.
- Separate how scanner and generator work.
  in different files and link to each other.
- Add missing new lines.
- CI: Make wget quiet.
  to avoid many lines of non useful text the CI.
- Scanner: Rm condition assigning helper.
- Scanner: Move as_entry/as_exit into one function.
  since they're similar code
- Scanner: remove relay to measure as helper.
- Scanner: log exit policy when stream fails.
- Relaylist: Remove duplicated can exit methods.
  After refactoring and making clear when we were using exit(s) that can
  exit to all public IPs (and a port) or only some, refactor them
  removing the duplicated code and adding the `strict` argument.
- Add relay measure activity diagram.
- Scanner: extract method on circuit error.
  At some point all possible errors should be exceptions.
- Scanner: extract method for not helper case.
- Scanner: extract method to create paths.
  because `measure_relay` method is too long, confusing and we have had
  several bugs in this part of the code.
- Relaylist: Add methods to obtain exits that.
  can exit to some IPs.
  To use them in the cases it will be more convenient.
- Relaylist: rename exits_not_bad_allowing_port.
  see previous commit
- Relaylist: rename is_exit_not_bad_allowing_port.
  see previous commit
- Relaylist: rename can_exit_to_port.
  to can_exit_to_port_all_ips, because it's using `strict`, which means
  that it allows to exit to all IPs.
  It seems more convenient to try first with exits that allow to
  exit to some IPs and only try a second time if that fails, because
  there are more.
- Resultdump: Check that the error has a circuit.
  Because if the error is not a circuit error, it does not have that
  attribute.
- Tests: Run integration tests with chutney.
  and adapt the tests to pass.
  \o/
- Add chutney configuration.
  and scripts to run the integration tests with chutney.
  It does not replace yet the way integration tests are run.
- Stem: Move torrc option that does not depend on config.
  It seems we forgot this option when refactoring in #28738.
- Stem: Remove torrc option that is the default.
  to avoid conflict when comparing the options that should be set and the
  ones are set, since the SocksPort will be differently in chutney.
- Resultdump: Log if relay was measured as exit.
  or entry.
  Closes #40048
- Relaylist: Stop measuring relays not in the consenus.
  as this might cause many circuit errors.
  They're already added to the generator.
  Also adapt the number in test_init_relays.
- Sphinx warnings when creating documentation.
  This should give us at least a clean html, text, and man build
  experience.
  Closes #40036.
- Add forgotten image from consensus health.
  It was referenced by 6e6a8f3ba534cbd93b830fe3ffd5ce40abe8e77d. Since that
  image was wrong, created a new screenshot from the current "past 90
  days" at consensus-health.tpo.
- Stem: Add possible exception cause.
- Stem: Remove unused code.
- Stem: Exit on failure connecting to control port.
  because when trying to connect to an external tor (chutney), it does
  not make sense to start own tor.
  Also log how the connection has been made.
- Update values in config_tor.rst + clean-up.
  Closes #40035.
- Update default values in man_sbws.ini.rst.
  Closes #40034.
- Clean up config.rst.
  Closes #40033.
- Scanner: Retry to measure exit as exit.
  if it fails to be measured as entry.
  Mayb closes: #40029.
- Relaylist: Comment on IPv6 exit policy.
  that could be also checked, increasing the chances that the exit can
  exit to our Web servers.
  But if it could not, then we need to retry to measure it as 1st hop.
- Config: Increment circuit build timeout.
  setting it to the default, 60secs.
  Since many relays fail to be measured cause of circuit timeout.
  Maybe closes #40029.
- Bump bandwidth file version to 1.5.0.
  after removing KeyValue recent_measurement_attempt_count in #40023.
  Changed also torspec, issue #20.
- V3bwfile: Tor version added in bandwidth v1.4.0.
  since, by mistake, the bandwidth file version here was never updated
  to v1.5.0.
  This patch only changes the constants names, but logic remains the same.
  Related to torspec#35.
- Add the bwauths timeline wiki.
  Closes #40013.
- Add bwauthealth tool.
- Add consensus health page.
  about bwauths measured relays.
- Move consensus weight to top.
  and explain what to check.
- V3bwfile: Take all measurements when IP changes.
  Previously, when a relay changes IP, only the measurements with the
  last IP were considered.
  Relays with dynamic IP could get unmeasured that way.
  Now, all the measurements are considered.
- V3bwfile: Avoid statistics without data.
  If mean or median argument is empty, they throw an exception.
  This can happen when the scanner has stopped and the result is
  stored as successful without any downloads.
- No need to use Travis anymore.
- Clarify branch to use when contributing.
- Maint: Fix linter error after merging #29294.
- Tests: Stop converting boolean key to int.
  Conversion only happens when parsing a bandwidth file in the
  integration tests.
- Relaylist: filter out private networks.
  when checking exit policies to know whether an exit can exit to a port.
- Update authors.
- Replace docs links from Github to Gitlab.
- Update reviewers.
- Replace Github review process to Gitlab.
  Replace also Github terminology to Gitlab.
- Replace Trac, ticket by Gitlab, issue.
- Replace links from Trac to Gitlab.
- Start using release script later.
  Change the version from which the release script is used.
  Also explain the prefixes used in the commits.
  Closes #29294
- Scripts: Clarify the scope of the script.
  it should not take more effort than solving self-sbws issues.
- Scripts: Reformat sentence.
- Scripts: Stop bumping to next prerelease version.
  since it is now managed automatically by versioneer.
  Instead, suggest creating a "next" maintenance branch.
  But stop using `-` and `.` characters in it, to type it faster, since
  most of the new branches will be based on it.
- Scripts: Stop releasing from -dev0 version.
  since now sbws version is calculated from last release tag.
- Scripts: Stop changing version in __init__
  Since it is now done by `versioneer`.
- Scripts: Change Github by Gitlab.
  releases can live now in gitlab.tpo, instead of github.com and
  there is no need to check them since Gitlab is FLOSS and gitlab.tpo is
  hosted by Tor Project.
  Also, stop assuming which is the current branch and remote and do not
  push. Instead guide the maintainer to do it.
- CI: Add .gitlab-ci.yml to run tests in Gitlab.
- Relaylist: Check exit to all domains/ips.
  When an exit policy allows to exit only to some subnet, it is not
  enough to check that it can exit to a port, since it can, but it might
  not be able to exit to the domain/ip of the sbws Web servers.
  To ensure that without having to check whether it can exit to a
  specific domain/ip, we can query the exit policy with `strict`.
  Closes #40006. Bugfix v1.0.3.
- V3bwfile: Count relay priority lists.
  and measurement attempts from all the results.
  Until they get properly updated.
  Also change dates in tests, so that timestamps are counted correctly
- Recomment maint-1.1 for production.
- Recommend using a CDN,
  add link to it and rephrase some sentences.
- Increase RAM required.
  ahem, because of all json it has to manage in memory.
- Recommend pip only for development.
  or testing and add links.
- Update supported Python versions.
- Comment on Debian/Ubuntu releases.
  because sometimes the package might not be in Debian stable or testing
  and we are not checking Ubuntu releases.
- Tests: Remove all the `\t` in torrc files.
  at the beginning of the line and in empty lines. They are not needed.
- Tests: Create new authority keys.
  because they expired.
  They will expire again in a year.
  Implementing #33150 and using chutney would avoid to update keys.
  Closes #34394.
- V3bwfile: linter error with new flake version.
- Add differences between Torflow and sbws.
  Closes #33871.
- Update/clarify Torflow aggregation.
- Docs: Remove unneeded linter exception.
- Docs: Move torflow scaling docstring to docs.
  so that it has its own page as it is too long as docstring and is
  harder to write latex with the docstring syntax.
- Unrelated linter error.
- V3bwfile: Remove unneeded minimum 1.
  since rounding already returns 1 as minimum.
- V3bwfile: Use cap argument to clip scaled bw.
  Make test pass, though the value is not correct since it needs to be
  rounded after clipping
- V3bwfile: cap is never None.
- V3bwfile: Warn about None bandwidth values.
  since they are probably due a bug.
- Check that log prints a number.
  and not a list of timestamps.
- Assert that caplog messages were found.
- Explain changes in the previous commits.
- Tests: Check the files generated in test net.
  Test that the results, state and bandwidth file generated by running
  the scanner and the generator in the test network are correct.
- Tests: Add tests loading results.
  in ResultDump and incrementing relay's monitoring KeyValues.
- Tests: Add results incrementing relays'
  monitoring KeyValues.
- V3bwfile: Stop calculating failures with 0 attempts.
- Relaylist: Count recent relay's monitoring numbers.
  using timestamps class.
  Additionally:
  - fix: relayprioritizer: Replace call relay priority
  - fix: scanner: Replace call relay measurement attempt
- State: Let json manage data types.
  Since state uses json and json will raise an error when it can't
  decode/encode some datatype.
- State: Read file before setting key.
  Otherwise, if other instance of state set a key, it's lost by the
  current instance.
  Bugfix v0.7.0.
- Tests: Test state file consistency.
  Test that two different instances of state don't overwrite each other.
  This test don't past in this commit, will pass in the next bugfix.
  Bugfix v0.7.0, which claimed 100% test coverage on state.
- Tests: linter error cause missing nl.
- Relaylist: Update relay status before consensus.
  Update relay status before updating the consensus timestamps
  Timestamps that are not old yet were getting removed because the
  document.valid_after timestamp was still the one from the previous
  consensus.
  Closes #33570.
- Tests: Test the number of consensus in Relay.
  This test does not pass in this commit, but in the next bugfix.
- Relaylist: Use is_old fn removing consensus.
  since the logic is the same and the there were two bugfixes on the
  same logic.
- Relaylist: Use seconds removing consensuses.
  by default days is passed to timedelta, what was making the oldest
  date be thousands of days in the past.
  Bugfix 1.1.0.
- Tests: Add relaylist test.
  Tests don't pass in this commit, they're fixed in the next commits.
- Tests: Add mocked controller fixture.
  to be able to unit test all the code that needs a controller.
- Tests: Add test for remove old consensus ts.
  Tests don't pass in this commit, it's fixed in the next commits.
- Timestamp: measurements period is in seconds.
  by default days is passed to timedelta, what was making the oldest
  date be thousands of days in the past.
- Timestamp: Old timestamps are minor than older.
  Old timestamps are minor than the older date, not major.
- Relaylist: Stop passing argument to self.is_old.
- Tests: Add test timestamp.is_old.
  The tests don't pass in this commit, it's fixed in the next ones.
- V3bwfile: Reformat to don't get flake8 errors.
  Part of #30196
- V3bwfile: Move keys to correct constant.
  Part of #30196.
- V3bwfile: Add comment about bwlines v1.3.
  Part of #30196.
- V3bwfile: Add tor_version KeyValue.

  - Create new KeyValues constants for the new v1.5.0 KeyValues
  - Instantiate State in Header.from_results so that there is no need
    to create new methods for all the header KeyValues that are read
    from the state file
  - Add tor_version to the kwargs to initialize the Header
  - Write tor_version in the state file when the scanner is started
- V3bwfile: Add constant for ordered key/values.
  to build the list of all keys from it and ensure no key is missing.
- V3bwfile: Reformat to don't get flake8 errors.
  After the automatic constants renaming, fix the flake8 errors by
  reformatting automatically with `black`, only the lines that had
  errors.
  Part of #30196
- Document why ersioneer to obtain version.
- Add at build time the git revion to version.
  Instead of having a hardcoded version, calculate the version at build
  time making use of `git describe --tags --dirty --always`.
  This way, even if the program is not running from inside a git
  repository it still can know which was the git revision from the
  source it was installed from.
  If the program is launched from a path that is a git repository, it
  does not gives the git revision of that other repository.
  If's also able to get the version when installed from a tarball.
  It does not add the git revision when it's being install from a git
  tag.
  `versioneer` external program is only needed the first time, because
  it copies itself into the repository. So it does not add an external
  dependency.
  There're no changes needed to the `--version` cli argument nor to the
  code that generates the bandwidth file, since they both use the
  variable `__version__`.
  The version previous to this commit was `1.1.1-dev0`, after
  this commit, it becomes `1.1.0+xx.gyyyyyyyy`, ie. xx commits after
  `1.1.0` plus the git short hash (yyyyyyyy).
- Tests: Test maximum retry delta in destination.
- Destination: Replace constant name.
  to make it consistent with others and shorter.
  Part of #33033.
- Destination: Set maximum to retry a destination.
  otherwise the time to retry a destination could increase too much,
  as it's being multiplied by 2, and a destination would not recover.
  Patch submitted by tom.
- Relaylist: linter error after after merge.
  Fix linter error after merging #30733 and #30727.
- CI: Cache pip, run tox stats after success.
  and do not require sudo.
- CI: Test all supported python versions.
  As in chutney and stem:
  - Test all supported python versions
  - Test all supported tor versions
  Differences between chutney, stem and sbws:
  - in sbws we run directly, not an script that calls tox
  - we're not using chutney for integration tests (yet) and therefore we're not testing it with different networks
  - we don't have shellcheck tests
  - we don't support osx nor windows
- Relaylist: Update the relays' descriptors.
  when fetching new consensuses.
  Part of #30733.
- Globals: Fetch descriptors early.
  and useless descriptors, so that sbws detect early changes in the relay
  descriptors and continue downloading them even when Tor is idle.

Other
~~~~~
- Wip: rm me, temporally change release url.
  to personal fork, to test the release process
- Fixup! minor: Change info logs to debug or warning.
- Major: Change default log level to info.
  also change formatting to show thread.
- Minor: Change log warning to info or debug.
  when it contains sensitive information.
- Minor: Change info logs to debug or warning.
  when they contain sensitive information, eg. Web server or are too
  verbose for the debug level.
  Also add log to indicate when the main loop is actually started.
- Revert "fix: stem: Remove torrc option that is the default"
  This reverts commit 15da07d6a447d8310354124f6020b4cf74b75488.
  Because it's not the default. No additional changes are needed in the
  tests.
  Closes #40064.
- Minor: scanner: Change logic creating the path.
  When the relay is not an exit, instead of choosing exits that can
  exit to all IPs, try with exits that can exit to some IPs, since the
  relay will be measured again with a different exit in other loop.
  When the relay is an exit, instead of ensuring it can exit all IPs, try
  using it as exit if it can exit to some IPs.
  If it fails connecting to the Web server, then try a 2nd time using it
  as entry to avoid that it will fail in all loops if there is only one
  Web server, cause it will be used again as an exit.
  Also, the helper exits don't need to be able to exit all IPs. When a
  helper exit fails to exit (maybe cause it can not exit to the Web
  sever IP), it's not a problem cause in a next loop other exit will be
  chosen.
  This change of logic also solves the bug where non exits were being
  used as exits, because we were trying to measure again a relay that
  was used as entry, because it could not exit all IPs, which includes
  also the non exits.
- Minor: scanner: move checking helper to methods.
  `helper` variable is only used to return error, therefore move it to
  the methods that create the path and return the error there.
  `our_nick` is not useful for the log, since it is always the same, but
  not removing it here.
- Vote on the relays with few or close measurements.
  to vote on approximately the same numbers of relays as Torflow.
  Torflow does not exclude relays with few or close measurements, though
  it is possible that because of the way it measures, there are no few
  or close measurements.
  Closes #34393
- Doc: fix: Update sbws availabity in OS and links.
- Bug 33009: Require minimum bandwidth for second hop.
- Use freeze_time() in other parts of our tests, too.
  When using `_relays_with_flags()` and similar methods it's possible
  that tests start to hang without time freezing. See bug 33748 for more
  details. We work around this by providing the necessary `freeze_time()`
  calls meanwhile.
- Bug 33600: `max_pending_results` is not directly used in `main_loop`
- Fixup! fix: CI: Test all supported python versions.
- Relaylist: stop using the current time when a consensus is downloaded twice.
  Instead:
  * use the consensus valid-after time, or
  * use the supplied timestamp, or
  * warn and use the current time.
  This should fix the occasional CI failure, when the current time is 1 second
  later than the test consensus time. (Or it should warn, and we can fix the
  test code.)
  Fixes bug 30909; bugfix on 1.1.0.
- V3bwfile: skip relay results when required bandwidths are missing.
  Fixes bug 30747; bugfix on 1.1.0.
- Bump to version 1.1.1-dev0.

juga's avatar
juga committed
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
v1.1.0 (2019-03-27)
-------------------

New
~~~

- V3bwfile: Report excluded relays.
  Closes: #28565.
- V3bwfile: Add time to report half network.
  Closes: #28983
- Destination: Recover destination when it failed.
  Closes: #29589.
- V3bwfile: Report relays that fail to be measured.
  Closes: #28567.
- V3bwfile: Report relays that are not measured measured.
  Closes: #28566
- V3bwfile: Add KeyValues to monitor relays.
  Closes: #29591.
- Docs: document that authorities are not measured.
  Closes: #29722
- Scanner: Warn when there is no progress.
  Closes: #28652

Fix
~~~
- v3bwfile: Report relays even when they don't reach a minimum number.
  Closes: #29853.
- Minor fixes. Closes #29891.
- Relaylist: Convert consensus bandwidth to bytes.


v1.0.5 (2019-03-06)
-------------------

- Release v1.0.5.
  this time with the correct version

v1.0.4 (2019-03-06)
-------------------

- Release v1.0.4.
  because there was a commit missing between `1.0.3` and `1.0.4-dev0`
  and what is released as `1.0.3` has version `1.0.4-dev0` and it
  can not be fixed now.
juga's avatar
juga committed
900

juga's avatar
juga committed
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
v1.0.3 (2019-02-28)
-------------------

Fixed
~~~~~~

- scanner: check that ResultDump queue is not full
  Fixes bug #28866. Bugfix v0.1.0.
- config: set stdout log level to cli argument. Closes: #29199
- cleanup: Use getpath to get configuration paths. Bugfix v0.7.0.
- destination: stop running twice usability tests.
  Fixes bug #28897. Bugfix v0.3.0
- globals, stem: explain where torrc options are.
  Fixes bug #28646. Bugfix v0.4.0
- stem: disable pad connections. Fixes bug 28692. Bugfix v0.4.0
- generate: Load all results, including error ones.
  Closes #29568. Bugfix v0.4.0 (line introduced in v0.1.0).
- relayprioritizer: Stop prioritizing relays that tend to fail.
  Fixes bug #28868. Bugfix v0.1.0
- circuitbuilder: Stop building the circuit 3 times.
  Fixes bug #29295. Bugfix v0.1.0.
- docs: add verify option to man and example.
  Closes bug #28788. Bugfix v0.4.0.
- CI: run scanner using the test network. Fixes bug #28933. Bugfix v0.1.0.
- scanner: catch SIGINT in the main loop. Fixes bug #28869. Bugfix v0.1.0.
- Stop including tests network as binary blob. Fixes bug #28590. Bugfix v0.4.0.
- relaylist: remove assertions that fail measurement.
  Closes #28870. Bugfix v0.4.0
- config: Use configuration provided as argument.
  Fixes bug #28724. Bugfix v0.7.0.
- stem: parse torrc options that are only a key.
  Fixes bug #28715. Bugfix v0.1.1
- stem: Stop merging multiple torrc options with the same name.
  Fixes bug #28738. Bugfix v0.1.1
- docs: add note about syslog when running systemd.
  Closes bug #28761. Bugfix v0.6.0
- CI: include deb.torproject.org key.
  Closes #28922. Bugfix v1.0.3-dev0
- config: stop allowing http servers without tls.
  Fixes bug #28789. Bugfix v0.2.0.
- Make info level logs more clear and consistent.
  Closes bug #28736. Bugfix v0.3.0.
- CI: check broken links in the docs. Closes #28670.
- docs: add scanner and destination requirements.
  Closes bug #28647. Bugfix v0.4.0
- generate: use round_digs variable name in methods.
  Closes bug #28602. Bugfix 1.0.3-dev0
- docs: Change old broken links in the documentation. Closes #28662.
- docs: replace http by https in links. Closes #28661.
- Fix git repository link. Fixes bug #28762. Bugfix v1.0.0.
- docs: add example destination in DEPLOY. Closes #28649.
- docs: Change links to be interpreted by ReST. Closes #28648.
- Force rtfd.io to install the package. Closes bug #28601.
- config: continue when the file is not found. Closes: #28550.
- Stop resolving domains locally and check same flags for the 2nd hop.
  Closes bug #28458, #28471. Bugfix 1.0.4.
- Limit the relays' bandwidth to their consensus bandwidth. Closes #28598.
- globals: add torrc logging options. Closes #28645. Bugfix v0.2.0.
- Limit bandwidth to the relay MaxAdvertisedBandwidth
  Fixes bug #28588. Bugfix 0.8.0.
- Exclude results, then check for the minimum number. Closes bug 28572.
- Make sbws round to 3 significant figures in torflow rounding mode.
  Bugfix on 27337 in sbws 1.0. Part of 28442.

Changed
~~~~~~~~

- tests: remove unused testnets. Fixes bug #29046. Bugfix v0.4.0.
- scanner, destination: Log all possible exceptions.
- docs: Update/improve documentation on how the scanner/generator work.
  Closes: #29149
- Requests: Change make_session to use the TimedSession.
- CI: change to Ubuntu Xenial.
- docs: stop editing changelog on every bug/ticket. Closes ticket #28572.
- Change sbws scaling method to torflow. Closes: #28446.
- Round bandwidths to 2 significant digits by default.
  Implements part of proposal 276. Implements 28451.

Added
~~~~~~

- Send scanner metadata as part of every HTTP request. Closes: #28741
- scanner: log backtrace when not progressing. Closes: 28932

juga's avatar
juga committed
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
v1.0.2 (2018-11-10)
-------------------

Fixed
~~~~~

-  Update bandwidth file specification version in the ``generator``
   (#28366).
-  Use 5 "=" characters as terminator in the bandwidth files (#28379)

Changed
~~~~~~~

-  Include the headers about eligible relays in all the bandwidth files,
   not only in the ones that does not have enough eligible relays
   (#28365).
For faster browsing, not all history is shown. View entire blame