re-named some v2state_transactions.nim to its original name without the v2

also:
  re-integrated stack_defs.nim back into stack.nim

why:
  the v2 prefix of the file name was used as a visual aid when
  comparing vm2 against vm sources
This commit is contained in:
Jordan Hrycaj 2021-04-23 10:45:50 +01:00 committed by zah
parent e6eee3f3a6
commit 69a1ee5fc8
8 changed files with 13 additions and 31 deletions

View File

@ -112,10 +112,9 @@ export
import
./stack_defs as sdf,
./stack as stk
export
sdf.Stack,
stk.Stack,
stk.`$`,
stk.`[]`,
stk.dup,

View File

@ -18,7 +18,7 @@ import
../forks_list,
../op_codes,
../../memory,
../../stack_defs,
../../stack,
eth/common/eth_types,
sets

View File

@ -7,11 +7,17 @@
import
chronicles, strformat, strutils, sequtils, macros, eth/common, nimcrypto,
../errors, ../validation, ./stack_defs
../errors, ../validation
logScope:
topics = "vm stack"
type
Stack* = ref object of RootObj
values*: seq[StackElement]
StackElement = UInt256
template ensureStackLimit: untyped =
if len(stack.values) > 1023:
raise newException(FullStack, "Stack limit reached")

View File

@ -1,23 +0,0 @@
# Nimbus
# Copyright (c) 2018 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)
# * 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
stint
export
UInt256
type
StackElement* = UInt256
Stack* = ref object of RootObj
values*: seq[StackElement]
# End

View File

@ -31,9 +31,9 @@ when not breakCircularDependency:
../constants,
../db/accounts_cache,
./computation,
./interpreter/gas_costs,
./state,
./types,
./interpreter/gas_costs,
eth/common
else:

View File

@ -11,7 +11,7 @@
import
tables, eth/common,
options, json, sets,
./stack_defs, ./memory, ./code_stream,
./stack, ./memory, ./code_stream,
./interpreter/[gas_costs, op_codes, forks_list],
# TODO - will be hidden at a lower layer
../db/[db_chain, accounts_cache]

View File

@ -16,7 +16,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
else:
import
./vm2/v2state_transactions as vmx,
./vm2/state_transactions as vmx,
./vm2/state as vms
export
vmx.setupTxContext

View File

@ -13,7 +13,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled):
vm/state_transactions as vmx
else:
import
vm2/v2state_transactions as vmx
vm2/state_transactions as vmx
export
vmx.execComputation,