jangko
6d266178d7
London HF: bump ethereum/tests submodule
...
This commit concludes a series of London related PRs
fixes #716
2021-06-30 20:44:35 +07:00
jangko
c858148a43
fix test_graphql because of London HF changes
2021-06-30 20:44:35 +07:00
jangko
d47be9047f
London: fix test_blockchain_json and test_generalstate_json
...
new London HF requires update to test code
2021-06-30 20:41:29 +07:00
jangko
4a188788bd
preparation for EIP-1559 implementation
...
- unify signTx in test_helper and signTransaction in rpc_utils
and put it into transaction.nim
- clean up mess by previous EIP-2930
2021-06-29 07:33:48 +07:00
Jordan Hrycaj
a49a812879
Jordan/fix some failing nohive tests ( #727 )
...
* continue importing rlp blocks
why:
a chain of blocks to be imported might have legit blocks
after rejected blocks
details:
import loop only stops if the import list is exhausted or if there
was a decoding error. this adds another four to the count of successful
no-hive tests.
* verify DAO marked extra data field in block header
why:
was ignored, scores another two no-hive tests
* verify minimum required difficulty in header validator
why:
two more nohive tests to succeed
details:
* subsumed extended header tests under validateKinship() and renamed it
more appropriately validateHeaderAndKinship()
* enhanced readability of p2p/chain.nim
* cleaned up test_blockchain_json.nim
* verify positive gasUsed unless no transactions
why:
solves another to nohive tests
details:
straightened test_blockchain_json chech so there is no unconditional
rejection anymore (based on the input test scenario)
2021-06-24 16:29:21 +01:00
jangko
2269d16c4c
reintegrate test_rpc back into all_tests
...
for a long time, test_rpc will crash all_tests
if they are combined together. but now it works fine
2021-06-22 08:32:32 +07:00
jangko
3a826b8406
replace all unittest usage with unittest2
...
- test_graphql
- test_rpc
- test_hexstrings
fixes #691
2021-06-21 20:30:01 +07:00
jangko
d0782cdb0d
fixes some of graphql resolver
...
following recent fixes in upstream hive,
we also update our graphql resolvers
2021-06-17 18:18:28 +07:00
Jordan Hrycaj
82e6cd991d
maintenance update
...
why:
some handy features were intended to support the unit test from
the clique/clique_test.go source (the other one is from
clique/snapshot_test.go.)
as this test cannot realistically be implemented without the full
api (includes mining support), it is left as that
2021-06-17 08:03:57 +01:00
Jordan Hrycaj
90b012ad3f
clarify epoch sync handling (effectively a comment update only)
...
why:
autorisation list verification is performed in the main module along
with other header verifications
2021-06-17 08:03:57 +01:00
Jordan Hrycaj
dd7ca174f0
all snapshot unit tests succeed
...
details:
for extra verbosity compile as: nim c -r -d:debug [..] test_clique.nim
2021-06-17 08:03:57 +01:00
Jordan Hrycaj
61e460c125
Most snapshot unit tests work
...
details:
three test cases still fail which are skipped
test suite is linked to all_tests list
2021-06-17 08:03:57 +01:00
Jordan Hrycaj
87edd80557
Update snapshot smoke test
...
details:
can initialise & load all tests
todo:
double check tests that are supposed to return error
follow up succesful voting results
2021-06-17 08:03:57 +01:00
Jordan Hrycaj
1de2cc1a77
Basic tests for Clique PoA/Consensus engine
...
details:
test scenario from eip-225 reference implementation,
set up unittes2 test framework
smoke test for first sample ok (not functional yet)
2021-06-17 08:03:57 +01:00
Jamie Lokier
168e69080b
Tests: Disable precompile fixtures when ENABLE_EVMC=1
...
The precompile fixture tests (`test_precompiles.nim`) are now incompatible with
ENABLE_EVMC=1, because `noTransfer` does not work with the new EVMC path.
This will start working again after the host/EVM context rework (needed for
other reasons anyway), but for now disable these tests so that other work can
continue.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 18:29:40 +01:00
Jamie Lokier
7c90d8de70
EVM: Remove `vm_forks` everywhere, use common forks list instead
...
The common forks list was already used, redirected via `vm_forks` for
historical compatibility. Remove the old `vm_forks` now and divert all imports
to the common forks list outside the EVM.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 15:36:31 +01:00
Jamie Lokier
aee0fe39d2
EVM: Remove `vm_types2` everywhere, use common forks list instead
...
File `vm_types2` is obsolete. Remove this file and divert all imports to the
common forks list outside the EVM, or in some cases they don't need it anyway.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 15:36:31 +01:00
Jamie Lokier
84269ddccf
Forks: Use capitalized names again for presentation (logging etc.)
...
Fork names were originally capitalized, and were made lower case by @narimiran
in commit 36a7519
to satisfy `parseEnum` in some tests. Restore the
capitalization and make the tests work with it.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 15:36:31 +01:00
Jamie Lokier
775231eef1
EVM: Apply EIP-6 in the code (affects both vm and vm2)
...
The rationale in EIP-6[1] for changing names to `selfDestruct` applies to code
as much as it does to specs. Also, Ethereum uses the new names consistently,
so it's useful for our code to match the terms used in later EIP specs and
testsuite entries.
This change is straightforward, and is a prerequisite for patches to come that
do things with the `selfDestruct` fields.
[1] https://eips.ethereum.org/EIPS/eip-6
Hudson Jameson, "EIP-6: Renaming SUICIDE opcode," Ethereum Improvement
Proposals, no. 6, November 2015.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-08 15:36:30 +01:00
Jamie Lokier
3ba22809f0
Whisper: Remove all Whisper tests and test support
...
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-01 18:12:47 +01:00
Jamie Lokier
5e718bcbe2
EVM: Remove most unused imports of `vm_*` files
...
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-06-01 16:54:38 +01:00
Jamie Lokier
f4de9d3c80
Tests: Use `ZERO_ADDRESS` in precompile tests
...
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-27 12:16:27 +01:00
Jamie Lokier
78233a4edc
Tests: Explain rules of "to" for call/create, use `ZERO_ADDRESS`
...
The conditions mentioned in the old TODO comment have been checked. All
fixtures have either 40 hex digits or empty string for "to". There is a test
with all-zeros, and it means send to that account, not contract creation.
Empty string means contract creation.
This patch does not change the relaxed parsing where fewer than 40 digits is
accepted. We should probably be stricter about this.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-27 12:15:02 +01:00
jangko
91b50235b0
add assertion guard in test_blockchain_json's parseBlock function
...
we don't want any surprice because of unrecognized key in test fixture
classified as `hasException`.
2021-05-26 15:46:04 +01:00
Jordan Hrycaj
e5947f4db6
Deep copy semantics for LRU cache
...
why:
follows standard nim semantics
details:
changed Table to TableRef in previous patch which was the
wrong choice (see andri's comment.)
2021-05-26 11:12:52 +01:00
Jordan Hrycaj
7b72109afa
Use sorted RLP serialisation for LRU cache
...
why:
previously, table data were stored with the table iterator. while
loading a table with permuted entries will always reconstruct equivalent
tables (in the sense of `==`), serialisation data are not comparable.
this patch produces always the same serialised data for equivalent
tables.
2021-05-26 07:58:12 +01:00
Jordan Hrycaj
b83b47e541
LRU cache tests makeover
...
why:
source-local unit tests would hardly be triggered by github CI as rightly
criticised with the last patch.
details:
source-local unit tests have been moved to tests folder.
this version also contains rlp serialisation code so rlp encode/decode
will apply tranparently. this is not needed in p2p/validate but will be
useful with the clique protocol.
2021-05-26 07:58:12 +01:00
Jordan Hrycaj
3663b1603f
pulled out cache logic into separate file
...
why:
handy to re-use, eg. for upcoming clique implementation
2021-05-24 07:57:21 +01:00
Jordan Hrycaj
d6a5cecb98
re-wrote validation with exceptionless functions
...
why:
exceptions were from test code should be avoided in production code
2021-05-24 07:57:21 +01:00
Jordan Hrycaj
40c7bdfc06
update lookup cache management
...
details:
enable fifo behaviour, using cache as argument
2021-05-24 07:57:21 +01:00
Jordan Hrycaj
ce8e5511e3
backport from test_blockchain_json, see issue #666
2021-05-24 07:57:21 +01:00
jangko
a0d10f5728
drop PublicNetwork enum usage and replace it with NetworkId
...
we cannot limit the `--networkid` switch to values available in
`PublicNetwork` enum. it should able to accept very wide range of
custom NetworkId.
2021-05-20 14:04:16 +07:00
jangko
0ecf9fe1af
add more query fields and resolvers to graphql api
...
after EIP2718/EIP2930, we have additional fields:
type AccessTuple {
address: Address!
storageKeys : [Bytes32!]
}
type Transaction {
r: BigInt!
s: BigInt!
v: BigInt!
# Envelope transaction support
type: Int
accessList: [AccessTuple!]
}
close #606
2021-05-18 07:32:03 +07:00
jangko
43bc010c9c
remove test_vm_json
...
reason:
- they already covered by test_blockchain_json
and test_generalstate_json.
- new ethereum/tests already remove them,
nothing to tests anymore
2021-05-17 11:14:34 +07:00
jangko
77272544c0
fixes test_helper's jsonTestImpl
...
when a skipped test case not in the skip list
but skipped using `testStatusIMPL`, the generated
markdown file list it as failed.
now that bug is fixed.
2021-05-17 11:14:33 +07:00
jangko
224b1e833b
bump ethereum/tests submodule
...
reason: allow EIP-2930 test cases to participate in test
2021-05-17 01:30:44 +07:00
jangko
79a52b11fd
fixes test_blockchain_json: better error message
...
also remove local EthBlock type and use EthBlock from nim-eth/common
2021-05-17 01:29:03 +07:00
jangko
76543da456
disable EIP-2537: Precompile for BLS12-381 curve operations
...
reason: not included in berlin hard fork
but we keep the code around, for future inclusion
2021-05-17 01:29:03 +07:00
jangko
3ccc4642f2
disable EIP-2315: Simple Subroutines for the EVM
...
reason: not included in berlin hard fork
2021-05-17 01:29:03 +07:00
jangko
6fc3df637c
reenable EIP-2565: modExp gas cost
...
now it's officially included in berlin hard fork
2021-05-17 01:28:31 +07:00
jangko
a2712c5c7a
eip2718: fixes test_rpc.nim
2021-05-15 18:09:36 +07:00
jangko
79044f1e92
eip2718: test_blockchain_json pass test
2021-05-15 18:09:35 +07:00
jangko
2a9c3982d9
remove code duplication from test_blockchain_json
...
now test_blockchain_json is using block validation code
from p2p/executor.nim instead of using it's own
block validation code.
this will reduce maintenance cost and fixes #592 .
2021-05-14 15:37:30 +07:00
jangko
db65f92e66
refactor vmConfiguration in test_blockchain_json
...
instead of using it's own blockNumber to Fork calculation,
we switch to ChainConfig to Fork to ensure smooth transition
when using common block validator.
2021-05-14 15:37:29 +07:00
jangko
beb274d98c
remove unnecessary codes from test_blockchain_json
...
except for genesis block, we are not parsing block header from json
node anymore.
we parse block headers from block RLP, it is the same thing.
2021-05-14 15:37:29 +07:00
jangko
f2491e6307
fixes crappy custom genesis and chain config parser
...
instead of using stdlib/json, now we switch to json_serialization
the result is much tidier code and more robust when parsing
optional fields.
fixes #635
2021-05-13 16:04:08 +07:00
jangko
97f4226171
update berlin fork number in config.nim
...
also update test_forkid because of berlin changes
2021-05-12 17:24:27 +07:00
jangko
5ee918f4ef
fixes test_graphql crash due to recent changes related to `chainId`
...
now test_graphql takes another route to initialize the empty db
that is safer instead of bypassing commonly used route.
2021-05-12 09:45:09 +07:00
jangko
2d3d450075
fixes `validateFixedLenHex` in graphql/ethapi.nim
...
now it can detect too long hex besides padding too short hex
2021-05-12 08:12:26 +07:00
jangko
d0546becfb
add query complexity calculator to graphql/ethapi
...
this will allow us to pass two more hive tests
2021-05-10 22:22:04 +07:00
jangko
ad1edd9af6
fixes graphql test cases
...
after recent bugfix in graphql resolvers, many of
test cases need to updated too
2021-05-05 11:20:12 +07:00
Jamie Lokier
1574136a25
Precompiles: Change precompile tests to use fixtureCallEvm
...
Move the EVM setup and call in precompile tests to `fixtureCallEvm` in
`call_evm`. Extra return values needed for testing are returned specially, and
the convention for reporting gas used is changed to match `asmCallEvm`.
Although the precompile tests used `execPrecompiles` before, `executeOpcodes`
does perfectly well as a substitute, allowing `fixtureCallEvm` to be shared.
_Significantly, this patch also makes `Computation` more or less an internal
type of the EVM now._
Nothing outside the EVM (except `call_evm`) needs access any more to
`Computation`, `execComputation`, `executeOpcodes` or `execPrecompiles`.
Many imports can be trimmed, some files removed, and EVMC is much closer.
(As a bonus, the functions in `call_evm` reveal what capabilities parts of the
program have needed over time, makes certain bugs and inconsistencies clearer,
and suggests how to refactor into a more useful shared entry point.)
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-05 02:31:46 +01:00
Jamie Lokier
236a65d598
Fixtures: Make fixture "vm json tests" use new function fixtureCallEvm
...
Move the EVM setup and call in fixtures "vm json tests" to new function
`fixtureCallEvm` in `call_evm`. Extra return values needed for testing are
returned specially.
This entry point is different from all other `..CallEvm` type functions,
because it uses `executeOpcodes` instead of `execComputation`, so it doesn't
update the account balance or nonce on entry and exit from the EVM.
The new code is a bit redundant and simplistic intentionally, as the purpose is
to move functionality to `call_evm` with high confidence nothing really
changed. The calls will be jointly refactored afterwards to merge differences.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-04 15:21:15 +01:00
Jamie Lokier
9e99bb6cd9
Fixtures: Prepare fixtureSetupComputation to support fixtureCallEvm
...
In the `text_vm_json` ("fixtures") test code, there is another variant of
`rpcSetupComputation` and `txSetupComputation` with slightly different
paremeters. The similarity is obvious.
It is a special setup for testing, though, as it requires slightly different
parameters.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-04 15:21:14 +01:00
jangko
39ce2390ae
fixes `getRecipient`: using `sender` param instead of calculating sender itself
...
usually, there is always a sender around `getRecipient` call.
no need to recalculate sender. and more important, in some of
JSON-RPC/GraphQL call, the sender is come from `rpcCallData`,
not from `tx.getSender`. or in ohter situation when the tx is
an unsigned tx, without `r,s,v` fields to calculate sender.
2021-05-04 15:31:47 +07:00
jangko
c46b7186ca
update graphql test case because of bugfixes in nim-graphql
...
recent introspection bugfixes in nim-graphql alter the result
of introspection system.
2021-05-04 14:26:10 +07:00
jangko
10142ad711
add missing `disableParamFiltering` in test_graphql.nim
...
if there is no `disableParamFiltering()`, and the test is run via
all_tests.nim, no test unit will be executed
2021-05-04 13:03:08 +07:00
Jamie Lokier
d2586c3a73
Assembler: Make macro_assembler tests use new function asmCallEvm
...
Move the EVM setup and call in `macro_assembler` (`runVM`) entirely to new
function `asmCallEvm` in `call_evm`. Extra return values needed for
testing are returned specially from `asmCallEvm`.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-04 01:36:00 +01:00
Jamie Lokier
834449d943
Assembler: Second asmSetupComputation, calls the first
...
The second `asmSetupComputation looks up state by block number and preceding
block number, modifies the first transaction with code for testing, and uses
some parts of that transaction to setup an an EVM test.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-04 01:03:55 +01:00
Jamie Lokier
5728491d60
Assembler: First asmSetupComputation to support asmCallEvm
...
In the `macro_assembler` test code, `initComputation` is another variant of
`rpcSetupComputation` and `txSetupComputation` with slightly different
paremeters. The similarity is obvious.
It is a special setup for testing, though, as it requires a contract-creation
transaction for parameters, but sets up a `CALL` execution not `CREATE`.
Gather this into `call_evm`: `initComputation` -> `asmSetupComputation`.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-04 01:03:55 +01:00
Jordan Hrycaj
59d7ba1f1e
print compiler warning about the VM used
...
why:
handy to have confirmation about which of the three different VMs
is activated
2021-04-28 15:24:14 +03:00
jangko
639674d341
add disableParamFiltering() to both test_generalstate_json and test_blockchain_json
...
disableParamFiltering() is called in test_all, so its ok when
called via test_all. but when test_generalstate_json or
test_blockchain_json is called independently, and we are using
command line switch, the default param handler from std/unittest
will interfere. hence need to disable it.
2021-04-25 12:20:03 +07:00
jangko
a95cec3aa8
add graphql test suite
2021-04-24 11:01:56 +07:00
Jamie Lokier
8a806da600
Bugfix: Fix blockchain tests: It was quietly skipping 4654 of them
...
The "new block chain json tests" were being skipped on Linux, but silently so
that CI didn't notice. These are a significant part of the Ethereum test suite.
See the missing output from `make test`, also visible in CI logs for Linux
targets (prior to this commit):
[OK] tests/fixtures/eth_tests/TransactionTests/ttGasPrice/TransactionWithGasPriceOverflow.json
[OK] tests/fixtures/eth_tests/TransactionTests/ttGasPrice/TransactionWithHighGasPrice.json
[Suite] new block chain json tests
<-- nothing here
[Suite] Fork ID tests
[OK] MainNet
[OK] RopstenNet
Commit 3d468a7
(`fixes path pointing to eth_tests`) renamed the JSON fixture
source directoryf in the witness-builder tests but not the regular blockchain
tests. As a result, searching for JSON test files yielded zero results. To
make this less likely in future, zero results is now an error.
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-04-08 16:40:53 +01:00
Jordan Hrycaj
c8582583ef
merge vm_memory, vm_interpreter, and vm_utils_numeric => vm_internals
...
why:
currently used for tests only
2021-03-31 18:15:27 +01:00
Jordan Hrycaj
00ba7a2718
merge vm_forks and vm_opcode_values => vm_type2
...
why:
all types, but they cannot be merged int vm_types because of a circular
dependency.
2021-03-31 17:53:15 +01:00
Jordan Hrycaj
7c28d5d362
provide vm_utils_numeric as import/export wrapper
...
details:
moved original vm/interpreter/utils/utils_numeric.nim => vm/interpreter/utils/utils_numeric.nim
2021-03-31 16:49:07 +01:00
Jordan Hrycaj
99568c9b46
provide vm_opcode_values as import/export wrapper
...
details:
moved original vm/interpreter/opcode_values.nim => vm/interpreter/nvm_opcode_values.nim
2021-03-31 16:49:03 +01:00
Jordan Hrycaj
cf63b9b03f
provide vm_memory as import/export wrapper
...
details:
moved original vm/memory.nim => vm/nvm_memory.nim
2021-03-31 16:48:44 +01:00
Jordan Hrycaj
7b5d00307c
provide vm_precompiles as import/export wrapper
...
details:
moved original vm/precompiles.nim => vm/nvm_precompiles.nim
2021-03-31 16:47:15 +01:00
Jordan Hrycaj
5ce7ca6b32
provide vm_interpreter as import/export wrapper
...
details:
moved original vm/interpreter.nim => vm/nvm_interpreter.nim
2021-03-31 16:47:08 +01:00
Jordan Hrycaj
eee24de450
provide vm_message as import/export wrapper
...
details:
moved original vm/message.nim => vm/nvm_message.nim
2021-03-31 16:47:02 +01:00
Jordan Hrycaj
cf3a356d76
provide vm_computation as import/export wrapper
...
details:
moved original vm/computation.nim => vm/nvm_computation.nim
2021-03-31 16:38:10 +01:00
Jordan Hrycaj
3a3e4d5707
provide vm_forks as import/export wrapper
...
details:
moved original vm/interpreter/vm_forks.nim => vm/interpreter/nvm_forks.nim
2021-03-31 16:03:34 +01:00
jangko
8486c1834c
fixes #558 , use distinct uint for ChainId and NetworkId to prevent confusion
2021-02-14 11:01:27 +07:00
jangko
5248be1766
bump eth_tests to pre YOLO v3
2021-02-03 14:31:16 +07:00
jangko
b6ad47f3a4
fixes evmc bug and add github action job to test evmc
2021-01-20 11:50:07 +07:00
jangko
03bed02512
split legacy and new test to save time
2021-01-14 23:22:28 +07:00
jangko
ad284e3d25
fixes EIP2929 SLOAD
2021-01-14 23:22:28 +07:00
jangko
f6c44ffcc0
fixes EIP2929 CALL opCode
2021-01-14 23:22:28 +07:00
jangko
9709525916
fix byzantium bug related to revertPrecompileTouched
2021-01-13 08:08:56 +07:00
jangko
15cacc749d
clean up EIP2929 for test
2021-01-12 16:17:00 +07:00
jangko
f906d177f4
add comments about disabled EIPs
2021-01-11 15:33:30 +07:00
jangko
f2b483d6ad
access list implementation
2021-01-11 14:54:55 +07:00
jangko
08c8b12821
bump eth_tests
2021-01-11 14:54:33 +07:00
jangko
8f7e45fa08
fixes test codes
2021-01-11 14:54:11 +07:00
jangko
16dd053a72
bump eth_tests
2021-01-06 21:46:16 +07:00
jangko
3d468a7a4c
fixes path pointing to eth_tests
2021-01-06 21:45:48 +07:00
jangko
74cccdfe9e
fixes test codes to deal with eth_tests submodule
2021-01-06 17:02:19 +07:00
jangko
c0db998947
add eth_tests submodule
2021-01-06 17:01:46 +07:00
jangko
18bfd34d84
remove some of json fixtures
2021-01-06 17:01:03 +07:00
Ștefan Talpalaru
5e17bd5e16
test_precompiles: fix enum case
...
This fixes compilation with Nim-1.4.2.
2020-12-09 04:04:27 +01:00
andri lim
de12fb3c94
Merge pull request #546 from status-im/eip2537
...
Eip2537 implementation
2020-12-02 20:39:24 +07:00
jangko
0799b4534c
EIP2537 part 2
2020-11-28 23:13:10 +07:00
jangko
c1b7ae5b02
EIP2537 part 1
2020-11-27 21:42:17 +07:00
narimiran
73c4837d0d
change case of `berlin`
...
In `vm_forks.nim`, `FkBerlin`'s value is (lowercase) `"berlin"`.
Another example of using lowercase in similar code:
`constantinople` in `test_op_bit.nim`
2020-11-27 09:50:28 +01:00
andri lim
360b74327e
Merge pull request #544 from status-im/precompiles_test_rework
...
Precompiles test rework
2020-11-26 10:34:26 +07:00
jangko
92fec713db
add EIP2537 test vectors
2020-11-25 20:55:53 +07:00
jangko
971e00e580
precompile contracts test rework
2020-11-25 20:42:15 +07:00
jangko
a263e6b1a6
implement EIP2315 tests
2020-11-25 18:23:02 +07:00
jangko
5bb6418bcb
implement EIP2565
2020-11-24 16:19:02 +07:00
jangko
97f73fd03d
implement EIP 2046
2020-11-19 14:23:07 +07:00
jangko
f987e86562
implement more eth rpc
2020-07-30 14:21:11 +07:00
jangko
9c38266ba7
implement eth_estimateGas
2020-07-29 12:42:32 +07:00
jangko
c9802edfce
setup block and state env for more complex eth rpc tests
2020-07-28 23:48:45 +07:00
jangko
d089a61539
add compiletime evm bytecode generator to macro_assembler
2020-07-24 19:54:27 +07:00
jangko
bb89a296dd
implement eth_signTransaction, eth_sendTransaction, eth_sendRawTransaction, eth_call
2020-07-24 19:44:36 +07:00
jangko
7819dae7ce
implement eth_signTransaction
2020-07-23 22:30:42 +07:00
jangko
f82dff64fa
implement more eth rpc and keystore management
2020-07-23 14:54:32 +07:00
jangko
336efdb0c3
implement web3, net, and some eth namespace rpc
2020-07-22 23:57:55 +07:00
jangko
165f9fea2e
reduce warnings
2020-07-21 13:15:06 +07:00
jangko
91eb5db346
save some CI time by combining tools build
2020-07-21 11:28:03 +07:00
jangko
845671bf0a
fix compilation error following breaking changes in nim-eth
2020-07-20 13:50:05 +07:00
jangko
e37cacd8f1
implement forkid calculation and tests for each supported network
2020-07-04 13:23:09 +07:00
jangko
12ddfee675
fix compilation error related to lib-secp256k1 changes
2020-06-24 17:07:33 +07:00
jangko
49460b6b1e
move buildWitness from test_blockchain_json to vm_state
2020-06-18 13:16:38 +07:00
jangko
3947e9a853
piggyback generate block witness test on test_blockchain_json
2020-06-06 10:26:36 +07:00
jangko
8efcfd32d8
fix test_rpc: switch state_db to accounts_cache
2020-06-01 20:37:00 +07:00
jangko
8ee0ab4e89
fix macro_assembler -> add call to acounts_cache.persist
2020-06-01 13:58:14 +07:00
jangko
844071033a
fix at various places related to missing accounts_cache.persist call
2020-06-01 13:45:32 +07:00
jangko
079579c1cb
fix test_blockchain_json -> add a call to accounts_cache.persist
2020-06-01 12:00:36 +07:00
jangko
46e9c11d3f
fix test_generalstate_json -> add a call to accounts_cache.persist
2020-06-01 11:49:56 +07:00
jangko
9cce8d695b
fix test_helpers -> add a call to accounts_cache.persist
2020-06-01 11:28:27 +07:00
jangko
71514a0a66
replace state_db with accounts_cache
2020-05-30 10:14:59 +07:00
jangko
7c0d24a648
add instruction comment for test_fuzz
2020-05-20 12:41:05 +07:00
jangko
9d101948ab
use 'const' instead of 'let' for module names in all_tests
2020-05-20 11:43:46 +07:00
jangko
048c8a41f1
all_tests now print the name of failed module instead of only index number
2020-05-20 11:35:27 +07:00
andri lim
7a0215608e
Merge pull request #496 from status-im/stateless_client_experiment
...
[WIP] Stateless client experiment: The Block Witness
2020-05-08 19:58:50 +07:00
andri lim
758ebabd87
working test_witness_json prototype
2020-05-08 12:16:24 +07:00
andri lim
9c999ffa9c
enable block witness test
2020-05-05 20:46:17 +07:00
andri lim
c9e49bf68a
fix accounts cache init API
2020-04-29 12:00:44 +07:00
andri lim
8747fe1ecd
add optional outputName to jsonTest macro
2020-04-21 12:05:46 +03:00
Jacek Sieka
4ade5797ee
rlp: don't use ranges / experimental features ( #495 )
2020-04-20 20:12:44 +02:00
andri lim
af02a3b1b2
reduce unused import warnings
2020-04-15 19:05:57 +07:00
andri lim
5e694c6874
fix test_blockchain_json
2020-04-12 19:02:03 +07:00
andri lim
d2b0ca62b2
fix GlacierMuir to MuirGlacier typo
2020-04-12 18:13:22 +07:00
andri lim
5ca7370407
add ropsten difficulty test
2020-04-12 18:09:18 +07:00
andri lim
87bae2bb78
switch to new toFork
2020-04-12 18:02:59 +07:00
andri lim
d69ede6060
add goerli testnet genesis data[skip ci]
2020-04-09 19:13:17 +03:00
Jacek Sieka
1d472cf090
Eth keys ( #482 )
...
* bump nim-eth, fix deprecated calls
2020-04-05 15:12:48 +02:00
andri lim
266e0ddb1e
room for EIP-1283
2020-03-24 17:21:13 +07:00
Zed
fff29f7a6a
Replace markdown report code with testutils
2020-03-10 14:03:04 +02:00
andri lim
0a35cce48a
add accounts cache read only operations tests
2020-02-27 14:38:42 +02:00
andri lim
08168ef121
Update BCT json fixtures
2020-02-21 13:01:35 +02:00
andri lim
e12fdec7c7
update GST json fixtures
2020-02-21 13:01:21 +02:00
andri lim
6b6584c4d0
Glacier Muir update
2020-02-20 09:21:35 +02:00
andri lim
a6cde0928e
[skip ci] remove test_generalstate_failing.nim
2020-02-20 09:16:29 +02:00
andri lim
32574fcebe
allow user to turn pruning on/off when run test
2020-02-20 09:16:29 +02:00
andri lim
ed5710fa17
allow user to select legacy or new test suite for GST and BCT
2020-02-20 09:16:29 +02:00
andri lim
2fbabd25a4
implement aleth/geth/parity compatibility mode -- 100% pass test
2020-02-20 09:08:44 +02:00
andri lim
4a786d8cf7
update tx tests json fixtures
2020-02-20 09:02:20 +02:00
andri lim
15c9fa54ec
fixes modexp gasFee bug
2020-02-18 20:11:36 +02:00
andri lim
ad1b27d2a4
fixes failed tx test
2020-02-12 17:55:14 +02:00
andri lim
85c36647d1
make tests green
2020-02-12 17:53:26 +02:00
andri lim
1e447ee2db
make tests green
2020-02-05 23:08:26 +07:00
Ștefan Talpalaru
ea38893416
fix test dir name
2020-01-31 22:53:28 +01:00
andri lim
55494f06e5
move 'validateTransaction' from GST into 'processTransaction'
2020-01-24 19:52:55 +07:00
andri lim
349d033d05
add whenIsMainModule to test_tracer_json
2020-01-23 18:07:44 +02:00
andri lim
d656f7f701
rename 'txContext' to 'setupTxContext'
2020-01-23 18:07:44 +02:00
andri lim
933b2dad78
remove code from EVM Message and load code in 'Computation'
2020-01-23 18:07:44 +02:00
kdeme
d56655d278
Move WhisperKeys to KeyStorage
2020-01-23 12:39:36 +02:00
andri lim
c1ef8632b2
move fork and gasCosts from Computation to vmState
2020-01-20 18:36:58 +02:00
andri lim
bab359cabf
move origin and gasPrice from Message to vmState
2020-01-20 18:36:58 +02:00
andri lim
16a938d3fa
fixes clearStorage bug
2020-01-20 18:36:58 +02:00
andri lim
52fffa6e25
fixes long standing bug create2nocash
2020-01-20 18:36:58 +02:00
andri lim
2535219830
reenable previously OOM tests
2020-01-20 18:36:58 +02:00
andri lim
63e886655b
fixes coinbase suicide bugs
2020-01-20 18:36:58 +02:00
andri lim
0b99b76cd1
change 'BaseComputation' to 'Computation'
2020-01-20 18:36:58 +02:00
andri lim
79df931234
simplifies computation.getFork
2020-01-20 18:36:58 +02:00
andri lim
8f7597e23b
[skip ci] add evmc CallKind to EVM Message
2020-01-19 19:17:37 +02:00
andri lim
dfa2f0099f
[skip ci] fixes macro_assembler
2020-01-19 19:17:37 +02:00
andri lim
836e087984
[skip ci] change storageAddress to contractAddres
2020-01-19 19:17:37 +02:00
andri lim
727b477fca
[skip ci] add accounts cache test
2020-01-19 19:17:37 +02:00
andri lim
f9c2f40021
uncomment general state tests
2019-12-10 12:34:48 +02:00
andri lim
7bdbf85a7a
update tests log
2019-12-10 12:34:48 +02:00
andri lim
69072b8cf7
disable slow bc tests
2019-12-10 12:34:48 +02:00
andri lim
0f2be7c964
disable problematic tests
2019-12-10 12:34:48 +02:00
andri lim
df21dd44cb
fixes typo
2019-12-10 12:34:48 +02:00
andri lim
9596dbc267
activates blockchain test
2019-12-10 12:34:48 +02:00
andri lim
1ffb992674
multi root state trie implementation
2019-12-10 12:34:48 +02:00
andri lim
5c96cf8e87
enable EVM sha3_bigsize test on 32 bits
2019-12-10 12:34:14 +02:00
andri lim
3683ce2cbc
disable tests with huge memory consumption
2019-12-06 15:01:49 +07:00
andri lim
d2b5e1a26d
use 'skipNothing' as default param to 'jsonTest'
2019-12-06 15:01:49 +07:00
andri lim
2057f88dba
fixes #421 , each tests have their own skip table
2019-12-06 15:01:49 +07:00
kdeme
10f9f2c3bb
Disable test randomStatetest159
2019-12-05 13:02:21 +01:00
andri lim
358c27c862
make test green, skip mysterious raising exception failed test
2019-12-05 07:30:11 +07:00
andri lim
d944138e63
fixes indentation
2019-11-19 21:26:58 +07:00
andri lim
0d743dc468
fixes 'collectTouchedAccounts' for Istanbul
2019-11-19 16:14:36 +07:00
andri lim
6b053d8a89
skip failed tests
2019-11-19 13:12:13 +07:00
andri lim
19803bd685
skip incorrect and slow tests
2019-11-18 20:49:24 +07:00
andri lim
dda26611c2
fixes bc and gst tester [skip ci]
2019-11-14 22:37:58 +07:00
andri lim
f66f49168a
fix bc/gst tester for istanbul [skip ci]
2019-11-14 21:20:34 +07:00
andri lim
d01edfdcac
add istanbul tests fixtures
2019-11-14 10:21:04 +00:00
andri lim
c4dcf5da30
reduce compiler warnings
2019-11-13 21:49:39 +07:00
andri lim
b3cbf620d6
implement EIP-152
2019-11-12 15:51:48 +00:00
Ștefan Talpalaru
d84e4810d5
unittest2 (parallelism disabled)
...
This is https://github.com/status-im/nimbus/pull/332 with parallelism
disabled, while some threadpool deadlock is being debugged.
2019-10-31 06:17:01 +01:00
andri lim
8a09e97d4d
add diagnostic message to test_difficulty.nim
2019-10-28 22:21:41 +07:00
andri lim
a45792cede
add diagnostic message to all_tests.nim
2019-10-28 22:21:40 +07:00
andri lim
b3a7adcedd
fixes #404
2019-10-17 15:30:15 +07:00
andri lim
a65ab2763e
fixes generateHeaderFromParentHeader
2019-09-26 12:33:43 +03:00
andri lim
12960c27ce
fixes coinBase suicide
2019-09-26 12:33:43 +03:00
andri lim
e63a43ee9f
fixes getAncestorHash
2019-09-26 12:33:43 +03:00
andri lim
4c48244cbb
fixes debugger
2019-09-26 12:33:43 +03:00
andri lim
b189e1604f
fixes gasLimitBounds
2019-09-26 12:33:43 +03:00
andri lim
ed01201233
fixes fork choice
2019-09-26 12:33:43 +03:00
andri lim
10fb81b781
fixes verifyStateDB nonce conversion
2019-09-26 12:33:43 +03:00
andri lim
a2a8e81265
fixes difficulty validation
2019-09-26 12:33:43 +03:00
andri lim
58a7d5af83
fixes checkPOW of validateSeal
2019-09-26 12:33:43 +03:00
andri lim
7a07737855
implement bc_test debugger
2019-09-26 12:33:43 +03:00
andri lim
bf23bd8d84
fixes wrongNumber bug
2019-09-26 12:33:43 +03:00
andri lim
5c7adaae3b
implement pow validation
2019-09-26 12:33:43 +03:00
andri lim
b5266a7412
fix wrong gasUsed
2019-09-26 12:33:43 +03:00
andri lim
85b21721b0
pass more tests
2019-09-26 12:33:43 +03:00
andri lim
9cba2c9cc0
fix validateGasLimit
2019-09-26 12:33:43 +03:00
andri lim
f2b5f9b77f
skip more failing test
2019-09-26 12:33:43 +03:00
andri lim
3ad465d169
implement block validation and friends
2019-09-26 12:33:43 +03:00
andri lim
af49151bc6
deals with invalid blocks
2019-09-26 12:33:43 +03:00
andri lim
49a6f84ac9
activates verifyStateDB
2019-09-26 12:33:43 +03:00
andri lim
7c65b8a2b2
implement validate block unchanged
2019-09-26 12:33:43 +03:00
andri lim
594c3b8d08
some cleanup
2019-09-26 12:33:43 +03:00
andri lim
e61e530b9f
skip failing test
2019-09-26 12:33:43 +03:00
andri lim
890c6a9802
add command line config
2019-09-26 12:33:43 +03:00
andri lim
12ea5247d6
execute transactions
2019-09-26 12:33:43 +03:00
andri lim
9485db920d
prepare vmstate for block validation
2019-09-26 12:33:43 +03:00
andri lim
33c2848fd5
implement vmconfig for bc test
2019-09-26 12:33:43 +03:00
andri lim
578c2bd857
improve cliBuilder macro readability
2019-09-24 10:29:41 +07:00
andri lim
d2d5661e11
fix comment
2019-09-22 16:57:19 +07:00
andri lim
321f13dc19
attempt to add simple cli to all_tests
2019-09-21 12:45:23 +07:00
andri lim
081baa6da7
parsing complete
2019-09-04 19:05:21 +02:00
andri lim
c5d07fc07f
implement bc test fixtures parser
2019-09-04 19:05:21 +02:00
andri lim
e2c01f46ab
skip failing test
2019-09-03 10:45:48 +07:00
andri lim
31ed8fcf83
refine transaction validation
2019-08-29 20:44:54 +07:00
andri lim
230fb4b06d
activates test
2019-08-29 19:57:01 +07:00
andri lim
7c094a2a3e
initial implementation of transaction test
2019-08-29 19:54:38 +07:00
andri lim
1d9760eb66
activates difficulty_test
2019-08-26 21:40:27 +07:00
andri lim
0bad132387
add diffficulty test
2019-08-26 21:26:57 +07:00
Ștefan Talpalaru
2fc238f35f
Merge branch 'add_trace_switch' of github.com:jangko/nimbus into jangko-add_trace_switch
2019-08-26 16:22:45 +02:00
Ștefan Talpalaru
4cfff44748
Merge branch 'simplify_calldataload' of github.com:jangko/nimbus into jangko-simplify_calldataload
2019-08-26 16:20:38 +02:00
andri lim
bcb7e78a77
add more tests fixtures
2019-08-25 08:38:10 +07:00
andri lim
e6187aa5f3
uncomment commented test case in test_op_custom.nim
2019-08-20 18:08:09 +07:00
andri lim
ccd8835b4d
fixes and activates test for 'calldataload'
2019-08-20 17:11:17 +07:00
andri lim
e05108b7e4
add 'trace' switch to tester configuration
2019-08-20 14:17:22 +07:00
andri lim
7d9aa54b2c
add 1 OOM 32bit GST to skip list
2019-08-19 20:41:27 +03:00
andri lim
fe45235d76
add 4 failed 32bit GST to skip list
2019-08-19 20:41:27 +03:00
andri lim
1ed6322c2f
remove 55 32bit GST from skip list
2019-08-19 20:41:27 +03:00
andri lim
e675182506
fixes 32 bit problem in test_helpers.nim and transaction_tracer.nim
2019-08-19 20:41:27 +03:00
andri lim
742f53f5e9
reactivates GST
2019-08-19 20:41:27 +03:00
andri lim
fc6dcfcfa5
Merge pull request #375 from status-im/addBlockTest
...
Add PersistBlockTest for block 1352922, fixes #363
2019-08-15 07:52:00 +07:00
kdeme
b4b096ef5e
Add PersistBlockTest for block 1352922, fixes #363
2019-08-14 20:56:57 +02:00
andri lim
b1febeabb7
fixes #64 test_vm_json now support all forks
2019-08-14 23:31:30 +07:00
andri lim
b2bf979c57
remove tests/test_opcode.nim
2019-08-13 17:48:56 +03:00
andri lim
74d68ea425
fixes #72 , simplify SDIV implementation
2019-08-13 17:48:25 +03:00
Jacek Sieka
2763bd0dd5
std_shims -> stew
2019-07-07 12:12:01 +02:00
kdeme
f34d8d71db
Use await instead of waitFor in RPC tests
2019-05-16 22:20:17 +02:00
andri lim
a0126a7458
add byzantium block validation test
2019-05-15 17:03:36 +03:00
andri lim
58c4e16365
add some comments
2019-05-13 10:26:28 +03:00
andri lim
077fbe6b73
modexp cleanup
2019-05-13 10:26:28 +03:00
andri lim
a86979eaa3
fix create2 gasCost
2019-05-13 10:26:28 +03:00
andri lim
e51725d13b
fix extCodeHash
2019-05-13 10:26:28 +03:00
andri lim
f08eedbce3
fix create2 nonce increment
2019-05-13 10:26:28 +03:00
andri lim
51edbe6390
fix shr and shl gasCost
2019-05-13 10:26:28 +03:00
andri lim
956a51c2ed
activates constantinople general state test
2019-05-13 10:26:28 +03:00
andri lim
480a3d2cab
implement constantinople bitwise opcode test
2019-05-13 10:26:28 +03:00
andri lim
2f08a6bc0e
fix byzantium contract creation OOG
2019-05-13 10:26:28 +03:00
andri lim
fd8a649df3
fix RevertInCreateInInit problem
2019-05-13 10:26:28 +03:00
andri lim
86d5653a4c
make test green
2019-05-13 10:26:28 +03:00
andri lim
b34ad8b507
fix collectTouchedAccounts
2019-05-13 10:26:28 +03:00
andri lim
f809a864b1
fix calcMemSize bug
2019-05-13 10:26:28 +03:00
andri lim
213fb3b971
constantinople's skeletal implementation
2019-05-13 10:26:28 +03:00
Bruno Škvorc
023b90fde8
Merge pull request #286 from kdeme/feature/whisper-rpc
...
[WIP] Initial implementation of Whisper RPC
2019-05-01 23:00:54 +02:00
andri lim
8bc263a91f
update GST with Constantinople fixtures
2019-04-29 13:23:44 +07:00
kdeme
9de9741e3c
Fix more return values + minor improvements
2019-04-26 13:40:28 +02:00
kdeme
7ab84641d6
Fix, improve and activate rpc test
2019-04-26 13:38:50 +02:00
kdeme
e8a997cf11
Fix return values (raise errors) for most of the calls + some minor TODOs
2019-04-26 13:38:50 +02:00
kdeme
ce523550c0
Use directly the Whisper types instead of distinct strings, we test for string in fromJson anyhow
2019-04-26 13:38:50 +02:00
kdeme
1df3c7202b
Fix & add Whisper RPC tests + add isValidHexData with length check
2019-04-26 13:38:50 +02:00
kdeme
65908d5359
Add shh_generateSymKeyFromPassword implementation
2019-04-26 13:38:50 +02:00
kdeme
d43f20c65a
Initial implementation of Whisper RPC
2019-04-26 13:38:50 +02:00
andri lim
cee0a38278
add some comment
2019-04-26 07:31:18 +07:00
andri lim
3ccd1b1ee9
fix rangeToPadded, GST +5
2019-04-26 07:31:17 +07:00
andri lim
fd7c447f18
fix modexp output, GST +53
2019-04-26 07:31:16 +07:00
andri lim
89402af114
fix modexp gasCost, GST +6
2019-04-26 07:31:16 +07:00
andri lim
8ecbce6d0c
fix gst state clearing, GST +5
2019-04-26 07:31:15 +07:00
andri lim
03ea1c5a85
fix ecRecover precompiles, GST +1
2019-04-26 07:31:15 +07:00
andri lim
ba47d3c997
fix returnDataCopy gasCost, GST +11
2019-04-26 07:31:14 +07:00
andri lim
7b47cb6b24
various fixes, GST +6
2019-04-26 07:31:14 +07:00
andri lim
90e3a4320a
fix revert opcode at first level computation
2019-04-26 07:31:13 +07:00
andri lim
c57295da0b
fix precompiles error handling, GST +262
2019-04-26 07:31:13 +07:00
andri lim
ceb159f5fe
fix static context check in Call and Create, GST +52
2019-04-26 07:31:12 +07:00
andri lim
605618d9ee
add static context check, GST +94 -28
2019-04-26 07:31:12 +07:00
andri lim
6295e6a7e4
fix touched miner problem, GST +25
2019-04-26 07:31:11 +07:00
andri lim
be5cce6c71
fix static call addr, GST +93 -16
2019-04-26 07:31:11 +07:00
andri lim
fd8f774386
activates byzantium gst test, GST +153
2019-04-26 07:31:11 +07:00
Ștefan Talpalaru
9011b06037
Merge branch 'fix_spurious_dragon' of github.com:jangko/nimbus into jangko-fix_spurious_dragon
2019-04-19 13:03:05 +02:00
andri lim
1383a87e10
make test green
2019-04-18 16:10:31 +07:00
andri lim
f3c740498c
implement EIP155 tx.getSender
2019-04-18 15:33:17 +07:00
andri lim
e658ac0a30
add block 2.675.000 test data
2019-04-18 13:49:06 +07:00
andri lim
ec918602bc
fix accountsForDeletion iterator, GST +2
2019-04-18 13:23:04 +07:00
andri lim
1883472104
fix evm msg contract creation, GST +3
2019-04-18 12:42:37 +07:00
andri lim
f7338b7d76
include miner address in touchedAccounts, GST +7
2019-04-18 11:12:21 +07:00