diff --git a/fluffy/common/common_types.nim b/fluffy/common/common_types.nim index 3b165e6ba..b69b35d65 100644 --- a/fluffy/common/common_types.nim +++ b/fluffy/common/common_types.nim @@ -7,7 +7,7 @@ {.push raises: [].} -import ssz_serialization, eth/rlp, stew/[byteutils, results], nimcrypto/hash +import results, ssz_serialization, eth/rlp, stew/byteutils, nimcrypto/hash export hash diff --git a/fluffy/database/content_db.nim b/fluffy/database/content_db.nim index f8cc7a25e..77f7ab09f 100644 --- a/fluffy/database/content_db.nim +++ b/fluffy/database/content_db.nim @@ -11,7 +11,7 @@ import chronicles, metrics, stint, - stew/results, + results, eth/db/kvstore, eth/db/kvstore_sqlite3, ../network/state/state_content, diff --git a/fluffy/eth_data/history_data_json_store.nim b/fluffy/eth_data/history_data_json_store.nim index c6130088a..f564313f7 100644 --- a/fluffy/eth_data/history_data_json_store.nim +++ b/fluffy/eth_data/history_data_json_store.nim @@ -10,7 +10,8 @@ import json_serialization, json_serialization/std/tables, - stew/[byteutils, io2, results], + results, + stew/[byteutils, io2], chronicles, eth/[rlp, common/eth_types], ../../nimbus/common/[chain_config, genesis], diff --git a/fluffy/eth_data/history_data_ssz_e2s.nim b/fluffy/eth_data/history_data_ssz_e2s.nim index 4e6c342f5..3467ccf33 100644 --- a/fluffy/eth_data/history_data_ssz_e2s.nim +++ b/fluffy/eth_data/history_data_ssz_e2s.nim @@ -8,8 +8,9 @@ {.push raises: [].} import - stew/[byteutils, io2, results], + stew/[byteutils, io2], chronicles, + results, eth/[rlp, common/eth_types], ncli/e2store, ../network/history/[history_content, accumulator] diff --git a/fluffy/fluffy.nim b/fluffy/fluffy.nim index 4d53f7220..2bac500b6 100644 --- a/fluffy/fluffy.nim +++ b/fluffy/fluffy.nim @@ -18,7 +18,8 @@ import metrics/chronos_httpserver, json_rpc/clients/httpclient, json_rpc/rpcproxy, - stew/[byteutils, io2, results], + results, + stew/[byteutils, io2], eth/keys, eth/net/nat, eth/p2p/discoveryv5/protocol as discv5_protocol, diff --git a/fluffy/logging.nim b/fluffy/logging.nim index 822b0a197..7b8106bdf 100644 --- a/fluffy/logging.nim +++ b/fluffy/logging.nim @@ -17,7 +17,7 @@ import pkg/chronicles, pkg/chronicles/helpers, chronicles/topics_registry, - pkg/stew/results + pkg/results export results diff --git a/fluffy/network/beacon/beacon_content.nim b/fluffy/network/beacon/beacon_content.nim index e6b1249ad..67314e6e5 100644 --- a/fluffy/network/beacon/beacon_content.nim +++ b/fluffy/network/beacon/beacon_content.nim @@ -9,7 +9,8 @@ import std/typetraits, - stew/[arrayops, results], + stew/arrayops, + results, beacon_chain/spec/forks, beacon_chain/spec/datatypes/altair, nimcrypto/[sha2, hash], diff --git a/fluffy/network/beacon/beacon_db.nim b/fluffy/network/beacon/beacon_db.nim index da08bea42..f2ccfa657 100644 --- a/fluffy/network/beacon/beacon_db.nim +++ b/fluffy/network/beacon/beacon_db.nim @@ -13,7 +13,7 @@ import eth/db/kvstore, eth/db/kvstore_sqlite3, stint, - stew/results, + results, ssz_serialization, beacon_chain/db_limits, beacon_chain/spec/datatypes/[phase0, altair, bellatrix], diff --git a/fluffy/network/beacon/beacon_light_client_manager.nim b/fluffy/network/beacon/beacon_light_client_manager.nim index 43116e3db..3f537e63a 100644 --- a/fluffy/network/beacon/beacon_light_client_manager.nim +++ b/fluffy/network/beacon/beacon_light_client_manager.nim @@ -11,7 +11,8 @@ import std/typetraits, chronos, chronicles, - stew/[base10, results], + stew/base10, + results, eth/p2p/discoveryv5/random2, beacon_chain/spec/datatypes/[phase0, altair, bellatrix, capella, deneb], beacon_chain/spec/[forks_light_client, digest], diff --git a/fluffy/network/beacon/beacon_network.nim b/fluffy/network/beacon/beacon_network.nim index 80ba09190..83494d269 100644 --- a/fluffy/network/beacon/beacon_network.nim +++ b/fluffy/network/beacon/beacon_network.nim @@ -8,7 +8,7 @@ {.push raises: [].} import - stew/results, + results, chronos, chronicles, eth/p2p/discoveryv5/[protocol, enr], diff --git a/fluffy/network/history/beacon_chain_block_proof_bellatrix.nim b/fluffy/network/history/beacon_chain_block_proof_bellatrix.nim index 85a590158..436251db2 100644 --- a/fluffy/network/history/beacon_chain_block_proof_bellatrix.nim +++ b/fluffy/network/history/beacon_chain_block_proof_bellatrix.nim @@ -74,7 +74,7 @@ {.push raises: [].} import - stew/results, + results, ssz_serialization, ssz_serialization/[proofs, merkleization], beacon_chain/spec/eth2_ssz_serialization, diff --git a/fluffy/network/history/beacon_chain_historical_roots.nim b/fluffy/network/history/beacon_chain_historical_roots.nim index 670950374..b56bdc4ee 100644 --- a/fluffy/network/history/beacon_chain_historical_roots.nim +++ b/fluffy/network/history/beacon_chain_historical_roots.nim @@ -20,7 +20,7 @@ {.push raises: [].} -import stew/results, beacon_chain/spec/forks, beacon_chain/spec/datatypes/bellatrix +import results, beacon_chain/spec/forks, beacon_chain/spec/datatypes/bellatrix export results diff --git a/fluffy/network/history/experimental/beacon_chain_block_proof_capella.nim b/fluffy/network/history/experimental/beacon_chain_block_proof_capella.nim index dbcaf295e..6e3bc6098 100644 --- a/fluffy/network/history/experimental/beacon_chain_block_proof_capella.nim +++ b/fluffy/network/history/experimental/beacon_chain_block_proof_capella.nim @@ -24,7 +24,7 @@ {.push raises: [].} import - stew/results, + results, ssz_serialization, ssz_serialization/[proofs, merkleization], beacon_chain/spec/eth2_ssz_serialization, diff --git a/fluffy/network/history/history_content.nim b/fluffy/network/history/history_content.nim index 5c6129d59..d66b42087 100644 --- a/fluffy/network/history/history_content.nim +++ b/fluffy/network/history/history_content.nim @@ -12,7 +12,8 @@ import std/math, nimcrypto/[sha2, hash], - stew/[byteutils, results], + stew/byteutils, + results, stint, ssz_serialization, ../../common/common_types diff --git a/fluffy/network/history/history_network.nim b/fluffy/network/history/history_network.nim index c31da9ff0..29b40c3ac 100644 --- a/fluffy/network/history/history_network.nim +++ b/fluffy/network/history/history_network.nim @@ -8,7 +8,7 @@ {.push raises: [].} import - stew/results, + results, chronos, chronicles, eth/[common/eth_types_rlp, rlp, trie, trie/db], diff --git a/fluffy/network/wire/messages.nim b/fluffy/network/wire/messages.nim index 924b5c2ca..14694a351 100644 --- a/fluffy/network/wire/messages.nim +++ b/fluffy/network/wire/messages.nim @@ -11,7 +11,7 @@ {.push raises: [].} import - stint, stew/[results, objects, endians2], ssz_serialization, ../../common/common_types + stint, stew/[objects, endians2], ssz_serialization, ../../common/common_types, results export ssz_serialization, stint, common_types diff --git a/fluffy/network/wire/portal_protocol.nim b/fluffy/network/wire/portal_protocol.nim index ed55ac2f3..260e0c02c 100644 --- a/fluffy/network/wire/portal_protocol.nim +++ b/fluffy/network/wire/portal_protocol.nim @@ -12,7 +12,8 @@ import std/[sequtils, sets, algorithm, tables], - stew/[results, byteutils, leb128, endians2], + stew/[byteutils, leb128, endians2], + results, chronicles, chronos, nimcrypto/hash, diff --git a/fluffy/rpc/rpc_types.nim b/fluffy/rpc/rpc_types.nim index 54c484bb3..ab43f3b84 100644 --- a/fluffy/rpc/rpc_types.nim +++ b/fluffy/rpc/rpc_types.nim @@ -10,7 +10,8 @@ import stint, json_rpc/jsonmarshal, - stew/[results, byteutils], + stew/[byteutils], + results, eth/p2p/discoveryv5/[routing_table, enr, node] export jsonmarshal, routing_table, enr, node diff --git a/fluffy/tests/beacon_network_tests/test_beacon_content.nim b/fluffy/tests/beacon_network_tests/test_beacon_content.nim index 1e3658480..01994592f 100644 --- a/fluffy/tests/beacon_network_tests/test_beacon_content.nim +++ b/fluffy/tests/beacon_network_tests/test_beacon_content.nim @@ -11,7 +11,7 @@ import unittest2, stew/byteutils, stew/io2, - stew/results, + results, beacon_chain/networking/network_metadata, beacon_chain/spec/forks, beacon_chain/spec/datatypes/altair, diff --git a/fluffy/tests/portal_spec_tests/mainnet/test_history_content_validation.nim b/fluffy/tests/portal_spec_tests/mainnet/test_history_content_validation.nim index 143113a6a..8fdf8c2fa 100644 --- a/fluffy/tests/portal_spec_tests/mainnet/test_history_content_validation.nim +++ b/fluffy/tests/portal_spec_tests/mainnet/test_history_content_validation.nim @@ -12,7 +12,8 @@ import unittest2, stint, - stew/[byteutils, results], + stew/byteutils, + results, eth/[common/eth_types, rlp], ../../../common/common_types, ../../../eth_data/history_data_json_store, diff --git a/fluffy/tests/portal_spec_tests/mainnet/test_portal_wire_encoding.nim b/fluffy/tests/portal_spec_tests/mainnet/test_portal_wire_encoding.nim index 9154778a8..1231f2a93 100644 --- a/fluffy/tests/portal_spec_tests/mainnet/test_portal_wire_encoding.nim +++ b/fluffy/tests/portal_spec_tests/mainnet/test_portal_wire_encoding.nim @@ -10,7 +10,8 @@ import unittest2, stint, - stew/[byteutils, results], + stew/byteutils, + results, eth/p2p/discoveryv5/enr, ../../../network/wire/messages diff --git a/fluffy/tests/state_network_tests/test_state_gossip_getparent_genesis.nim b/fluffy/tests/state_network_tests/test_state_gossip_getparent_genesis.nim index 48e4c1fec..080de9d8a 100644 --- a/fluffy/tests/state_network_tests/test_state_gossip_getparent_genesis.nim +++ b/fluffy/tests/state_network_tests/test_state_gossip_getparent_genesis.nim @@ -10,7 +10,7 @@ import std/os, unittest2, - stew/results, + results, eth/[common, trie, trie/db], ../../../nimbus/common/chain_config, ../../network/state/[state_content, state_validation, state_gossip, state_utils], diff --git a/fluffy/tests/state_network_tests/test_state_validation_genesis.nim b/fluffy/tests/state_network_tests/test_state_validation_genesis.nim index c6f55a044..563c1aefe 100644 --- a/fluffy/tests/state_network_tests/test_state_validation_genesis.nim +++ b/fluffy/tests/state_network_tests/test_state_validation_genesis.nim @@ -10,7 +10,7 @@ import std/os, unittest2, - stew/results, + results, eth/[common, trie, trie/trie_defs], ../../../nimbus/common/chain_config, ../../network/state/[state_content, state_validation], diff --git a/fluffy/tests/test_history_util.nim b/fluffy/tests/test_history_util.nim index 4e13df289..b3c4a6f86 100644 --- a/fluffy/tests/test_history_util.nim +++ b/fluffy/tests/test_history_util.nim @@ -8,9 +8,7 @@ {.push raises: [].} import - stew/results, - eth/common/eth_types_rlp, - ../network/history/[history_content, accumulator] + results, eth/common/eth_types_rlp, ../network/history/[history_content, accumulator] export results, accumulator, history_content diff --git a/fluffy/tests/test_portal_wire_protocol.nim b/fluffy/tests/test_portal_wire_protocol.nim index 226e35c04..8d3e4f5a1 100644 --- a/fluffy/tests/test_portal_wire_protocol.nim +++ b/fluffy/tests/test_portal_wire_protocol.nim @@ -11,7 +11,7 @@ import std/[algorithm, sequtils], chronos, testutils/unittests, - stew/results, + results, eth/keys, eth/p2p/discoveryv5/routing_table, nimcrypto/[hash, sha2], diff --git a/fluffy/tools/portalcli.nim b/fluffy/tools/portalcli.nim index 1d678f726..6291402e3 100644 --- a/fluffy/tools/portalcli.nim +++ b/fluffy/tools/portalcli.nim @@ -14,7 +14,8 @@ import chronos, metrics, metrics/chronos_httpserver, - stew/[byteutils, results], + stew/byteutils, + results, nimcrypto/[hash, sha2], eth/[keys, net/nat], eth/p2p/discoveryv5/[enr, node], diff --git a/hive_integration/nodocker/engine/cancun/blobs.nim b/hive_integration/nodocker/engine/cancun/blobs.nim index fdfb61ce0..f64ad153d 100644 --- a/hive_integration/nodocker/engine/cancun/blobs.nim +++ b/hive_integration/nodocker/engine/cancun/blobs.nim @@ -14,7 +14,7 @@ import kzg4844/kzg_ex as kzg, stew/endians2, nimcrypto/sha2, - stew/results, + results, ../../../../nimbus/core/eip4844 type diff --git a/hive_integration/nodocker/engine/engine_env.nim b/hive_integration/nodocker/engine/engine_env.nim index a95d01860..27d6029df 100644 --- a/hive_integration/nodocker/engine/engine_env.nim +++ b/hive_integration/nodocker/engine/engine_env.nim @@ -14,7 +14,7 @@ import eth/p2p as eth_p2p, chronos, json_rpc/[rpcserver, rpcclient], - stew/[results], + results, ../../../nimbus/[ config, constants, diff --git a/hive_integration/nodocker/engine/engine_sim.nim b/hive_integration/nodocker/engine/engine_sim.nim index 34a71f653..a40aceeb2 100644 --- a/hive_integration/nodocker/engine/engine_sim.nim +++ b/hive_integration/nodocker/engine/engine_sim.nim @@ -11,7 +11,7 @@ import std/times, chronicles, - stew/results, + results, ./types, ../sim_utils, ../../../nimbus/core/eip4844 diff --git a/hive_integration/nodocker/engine/test_env.nim b/hive_integration/nodocker/engine/test_env.nim index 0af07ee0f..77a0b87c8 100644 --- a/hive_integration/nodocker/engine/test_env.nim +++ b/hive_integration/nodocker/engine/test_env.nim @@ -11,7 +11,7 @@ import chronicles, eth/keys, - stew/results, + results, json_rpc/rpcclient, ../../../nimbus/config, ../../../nimbus/common, diff --git a/hive_integration/nodocker/rpc/test_env.nim b/hive_integration/nodocker/rpc/test_env.nim index 7110b45bb..631fcd876 100644 --- a/hive_integration/nodocker/rpc/test_env.nim +++ b/hive_integration/nodocker/rpc/test_env.nim @@ -10,7 +10,7 @@ import std/[os, net], eth/p2p as ethp2p, - stew/results, + results, chronos, json_rpc/[rpcserver, rpcclient], ../../../nimbus/sync/protocol, ../../../nimbus/common, diff --git a/nimbus/beacon/api_handler/api_forkchoice.nim b/nimbus/beacon/api_handler/api_forkchoice.nim index bceef1e82..ae28ce922 100644 --- a/nimbus/beacon/api_handler/api_forkchoice.nim +++ b/nimbus/beacon/api_handler/api_forkchoice.nim @@ -10,7 +10,7 @@ import std/[typetraits], eth/common, - stew/results, + results, ../web3_eth_conv, ../beacon_engine, web3/execution_types, diff --git a/nimbus/beacon/api_handler/api_newpayload.nim b/nimbus/beacon/api_handler/api_newpayload.nim index fe19f6ee4..031c7669c 100644 --- a/nimbus/beacon/api_handler/api_newpayload.nim +++ b/nimbus/beacon/api_handler/api_newpayload.nim @@ -9,7 +9,7 @@ import eth/common, - stew/results, + results, ../web3_eth_conv, ../beacon_engine, web3/execution_types, diff --git a/nimbus/beacon/api_handler/api_utils.nim b/nimbus/beacon/api_handler/api_utils.nim index 1327968d5..8bbd52a55 100644 --- a/nimbus/beacon/api_handler/api_utils.nim +++ b/nimbus/beacon/api_handler/api_utils.nim @@ -12,7 +12,8 @@ import eth/[rlp], json_rpc/errors, nimcrypto/[hash, sha2], - stew/[results, endians2], + stew/endians2, + results, ../../constants, ../../db/core_db, ../../utils/utils, diff --git a/nimbus/common/context.nim b/nimbus/common/context.nim index 8e78c3533..aa308d17e 100644 --- a/nimbus/common/context.nim +++ b/nimbus/common/context.nim @@ -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)) @@ -10,7 +10,8 @@ import std/[strutils, os], manager, - stew/[results, io2, byteutils], + stew/[io2, byteutils], + results, eth/keys export manager diff --git a/nimbus/common/manager.nim b/nimbus/common/manager.nim index 59416f4ae..dc0ab826a 100644 --- a/nimbus/common/manager.nim +++ b/nimbus/common/manager.nim @@ -11,7 +11,8 @@ import std/[os, json, tables, strutils], - stew/[byteutils, results], + stew/byteutils, + results, eth/[keyfile, common, keys], json_serialization @@ -29,7 +30,7 @@ type proc init*(_: type AccountsManager): AccountsManager = discard -proc loadKeystores*(am: var AccountsManager, path: string): +proc loadKeystores*(am: var AccountsManager, path: string): Result[void, string] = try: createDir(path) @@ -39,7 +40,7 @@ proc loadKeystores*(am: var AccountsManager, path: string): am.accounts[address] = NimbusAccount(keystore: data, unlocked: false) except CatchableError as exc: return err("loadKeystrores: " & exc.msg) - + ok() proc getAccount*(am: var AccountsManager, address: EthAddress): Result[NimbusAccount, string] = diff --git a/nimbus/core/eip4844.nim b/nimbus/core/eip4844.nim index 1ab12f8c2..46728e96a 100644 --- a/nimbus/core/eip4844.nim +++ b/nimbus/core/eip4844.nim @@ -12,7 +12,7 @@ import std/[os, strutils], nimcrypto/sha2, kzg4844/kzg_ex as kzg, - stew/results, + results, stint, ../constants, ../common/common diff --git a/nimbus/core/executor/process_block.nim b/nimbus/core/executor/process_block.nim index dbfbefc23..7ecf8c11a 100644 --- a/nimbus/core/executor/process_block.nim +++ b/nimbus/core/executor/process_block.nim @@ -21,7 +21,7 @@ import ./executor_helpers, ./process_transaction, chronicles, - stew/results + results {.push raises: [].} diff --git a/nimbus/core/executor/process_transaction.nim b/nimbus/core/executor/process_transaction.nim index 50589a276..c45da2d08 100644 --- a/nimbus/core/executor/process_transaction.nim +++ b/nimbus/core/executor/process_transaction.nim @@ -12,7 +12,7 @@ import std/strutils, - stew/results, + results, ../../common/common, ../../db/ledger, ../../transaction/call_evm, diff --git a/nimbus/core/gaslimit.nim b/nimbus/core/gaslimit.nim index cc55bf042..f4c5a58f0 100644 --- a/nimbus/core/gaslimit.nim +++ b/nimbus/core/gaslimit.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -11,7 +11,7 @@ import ../common/common, std/strformat, - stew/results, + results, eth/[eip1559] export diff --git a/nimbus/core/tx_pool.nim b/nimbus/core/tx_pool.nim index 419207d03..9d622cf6c 100644 --- a/nimbus/core/tx_pool.nim +++ b/nimbus/core/tx_pool.nim @@ -435,7 +435,8 @@ import tx_recover], chronicles, eth/keys, - stew/[keyed_queue, results], + stew/keyed_queue, + results, ../common/common, ./casper diff --git a/nimbus/core/tx_pool/tx_item.nim b/nimbus/core/tx_pool/tx_item.nim index 2d1cb2e01..9a12ef7c9 100644 --- a/nimbus/core/tx_pool/tx_item.nim +++ b/nimbus/core/tx_pool/tx_item.nim @@ -18,7 +18,7 @@ import ../../utils/utils, ./tx_info, eth/[common, keys], - stew/results + results {.push raises: [].} diff --git a/nimbus/core/tx_pool/tx_tabs.nim b/nimbus/core/tx_pool/tx_tabs.nim index 2f785cb0b..d45449ae7 100644 --- a/nimbus/core/tx_pool/tx_tabs.nim +++ b/nimbus/core/tx_pool/tx_tabs.nim @@ -12,15 +12,16 @@ ## ====================================================== ## +{.push raises: [].} + import std/[sequtils, tables], ./tx_info, ./tx_item, ./tx_tabs/[tx_sender, tx_rank, tx_status], eth/[common, keys], - stew/[keyed_queue, keyed_queue/kq_debug, results, sorted_set] - -{.push raises: [].} + stew/[keyed_queue, keyed_queue/kq_debug, sorted_set], + results export # bySender/byStatus index operations diff --git a/nimbus/core/tx_pool/tx_tabs/tx_rank.nim b/nimbus/core/tx_pool/tx_tabs/tx_rank.nim index 785b8918c..deb7afe88 100644 --- a/nimbus/core/tx_pool/tx_tabs/tx_rank.nim +++ b/nimbus/core/tx_pool/tx_tabs/tx_rank.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -12,13 +12,15 @@ ## ========================================= ## +{.push raises: [].} + import std/[tables], ../tx_info, eth/[common], - stew/[results, sorted_set] + stew/[sorted_set], + results -{.push raises: [].} type TxRank* = ##\ diff --git a/nimbus/core/tx_pool/tx_tabs/tx_sender.nim b/nimbus/core/tx_pool/tx_tabs/tx_sender.nim index f000ada6b..3c4fca54e 100644 --- a/nimbus/core/tx_pool/tx_tabs/tx_sender.nim +++ b/nimbus/core/tx_pool/tx_tabs/tx_sender.nim @@ -8,6 +8,8 @@ # at your option. This file may not be copied, modified, or distributed except # according to those terms. +{.push raises: [].} + ## Transaction Pool Table: `Sender` > `status` | all > `nonce` ## =========================================================== ## @@ -17,10 +19,10 @@ import ../tx_info, ../tx_item, eth/[common], - stew/[results, keyed_queue, keyed_queue/kq_debug, sorted_set], + stew/[keyed_queue, keyed_queue/kq_debug, sorted_set], + results, ../../eip4844 -{.push raises: [].} type TxSenderNonceRef* = ref object ##\ diff --git a/nimbus/core/tx_pool/tx_tabs/tx_status.nim b/nimbus/core/tx_pool/tx_tabs/tx_status.nim index 90bc42630..c5f742f3d 100644 --- a/nimbus/core/tx_pool/tx_tabs/tx_status.nim +++ b/nimbus/core/tx_pool/tx_tabs/tx_status.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2018 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -16,7 +16,8 @@ import ../tx_info, ../tx_item, eth/[common], - stew/[results, keyed_queue, keyed_queue/kq_debug, sorted_set] + stew/[keyed_queue, keyed_queue/kq_debug, sorted_set], + results {.push raises: [].} diff --git a/nimbus/core/validate.nim b/nimbus/core/validate.nim index 5fba80dcf..ef9c3131d 100644 --- a/nimbus/core/validate.nim +++ b/nimbus/core/validate.nim @@ -20,7 +20,8 @@ import ./pow/[difficulty, header], ./pow, nimcrypto/utils as cryptoutils, - stew/[objects, results] + stew/objects, + results from stew/byteutils import nil diff --git a/nimbus/core/withdrawals.nim b/nimbus/core/withdrawals.nim index b77849b18..9e6ef0228 100644 --- a/nimbus/core/withdrawals.nim +++ b/nimbus/core/withdrawals.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2022 Status Research & Development GmbH +# Copyright (c) 2022-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -9,7 +9,7 @@ # according to those terms. import - stew/results, + results, ../common/common {.push raises: [].} diff --git a/nimbus/db/kvstore_rocksdb.nim b/nimbus/db/kvstore_rocksdb.nim index 35bd41a38..a68c5edc7 100644 --- a/nimbus/db/kvstore_rocksdb.nim +++ b/nimbus/db/kvstore_rocksdb.nim @@ -12,7 +12,7 @@ import std/[os, sequtils], - stew/results, + results, rocksdb, eth/db/kvstore diff --git a/nimbus/evm/precompiles.nim b/nimbus/evm/precompiles.nim index aaa7a0ffa..c495c6125 100644 --- a/nimbus/evm/precompiles.nim +++ b/nimbus/evm/precompiles.nim @@ -10,7 +10,7 @@ import std/[macros], - stew/results, + results, "."/[types, blake2b_f, blscurve], ./interpreter/[gas_meter, gas_costs, utils/utils_numeric], ../errors, eth/[common, keys], chronicles, diff --git a/nimbus/graphql/ethapi.nim b/nimbus/graphql/ethapi.nim index d83078ac4..c0d2ad670 100644 --- a/nimbus/graphql/ethapi.nim +++ b/nimbus/graphql/ethapi.nim @@ -9,7 +9,8 @@ import std/[strutils], - stew/[results, byteutils], stint, + stew/byteutils, stint, + results, eth/common/eth_types_rlp, chronos, graphql, graphql/graphql as context, graphql/common/types, graphql/httpserver, diff --git a/nimbus/rpc/jwt_auth.nim b/nimbus/rpc/jwt_auth.nim index 4cb4ccfe8..089cb3aaf 100644 --- a/nimbus/rpc/jwt_auth.nim +++ b/nimbus/rpc/jwt_auth.nim @@ -23,7 +23,8 @@ import chronos/apps/http/httpserver, httputils, nimcrypto/[hmac, utils], - stew/[byteutils, objects, results], + stew/[byteutils, objects], + results, ../config, ./jwt_auth_helper, ./rpc_server @@ -254,7 +255,7 @@ proc jwtSharedSecret*(rng: ref rand.HmacDrbgContext; config: NimbusConf): return err(jwtCreationError) proc httpJwtAuth*(key: JwtSharedKey): RpcAuthHook = - proc handler(req: HttpRequestRef): Future[HttpResponseRef] + proc handler(req: HttpRequestRef): Future[HttpResponseRef] {.gcsafe, async: (raises: [CatchableError]).} = let auth = req.headers.getString("Authorization", "?") if auth.len < 9 or auth[0..6].cmpIgnoreCase("Bearer ") != 0: diff --git a/nimbus/sync/todo/snap/worker/db/hexary_inspect.nim b/nimbus/sync/todo/snap/worker/db/hexary_inspect.nim index 09db8a4a1..07e3b251d 100644 --- a/nimbus/sync/todo/snap/worker/db/hexary_inspect.nim +++ b/nimbus/sync/todo/snap/worker/db/hexary_inspect.nim @@ -14,7 +14,8 @@ import std/[sequtils, strutils, tables], chronicles, eth/[common, trie/nibbles], - stew/[results, byteutils], + stew/[byteutils], + results, "../.."/[constants, range_desc], "."/[hexary_desc, hexary_nodes_helper, hexary_paths] diff --git a/nimbus/sync/todo/snap/worker/db/hexary_interpolate.nim b/nimbus/sync/todo/snap/worker/db/hexary_interpolate.nim index f92671d6f..50595c82f 100644 --- a/nimbus/sync/todo/snap/worker/db/hexary_interpolate.nim +++ b/nimbus/sync/todo/snap/worker/db/hexary_interpolate.nim @@ -1,5 +1,5 @@ # nimbus-eth1 -# 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -19,7 +19,7 @@ import std/[tables], eth/[common, trie/nibbles], - stew/results, + results, "../.."/[constants, range_desc], "."/[hexary_desc, hexary_error, hexary_paths] diff --git a/nimbus/sync/todo/snap/worker/db/hexary_nearby.nim b/nimbus/sync/todo/snap/worker/db/hexary_nearby.nim index af793fbf1..696b94df5 100644 --- a/nimbus/sync/todo/snap/worker/db/hexary_nearby.nim +++ b/nimbus/sync/todo/snap/worker/db/hexary_nearby.nim @@ -13,7 +13,7 @@ import std/tables, eth/[common, trie/nibbles], - stew/results, + results, ../../range_desc, "."/[hexary_desc, hexary_error, hexary_nodes_helper, hexary_paths] diff --git a/nimbus/sync/todo/snap/worker/db/hexary_nodes_helper.nim b/nimbus/sync/todo/snap/worker/db/hexary_nodes_helper.nim index 5571de05f..df9528db2 100644 --- a/nimbus/sync/todo/snap/worker/db/hexary_nodes_helper.nim +++ b/nimbus/sync/todo/snap/worker/db/hexary_nodes_helper.nim @@ -15,7 +15,7 @@ import std/[sequtils, tables], eth/[common, trie/nibbles], - stew/results, + results, ../../range_desc, "."/[hexary_desc, hexary_error] diff --git a/nimbus/sync/todo/snap/worker/db/snapdb_debug.nim b/nimbus/sync/todo/snap/worker/db/snapdb_debug.nim index 84ffa06e8..42e86f4c7 100644 --- a/nimbus/sync/todo/snap/worker/db/snapdb_debug.nim +++ b/nimbus/sync/todo/snap/worker/db/snapdb_debug.nim @@ -13,7 +13,7 @@ import std/[algorithm, sequtils, tables], eth/[common, trie/nibbles], - stew/results, + results, ../../range_desc, "."/[hexary_debug, hexary_desc, hexary_error, hexary_paths, snapdb_desc] diff --git a/nimbus/sync/todo/snap/worker/db/snapdb_pivot.nim b/nimbus/sync/todo/snap/worker/db/snapdb_pivot.nim index bae0e10c5..d9c096f5e 100644 --- a/nimbus/sync/todo/snap/worker/db/snapdb_pivot.nim +++ b/nimbus/sync/todo/snap/worker/db/snapdb_pivot.nim @@ -1,5 +1,5 @@ # nimbus-eth1 -# 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -12,7 +12,7 @@ import eth/[common, rlp], - stew/results, + results, ../../range_desc, "."/[hexary_error, snapdb_desc, snapdb_persistent] diff --git a/nimbus/utils/ec_recover.nim b/nimbus/utils/ec_recover.nim index 6d035269a..51fe24383 100644 --- a/nimbus/utils/ec_recover.nim +++ b/nimbus/utils/ec_recover.nim @@ -1,5 +1,5 @@ # Nimbus -# 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -21,7 +21,8 @@ import ./keyed_queue/kq_rlp, ./utils_defs, eth/[common, common/transaction, keys, rlp], - stew/[keyed_queue, results], + stew/keyed_queue, + results, stint export diff --git a/nimbus_verified_proxy/block_cache.nim b/nimbus_verified_proxy/block_cache.nim index ca3857712..021b9edbb 100644 --- a/nimbus_verified_proxy/block_cache.nim +++ b/nimbus_verified_proxy/block_cache.nim @@ -7,7 +7,7 @@ {.push raises: [].} -import std/tables, web3/primitives, stew/[results, keyed_queue], ./rpc/rpc_utils +import std/tables, web3/primitives, stew/keyed_queue, results, ./rpc/rpc_utils ## Cache for payloads received through block gossip and validated by the ## consensus light client. diff --git a/nimbus_verified_proxy/rpc/rpc_eth_api.nim b/nimbus_verified_proxy/rpc/rpc_eth_api.nim index 47a5880a1..ddf6255fd 100644 --- a/nimbus_verified_proxy/rpc/rpc_eth_api.nim +++ b/nimbus_verified_proxy/rpc/rpc_eth_api.nim @@ -10,7 +10,8 @@ import std/[strutils, typetraits], stint, - stew/[byteutils, results], + stew/byteutils, + results, chronicles, json_rpc/[rpcproxy, rpcserver, rpcclient], eth/common/eth_types as etypes, diff --git a/nimbus_verified_proxy/validate_proof.nim b/nimbus_verified_proxy/validate_proof.nim index fd5aec260..887c3c665 100644 --- a/nimbus_verified_proxy/validate_proof.nim +++ b/nimbus_verified_proxy/validate_proof.nim @@ -10,7 +10,7 @@ import std/[sequtils, typetraits, options], stint, - stew/results, + results, eth/common/eth_types as etypes, eth/common/eth_types_rlp, eth/rlp, diff --git a/premix/graphql_downloader.nim b/premix/graphql_downloader.nim index 360e60344..75958fd3c 100644 --- a/premix/graphql_downloader.nim +++ b/premix/graphql_downloader.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2021-2023 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -10,7 +10,7 @@ import std/json, - chronos, stew/results, eth/common, + chronos, results, eth/common, graphql/httpclient, ./parser diff --git a/stateless/test_witness_verification.nim b/stateless/test_witness_verification.nim index 0b89bbce6..8587bc481 100644 --- a/stateless/test_witness_verification.nim +++ b/stateless/test_witness_verification.nim @@ -10,7 +10,7 @@ import std/os, unittest2, - stew/results, + results, eth/[common, trie/trie_defs], ../nimbus/db/[ledger, core_db], ../nimbus/common/chain_config, diff --git a/stateless/witness_verification.nim b/stateless/witness_verification.nim index 6cf4a8bd6..c75331e76 100644 --- a/stateless/witness_verification.nim +++ b/stateless/witness_verification.nim @@ -11,7 +11,7 @@ import std/tables, stint, eth/[common, rlp], - stew/results, + results, ../nimbus/db/[core_db, state_db], ./[tree_from_witness, witness_types] diff --git a/tests/replay/gunzip.nim b/tests/replay/gunzip.nim index 9006444f5..6479ebb12 100644 --- a/tests/replay/gunzip.nim +++ b/tests/replay/gunzip.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2021-2023 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) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -10,7 +10,7 @@ import std/strutils, - stew/results, + results, zlib const diff --git a/tests/test_generalstate_json.nim b/tests/test_generalstate_json.nim index 26451465d..e1b8b130d 100644 --- a/tests/test_generalstate_json.nim +++ b/tests/test_generalstate_json.nim @@ -21,7 +21,8 @@ import ../tools/common/state_clearing, eth/trie/trie_defs, unittest2, - stew/[results, byteutils] + stew/byteutils, + results type TestCtx = object diff --git a/tests/test_jwt_auth.nim b/tests/test_jwt_auth.nim index cd5ac5214..0f35a6d7b 100644 --- a/tests/test_jwt_auth.nim +++ b/tests/test_jwt_auth.nim @@ -22,7 +22,7 @@ import chronos/apps/http/httptable, eth/[common, keys, p2p], nimcrypto/[hmac, utils], - stew/results, + results, stint, unittest2, graphql, diff --git a/tests/test_sync_snap/test_helpers.nim b/tests/test_sync_snap/test_helpers.nim index 340fde5f4..62a36bcd8 100644 --- a/tests/test_sync_snap/test_helpers.nim +++ b/tests/test_sync_snap/test_helpers.nim @@ -11,7 +11,8 @@ import std/times, eth/common, - stew/[interval_set, results], + stew/interval_set, + results, unittest2, ../../nimbus/sync/snap/range_desc, ../../nimbus/sync/snap/worker/db/hexary_error, diff --git a/tests/test_sync_snap/test_node_range.nim b/tests/test_sync_snap/test_node_range.nim index 7fa55fb50..33f0dfb0b 100644 --- a/tests/test_sync_snap/test_node_range.nim +++ b/tests/test_sync_snap/test_node_range.nim @@ -13,7 +13,8 @@ import std/[sequtils, sets, strformat, strutils], eth/[common, p2p, trie/nibbles], - stew/[byteutils, interval_set, results], + stew/[byteutils, interval_set], + results, unittest2, ../../nimbus/sync/[handlers, protocol, types], ../../nimbus/sync/snap/range_desc, diff --git a/tests/test_txpool/sign_helper.nim b/tests/test_txpool/sign_helper.nim index d2ad1556e..023169bf7 100644 --- a/tests/test_txpool/sign_helper.nim +++ b/tests/test_txpool/sign_helper.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2022-2023 Status Research & Development GmbH +# Copyright (c) 2022-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -14,7 +14,7 @@ import ../../nimbus/core/tx_pool/tx_item, ../../nimbus/core/clique/clique_desc, eth/[common, common/transaction, keys], - stew/results, + results, stint const diff --git a/tests/test_txpool2.nim b/tests/test_txpool2.nim index 3cfdce0fd..3c4546e14 100644 --- a/tests/test_txpool2.nim +++ b/tests/test_txpool2.nim @@ -11,7 +11,7 @@ import std/[tables, os], eth/[keys], - stew/[byteutils, results], unittest2, + stew/byteutils, results, unittest2, ../nimbus/db/ledger, ../nimbus/core/chain, ../nimbus/[config, transaction, constants], diff --git a/tools/evmstate/evmstate.nim b/tools/evmstate/evmstate.nim index b8c446c23..7b2229d80 100644 --- a/tools/evmstate/evmstate.nim +++ b/tools/evmstate/evmstate.nim @@ -12,7 +12,8 @@ import std/[json, strutils, sets, tables, options, streams], chronicles, eth/keys, - stew/[results, byteutils], + stew/byteutils, + results, stint, eth/trie/[trie_defs], ../../nimbus/[vm_types, vm_state], diff --git a/tools/t8n/helpers.nim b/tools/t8n/helpers.nim index 7716d0eb1..c971a5990 100644 --- a/tools/t8n/helpers.nim +++ b/tools/t8n/helpers.nim @@ -1,5 +1,5 @@ # Nimbus -# Copyright (c) 2022 Status Research & Development GmbH +# Copyright (c) 2022-2024 Status Research & Development GmbH # Licensed under either of # * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or # http://www.apache.org/licenses/LICENSE-2.0) @@ -10,7 +10,7 @@ import std/[json, strutils, tables], - stew/[byteutils, results], + stew/byteutils, stint, eth/[common, rlp, keys], ../../nimbus/transaction, diff --git a/tools/t8n/transition.nim b/tools/t8n/transition.nim index 88d599308..667c06e5a 100644 --- a/tools/t8n/transition.nim +++ b/tools/t8n/transition.nim @@ -11,7 +11,7 @@ import std/[json, strutils, tables, os, streams], eth/[rlp, trie, eip1559], - stint, stew/results, + stint, results, "."/[config, types, helpers], ../common/state_clearing, ../../nimbus/[vm_types, vm_state, transaction], diff --git a/vendor/nim-results b/vendor/nim-results index dfeef8ba7..e2adf66b8 160000 --- a/vendor/nim-results +++ b/vendor/nim-results @@ -1 +1 @@ -Subproject commit dfeef8ba705d7bab3e2073bb44549f0a2562df70 +Subproject commit e2adf66b8bc2f41606e8469a5f0a850d1e545b55