Interface RelayNetworkStatusConsensus

All Superinterfaces:
Descriptor, Serializable

public interface RelayNetworkStatusConsensus extends Descriptor
Contains a network status consensus in the version 3 directory protocol.

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).

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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).
    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.
    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
    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.
    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.
    Return the SHA-1 digest of this consensus, encoded as 40 lower-case hexadecimal characters that directory authorities use to sign the consensus.
    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
    Return the number of seconds that the directory authorities will allow to collect signatures from the other authorities when producing the next consensus.
    long
    Return the time in milliseconds since the epoch until which this descriptor is the freshest that is available.
    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
    Return the document format version of this descriptor which is 3 or higher.
    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.
    Return the version numbers of all protocols that clients should support, or null if the consensus does not contain an opinion about protocol versions.
    Return recommended Tor versions for client usage, or null if the consensus does not contain an opinion about client versions.
    Return the version numbers of all protocols that relays should support, or null if the consensus does not contain an opinion about protocol versions.
    Return recommended Tor versions for server usage, or null if the consensus does not contain an opinion about server versions.
    Return the version numbers of all protocols that clients must support, or null if the consensus does not contain an opinion about protocol versions.
    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
    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.
    Return the latest shared random value, encoded in base64, or null if the consensus does not contain the latest shared random value.
    int
    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.
    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.
    Return the list of signatures contained in this consensus.
    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.
    getStatusEntry(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
    Return the time in milliseconds since the epoch at which this descriptor became valid.
    long
    Return the time in milliseconds since the epoch until which this descriptor was valid.
    long
    Return the number of seconds that the directory authorities will allow to collect votes from the other authorities when producing the next consensus.

    Methods inherited from interface org.torproject.descriptor.Descriptor

    getAnnotations, getDescriptorFile, getRawDescriptorBytes, getRawDescriptorLength, getUnrecognizedLines
  • Method Details

    • getNetworkStatusVersion

      int getNetworkStatusVersion()
      Return the document format version of this descriptor which is 3 or higher.
      Since:
      1.0.0
    • getConsensusFlavor

      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.
      Since:
      1.0.0
    • getConsensusMethod

      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.
      Since:
      1.0.0
    • getValidAfterMillis

      long getValidAfterMillis()
      Return the time in milliseconds since the epoch at which this descriptor became valid.
      Since:
      1.0.0
    • getFreshUntilMillis

      long getFreshUntilMillis()
      Return the time in milliseconds since the epoch until which this descriptor is the freshest that is available.
      Since:
      1.0.0
    • getValidUntilMillis

      long getValidUntilMillis()
      Return the time in milliseconds since the epoch until which this descriptor was valid.
      Since:
      1.0.0
    • getVoteSeconds

      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.
      Since:
      1.0.0
    • getDistSeconds

      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.
      Since:
      1.0.0
    • getRecommendedServerVersions

      List<String> getRecommendedServerVersions()
      Return recommended Tor versions for server usage, or null if the consensus does not contain an opinion about server versions.
      Since:
      1.0.0
    • getRecommendedClientVersions

      List<String> getRecommendedClientVersions()
      Return recommended Tor versions for client usage, or null if the consensus does not contain an opinion about client versions.
      Since:
      1.0.0
    • getRecommendedClientProtocols

      SortedMap<String,SortedSet<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.
      Since:
      1.6.0
    • getRecommendedRelayProtocols

      SortedMap<String,SortedSet<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.
      Since:
      1.6.0
    • getRequiredClientProtocols

      SortedMap<String,SortedSet<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.
      Since:
      1.6.0
    • getRequiredRelayProtocols

      SortedMap<String,SortedSet<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.
      Since:
      1.6.0
    • getPackageLines

      List<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.
      Since:
      1.3.0
    • getKnownFlags

      SortedSet<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.
      Since:
      1.0.0
    • getConsensusParams

      SortedMap<String,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.
      Since:
      1.0.0
    • getSharedRandPreviousNumReveals

      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.
      Since:
      1.6.0
    • getSharedRandPreviousValue

      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.
      Since:
      1.6.0
    • getSharedRandCurrentNumReveals

      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.
      Since:
      1.6.0
    • getSharedRandCurrentValue

      String getSharedRandCurrentValue()
      Return the latest shared random value, encoded in base64, or null if the consensus does not contain the latest shared random value.
      Since:
      1.6.0
    • getDirSourceEntries

      SortedMap<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.
      Since:
      1.0.0
    • getStatusEntries

      SortedMap<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.
      Since:
      1.0.0
    • containsStatusEntry

      boolean containsStatusEntry(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).
      Since:
      1.0.0
    • getStatusEntry

      NetworkStatusEntry getStatusEntry(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).
      Since:
      1.0.0
    • getSignatures

      List<DirectorySignature> getSignatures()
      Return the list of signatures contained in this consensus.
      Since:
      1.3.0
    • getBandwidthWeights

      SortedMap<String,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.
      Since:
      1.0.0
    • getDigestSha1Hex

      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.
      Since:
      1.7.0