aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2016-05-03 11:21:17 -0400
committerDavid Goulet <dgoulet@torproject.org>2016-07-01 13:25:03 -0400
commitca6ceec112f05ce68097429089ee428010c8b8d0 (patch)
treea297cc544c7f354a458a1712d7e2d101fcb6aa0b /src/or/or.h
parent5b183328fdd4bf81a3a38afe88d2766e61773fb9 (diff)
downloadtor-ca6ceec112f05ce68097429089ee428010c8b8d0.tar.gz
tor-ca6ceec112f05ce68097429089ee428010c8b8d0.zip
prop250: Put commits and SRVs in votes/consensus
This commit adds the commit(s) line in the vote as well as the SR values. It also has the mechanism to add the majority SRVs in the consensus. Signed-off-by: George Kadianakis <desnacked@riseup.net> Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 5a19f9a944..1b7f1a8568 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2505,6 +2505,18 @@ typedef struct networkstatus_voter_info_t {
smartlist_t *sigs;
} networkstatus_voter_info_t;
+typedef struct networkstatus_sr_info_t {
+ /* Indicate if the dirauth partitipates in the SR protocol with its vote.
+ * This is tied to the SR flag in the vote. */
+ unsigned int participate:1;
+ /* Both vote and consensus: Current and previous SRV. If list is empty,
+ * this means none were found in either the consensus or vote. */
+ struct sr_srv_t *previous_srv;
+ struct sr_srv_t *current_srv;
+ /* Vote only: List of commitments. */
+ smartlist_t *commits;
+} networkstatus_sr_info_t;
+
/** Enumerates the possible seriousness values of a networkstatus document. */
typedef enum {
NS_TYPE_VOTE,
@@ -2587,6 +2599,9 @@ typedef struct networkstatus_t {
/** If present, a map from descriptor digest to elements of
* routerstatus_list. */
digestmap_t *desc_digest_map;
+
+ /** Contains the shared random protocol data from a vote or consensus. */
+ networkstatus_sr_info_t sr_info;
} networkstatus_t;
/** A set of signatures for a networkstatus consensus. Unless otherwise
@@ -4480,6 +4495,12 @@ typedef struct {
/** Autobool: Do we try to retain capabilities if we can? */
int KeepBindCapabilities;
+
+ /** Bool (default: 1): Switch for the shared random protocol. Only
+ * relevant to a directory authority. If off, the authority won't
+ * participate in the protocol. If on (default), a flag is added to the
+ * vote indicating participation. */
+ int AuthDirSharedRandomness;
} or_options_t;
/** Persistent state for an onion router, as saved to disk. */