From 2ca96217995eebb44f20d406cf3ec66dad5b9ac0 Mon Sep 17 00:00:00 2001 From: Jordan Hrycaj Date: Thu, 8 Apr 2021 18:29:48 +0100 Subject: [PATCH] renamed message.nim, precompiles.nim, gas_costs.nim => v2*.nim why: these files provide part of the externally accessible interface provided by vm_message.nim, vm_precompile.nim, vm_gas_cost.nim. so the new filename indicates that the source code belongs to vm2 (rather than vm). --- nimbus/vm2/computation.nim | 6 +++--- nimbus/vm2/interpreter.nim | 2 +- nimbus/vm2/interpreter/opcodes_impl.nim | 2 +- nimbus/vm2/interpreter/{gas_costs.nim => v2gas_costs.nim} | 0 nimbus/vm2/interpreter_dispatch.nim | 4 ++-- nimbus/vm2/{message.nim => v2message.nim} | 0 nimbus/vm2/{precompiles.nim => v2precompiles.nim} | 2 +- nimbus/vm2/v2state.nim | 2 +- nimbus/vm2/v2types.nim | 2 +- nimbus/vm_gas_costs.nim | 2 +- nimbus/vm_message.nim | 2 +- nimbus/vm_precompiles.nim | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) rename nimbus/vm2/interpreter/{gas_costs.nim => v2gas_costs.nim} (100%) rename nimbus/vm2/{message.nim => v2message.nim} (100%) rename nimbus/vm2/{precompiles.nim => v2precompiles.nim} (99%) diff --git a/nimbus/vm2/computation.nim b/nimbus/vm2/computation.nim index 255597e96..a593bb9e4 100644 --- a/nimbus/vm2/computation.nim +++ b/nimbus/vm2/computation.nim @@ -14,10 +14,10 @@ import chronicles, strformat, macros, options, times, sets, eth/[common, keys], ../constants, ../errors, - ./interpreter/[v2opcode_values, gas_meter, gas_costs, v2forks], - ./code_stream, ./memory, ./message, ./stack, ./v2types, ./v2state, + ./interpreter/[v2opcode_values, gas_meter, v2gas_costs, v2forks], + ./code_stream, ./memory, ./v2message, ./stack, ./v2types, ./v2state, ../db/[accounts_cache, db_chain], - ../utils/header, ./precompiles, + ../utils/header, ./v2precompiles, ./transaction_tracer, ../utils when defined(chronicles_log_level): diff --git a/nimbus/vm2/interpreter.nim b/nimbus/vm2/interpreter.nim index c3ee49069..54e2974ef 100644 --- a/nimbus/vm2/interpreter.nim +++ b/nimbus/vm2/interpreter.nim @@ -30,7 +30,7 @@ export # see vm_message import - ./message as vmm + ./v2message as vmm export vmm.isCreate diff --git a/nimbus/vm2/interpreter/opcodes_impl.nim b/nimbus/vm2/interpreter/opcodes_impl.nim index b36823270..a1a2c450e 100644 --- a/nimbus/vm2/interpreter/opcodes_impl.nim +++ b/nimbus/vm2/interpreter/opcodes_impl.nim @@ -9,7 +9,7 @@ import strformat, times, sets, sequtils, options, chronicles, stint, nimcrypto, stew/ranges/ptr_arith, eth/common, ./utils/[macros_procs_opcodes, utils_numeric], - ./gas_meter, ./gas_costs, ./v2opcode_values, ./v2forks, + ./gas_meter, ./v2gas_costs, ./v2opcode_values, ./v2forks, ../memory, ../stack, ../code_stream, ../computation, ../v2state, ../v2types, ../../errors, ../../constants, ../../db/[db_chain, accounts_cache] diff --git a/nimbus/vm2/interpreter/gas_costs.nim b/nimbus/vm2/interpreter/v2gas_costs.nim similarity index 100% rename from nimbus/vm2/interpreter/gas_costs.nim rename to nimbus/vm2/interpreter/v2gas_costs.nim diff --git a/nimbus/vm2/interpreter_dispatch.nim b/nimbus/vm2/interpreter_dispatch.nim index 003421474..1c9976018 100644 --- a/nimbus/vm2/interpreter_dispatch.nim +++ b/nimbus/vm2/interpreter_dispatch.nim @@ -8,8 +8,8 @@ import tables, macros, chronicles, - ./interpreter/[v2opcode_values, opcodes_impl, v2forks, gas_costs, gas_meter, utils/macros_gen_opcodes], - ./code_stream, ./v2types, ../errors, ./precompiles, ./stack, + ./interpreter/[v2opcode_values, opcodes_impl, v2forks, v2gas_costs, gas_meter, utils/macros_gen_opcodes], + ./code_stream, ./v2types, ../errors, ./v2precompiles, ./stack, terminal # Those are only needed for logging logScope: diff --git a/nimbus/vm2/message.nim b/nimbus/vm2/v2message.nim similarity index 100% rename from nimbus/vm2/message.nim rename to nimbus/vm2/v2message.nim diff --git a/nimbus/vm2/precompiles.nim b/nimbus/vm2/v2precompiles.nim similarity index 99% rename from nimbus/vm2/precompiles.nim rename to nimbus/vm2/v2precompiles.nim index bfe150682..d1b1ef502 100644 --- a/nimbus/vm2/precompiles.nim +++ b/nimbus/vm2/v2precompiles.nim @@ -15,7 +15,7 @@ when defined(evmc_enabled): import ./v2types, - ./interpreter/[gas_meter, gas_costs, utils/utils_numeric, v2forks], + ./interpreter/[gas_meter, v2gas_costs, utils/utils_numeric, v2forks], ../errors, stint, eth/[keys, common], chronicles, tables, macros, math, nimcrypto, bncurve/[fields, groups], ./blake2b_f, ./blscurve diff --git a/nimbus/vm2/v2state.nim b/nimbus/vm2/v2state.nim index acabf536f..ae818d26d 100644 --- a/nimbus/vm2/v2state.nim +++ b/nimbus/vm2/v2state.nim @@ -16,7 +16,7 @@ when defined(evmc_enabled): import macros, strformat, tables, sets, options, eth/[common, keys, rlp], nimcrypto/keccak, - ./interpreter/[v2forks, gas_costs], ../errors, + ./interpreter/[v2forks, v2gas_costs], ../errors, ../constants, ../db/[db_chain, accounts_cache], ../utils, json, ./transaction_tracer, ./v2types, ../config, ../../stateless/[witness_from_tree, witness_types] diff --git a/nimbus/vm2/v2types.nim b/nimbus/vm2/v2types.nim index 3ccb3363d..5ad59e3c5 100644 --- a/nimbus/vm2/v2types.nim +++ b/nimbus/vm2/v2types.nim @@ -17,7 +17,7 @@ import tables, eth/common, options, json, sets, ./memory, ./stack, ./code_stream, - ./interpreter/[gas_costs, v2opcode_values, v2forks], + ./interpreter/[v2gas_costs, v2opcode_values, v2forks], # TODO - will be hidden at a lower layer ../db/[db_chain, accounts_cache] diff --git a/nimbus/vm_gas_costs.nim b/nimbus/vm_gas_costs.nim index d7f15561e..7f0a47b0d 100644 --- a/nimbus/vm_gas_costs.nim +++ b/nimbus/vm_gas_costs.nim @@ -13,7 +13,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled): ./vm/interpreter/gas_costs as vmg else: import - ./vm2/interpreter/gas_costs as vmg + ./vm2/interpreter/v2gas_costs as vmg export vmg.Bls12381G1AddGas, diff --git a/nimbus/vm_message.nim b/nimbus/vm_message.nim index 6a2c641d4..ba447fad6 100644 --- a/nimbus/vm_message.nim +++ b/nimbus/vm_message.nim @@ -16,7 +16,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled): ./vm/message as vmm else: import - ./vm2/message as vmm + ./vm2/v2message as vmm export vmm.isCreate diff --git a/nimbus/vm_precompiles.nim b/nimbus/vm_precompiles.nim index 4df0afa1e..59b42852e 100644 --- a/nimbus/vm_precompiles.nim +++ b/nimbus/vm_precompiles.nim @@ -13,7 +13,7 @@ when defined(evmc_enabled) or not defined(vm2_enabled): ./vm/precompiles as vmp else: import - ./vm2/precompiles as vmp + ./vm2/v2precompiles as vmp export vmp.PrecompileAddresses,