commit 91993f11f696ef8ba19dc3f8f2cf0ae7affe5bb7 Author: Damian Johnson atagar@torproject.org Date: Sun Aug 3 22:29:00 2014 -0700
Revert "Dropping parameter mismatch check"
This reverts commit 407a5fa432c168a5a7dcd84efd39b1593d056246. --- consensus_health_checker.py | 20 ++++++++++++++++++++ data/consensus_health.cfg | 2 ++ 2 files changed, 22 insertions(+)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py index d8cf277..e85ece1 100755 --- a/consensus_health_checker.py +++ b/consensus_health_checker.py @@ -221,6 +221,7 @@ def run_checks(consensuses, votes): different_recommended_client_version, different_recommended_server_version, unknown_consensus_parameters, + vote_parameters_mismatch_consensus, certificate_expiration, consensuses_have_same_votes, has_all_signatures, @@ -344,6 +345,25 @@ def unknown_consensus_parameters(latest_consensus, consensuses, votes): return Issue(Runlevel.NOTICE, 'UNKNOWN_CONSENSUS_PARAMETERS', parameters = ', '.join(unknown_entries))
+def vote_parameters_mismatch_consensus(latest_consensus, consensuses, votes): + "Check that all vote parameters appear in the consensus." + + mismatching_entries = [] + + for authority, vote in votes.items(): + mismatching_params = [] + + for param_key, param_value in vote.params.items(): + if latest_consensus.params.get(param_key) != param_value: + mismatching_params.append('%s=%s' % (param_key, param_value)) + + if mismatching_params: + mismatching_entries.append('%s %s' % (authority, ' '.join(mismatching_params))) + + if mismatching_entries: + return Issue(Runlevel.NOTICE, 'MISMATCH_CONSENSUS_PARAMETERS', parameters = ', '.join(mismatching_entries)) + + def certificate_expiration(latest_consensus, consensuses, votes): "Check if an authority's certificate is about to expire."
diff --git a/data/consensus_health.cfg b/data/consensus_health.cfg index 68d5bb9..2201a57 100644 --- a/data/consensus_health.cfg +++ b/data/consensus_health.cfg @@ -4,6 +4,7 @@ msg MISSING_LATEST_CONSENSUS => The consensuses published by the following direc msg CONSENSUS_METHOD_UNSUPPORTED => The following directory authorities do not support the consensus method that the consensus uses: {authorities} msg DIFFERENT_RECOMMENDED_VERSION => The following directory authorities recommend other {type} versions than the consensus: {differences} msg UNKNOWN_CONSENSUS_PARAMETERS => The following directory authorities set unknown consensus parameters: {parameters} +msg MISMATCH_CONSENSUS_PARAMETERS => The following directory authorities set conflicting consensus parameters: {parameters} msg CERTIFICATE_ABOUT_TO_EXPIRE => The certificate of the following directory authority expires within the next {duration}: {authority} msg MISSING_SIGNATURE => Consensus belonging to {consensus_of} was missing the following authority signatures: {authorities} msg MISSING_BANDWIDTH_SCANNERS => The following directory authorities are not reporting bandwidth scanner results: {authorities} @@ -21,6 +22,7 @@ msg AUTHORITY_UNAVAILABLE => Unable to retrieve the {fetch_type} from {authority
suppression DIFFERENT_RECOMMENDED_VERSION => 24 # 1 day suppression UNKNOWN_CONSENSUS_PARAMETERS => 24 # 1 day +suppression MISMATCH_CONSENSUS_PARAMETERS => 24 # 1 day suppression CERTIFICATE_ABOUT_TO_EXPIRE => 336 # 2 weeks suppression MISSING_BANDWIDTH_SCANNERS => 24 # 1 day suppression EXTRA_BANDWIDTH_SCANNERS => 24 # 1 day
tor-commits@lists.torproject.org