diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-06 10:25:21 -0400 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-09-08 19:06:56 +0300 |
commit | b586de78e37425c3f4b79fb0da32971ed5216401 (patch) | |
tree | 36b980dbca571cbde86a2ec3baffb20b76f357c3 /src/or/hs_common.h | |
parent | 72c7f81459e087e2a0485361eb34db1023d12155 (diff) | |
download | tor-b586de78e37425c3f4b79fb0da32971ed5216401.tar.gz tor-b586de78e37425c3f4b79fb0da32971ed5216401.zip |
prop224: Use fetch and store HSDir indexes.
Based on our #23387 findings, it seems like to maintain 24/7
reachability we need to employ different logic when computing hsdir
indices for fetching vs storing. That's to guarantee that the client
will always fetch the current descriptor, while the service will always
publish two descriptors aiming to cover all possible edge cases.
For more details see the next commit and the spec branch.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r-- | src/or/hs_common.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h index 79d92d915f..a85e86a0c4 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -142,10 +142,12 @@ typedef struct rend_service_port_config_t { /* Hidden service directory index used in a node_t which is set once we set * the consensus. */ typedef struct hsdir_index_t { - /* The hsdir index for the current time period. */ - uint8_t current[DIGEST256_LEN]; - /* The hsdir index for the next time period. */ - uint8_t next[DIGEST256_LEN]; + /* Index to use when fetching a descriptor. */ + uint8_t fetch[DIGEST256_LEN]; + + /* Index to store the first and second descriptor. */ + uint8_t store_first[DIGEST256_LEN]; + uint8_t store_second[DIGEST256_LEN]; } hsdir_index_t; void hs_init(void); |