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:
parent
431a399662
commit
8c5aa7cbe7
|
@ -2,6 +2,9 @@
|
||||||
-d:"chronicles_runtime_filtering=on"
|
-d:"chronicles_runtime_filtering=on"
|
||||||
-d:"chronicles_default_output_device=dynamic"
|
-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:
|
@if testnet_servers_image:
|
||||||
-d:"chronicles_sinks=json"
|
-d:"chronicles_sinks=json"
|
||||||
-d:"withoutPrompt"
|
-d:"withoutPrompt"
|
||||||
|
|
|
@ -249,6 +249,12 @@ const useNativeSnappy = when snappy_implementation == "native": true
|
||||||
elif snappy_implementation == "libp2p": false
|
elif snappy_implementation == "libp2p": false
|
||||||
else: {.fatal: "Please set snappy_implementation to either 'libp2p' or 'native'".}
|
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 libp2pProtocol*(name: string, version: int) {.pragma.}
|
||||||
|
|
||||||
template `$`*(peer: Peer): string = id(peer.info)
|
template `$`*(peer: Peer): string = id(peer.info)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
|
||||||
|
-d:"libp2p_pki_schemes=secp256k1"
|
|
@ -2,6 +2,9 @@
|
||||||
-d:"chronicles_runtime_filtering=on"
|
-d:"chronicles_runtime_filtering=on"
|
||||||
-d:"chronicles_default_output_device=dynamic"
|
-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:
|
@if testnet_servers_image:
|
||||||
-d:"chronicles_sinks=json"
|
-d:"chronicles_sinks=json"
|
||||||
-d:"withoutPrompt"
|
-d:"withoutPrompt"
|
||||||
|
|
|
@ -3,3 +3,5 @@
|
||||||
# Investigate why it's needed.
|
# Investigate why it's needed.
|
||||||
-d:withoutPrompt
|
-d:withoutPrompt
|
||||||
|
|
||||||
|
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
|
||||||
|
-d:"libp2p_pki_schemes=secp256k1"
|
||||||
|
|
Loading…
Reference in New Issue