From a8c5af8874fb2ac4347e39d75b1fc0e392fad303 Mon Sep 17 00:00:00 2001 From: Age Manning Date: Sun, 4 Oct 2020 23:49:16 +0000 Subject: [PATCH] Increase content-id length (#1725) ## Issue Addressed N/A ## Proposed Changes Increase gossipsub's content-id length to the full 32 byte hash. ## Additional Info N/A --- beacon_node/eth2_libp2p/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/eth2_libp2p/src/config.rs b/beacon_node/eth2_libp2p/src/config.rs index 0d974c9774..f3fbbda53e 100644 --- a/beacon_node/eth2_libp2p/src/config.rs +++ b/beacon_node/eth2_libp2p/src/config.rs @@ -92,7 +92,7 @@ impl Default for Config { // The function used to generate a gossipsub message id // We use the first 8 bytes of SHA256(data) for content addressing let gossip_message_id = - |message: &GossipsubMessage| MessageId::from(&Sha256::digest(&message.data)[..8]); + |message: &GossipsubMessage| MessageId::from(&Sha256::digest(&message.data)[..]); // gossipsub configuration // Note: The topics by default are sent as plain strings. Hashes are an optional