merging back into original HEAD

why:
  temporary github problem caused macos crash on ci
This commit is contained in:
Jordan Hrycaj 2021-04-06 15:27:03 +01:00
commit a72f6ed6e0
No known key found for this signature in database
GPG Key ID: 4101B9BC5A0DB080
22 changed files with 55 additions and 56 deletions

View File

@ -1 +0,0 @@
path = nimbus

View File

@ -1,5 +1,5 @@
import ../db/db_chain, eth/common, chronicles, ../vm_state, ../vm_types,
../vm_computation, ../vm_message, ./vm_types2, stint, nimcrypto,
../vm_computation, ../vm_message, ../vm_types2, stint, nimcrypto,
../utils, eth/trie/db, ./executor, ../config, ../genesis, ../utils,
stew/endians2

View File

@ -4,7 +4,7 @@ import options, sets,
../utils, ../constants, ../transaction,
../vm_state, ../vm_types, ../vm_state_transactions,
../vm_computation, ../vm_message, ../vm_precompiles,
./vm_types2,
../vm_types2,
./dao, ../config
proc processTransaction*(tx: Transaction, sender: EthAddress, vmState: BaseVMState, fork: Fork): GasInt =

View File

@ -8,7 +8,7 @@
import
chronicles, strformat, strutils, sequtils, parseutils, sets, macros,
eth/common,
vm/interpreter/opcode_values
./interpreter/opcode_values
logScope:
topics = "vm code_stream"

View File

@ -8,12 +8,12 @@
import
chronicles, strformat, macros, options, times,
sets, eth/[common, keys],
constants, errors,
vm/interpreter/[opcode_values, gas_meter, gas_costs, vm_forks],
vm/[code_stream, memory, message, stack, types, state],
db/[accounts_cache, db_chain],
utils/header, precompiles,
transaction_tracer, utils
../constants, ../errors,
./interpreter/[opcode_values, gas_meter, gas_costs, vm_forks],
./code_stream, ./memory, ./message, ./stack, ./types, ./state,
../db/[accounts_cache, db_chain],
../utils/header, ./precompiles,
./transaction_tracer, ../utils
when defined(chronicles_log_level):
import stew/byteutils

View File

@ -5,7 +5,7 @@
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import evmc/evmc, vm/evmc_helpers, eth/common, constants
import evmc/evmc, ./evmc_helpers, eth/common, ../constants
type
# we are not using EVMC original signature here

View File

@ -10,21 +10,21 @@
# see vm_opcode_value
import
./vm/interpreter/opcode_values as vmo
./interpreter/opcode_values as vmo
export
vmo.Op
# see vm_forks
import
vm/interpreter/vm_forks as vmf
./interpreter/vm_forks as vmf
export
vmf.Fork
# see vm_message
import
./vm/message as vmm
./message as vmm
export
vmm.isCreate
@ -32,7 +32,7 @@ export
# see vm_computation
import
./vm/computation as vmc
./computation as vmc
export
vmc.accountExists,
vmc.addLogEntry,
@ -79,7 +79,7 @@ export
import
vm/interpreter/gas_meter as gmt
./interpreter/gas_meter as gmt
export
gmt.consumeGas,
gmt.init,
@ -88,7 +88,7 @@ export
import
vm/code_stream as cst
./code_stream as cst
export
cst.CodeStream,
cst.`$`,
@ -110,7 +110,7 @@ export
import
vm/stack as stk
./stack as stk
export
stk.Stack,
stk.`$`,

View File

@ -7,8 +7,8 @@
import
math, eth/common/eth_types,
vm/interpreter/utils/[macros_gen_opcodes, utils_numeric],
vm/interpreter/[opcode_values, vm_forks], errors
./utils/[macros_gen_opcodes, utils_numeric],
./opcode_values, ./vm_forks, ../../errors
when defined(evmc_enabled):
import evmc/evmc

View File

@ -7,7 +7,7 @@
import
chronicles, strformat, eth/common, # GasInt
errors, vm/types
../../errors, ../types
logScope:
topics = "vm gas"

View File

@ -5,7 +5,7 @@
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import vm/interpreter/utils/macros_gen_opcodes
import ./utils/macros_gen_opcodes
fill_enum_holes:
type

View File

@ -8,14 +8,14 @@
import
strformat, times, sets, sequtils, options,
chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common,
vm/interpreter/utils/[macros_procs_opcodes, utils_numeric],
vm/interpreter/[gas_meter, gas_costs, opcode_values, vm_forks],
vm/[memory, stack, code_stream, computation, state, types],
errors, constants,
db/[db_chain, accounts_cache]
./utils/[macros_procs_opcodes, utils_numeric],
./gas_meter, ./gas_costs, ./opcode_values, ./vm_forks,
../memory, ../stack, ../code_stream, ../computation, ../state, ../types,
../../errors, ../../constants,
../../db/[db_chain, accounts_cache]
when defined(evmc_enabled):
import vm/evmc_api, vm/evmc_helpers, evmc/evmc
import ../evmc_api, ../evmc_helpers, evmc/evmc
logScope:
topics = "opcode impl"

View File

@ -10,12 +10,12 @@
import
macros, strformat, stint, eth/common,
vm/[computation, stack, code_stream, memory],
vm/types, errors, vm/interpreter/[gas_meter, opcode_values],
vm/interpreter/utils/utils_numeric
../../computation, ../../stack, ../../code_stream, ../../memory,
../../types, ../../../errors, ../gas_meter, ../opcode_values,
./utils_numeric
when defined(evmc_enabled):
import vm/evmc_api, evmc/evmc
import ../../evmc_api, evmc/evmc
proc pop(tree: var NimNode): NimNode =
## Returns the last value of a NimNode and remove it

View File

@ -9,7 +9,7 @@ import
macros,
stew/endians2, stew/ranges/ptr_arith,
eth/common/eth_types,
constants
../../../constants
type
# cannot use range for unknown reason

View File

@ -8,8 +8,8 @@
import
tables, macros,
chronicles,
vm/interpreter/[opcode_values, opcodes_impl, vm_forks, gas_costs, gas_meter, utils/macros_gen_opcodes],
vm/code_stream, vm/types, errors, precompiles, vm/stack,
./interpreter/[opcode_values, opcodes_impl, vm_forks, gas_costs, gas_meter, utils/macros_gen_opcodes],
./code_stream, ./types, ../errors, ./precompiles, ./stack,
terminal # Those are only needed for logging
logScope:

View File

@ -8,8 +8,8 @@
import
sequtils,
chronicles, eth/common/eth_types,
errors, validation,
vm/interpreter/utils/utils_numeric
../errors, ../validation,
./interpreter/utils/utils_numeric
logScope:
topics = "vm memory"

View File

@ -5,7 +5,7 @@
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import vm/types
import ./types
proc isCreate*(message: Message): bool =
message.kind in {evmcCreate, evmcCreate2}

View File

@ -1,8 +1,8 @@
import
vm/types,
vm/interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks],
errors, stint, eth/[keys, common], chronicles, tables, macros,
math, nimcrypto, bncurve/[fields, groups], vm/blake2b_f, vm/blscurve
./types,
./interpreter/[gas_meter, gas_costs, utils/utils_numeric, vm_forks],
../errors, stint, eth/[keys, common], chronicles, tables, macros,
math, nimcrypto, bncurve/[fields, groups], ./blake2b_f, ./blscurve
type
PrecompileAddresses* = enum

View File

@ -7,7 +7,7 @@
import
chronicles, strformat, strutils, sequtils, macros, eth/common, nimcrypto,
errors, validation
../errors, ../validation
logScope:
topics = "vm stack"

View File

@ -11,10 +11,10 @@
import
macros, strformat, tables, sets, options,
eth/[common, keys, rlp], nimcrypto/keccak,
vm/interpreter/[vm_forks, gas_costs], errors,
constants, db/[db_chain, accounts_cache],
utils, json, vm/[transaction_tracer, types],
config, ../stateless/[witness_from_tree, witness_types]
./interpreter/[vm_forks, gas_costs], ../errors,
../constants, ../db/[db_chain, accounts_cache],
../utils, json, ./transaction_tracer, ./types,
../config, ../../stateless/[witness_from_tree, witness_types]
proc newAccessLogs*: AccessLogs =
AccessLogs(reads: initTable[string, string](), writes: initTable[string, string]())

View File

@ -7,9 +7,9 @@
import
options, sets,
eth/common, chronicles, db/accounts_cache,
transaction,
vm/[computation, interpreter, state, types]
eth/common, chronicles, ../db/accounts_cache,
../transaction,
./computation, ./interpreter, ./state, ./types
proc validateTransaction*(vmState: BaseVMState, tx: Transaction, sender: EthAddress, fork: Fork): bool =
let balance = vmState.readOnlyStateDB.getBalance(sender)

View File

@ -1,9 +1,9 @@
import
json, strutils, sets, hashes,
chronicles, nimcrypto, eth/common, stint,
vm/[types, memory, stack], db/accounts_cache,
./types, ./memory, ./stack, ../db/accounts_cache,
eth/trie/hexary,
vm/interpreter/opcode_values
./interpreter/opcode_values
logScope:
topics = "vm opcode"

View File

@ -11,14 +11,14 @@
import
tables, eth/common,
options, json, sets,
vm/[memory, stack, code_stream],
vm/interpreter/[gas_costs, opcode_values, vm_forks],
./memory, ./stack, ./code_stream,
./interpreter/[gas_costs, opcode_values, vm_forks],
# TODO - will be hidden at a lower layer
db/[db_chain, accounts_cache]
../db/[db_chain, accounts_cache]
when defined(evmc_enabled):
import
./vm/evmc_api
./evmc_api
type
VMFlag* = enum