Commit Graph

2302 Commits

Author SHA1 Message Date
jangko cbed4a368b
hive: update current state of the tests
from: ethereum/sync:           0 pass,     1 fail,     1 total
to  : ethereum/sync:           2 pass,     2 fail,     4 total
2021-05-20 18:47:11 +07:00
jangko 19f343b979
hive: use HIVE_NETWORK_ID to initialize networkId if available
devp2p/eth simulator is using this HIVE_NETWORK_ID to configure client
2021-05-20 14:04:17 +07:00
jangko b82061bf46
don't mix customBootNodes and bootNodes usage 2021-05-20 14:04:17 +07: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 d12e7d22bf
update hive stat
additional simulators can run:
- `devp2p/discv4`
- `devp2p/eth`

from:
devp2p/discv4:           0 pass,    14 fail,    14 total
devp2p/eth:              0 pass,     1 fail,     1 total

to:
devp2p/discv4:           3 pass,    11 fail,    14 total
devp2p/eth:              1 pass,     8 fail,     9 total
2021-05-19 17:51:13 +07:00
jangko 2fd2665026
update hive client script
add enode.sh
use HIVE_BOOTNODES flag in nimbus.sh
2021-05-19 17:51:12 +07:00
jangko ec1af91370
implement "net_nodeInfo" rpc
fixes #569
2021-05-19 16:35:13 +07:00
Ștefan Talpalaru 82f99dc3c0
Windows: support more Mingw-w64 versions
This reverts commit 295c1409f6.
2021-05-19 00:42:56 +02:00
Jordan Hrycaj 91e24e3581
collected wisdom after working with hive/docker (#669) 2021-05-18 16:38:35 +01:00
jangko 18553156b1
hive: update hive flags usage checklist in nimbus.sh
additional flags we use:
- [x] HIVE_NETWORK_ID              network ID number to use for the eth protocol
- [x] HIVE_LOGLEVEL                client loglevel (0-5)
- [x] HIVE_GRAPHQL_ENABLED         enables graphql on port 8545
2021-05-18 09:31:11 +07:00
jangko cc1034aecf
hive: fixes mapper.jq related to DAO fork
hive always set 'HIVE_FORK_DAO_VOTE' to '1'.

set 'daoForkSupport' to 'true' if only 'HIVE_FORK_DAO_BLOCK'
is set by hive, not depends only on 'HIVE_FORK_DAO_VOTE'.

This is because 'nimbus-eth1' internal is different compared to 'geth'.
2021-05-18 09:23:12 +07:00
jangko b02095a45a
hive: update current state of the tests
additional simulators can be run:
- `ethereum/rpc`
- `smoke/network`
- `smoke/genesis`

number of passess and fails:
from: ethereum/consensus:  27353 pass,   892 fail, 28245 total
to  : ethereum/consensus:  28186 pass,    59 fail, 28245 total

new:
- smoke/genesis:           3 pass,     0 fail,     3 total
- smoke/network:           1 pass,     0 fail,     1 total
- smoke/clique:            0 pass,     1 fail,     1 total
2021-05-18 09:01:11 +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 af1537fcab
fixes and add hive simulators written in nim
now we have hive simulators written in nim:
- ethereum/consensus
- ethereum/graphql

Using these simulators, we can debug test cases without have to run
hive or docker.
2021-05-17 20:48:22 +07:00
jangko d2b47139e1
fixes `importRlpBlocks` in conf_utils.nim
now we are importing block one by one to satisfy
some of hive test cases.

we also catch exception instead of letting it terminate the
process.
2021-05-17 18:43:44 +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 6055e0bd0f
update tests logs
recent EIP2718 and EIP2930 inclusion and ethereum/tests update
add and remove many entries
2021-05-17 11:14:33 +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 df9bae3517
bump nim-eth submodule
eip2718: protect against malformed rlp in tx sequence decoder
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 01a27ff328
EIP-2930: optional access list
the new AccessListTx contains address and storage keys
that will go into global access list. and this come with
prices.... in ether
2021-05-16 19:54:48 +07:00
jangko a2712c5c7a
eip2718: fixes test_rpc.nim 2021-05-15 18:09:36 +07:00
jangko a2f77e8627
eip2718: rename vm2 ChainId op code to ChainIdOp
this is to avoid clash with ChainId type
imported from eth/common
2021-05-15 18:09:36 +07:00
jangko 96d1969017
bump nim-eth: eip2718 typed transaction envelope
these series of commits labelled eip2718 will pave the way for
eip2930: optional access lists
2021-05-15 18:09:36 +07:00
jangko 87c6ec7309
eip2718: add tx validate for AccessListTx 2021-05-15 18:09:36 +07:00
jangko 77f080c8c2
eip2718: nimbus is compileable 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
Jordan Hrycaj d1348824f8
update conversion to start option argument inside hive container (#658)
why:
  not overloading genesis.json by converted version, using new file
  with edited contents
2021-05-14 08:56:21 +01:00
jangko fe92942fa2
update hive/ethereum/consensus stat
from: ethereum/consensus:  16556 pass, 11643 fail, 28199 total
to  : ethereum/consensus:  27353 pass,   892 fail, 28245 total
2021-05-14 08:18:54 +07:00
jangko 911bc0b1c3
update mapper.jq in hive_integration/nimbus
this changes is required due to recent #654.
custom genesis and chain config parser are fixed
and the genesis fields are grouped into "genesis"
field, similar with chain config fields,
they are grouped in "config" field.
2021-05-13 18:09:28 +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 6966324f3b
add our own hive/graphql simulator into hive_integration
now we can run hive/graphql test without using hive or docker.
it's useful for debugging session. but lacking nice result report
like real hive.
2021-05-12 21:21:53 +07:00
jangko a57ac65c8c
fixes --customnetwork parser
now it can ignore an optional fork e.g. MuirGlacier
2021-05-12 19:05:32 +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 8ec72e86bc
update hive/rpc stat
from: ethereum/rpc:            0 pass,     1 fail,     1 total
to  : ethereum/rpc:            3 pass,    35 fail,    38 total
2021-05-12 12:55:29 +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 f6a0e4bcbd
fixes wrong usage of `chainId` in places where it should be networkId
fixes #643
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 86939d9248
fixes `Forks can't be assigned out of order` error in hive
this is a quick fix for #635, allow us to run hive test again
2021-05-12 07:54:37 +07:00
kdeme 273a94ed76 Bump nim-eth to get better exception tracking 2021-05-12 00:35:37 +03:00
jangko a401f43155
update hive/graphql stat in hive_integration/README.md
from: ethereum/graphql:       34 pass,    12 fail,    46 total
to  : ethereum/graphql:       36 pass,    10 fail,    46 total
2021-05-11 08:50:53 +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 03784848eb
bump nim-graphql version from 0.2.12 to 0.2.14
enhancements:
- scalar `Float` now have proper validation
- seqs are not copied anymore in some places, but using system.move

bugfixes:
- `removeWhitespaces` in test_common no longer eat white spaces
  from quoted string.
- `skipWhitespace` in lexer.nim now preserve \r\n instead of replace it with \n

new features:
- add custom instrument infrastructure
- add Query Complexity instrumen
2021-05-10 22:22:04 +07:00