diff options
author | David Goulet <dgoulet@torproject.org> | 2017-04-19 11:06:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-08 20:29:33 -0400 |
commit | 06909cafef6aee9141541fc85cbea5de0b2e5f6a (patch) | |
tree | 599e332bb545a16c12c3ded1a09c47fef990c26b /src/or/hs_common.h | |
parent | 267bc7bc3b574f3e60d7836fde5a24652e3ac9c2 (diff) | |
download | tor-06909cafef6aee9141541fc85cbea5de0b2e5f6a.tar.gz tor-06909cafef6aee9141541fc85cbea5de0b2e5f6a.zip |
prop224: Add hsdir consensus parameters
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r-- | src/or/hs_common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h index a70ddc68da..d367e815e8 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -113,6 +113,13 @@ #define HS_SRV_DISASTER_PREFIX "shared-random-disaster" #define HS_SRV_DISASTER_PREFIX_LEN (sizeof(HS_SRV_DISASTER_PREFIX) - 1) +/* Default value of number of hsdir replicas (hsdir_n_replicas). */ +#define HS_DEFAULT_HSDIR_N_REPLICAS 2 +/* Default value of hsdir spread store (hsdir_spread_store). */ +#define HS_DEFAULT_HSDIR_SPREAD_STORE 3 +/* Default value of hsdir spread fetch (hsdir_spread_fetch). */ +#define HS_DEFAULT_HSDIR_SPREAD_FETCH 3 + /* Type of authentication key used by an introduction point. */ typedef enum { HS_AUTH_KEY_TYPE_LEGACY = 1, @@ -203,6 +210,10 @@ void hs_build_hs_index(uint64_t replica, const ed25519_public_key_t *blinded_pk, uint64_t period_num, uint8_t *hs_index_out); +int32_t hs_get_hsdir_n_replicas(void); +int32_t hs_get_hsdir_spread_fetch(void); +int32_t hs_get_hsdir_spread_store(void); + #ifdef HS_COMMON_PRIVATE #ifdef TOR_UNIT_TESTS |