From a2270a5f270b328495572f51922631f5713600a4 Mon Sep 17 00:00:00 2001 From: tersec Date: Mon, 28 Sep 2020 15:07:10 +0000 Subject: [PATCH] update to v0.12.3 message ID for Spadina launch (#1762) * update to v0.12.3 message ID for Spadina launch * remove base64 import --- beacon_chain/eth2_network.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index 04599ea1b..a901c3000 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -4,7 +4,7 @@ import std/options as stdOptions, # Status libs - stew/[varints, base58, base64, endians2, results, byteutils], bearssl, + stew/[varints, base58, endians2, results, byteutils], bearssl, stew/shims/net as stewNet, stew/shims/[macros, tables], faststreams/[inputs, outputs, buffers], snappy, snappy/framing, @@ -1218,7 +1218,7 @@ proc getPersistentNetKeys*( func gossipId(data: openArray[byte]): string = # https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/specs/phase0/p2p-interface.md#topics-and-messages - base64.encode(Base64Url, sha256.digest(data).data) + string.fromBytes(sha256.digest(data).data.toOpenArray(0, 7)) func msgIdProvider(m: messages.Message): string = gossipId(m.data)