27 #define MIN_VOTE_SECONDS 2 29 #define MIN_VOTE_SECONDS_TESTING 2 32 #define MIN_DIST_SECONDS 2 34 #define MIN_DIST_SECONDS_TESTING 2 37 #define MIN_VOTE_INTERVAL 300 46 #define MIN_VOTE_INTERVAL_TESTING \ 47 (((MIN_VOTE_SECONDS_TESTING)+(MIN_DIST_SECONDS_TESTING)+1)*2) 49 #define MIN_VOTE_INTERVAL_TESTING_INITIAL \ 50 ((MIN_VOTE_SECONDS_TESTING)+(MIN_DIST_SECONDS_TESTING)+1) 54 #define ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD 0 57 #define MIN_SUPPORTED_CONSENSUS_METHOD 25 60 #define MAX_SUPPORTED_CONSENSUS_METHOD 28 64 #define MIN_METHOD_FOR_RECOMMENDED_PROTOCOLS 25 68 #define MIN_METHOD_FOR_RS_PROTOCOLS 25 72 #define MIN_METHOD_FOR_INIT_BW_WEIGHTS_ONE 26 76 #define MIN_METHOD_FOR_A_LINES_IN_MICRODESC_CONSENSUS 27 80 #define MIN_METHOD_FOR_NO_A_LINES_IN_MICRODESC 28 85 #define DEFAULT_MAX_UNMEASURED_BW_KB 20 89 #define DGV_INCLUDE_PENDING 2 90 #define DGV_INCLUDE_PREVIOUS 4 97 #ifdef HAVE_MODULE_DIRAUTH 104 void dirvote_dirreq_get_status_vote(
const char *url,
smartlist_t *items,
109 const char **msg_out,
113 const char **msg_out);
144 dirvote_dirreq_get_status_vote(
const char *url,
smartlist_t *items,
153 dirvote_add_vote(
const char *vote_body,
const char **msg_out,
int *status_out)
158 tor_assert_nonfatal_unreached();
162 *msg_out =
"No directory authority support";
168 const char **msg_out)
170 (void) detached_signatures_body;
175 tor_assert_nonfatal_unreached();
182 MOCK_DECL(
const char*, dirvote_get_pending_consensus,
184 MOCK_DECL(
const char*, dirvote_get_pending_detached_signatures, (
void));
207 #ifdef DIRVOTE_PRIVATE 214 int32_t default_val);
218 int total_authorities);
223 int64_t M, int64_t E, int64_t D,
224 int64_t
T, int64_t weight_scale);
227 int total_authorities,
230 const char *legacy_identity_key_digest,
238 const char **msg_out);
242 int consensus_method);
STATIC char * networkstatus_get_detached_signatures(smartlist_t *consensuses)
Definition: dirvote.c:2646
STATIC char * compute_consensus_package_lines(smartlist_t *votes)
Definition: dirvote.c:2376
time_t dirvote_act(const or_options_t *options, time_t now)
Definition: dirvote.c:2756
MOCK_DECL(int, router_have_minimum_dir_info,(void))
Definition: container.h:18
pending_vote_t * dirvote_add_vote(const char *vote_body, const char **msg_out, int *status_out)
Definition: dirvote.c:3048
networkstatus_t * dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, authority_cert_t *cert)
Definition: dirvote.c:4267
STATIC char * make_consensus_method_list(int low, int high, const char *separator)
Definition: dirvote.c:752
STATIC authority_cert_t * authority_cert_dup(authority_cert_t *cert)
Definition: dirvote.c:106
void set_routerstatus_from_routerinfo(routerstatus_t *rs, node_t *node, routerinfo_t *ri, time_t now, int listbadexits)
Definition: dirserv.c:2031
void dirvote_free_all(void)
Definition: dirvote.c:3599
STATIC int networkstatus_add_detached_signatures(networkstatus_t *target, ns_detached_signatures_t *sigs, const char *source, int severity, const char **msg_out)
Definition: dirvote.c:2454
Definition: dirvote.c:2833
STATIC microdesc_t * dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
Definition: dirvote.c:3692
vote_microdesc_hash_t * dirvote_format_all_microdesc_vote_lines(const routerinfo_t *ri, time_t now, smartlist_t *microdescriptors_out)
Definition: dirvote.c:3838
consensus_flavor_t
Definition: or.h:2677
Definition: crypto_rsa.c:41
STATIC int32_t dirvote_get_intermediate_param_value(const smartlist_t *param_list, const char *keyword, int32_t default_val)
Definition: dirvote.c:793
const cached_dir_t * dirvote_get_vote(const char *fp, int flags)
Definition: dirvote.c:3646
STATIC char * format_networkstatus_vote(crypto_pk_t *private_signing_key, networkstatus_t *v3_ns)
Definition: dirvote.c:183
int networkstatus_compute_bw_weights_v10(smartlist_t *chunks, int64_t G, int64_t M, int64_t E, int64_t D, int64_t T, int64_t weight_scale)
Definition: dirvote.c:1005
STATIC char * networkstatus_compute_consensus(smartlist_t *votes, int total_authorities, crypto_pk_t *identity_key, crypto_pk_t *signing_key, const char *legacy_id_key_digest, crypto_pk_t *legacy_signing_key, consensus_flavor_t flavor)
Definition: dirvote.c:1410
int dirvote_add_signatures(const char *detached_signatures_body, const char *source, const char **msg)
Definition: dirvote.c:3548
STATIC smartlist_t * dirvote_compute_params(smartlist_t *votes, int method, int total_authorities)
Definition: dirvote.c:829
#define T(s, t, a, o)
Definition: parsecommon.h:244