Vendor bumps + related fixes + warning fixes (#1985)
- Vendor bump of stew, nim-eth, chronos, nimbus-eth2 and libp2p - Bump related fixes + fixes of deprecation warnings - Several other warnings fixed.
This commit is contained in:
parent
31c288d5e5
commit
dbc1ae86e2
|
@ -1,5 +1,5 @@
|
|||
# Nimbus - Portal Network
|
||||
# Copyright (c) 2022-2023 Status Research & Development GmbH
|
||||
# Copyright (c) 2022-2024 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
|
@ -99,7 +99,7 @@ proc new*(
|
|||
|
||||
proc lightClientVerifier(obj: SomeForkedLightClientObject):
|
||||
Future[Result[void, VerifierError]] =
|
||||
let resfut = newFuture[Result[void, VerifierError]]("lightClientVerifier")
|
||||
let resfut = Future[Result[void, VerifierError]].Raising([CancelledError]).init("lightClientVerifier")
|
||||
lightClient.processor[].addObject(MsgSource.gossip, obj, resfut)
|
||||
resfut
|
||||
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
import
|
||||
std/[sequtils, sugar],
|
||||
stew/results, chronos, chronicles,
|
||||
eth/[rlp, common],
|
||||
eth/trie/hexary_proof_verification,
|
||||
eth/p2p/discoveryv5/[protocol, enr],
|
||||
../../database/content_db,
|
||||
../wire/[portal_protocol, portal_stream, portal_protocol_config],
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
# fluffy
|
||||
# Copyright (c) 2022-2024 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
-d:"chronicles_runtime_filtering=on"
|
||||
-d:"chronicles_disable_thread_id"
|
||||
|
||||
|
@ -5,7 +12,6 @@
|
|||
-d:"chronicles_line_numbers:0"
|
||||
@end
|
||||
|
||||
-d:chronosStrictException
|
||||
-d:PREFER_BLST_SHA256=false
|
||||
|
||||
--styleCheck:usages
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Fluffy
|
||||
# Copyright (c) 2021-2023 Status Research & Development GmbH
|
||||
# Copyright (c) 2021-2024 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
|
@ -9,7 +9,7 @@
|
|||
|
||||
import
|
||||
std/[times, sequtils, strutils, typetraits],
|
||||
json_rpc/[rpcproxy, rpcserver], stew/byteutils,
|
||||
json_rpc/[rpcproxy, rpcserver],
|
||||
web3/[conversions], # sigh, for FixedBytes marshalling
|
||||
eth/[common/eth_types, rlp],
|
||||
beacon_chain/spec/forks,
|
||||
|
|
|
@ -12,7 +12,6 @@ import
|
|||
json_rpc/[rpcproxy, rpcserver],
|
||||
json_serialization/std/tables,
|
||||
stew/byteutils,
|
||||
eth/p2p/discoveryv5/nodes_verification,
|
||||
../network/wire/portal_protocol,
|
||||
./rpc_types
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
import
|
||||
std/[os, json, sequtils],
|
||||
testutils/unittests,
|
||||
stew/[byteutils, io2],
|
||||
eth/keys,
|
||||
|
@ -24,7 +23,7 @@ suite "State Content Keys":
|
|||
encoded = SSZ.encode(nibbles)
|
||||
check encoded.toHex() == evenNibles
|
||||
# echo ">>>", encoded.toHex()
|
||||
|
||||
|
||||
const oddNibbles = "0105000000123456789abc0d"
|
||||
test "Encode/decode odd nibbles":
|
||||
const
|
||||
|
@ -85,7 +84,7 @@ suite "State Content Keys":
|
|||
const
|
||||
address = Address.fromHex("000d836201318ec6899a67540690382780743280")
|
||||
codeHash = CodeHash.fromHex("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470")
|
||||
|
||||
|
||||
let
|
||||
contractCodeKey = ContractCodeKey(address: address, codeHash: codeHash)
|
||||
contentKey = ContentKey(contentType: contractCode, contractCodeKey: contractCodeKey)
|
||||
|
@ -166,7 +165,7 @@ suite "State Content Values":
|
|||
contractWitnessProof = Witness(@[WitnessNode(@[byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07])])
|
||||
stateWitnessKeyPackedNibbles = @[NibblePair 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF1]
|
||||
stateWitnessProof = Witness(@[WitnessNode(@[byte 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09])])
|
||||
|
||||
|
||||
contractTrieNodeOffer = ContractTrieNodeOffer(
|
||||
blockHash: BlockHash.fromHex(blockHash),
|
||||
proof: StorageWitness(
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{.used.}
|
||||
|
||||
import
|
||||
chronos, testutils/unittests, stew/shims/net,
|
||||
chronos, testutils/unittests,
|
||||
json_rpc/[rpcproxy, rpcserver], json_rpc/clients/httpclient,
|
||||
stint,eth/p2p/discoveryv5/enr, eth/keys,
|
||||
eth/p2p/discoveryv5/protocol as discv5_protocol,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Nimbus - Portal Network
|
||||
# Copyright (c) 2021-2023 Status Research & Development GmbH
|
||||
# Copyright (c) 2021-2024 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
|
@ -8,7 +8,7 @@
|
|||
{.push raises: [].}
|
||||
|
||||
import
|
||||
stew/shims/net,
|
||||
std/net,
|
||||
eth/[common, keys, rlp, trie, trie/db],
|
||||
eth/p2p/discoveryv5/[enr, node, routing_table],
|
||||
eth/p2p/discoveryv5/protocol as discv5_protocol,
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
import
|
||||
std/[algorithm, sequtils],
|
||||
chronos, testutils/unittests, stew/shims/net,
|
||||
chronos, testutils/unittests,
|
||||
stew/results,
|
||||
eth/keys, eth/p2p/discoveryv5/routing_table, nimcrypto/[hash, sha2],
|
||||
eth/p2p/discoveryv5/protocol as discv5_protocol,
|
||||
|
|
|
@ -314,7 +314,7 @@ proc asPortalBlockData*(
|
|||
|
||||
proc getBlockReceipts(
|
||||
client: RpcClient, transactions: seq[TypedTransaction], blockHash: Hash256):
|
||||
Future[Result[seq[Receipt], string]] {.async.} =
|
||||
Future[Result[seq[Receipt], string]] {.async: (raises: [CancelledError]).} =
|
||||
## Note: This makes use of `eth_getBlockReceipts` JSON-RPC endpoint which is
|
||||
## only supported by Alchemy.
|
||||
var receipts: seq[Receipt]
|
||||
|
@ -324,11 +324,8 @@ proc getBlockReceipts(
|
|||
try:
|
||||
await client.eth_getBlockReceipts(w3Hash blockHash)
|
||||
except CatchableError as e:
|
||||
await client.close()
|
||||
return err("JSON-RPC eth_getBlockReceipts failed: " & e.msg)
|
||||
|
||||
await client.close()
|
||||
|
||||
for receiptObject in receiptObjects:
|
||||
let receipt = asReceipt(receiptObject).valueOr:
|
||||
return err(error)
|
||||
|
@ -426,7 +423,7 @@ proc run(config: BeaconBridgeConf) {.raises: [CatchableError].} =
|
|||
Opt.some(client)
|
||||
|
||||
optimisticHandler = proc(signedBlock: ForkedMsgTrustedSignedBeaconBlock):
|
||||
Future[void] {.async.} =
|
||||
Future[void] {.async: (raises: [CancelledError]).} =
|
||||
# TODO: Should not be gossiping optimistic blocks, but instead store them
|
||||
# in a cache and only gossip them after they are confirmed due to an LC
|
||||
# finalized header.
|
||||
|
@ -459,8 +456,11 @@ proc run(config: BeaconBridgeConf) {.raises: [CatchableError].} =
|
|||
contentKey = encodedContentKey.toHex()
|
||||
except CatchableError as e:
|
||||
error "JSON-RPC error", error = $e.msg
|
||||
|
||||
await portalRpcClient.close()
|
||||
# TODO: clean-up when json-rpc gets async raises annotations
|
||||
try:
|
||||
await portalRpcClient.close()
|
||||
except CatchableError:
|
||||
discard
|
||||
|
||||
# For bodies to get verified, the header needs to be available on
|
||||
# the network. Wait a little to get the headers propagated through
|
||||
|
@ -480,17 +480,32 @@ proc run(config: BeaconBridgeConf) {.raises: [CatchableError].} =
|
|||
except CatchableError as e:
|
||||
error "JSON-RPC error", error = $e.msg
|
||||
|
||||
await portalRpcClient.close()
|
||||
# TODO: clean-up when json-rpc gets async raises annotations
|
||||
try:
|
||||
await portalRpcClient.close()
|
||||
except CatchableError:
|
||||
discard
|
||||
|
||||
if web3Client.isSome():
|
||||
let client = web3Client.get()
|
||||
# get receipts
|
||||
let receipts =
|
||||
(await web3Client.get().getBlockReceipts(
|
||||
(await client.getBlockReceipts(
|
||||
executionPayload.transactions, hash)).valueOr:
|
||||
# (await web3Client.get().getBlockReceipts(
|
||||
# executionPayload.transactions)).valueOr:
|
||||
error "Error getting block receipts", error
|
||||
# TODO: clean-up when json-rpc gets async raises annotations
|
||||
try:
|
||||
await client.close()
|
||||
except CatchableError:
|
||||
discard
|
||||
return
|
||||
# TODO: clean-up when json-rpc gets async raises annotations
|
||||
try:
|
||||
await client.close()
|
||||
except CatchableError:
|
||||
discard
|
||||
|
||||
let portalReceipts = PortalReceipts.fromReceipts(receipts)
|
||||
if validateReceipts(portalReceipts, payload.receiptsRoot).isErr():
|
||||
|
@ -511,7 +526,11 @@ proc run(config: BeaconBridgeConf) {.raises: [CatchableError].} =
|
|||
except CatchableError as e:
|
||||
error "JSON-RPC error for portal_historyGossip", error = $e.msg
|
||||
|
||||
await portalRpcClient.close()
|
||||
# TODO: clean-up when json-rpc gets async raises annotations
|
||||
try:
|
||||
await portalRpcClient.close()
|
||||
except CatchableError:
|
||||
discard
|
||||
|
||||
return
|
||||
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
{.push raises: [].}
|
||||
|
||||
import
|
||||
std/[hashes, tables],
|
||||
std/[hashes, tables, net],
|
||||
chronos, chronicles, confutils,
|
||||
confutils/std/net as confNet,
|
||||
stew/[byteutils, endians2],
|
||||
stew/shims/net,
|
||||
json_rpc/servers/httpserver,
|
||||
eth/p2p/discoveryv5/protocol,
|
||||
eth/p2p/discoveryv5/enr,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Nimbus
|
||||
# Copyright (c) 2021 Status Research & Development GmbH
|
||||
# Copyright (c) 2021-2024 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
@ -8,9 +8,8 @@
|
|||
# those terms.
|
||||
|
||||
import
|
||||
std/[os],
|
||||
std/[os, net],
|
||||
eth/p2p as ethp2p,
|
||||
stew/shims/net as stewNet,
|
||||
stew/results,
|
||||
chronos, json_rpc/[rpcserver, rpcclient],
|
||||
../../../nimbus/sync/protocol,
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
# nimbus
|
||||
# Copyright (c) 2018-2024 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
mode = ScriptMode.Verbose
|
||||
|
||||
packageName = "nimbus"
|
||||
|
@ -83,10 +90,10 @@ task fluffy_test, "Run fluffy tests":
|
|||
test "fluffy/tests", "all_fluffy_tests", "-d:chronicles_log_level=ERROR -d:nimbus_db_backend=sqlite -d:mergeBlockNumber:38130"
|
||||
|
||||
task utp_test_app, "Build uTP test app":
|
||||
buildBinary "utp_test_app", "fluffy/tools/utp_testing/", "-d:chronicles_log_level=TRACE -d:chronosStrictException"
|
||||
buildBinary "utp_test_app", "fluffy/tools/utp_testing/", "-d:chronicles_log_level=TRACE"
|
||||
|
||||
task utp_test, "Run uTP integration tests":
|
||||
test "fluffy/tools/utp_testing", "utp_test", "-d:chronicles_log_level=ERROR -d:chronosStrictException"
|
||||
test "fluffy/tools/utp_testing", "utp_test", "-d:chronicles_log_level=ERROR"
|
||||
|
||||
task test_portal_testnet, "Build test_portal_testnet":
|
||||
buildBinary "test_portal_testnet", "fluffy/scripts/", "-d:chronicles_log_level=DEBUG -d:unittest2DisableParamFiltering"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2018-2023 Status Research & Development GmbH
|
||||
# Copyright (c) 2018-2024 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
||||
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
||||
|
@ -14,7 +14,8 @@ import
|
|||
strutils,
|
||||
times,
|
||||
os,
|
||||
uri
|
||||
uri,
|
||||
net
|
||||
],
|
||||
pkg/[
|
||||
chronicles,
|
||||
|
@ -23,14 +24,13 @@ import
|
|||
stew/byteutils,
|
||||
confutils/std/net
|
||||
],
|
||||
stew/shims/net as stewNet,
|
||||
eth/[common, net/nat, p2p/bootnodes, p2p/enode, p2p/discoveryv5/enr],
|
||||
"."/[db/select_backend,
|
||||
constants, vm_compile_info, version
|
||||
],
|
||||
common/chain_config
|
||||
|
||||
export stewNet
|
||||
export net
|
||||
|
||||
const
|
||||
# TODO: fix this agent-string format to match other
|
||||
|
|
|
@ -11,7 +11,6 @@ import
|
|||
std/[strutils],
|
||||
stew/[results, byteutils], stint,
|
||||
eth/common/eth_types_rlp, chronos,
|
||||
stew/shims/net,
|
||||
graphql, graphql/graphql as context,
|
||||
graphql/common/types, graphql/httpserver,
|
||||
graphql/instruments/query_complexity,
|
||||
|
|
|
@ -19,7 +19,6 @@ import
|
|||
json_rpc/rpcserver,
|
||||
metrics,
|
||||
metrics/[chronos_httpserver, chronicles_support],
|
||||
stew/shims/net as stewNet,
|
||||
websock/websock as ws,
|
||||
kzg4844/kzg_ex as kzg,
|
||||
./core/eip4844,
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
# nimbus_verified_proxy
|
||||
# Copyright (c) 2022-2024 Status Research & Development GmbH
|
||||
# Licensed and distributed under either of
|
||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
-d:"chronicles_runtime_filtering=on"
|
||||
-d:"chronicles_disable_thread_id"
|
||||
|
||||
|
@ -5,7 +12,6 @@
|
|||
-d:"chronicles_line_numbers:0"
|
||||
@end
|
||||
|
||||
-d:chronosStrictException
|
||||
-d:PREFER_BLST_SHA256=false
|
||||
|
||||
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
|
||||
|
|
|
@ -104,7 +104,7 @@ proc run(config: VerifiedProxyConf) {.raises: [CatchableError].} =
|
|||
verifiedProxy = VerifiedRpcProxy.new(rpcProxy, blockCache, chainId)
|
||||
|
||||
optimisticHandler = proc(signedBlock: ForkedMsgTrustedSignedBeaconBlock):
|
||||
Future[void] {.async.} =
|
||||
Future[void] {.async: (raises: [CancelledError]).} =
|
||||
notice "New LC optimistic block",
|
||||
opt = signedBlock.toBlockId(),
|
||||
wallSlot = getBeaconTime().slotOrZero
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3ca2c5e6b510c15ce88c94ed25731b30f7ad46b5
|
||||
Subproject commit 09a0b117194ed41ee6cebf628404698006d238b4
|
|
@ -1 +1 @@
|
|||
Subproject commit 2c6049b1266a7739f4dca86da4e8c65b75797195
|
||||
Subproject commit 21f3014f548618919007910c4aacd47ce2373a46
|
|
@ -1 +1 @@
|
|||
Subproject commit e3c967ad1939fb33b8e13759037d193734acd202
|
||||
Subproject commit 2725be64bacb46997c0959560d833ff946c8cb3b
|
|
@ -1 +1 @@
|
|||
Subproject commit 2c2544aec13536304438be045bfdd22452741466
|
||||
Subproject commit 3aa92ab843ee2dbf2198e2d517ceeeb29dcda3d9
|
|
@ -1 +1 @@
|
|||
Subproject commit 5404178a4004c4bc13c75853a02b1a74f2ca302c
|
||||
Subproject commit d3e10cc7c6ea002b6918e1cd7cdb8db6ac25489f
|
Loading…
Reference in New Issue