public interface RelayNetworkStatusConsensus extends Descriptor
Directory authorities in the version 3 of the directory protocol
periodically generate a view of the current descriptors and status for
known relays and send a signed summary of this view to the other
authorities (RelayNetworkStatusVote
). The authorities compute
the result of this vote and sign a network status consensus containing
the result of the vote, which is this document.
Clients use consensus documents to find out when their list of
relays is out-of-date by looking at the contained network status
entries (NetworkStatusEntry
). If it is, they download any
missing server descriptors (ServerDescriptor
).
Modifier and Type | Method and Description |
---|---|
boolean |
containsStatusEntry(java.lang.String fingerprint)
Return whether a status entry with the given relay fingerprint
(SHA-1 digest of the server's public identity key, encoded as 40
upper-case hexadecimal characters) exists; convenience method for
getStatusEntries().containsKey(fingerprint) . |
java.util.SortedMap<java.lang.String,java.lang.Integer> |
getBandwidthWeights()
Return optional weights to be applied to router bandwidths during
path selection with map keys being case-sensitive weight identifiers
and map values being weight values, or null if the consensus doesn't
contain such weights.
|
java.lang.String |
getConsensusFlavor()
Return the consensus flavor name, which denotes the variant of the
original, unflavored consensus, encoded as a string of alphanumeric
characters and dashes, or null if this descriptor is the unflavored
consensus.
|
int |
getConsensusMethod()
Return the consensus method number of this descriptor, which is the
highest consensus method supported by more than 2/3 of voting
authorities, or 0 if no consensus method is contained in the
descriptor.
|
java.util.SortedMap<java.lang.String,java.lang.Integer> |
getConsensusParams()
Return consensus parameters contained in this descriptor with map
keys being case-sensitive parameter identifiers and map values being
parameter values, or null if the consensus doesn't contain consensus
parameters.
|
java.lang.String |
getDigestSha1Hex()
Return the SHA-1 digest of this consensus, encoded as 40 lower-case
hexadecimal characters that directory authorities use to sign the
consensus.
|
java.util.SortedMap<java.lang.String,DirSourceEntry> |
getDirSourceEntries()
Return directory source entries for each directory authority that
contributed to the consensus, with map keys being SHA-1 digests of
the authorities' identity keys in the version 3 directory protocol,
encoded as 40 upper-case hexadecimal characters.
|
long |
getDistSeconds()
Return the number of seconds that the directory authorities will
allow to collect signatures from the other authorities when producing
the next consensus.
|
long |
getFreshUntilMillis()
Return the time in milliseconds since the epoch until which this
descriptor is the freshest that is available.
|
java.util.SortedSet<java.lang.String> |
getKnownFlags()
Return known relay flags in this descriptor that were contained in
enough votes for this consensus to be an authoritative opinion for
these relay flags.
|
int |
getNetworkStatusVersion()
Return the document format version of this descriptor which is 3 or
higher.
|
java.util.List<java.lang.String> |
getPackageLines()
Return a list of software packages and their versions together with a
URL and one or more digests in the format
PackageName Version
URL DIGESTS that are known by at least three directory
authorities and agreed upon by the majority of directory authorities,
or null if the consensus does not contain package information. |
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> |
getRecommendedClientProtocols()
Return the version numbers of all protocols that clients should support,
or null if the consensus does not contain an opinion about protocol
versions.
|
java.util.List<java.lang.String> |
getRecommendedClientVersions()
Return recommended Tor versions for client usage, or null if the
consensus does not contain an opinion about client versions.
|
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> |
getRecommendedRelayProtocols()
Return the version numbers of all protocols that relays should support,
or null if the consensus does not contain an opinion about protocol
versions.
|
java.util.List<java.lang.String> |
getRecommendedServerVersions()
Return recommended Tor versions for server usage, or null if the
consensus does not contain an opinion about server versions.
|
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> |
getRequiredClientProtocols()
Return the version numbers of all protocols that clients must support,
or null if the consensus does not contain an opinion about protocol
versions.
|
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> |
getRequiredRelayProtocols()
Return the version numbers of all protocols that relays must support,
or null if the consensus does not contain an opinion about protocol
versions.
|
int |
getSharedRandCurrentNumReveals()
Return the number of commits used to generate the latest shared random
value, or -1 if the consensus does not contain the latest shared random
value.
|
java.lang.String |
getSharedRandCurrentValue()
Return the latest shared random value, encoded in base64, or null if the
consensus does not contain the latest shared random value.
|
int |
getSharedRandPreviousNumReveals()
Return the number of commits used to generate the second-to-last shared
random value, or -1 if the consensus does not contain a second-to-last
shared random value.
|
java.lang.String |
getSharedRandPreviousValue()
Return the second-to-last shared random value, encoded in base64, or null
if the consensus does not contain a second-to-last shared random value.
|
java.util.List<DirectorySignature> |
getSignatures()
Return the list of signatures contained in this consensus.
|
java.util.SortedMap<java.lang.String,NetworkStatusEntry> |
getStatusEntries()
Return status entries for each contained server, with map keys being
SHA-1 digests of the servers' public identity keys, encoded as 40
upper-case hexadecimal characters.
|
NetworkStatusEntry |
getStatusEntry(java.lang.String fingerprint)
Return a status entry by relay fingerprint (SHA-1 digest of the
server's public identity key, encoded as 40 upper-case hexadecimal
characters), or null if no such status entry exists; convenience
method for
getStatusEntries().get(fingerprint) . |
long |
getValidAfterMillis()
Return the time in milliseconds since the epoch at which this
descriptor became valid.
|
long |
getValidUntilMillis()
Return the time in milliseconds since the epoch until which this
descriptor was valid.
|
long |
getVoteSeconds()
Return the number of seconds that the directory authorities will
allow to collect votes from the other authorities when producing the
next consensus.
|
getAnnotations, getDescriptorFile, getRawDescriptorBytes, getRawDescriptorLength, getUnrecognizedLines
int getNetworkStatusVersion()
java.lang.String getConsensusFlavor()
int getConsensusMethod()
long getValidAfterMillis()
long getFreshUntilMillis()
long getValidUntilMillis()
long getVoteSeconds()
long getDistSeconds()
java.util.List<java.lang.String> getRecommendedServerVersions()
java.util.List<java.lang.String> getRecommendedClientVersions()
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> getRecommendedClientProtocols()
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> getRecommendedRelayProtocols()
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> getRequiredClientProtocols()
java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.Long>> getRequiredRelayProtocols()
java.util.List<java.lang.String> getPackageLines()
PackageName Version
URL DIGESTS
that are known by at least three directory
authorities and agreed upon by the majority of directory authorities,
or null if the consensus does not contain package information.java.util.SortedSet<java.lang.String> getKnownFlags()
java.util.SortedMap<java.lang.String,java.lang.Integer> getConsensusParams()
int getSharedRandPreviousNumReveals()
java.lang.String getSharedRandPreviousValue()
int getSharedRandCurrentNumReveals()
java.lang.String getSharedRandCurrentValue()
java.util.SortedMap<java.lang.String,DirSourceEntry> getDirSourceEntries()
java.util.SortedMap<java.lang.String,NetworkStatusEntry> getStatusEntries()
boolean containsStatusEntry(java.lang.String fingerprint)
getStatusEntries().containsKey(fingerprint)
.NetworkStatusEntry getStatusEntry(java.lang.String fingerprint)
getStatusEntries().get(fingerprint)
.java.util.List<DirectorySignature> getSignatures()
java.util.SortedMap<java.lang.String,java.lang.Integer> getBandwidthWeights()
java.lang.String getDigestSha1Hex()