gossip domain: clarify why we use plaintext topic names.

This commit is contained in:
Raúl Kripalani 2019-08-01 15:56:53 +01:00
parent c108444c06
commit 1ba03b4c33
1 changed files with 5 additions and 1 deletions

View File

@ -604,7 +604,11 @@ Such upgrades lead to fragmentation, so theyll need to be carried out in a co
### Why are the topics strings and not hashes? ### Why are the topics strings and not hashes?
Topics names have a hierarchical structure. In the future, gossipsub may support wildcard subscriptions (e.g. subscribe to all children topics under a root prefix). Using hashes as topic names would preclude us from leveraging such features going forward. No security guarantees are lost as a result of choosing plaintext topic names, since the domain is finite anyway. Topics names have a hierarchical structure. In the future, gossipsub may support wildcard subscriptions (e.g. subscribe to all children topics under a root prefix) by way of prefix matching. Enforcing hashes for topic names would preclude us from leveraging such features going forward.
No security or privacy guarantees are lost as a result of choosing plaintext topic names, since the domain is finite anyway, and calculating a digest's preimage would be trivial.
Furthermore, the ETH2 topic names are shorter their digest equivalents (asuming SHA-256 hash), so hashing topics would bloat messages unnecessarily.
### Why are there `SHARD_SUBNET_COUNT` subnets, and why is this not defined? ### Why are there `SHARD_SUBNET_COUNT` subnets, and why is this not defined?