std_shims -> stew

This commit is contained in:
Jacek Sieka 2019-07-07 12:12:01 +02:00
parent 7bd28905fd
commit 2763bd0dd5
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
53 changed files with 62 additions and 74 deletions

14
.gitmodules vendored
View File

@ -13,11 +13,6 @@
url = https://github.com/cheatfate/nimcrypto.git
ignore = dirty
branch = master
[submodule "vendor/nim-ranges"]
path = vendor/nim-ranges
url = https://github.com/status-im/nim-ranges.git
ignore = dirty
branch = master
[submodule "vendor/nim-stint"]
path = vendor/nim-stint
url = https://github.com/status-im/nim-stint.git
@ -33,11 +28,6 @@
url = https://github.com/status-im/nim-eth.git
ignore = dirty
branch = master
[submodule "vendor/nim-byteutils"]
path = vendor/nim-byteutils
url = https://github.com/status-im/nim-byteutils.git
ignore = dirty
branch = master
[submodule "vendor/nim-http-utils"]
path = vendor/nim-http-utils
url = https://github.com/status-im/nim-http-utils.git
@ -54,8 +44,8 @@
ignore = dirty
branch = master
[submodule "vendor/nim-std-shims"]
path = vendor/nim-std-shims
url = https://github.com/status-im/nim-std-shims.git
path = vendor/nim-stew
url = https://github.com/status-im/nim-stew.git
ignore = dirty
branch = master
[submodule "vendor/nim-serialization"]

View File

@ -17,7 +17,7 @@ requires "nim >= 0.19",
"chronos",
"bncurve",
"eth",
"std_shims"
"stew"
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
if not dirExists "build":

View File

@ -1,4 +1,4 @@
import eth/trie/db, ranges
import eth/trie/db, stew/ranges
type
CaptureFlags* {.pure.} = enum

View File

@ -7,8 +7,8 @@
import
tables, sequtils, algorithm,
ranges, state_db, eth/trie/[hexary, db],
eth/[common, rlp], byteutils, chronicles,
stew/[byteutils, ranges], state_db, eth/trie/[hexary, db],
eth/[common, rlp], chronicles,
../errors, ../constants, ./storage_types,
../utils, ../config

View File

@ -1,6 +1,6 @@
import
times, tables,
eth/[common, rlp, trie], stint, byteutils, ranges, block_types, nimcrypto,
eth/[common, rlp, trie], stint, stew/[byteutils, ranges], block_types, nimcrypto,
chronicles, eth/trie/db,
db/[db_chain, state_db], genesis_alloc, config, constants

View File

@ -1,7 +1,7 @@
# Constants containing the genesis allocation of built-in genesis blocks.
# Their content is an RLP-encoded list of (address, balance) tuples.
import byteutils, strutils
import stew/byteutils, strutils
proc toData(s: string): seq[byte] {.compileTime.} = s.strip().hexToSeqByte()

View File

@ -1,4 +1,4 @@
import ../db/[db_chain, state_db], eth/common, chronicles, ../vm_state, ../vm_types, ../transaction, ranges,
import ../db/[db_chain, state_db], eth/common, chronicles, ../vm_state, ../vm_types, ../transaction, stew/ranges,
../vm/[computation, message], ../constants, stint, nimcrypto,
../vm_state_transactions, sugar, ../utils, eth/trie/db, ../tracer, ./executor

View File

@ -1,4 +1,4 @@
import eth/common, byteutils, ../db/state_db
import eth/common, stew/byteutils, ../db/state_db
const
# DAOForkBlockExtra is the block header extra-data field to set for the DAO fork

View File

@ -1,5 +1,5 @@
import options, sets,
eth/[common, bloom], ranges, chronicles, nimcrypto,
eth/[common, bloom], stew/ranges, chronicles, nimcrypto,
../db/[db_chain, state_db],
../utils, ../constants, ../transaction,
../vm_state, ../vm_types, ../vm_state_transactions,

View File

@ -28,7 +28,7 @@
]#
import
stint, byteutils, eth/[keys, rlp], eth/common/eth_types,
stint, stew/byteutils, eth/[keys, rlp], eth/common/eth_types,
eth/p2p/rlpx_protocols/whisper_protocol
type

View File

@ -9,7 +9,7 @@
import
strutils, times, options,
json_rpc/rpcserver, hexstrings, stint, byteutils, ranges/typedranges,
json_rpc/rpcserver, hexstrings, stint, stew/byteutils, stew/ranges/typedranges,
eth/[common, keys, rlp, p2p], eth/trie/db, nimcrypto,
../transaction, ../config, ../vm_state, ../constants, ../vm_types,
../vm_state_transactions, ../utils,

View File

@ -7,7 +7,7 @@
# This file may not be copied, modified, or distributed except according to
# those terms.
import hexstrings, nimcrypto, eth/common, byteutils,
import hexstrings, nimcrypto, eth/common, stew/byteutils,
../db/[db_chain, state_db, storage_types], strutils,
../constants, stint

View File

@ -3,7 +3,7 @@ import
eth/[common, rlp, keys, p2p], eth/p2p/rlpx_protocols/whisper_protocol,
nimcrypto/[sysrand, hmac, sha2, pbkdf2]
from byteutils import hexToSeqByte, hexToByteArray
from stew/byteutils import hexToSeqByte, hexToByteArray
# Whisper RPC implemented mostly as in
# https://github.com/ethereum/go-ethereum/wiki/Whisper-v6-RPC-API

View File

@ -1,7 +1,7 @@
import
db/[db_chain, state_db, capturedb], eth/common, utils, json,
constants, vm_state, vm_types, transaction, p2p/executor,
eth/trie/db, nimcrypto, strutils, ranges,
eth/trie/db, nimcrypto, strutils, stew/ranges,
chronicles, rpc/hexstrings, launcher,
vm/interpreter/vm_forks

View File

@ -11,7 +11,7 @@ import
../constants, ../errors, ../validation, ../vm_state, ../vm_types,
./interpreter/[opcode_values, gas_meter, gas_costs, vm_forks],
./code_stream, ./memory, ./message, ./stack, ../db/[state_db, db_chain],
../utils/header, byteutils, ranges, precompiles,
../utils/header, stew/[byteutils, ranges], precompiles,
transaction_tracer, eth/trie/trie_defs
logScope:

View File

@ -6,8 +6,8 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
strformat, times, ranges, sequtils, options,
chronicles, stint, nimcrypto, ranges/typedranges, eth/common,
strformat, times, stew/ranges, sequtils, options,
chronicles, stint, nimcrypto, stew/ranges/typedranges, eth/common,
./utils/[macros_procs_opcodes, utils_numeric],
./gas_meter, ./gas_costs, ./opcode_values, ./vm_forks,
../memory, ../message, ../stack, ../code_stream, ../computation,

View File

@ -2,7 +2,7 @@ import
json, strutils, sets, hashes,
chronicles, nimcrypto, eth/common, stint,
../vm_types, memory, stack, ../db/[db_chain, state_db],
eth/trie/hexary, ./message, ranges/typedranges,
eth/trie/hexary, ./message, stew/ranges/typedranges,
./interpreter/opcode_values
logScope:

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
ranges/typedranges, sequtils, strformat, tables, options, sets,
stew/ranges/typedranges, sequtils, strformat, tables, options, sets,
eth/common, chronicles, ./db/[db_chain, state_db],
constants, errors, transaction, vm_types, vm_state, utils,
./vm/[computation, interpreter], ./vm/interpreter/gas_costs

View File

@ -1,5 +1,5 @@
import
json, os, stint, eth/trie/db, byteutils, eth/common,
json, os, stint, eth/trie/db, stew/byteutils, eth/common,
../nimbus/db/[db_chain], chronicles, ../nimbus/vm_state,
../nimbus/p2p/executor, premixcore, prestate, ../nimbus/tracer

View File

@ -1,9 +1,9 @@
import
json, downloader, stint, strutils, byteutils, parser,
json, downloader, stint, strutils, stew/byteutils, parser,
chronicles, ../nimbus/[tracer, vm_state, utils], eth/trie/[trie_defs, db],
../nimbus/db/[db_chain, state_db], ../nimbus/p2p/executor, premixcore,
eth/common, configuration, tables, ../nimbus/vm_types, hashes
const
emptyCodeHash = blankStringHash
emptyStorageHash = emptyRlpHash

View File

@ -1,7 +1,7 @@
import
json, strutils, times, options, os,
eth/[rlp, common], httputils, nimcrypto, chronicles,
stint, byteutils
stint, stew/byteutils
import
../nimbus/[transaction, rpc/hexstrings]

View File

@ -1,7 +1,7 @@
# use this module to quickly populate db with data from geth/parity
import
eth/[common, rlp], stint, byteutils, nimcrypto,
eth/[common, rlp], stint, stew/byteutils, nimcrypto,
chronicles, downloader, configuration,
../nimbus/errors
@ -62,13 +62,13 @@ proc main() =
var numBlocks = 0
var counter = 0
while true:
while true:
var thisBlock = requestBlock(blockNumber)
headers.add thisBlock.header
bodies.add thisBlock.body
info "REQUEST HEADER", blockNumber=blockNumber, txs=thisBlock.body.transactions.len
inc numBlocks
blockNumber += one

View File

@ -1,7 +1,7 @@
import
json, downloader, stint, strutils, os,
../nimbus/tracer, chronicles, prestate,
js_tracer, eth/common, byteutils, parser,
js_tracer, eth/common, stew/byteutils, parser,
nimcrypto, premixcore
proc generateGethData(thisBlock: Block, blockNumber: Uint256, accounts: JsonNode): JsonNode =

View File

@ -1,5 +1,5 @@
import
json, downloader, stint, eth/trie/db, byteutils,
json, downloader, stint, eth/trie/db, stew/byteutils,
../nimbus/db/[db_chain, storage_types], eth/[rlp, common],
../nimbus/p2p/chain, ../nimbus/tracer

View File

@ -1,5 +1,5 @@
import
eth/[common, rlp], stint, byteutils,
eth/[common, rlp], stint, stew/byteutils,
nimcrypto, chronicles, configuration,
eth/trie/[hexary, db, trie_defs]

View File

@ -1,8 +1,8 @@
import
macros, macrocache, strutils, unittest,
byteutils, chronicles, ranges, eth/common,
macrocache, strutils, unittest,
stew/byteutils, chronicles, stew/ranges, eth/common,
../nimbus/vm/interpreter/opcode_values,
std_shims/macros_shim
stew/shims/macros
import
options, json, os, eth/trie/[db, hexary],

View File

@ -1,5 +1,5 @@
import
json, os, eth/common, stint, chronicles, byteutils, nimcrypto, eth/rlp,
json, os, eth/common, stint, chronicles, stew/byteutils, nimcrypto, eth/rlp,
eth/trie/db, ../nimbus/db/[db_chain, capturedb, storage_types, select_backend],
../nimbus/[tracer, vm_types, config],
../nimbus/p2p/chain

View File

@ -7,7 +7,7 @@
import
unittest, strformat, strutils, tables, json, ospaths, times, os,
byteutils, ranges/typedranges, nimcrypto, options,
stew/byteutils, stew/ranges/typedranges, nimcrypto, options,
eth/[rlp, common], eth/trie/[db, trie_defs], chronicles,
./test_helpers, ../nimbus/p2p/executor, test_config,
../nimbus/[constants, errors, transaction],

View File

@ -7,7 +7,7 @@
import
os, macros, json, strformat, strutils, parseutils, ospaths, tables,
byteutils, ranges/typedranges, net, eth/[common, keys, rlp, p2p],
stew/byteutils, stew/ranges/typedranges, net, eth/[common, keys, rlp, p2p],
../nimbus/[vm_state, constants, config, transaction, utils],
../nimbus/db/[db_chain, state_db],
../nimbus/vm/interpreter/[gas_costs, vm_forks],

View File

@ -1,7 +1,7 @@
import
macro_assembler, unittest, macros, strutils,
byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, ranges
stew/byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, stew/ranges
suite "Custom Opcodes Test":
let (blockNumber, chainDB) = initDatabase()

View File

@ -1,7 +1,7 @@
import
macro_assembler, unittest, macros, strutils,
byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, ranges
stew/byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, stew/ranges
suite "Environmental Information Opcodes":
let (blockNumber, chainDB) = initDatabase()

View File

@ -1,7 +1,7 @@
import
macro_assembler, unittest, macros, strutils,
byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, ranges
stew/byteutils, eth/common, ../nimbus/db/state_db,
../nimbus/db/db_chain, stew/ranges
suite "Misc Opcodes":
let (blockNumber, chainDB) = initDatabase()

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
unittest, tables, parseutils, byteutils,
unittest, tables, parseutils, stew/byteutils,
eth/trie/db, eth/common/eth_types,
../nimbus/[constants, vm_types, vm_state],
../nimbus/vm/interpreter,

View File

@ -7,7 +7,7 @@
import
unittest, json, os, tables, strformat, strutils,
eth/[common, rlp], byteutils, eth/trie/db,
eth/[common, rlp], stew/byteutils, eth/trie/db,
./test_helpers, ../nimbus/db/[db_chain, storage_types], ../nimbus/[tracer, vm_types],
../nimbus/p2p/chain

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
unittest, ../nimbus/vm/precompiles, json, byteutils, test_helpers, ospaths, tables,
unittest, ../nimbus/vm/precompiles, json, stew/byteutils, test_helpers, ospaths, tables,
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/[db_chain, state_db],
../nimbus/[constants, vm_types, vm_state], ../nimbus/vm/[computation, message], macros

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
unittest, json, strformat, options, nimcrypto, byteutils,
unittest, json, strformat, options, nimcrypto, stew/byteutils,
json_rpc/[rpcserver, rpcclient], eth/common as eth_common,
eth/[rlp, keys], eth/trie/db, eth/p2p/rlpx_protocols/eth_protocol,
../nimbus/rpc/[common, p2p, hexstrings, rpc_types],

View File

@ -1,5 +1,5 @@
import
unittest, strformat, options, byteutils, json_rpc/[rpcserver, rpcclient],
unittest, strformat, options, stew/byteutils, json_rpc/[rpcserver, rpcclient],
eth/common as eth_common, eth/[rlp, keys], eth/p2p/rlpx_protocols/whisper_protocol,
../nimbus/rpc/[common, hexstrings, rpc_types, whisper], ./test_helpers

View File

@ -6,8 +6,8 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import unittest, strutils, eth/trie/[hexary, db],
../nimbus/db/state_db, byteutils, eth/common,
ranges
../nimbus/db/state_db, stew/byteutils, eth/common,
stew/ranges
suite "Account State DB":
var

View File

@ -7,7 +7,7 @@
import
unittest, json, os, tables, strformat, strutils,
eth/common, byteutils, eth/trie/db,
eth/common, stew/byteutils, eth/trie/db,
./test_helpers, ../nimbus/db/db_chain, ../nimbus/[tracer, vm_types]
proc testFixture(node: JsonNode, testStatusIMPL: var TestStatus)

View File

@ -7,7 +7,7 @@
import
unittest, strformat, strutils, sequtils, tables, json, ospaths, times,
byteutils, ranges/typedranges, eth/[rlp, common], eth/trie/db,
stew/byteutils, stew/ranges/typedranges, eth/[rlp, common], eth/trie/db,
./test_helpers, ../nimbus/vm/interpreter,
../nimbus/[constants, errors, vm_state, vm_types, utils],
../nimbus/db/[db_chain, state_db]

View File

@ -1,5 +1,5 @@
import
json, os, eth/common, stint, chronicles, byteutils, nimcrypto,
json, os, eth/common, stint, chronicles, stew/byteutils, nimcrypto,
eth/trie/db, ../nimbus/db/[db_chain, capturedb, select_backend],
../nimbus/[tracer, vm_types, config]

@ -1 +1 @@
Subproject commit 5198930503c31f0954dbddc0d3ad9e6bd828f69f
Subproject commit b9e62a1f6c489ec7738517d08c44bff69f3bc383

@ -1 +0,0 @@
Subproject commit 8b471d9653ef93319dc6eb131227eefc9802d5d4

@ -1 +1 @@
Subproject commit faca1407a5871c71a15df601703326c18ebefc0a
Subproject commit c7905dc8a34b7c4638563263b77f91a78661da82

2
vendor/nim-eth vendored

@ -1 +1 @@
Subproject commit 69de12e636befe9a0824afe46a2fc330b3440368
Subproject commit 75c7c6265174178129a060e51a40dc40d7b2bc1a

@ -1 +1 @@
Subproject commit 34f57cb144da4d69b97732014d324c90f3d4bef7
Subproject commit 5135173f60d870717cf8021345137b0f27c75990

@ -1 +1 @@
Subproject commit e127b49cd4bae0d7176c3854145df798ddc759b2
Subproject commit f349761b7669528b2b172cac2467e86792bb8e18

1
vendor/nim-ranges vendored

@ -1 +0,0 @@
Subproject commit c90fccd0cfff5dc4c3540f460e1e6b121c3ba954

2
vendor/nim-rocksdb vendored

@ -1 +1 @@
Subproject commit 234c7d2756ccd6b4ee9e543ca8ffc2455d0da95e
Subproject commit 60faf6af17d76e3f9c5fbbc5f62a913c9b89f84c

@ -1 +1 @@
Subproject commit 6025b5d3a7eb20d6aaf42fc5ef2ed14924a176d7
Subproject commit 5c2d0c72532e3d10ff178ca2a96ac8bc6c71ad50

@ -1 +0,0 @@
Subproject commit 7fa381eb8d12a21bd1c7a1b99217b4cf8acacc46

1
vendor/nim-stew vendored Submodule

@ -0,0 +1 @@
Subproject commit 89107ae03dc15f92f68f1c6932d4517681b8c8e7

2
vendor/nim-stint vendored

@ -1 +1 @@
Subproject commit 0761f33b91a7e05afd3c1c197ab80e938aad2ae6
Subproject commit 33562884a1fdd9cc8d40a42fa4b7c6ef1f87c8d8