FWICT, we have a regression in our new consensus code: we no longer check the if-modified-since date when serving consensuses, since that field isn't set in the consensus_cache_entry_t case of .
Additionally, if somebody says X-Or-Diff-From the consensus which we currently have, then instead of telling them "That's up-to-date", we also send the current consensus. That's also bad.
These problems make the most trouble in test networks, where the consensus update rate is so fast that relays frequently try to download a consensus before it's there.
Diagnosed with help from ahf.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Additionally, if somebody says X-Or-Diff-From the consensus which we currently have, then instead of telling them "That's up-to-date", we also send the current consensus. That's also bad.
What is meant here by "which we currently have"? Prop#140 allows a client to send multiple hashes of the consensuses they have, but our current request sending code only ever sends one hash, but our request receive path handles multiple hashes (which is according to the proposal).
Should we check if the digest_sha3_as_signed (from networkstatus_t) in our currently "live" consensus document, of the given client requested flavour, matches any one of the set of hashes the client sends to us in the X-Or-Diff-From-Consensus header - or should we only handle the case where a client sends one hash that happens to match the digest_sha3_as_signed? Or something entirely different?
Additionally, if somebody says X-Or-Diff-From the consensus which we currently have, then instead of telling them "That's up-to-date", we also send the current consensus. That's also bad.
What is meant here by "which we currently have"? Prop#140 allows a client to send multiple hashes of the consensuses they have, but our current request sending code only ever sends one hash, but our request receive path handles multiple hashes (which is according to the proposal).
If they include a hash that indicates that they would accept a diff from the most recent consensus, then they have the most recent consensus, and we should not send it to them.
Should we check if the digest_sha3_as_signed (from networkstatus_t) in our currently "live" consensus document, of the given client requested flavour, matches any one of the set of hashes the client sends to us in the X-Or-Diff-From-Consensus header - or should we only handle the case where a client sends one hash that happens to match the digest_sha3_as_signed? Or something entirely different?
I think it's an "any" condition: if they say they have the most recent consensus, we shouldn't send them any diff.