Use only secp256k1 as identity in libp2p. (#1343)

* Add libp2p_pki_schemes to beacon_node and inspector configuration files.

* Fix inspector.nim.cfg file name.

* Do not allow beacon_node to be build without libp2p_pki_schemes option value.

* Fix compilation problems.

* Fix tests.

* Fix validator_client.
This commit is contained in:
Eugene Kabanov 2020-07-21 19:07:14 +03:00 committed by GitHub
parent 431a399662
commit 8c5aa7cbe7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 0 deletions

View File

@ -2,6 +2,9 @@
-d:"chronicles_runtime_filtering=on"
-d:"chronicles_default_output_device=dynamic"
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
-d:"libp2p_pki_schemes=secp256k1"
@if testnet_servers_image:
-d:"chronicles_sinks=json"
-d:"withoutPrompt"

View File

@ -249,6 +249,12 @@ const useNativeSnappy = when snappy_implementation == "native": true
elif snappy_implementation == "libp2p": false
else: {.fatal: "Please set snappy_implementation to either 'libp2p' or 'native'".}
const
libp2p_pki_schemes {.strdefine.} = ""
when libp2p_pki_schemes != "secp256k1":
{.fatal: "Incorrect building process, please use -d:\"libp2p_pki_schemes=secp256k1\"".}
template libp2pProtocol*(name: string, version: int) {.pragma.}
template `$`*(peer: Peer): string = id(peer.info)

View File

@ -0,0 +1,2 @@
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
-d:"libp2p_pki_schemes=secp256k1"

View File

@ -2,6 +2,9 @@
-d:"chronicles_runtime_filtering=on"
-d:"chronicles_default_output_device=dynamic"
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
-d:"libp2p_pki_schemes=secp256k1"
@if testnet_servers_image:
-d:"chronicles_sinks=json"
-d:"withoutPrompt"

View File

@ -3,3 +3,5 @@
# Investigate why it's needed.
-d:withoutPrompt
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
-d:"libp2p_pki_schemes=secp256k1"