Tor 0.4.9.0-alpha-dev
|
#include <shared_random_state.h>
Data Fields | |
char * | fname |
uint32_t | version |
time_t | valid_after |
time_t | valid_until |
sr_phase_t | phase |
uint64_t | n_protocol_runs |
unsigned int | n_commit_rounds |
unsigned int | n_reveal_rounds |
digestmap_t * | commits |
sr_srv_t * | previous_srv |
sr_srv_t * | current_srv |
unsigned int | is_srv_fresh:1 |
State of the protocol. It's also saved on disk in fname. This data structure MUST be synchronized at all time with the one on disk.
Definition at line 41 of file shared_random_state.h.
digestmap_t* commits |
A map of all the received commitments for this protocol run. This is indexed by authority RSA identity digest.
Definition at line 62 of file shared_random_state.h.
Referenced by commit_add_to_state(), and state_query_get_commit().
sr_srv_t* current_srv |
Previous shared random value.
Definition at line 67 of file shared_random_state.h.
char* fname |
Filename of the state file on disk.
Definition at line 43 of file shared_random_state.h.
Referenced by state_free_().
unsigned int is_srv_fresh |
Indicate if the state contains an SRV that was just generated. This is used during voting so that we know whether to use the super majority rule or not when deciding on keeping it for the consensus. It is always set to 0 post consensus.
EDGE CASE: if an authority computes a new SRV then immediately reboots and, once back up, votes for the current round, it won't know if the SRV is fresh or not ultimately making it NOT use the super majority when deciding to put or not the SRV in the consensus. This is for now an acceptable very rare edge case.
Definition at line 79 of file shared_random_state.h.
Referenced by sr_state_set_fresh_srv(), sr_state_srv_is_fresh(), and sr_state_unset_fresh_srv().
unsigned int n_commit_rounds |
The number of commitment rounds we've performed in this protocol run.
Definition at line 56 of file shared_random_state.h.
uint64_t n_protocol_runs |
Number of runs completed.
Definition at line 54 of file shared_random_state.h.
unsigned int n_reveal_rounds |
The number of reveal rounds we've performed in this protocol run.
Definition at line 58 of file shared_random_state.h.
sr_phase_t phase |
Protocol phase.
Definition at line 51 of file shared_random_state.h.
Referenced by disk_state_parse(), is_phase_transition(), and new_protocol_run().
sr_srv_t* previous_srv |
Current shared random value.
Definition at line 65 of file shared_random_state.h.
time_t valid_after |
The valid-after of the voting period we have prepared the state for.
Definition at line 47 of file shared_random_state.h.
Referenced by disk_state_parse().
time_t valid_until |
Until when is this state valid?
Definition at line 49 of file shared_random_state.h.
Referenced by disk_state_parse().
uint32_t version |
Version of the protocol.
Definition at line 45 of file shared_random_state.h.
Referenced by disk_state_parse().