provide vm_precompiles as import/export wrapper

details:
  moved original vm/precompiles.nim => vm/nvm_precompiles.nim
This commit is contained in:
Jordan Hrycaj 2021-03-31 14:29:33 +01:00
parent 5ce7ca6b32
commit 7b5d00307c
No known key found for this signature in database
GPG Key ID: 4101B9BC5A0DB080
6 changed files with 41 additions and 4 deletions

View File

@ -3,7 +3,7 @@ import options, sets,
../db/[db_chain, accounts_cache],
../utils, ../constants, ../transaction,
../vm_state, ../vm_types, ../vm_state_transactions,
../vm_computation, ../vm_message, ../vm/precompiles,
../vm_computation, ../vm_message, ../vm_precompiles,
./vm_forks,
./dao, ../config

View File

@ -9,7 +9,7 @@ import
tables, macros,
chronicles,
vm/interpreter/[opcode_values, opcodes_impl, nvm_forks, nvm_gas_costs, gas_meter, utils/macros_gen_opcodes],
vm/code_stream, vm/nvm_types, errors, precompiles, vm/stack,
vm/code_stream, vm/nvm_types, errors, nvm_precompiles, vm/stack,
terminal # Those are only needed for logging
logScope:

View File

@ -12,7 +12,7 @@ import
vm/interpreter/[opcode_values, gas_meter, nvm_gas_costs, nvm_forks],
vm/[code_stream, memory, nvm_message, stack, nvm_types, nvm_state],
db/[accounts_cache, db_chain],
utils/header, precompiles,
utils/header, nvm_precompiles,
transaction_tracer, utils
when defined(chronicles_log_level):

37
nimbus/vm_precompiles.nim Normal file
View File

@ -0,0 +1,37 @@
# 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
./vm/nvm_precompiles as vmp
export
vmp.PrecompileAddresses,
vmp.activePrecompiles,
vmp.blake2bf,
vmp.blsG1Add,
vmp.blsG1Mul,
vmp.blsG1MultiExp,
vmp.blsG2Add,
vmp.blsG2Mul,
vmp.blsG2MultiExp,
vmp.blsMapG1,
vmp.blsMapG2,
vmp.blsPairing,
vmp.bn256ecAdd,
vmp.bn256ecMul,
vmp.ecRecover,
vmp.execPrecompiles,
vmp.identity,
vmp.modExp,
vmp.ripemd160,
vmp.sha256,
vmp.simpleDecode
# End

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import
unittest2, ../nimbus/vm/precompiles, json, stew/byteutils, test_helpers, os, tables,
unittest2, ../nimbus/vm_precompiles, json, stew/byteutils, test_helpers, os, tables,
strformat, strutils, eth/trie/db, eth/common, ../nimbus/db/db_chain,
../nimbus/[vm_computation, vm_types, vm_state, vm_forks], macros,
test_allowed_to_fail