Bump eth (#857)
* vendor: bump stew * vendor: bump nim-eth * vendor: bump web3 too
This commit is contained in:
parent
708ac80dae
commit
d180724d41
|
@ -45,7 +45,7 @@ proc toENode*(a: MultiAddress): Result[ENode, cstring] =
|
||||||
var pubkey: libp2pCrypto.PublicKey
|
var pubkey: libp2pCrypto.PublicKey
|
||||||
if peerId.extractPublicKey(pubkey):
|
if peerId.extractPublicKey(pubkey):
|
||||||
if pubkey.scheme == Secp256k1:
|
if pubkey.scheme == Secp256k1:
|
||||||
return ok ENode(pubkey: pubkey.skkey,
|
return ok ENode(pubkey: PublicKey(pubkey.skkey),
|
||||||
address: Address(ip: ipAddress,
|
address: Address(ip: ipAddress,
|
||||||
tcpPort: Port tcpPort,
|
tcpPort: Port tcpPort,
|
||||||
udpPort: Port udpPort))
|
udpPort: Port udpPort))
|
||||||
|
@ -57,8 +57,8 @@ proc toENode*(a: MultiAddress): Result[ENode, cstring] =
|
||||||
return err "Invalid MultiAddress"
|
return err "Invalid MultiAddress"
|
||||||
|
|
||||||
proc toMultiAddressStr*(enode: ENode): string =
|
proc toMultiAddressStr*(enode: ENode): string =
|
||||||
var peerId = PeerID.init(libp2pCrypto.PublicKey(scheme: Secp256k1,
|
var peerId = PeerID.init(libp2pCrypto.PublicKey(
|
||||||
skkey: enode.pubkey))
|
scheme: Secp256k1, skkey: SkPublicKey(enode.pubkey)))
|
||||||
&"/ip4/{enode.address.ip}/tcp/{enode.address.tcpPort}/p2p/{peerId.pretty}"
|
&"/ip4/{enode.address.ip}/tcp/{enode.address.tcpPort}/p2p/{peerId.pretty}"
|
||||||
|
|
||||||
proc toENode*(enrRec: enr.Record): Result[ENode, cstring] =
|
proc toENode*(enrRec: enr.Record): Result[ENode, cstring] =
|
||||||
|
|
|
@ -610,7 +610,8 @@ proc toPeerInfo*(r: enr.TypedRecord): PeerInfo =
|
||||||
if recoverPublicKey(r.secp256k1.get, pubKey) != EthKeysStatus.Success:
|
if recoverPublicKey(r.secp256k1.get, pubKey) != EthKeysStatus.Success:
|
||||||
return # TODO
|
return # TODO
|
||||||
|
|
||||||
let peerId = PeerID.init crypto.PublicKey(scheme: Secp256k1, skkey: pubKey)
|
let peerId = PeerID.init crypto.PublicKey(
|
||||||
|
scheme: Secp256k1, skkey: SkPublicKey(pubKey))
|
||||||
var addresses = newSeq[MultiAddress]()
|
var addresses = newSeq[MultiAddress]()
|
||||||
|
|
||||||
if r.ip.isSome and r.tcp.isSome:
|
if r.ip.isSome and r.tcp.isSome:
|
||||||
|
@ -866,10 +867,10 @@ proc setupNat(conf: BeaconNodeConf): tuple[ip: Option[IpAddress],
|
||||||
(result.tcpPort, result.udpPort) = extPorts.get()
|
(result.tcpPort, result.udpPort) = extPorts.get()
|
||||||
|
|
||||||
func asLibp2pKey*(key: keys.PublicKey): PublicKey =
|
func asLibp2pKey*(key: keys.PublicKey): PublicKey =
|
||||||
PublicKey(scheme: Secp256k1, skkey: key)
|
PublicKey(scheme: Secp256k1, skkey: SkPublicKey(key))
|
||||||
|
|
||||||
func asEthKey*(key: PrivateKey): keys.PrivateKey =
|
func asEthKey*(key: PrivateKey): keys.PrivateKey =
|
||||||
keys.PrivateKey(data: key.skkey.data)
|
keys.PrivateKey(SkSecretKey(data: key.skkey.data))
|
||||||
|
|
||||||
proc initAddress*(T: type MultiAddress, str: string): T =
|
proc initAddress*(T: type MultiAddress, str: string): T =
|
||||||
let address = MultiAddress.init(str)
|
let address = MultiAddress.init(str)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 5dc0a533b09fe2a250411c1113a76a4cc3d25b5b
|
Subproject commit c827c37329541a2f3d7d8057fa577f14537bb832
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4201f46750a47d45b6bfc1521f93aaf9cdf1bf0f
|
Subproject commit 86739f99c4efc1246d45164ef81c1e8f72970b65
|
|
@ -1 +1 @@
|
||||||
Subproject commit 89d7a0c8fd1eb0f749432bd7136d8f385351c48e
|
Subproject commit da74eabaa00e2a8f7c58e8d84a02b701041dfc2d
|
Loading…
Reference in New Issue