Commit Graph

49 Commits

Author SHA1 Message Date
jangko 94a94c5b65 implement better hardfork management 2022-12-02 13:51:42 +07:00
jangko 66439d69ca
unify chain config parser of t8n, bc test, and consensus simulator 2022-11-25 12:26:29 +07:00
jangko 43f4b99a1b
disable NewBlockHashes and NewBlock of eth wire handler after POS transition
fix #1133
2022-11-14 16:17:34 +07:00
Kim De Mey 74a83c1229
Bump nim-eth and remove all now unneeded p2p related imports (#1273) 2022-10-20 10:34:59 +02:00
jangko 16bc2de1cf
update EF test fixtures and fixes to pass all tests 2022-10-03 16:41:32 +07:00
Jacek Sieka c2ed731fa5
eth: adapt to smaller eth_types (#1210) 2022-09-03 20:15:35 +02:00
jangko fe54f93ab6
bump nim eth
better method not implemented message of AbstractChainDB
2022-08-22 20:11:36 +07:00
jangko 11908c78ec
engine api test: handle JsonRpcError for each client rpc call 2022-08-05 09:51:16 +07:00
jangko 21140191da
attempt to fix flaky simulator test 2022-08-02 11:48:59 +07:00
jangko 2c0a8fa26d
update to supported macOS in Github CI 2022-07-30 08:42:44 +07:00
jangko eb972fd598
attemp to fix simulator ci 2022-07-24 15:47:06 +07:00
jangko a48f69a89a
hive: engine simulator add jwt auth test cases 2022-07-18 16:56:44 +07:00
jangko 2b4baff8ec
move block validation from execution payload generator to engine api 2022-07-04 20:36:30 +07:00
jangko ce098bf88f
fix engine api test 2022-07-04 19:32:14 +07:00
Kim De Mey fb12793482
Bump nim-eth and nim-bearssl and accompanying fixes (#1150) 2022-07-04 09:38:02 +02:00
jangko 7f0bc71b65
add invalidMissingAncestorReOrg test case 2022-06-27 20:18:54 +07:00
jangko 4a50b00c37
rpc: change getStorageAt param type to HexDataStr
if using HexQuantityStr, it will fail when given hex string with leading zeros
2022-06-27 17:47:59 +07:00
jangko 71ac6b7de5
engine-api-test: fix transactionReorg test case 2022-06-27 13:01:32 +07:00
jangko b80eca0718
json-rpc: able to query finalized block and safe block header
engine-api:
- store safe block hash and finalized block hash

engine-api test:
- fix test case related to safe block hash and finalized block hash
2022-06-27 11:15:54 +07:00
jangko 8dce76c49f
add engine api test fixtures: PoW chain rlp 2022-06-22 08:10:10 +07:00
jangko d07ef2ee56
fix engine api and angine api test 2022-06-22 08:10:01 +07:00
jangko 69a1000d77
more engine api test 2022-06-15 15:56:45 +07:00
jangko ee13e5fdae
completing 'PrevRandao Opcode Transactions' test case in engine api test 2022-06-15 07:55:14 +07:00
jangko 5bd134e2f0
more engine api tests 2022-06-01 20:32:07 +07:00
jangko 0ad7ffcdbe
hive: proper rpc test 2022-05-31 15:42:01 +07:00
jangko 9843c9428f
fix related to engine api alpha.9 2022-05-29 11:23:03 +07:00
Jordan Hrycaj 62d31d6f1d
Normalise sync handler prototypes (#1087)
* Use type name eth and snap (rather than snap1)

* Prettified snap/eth handler trace messages

* Regrouped sync sources

details:
  Snap storage related sources are moved to common directory.
  Option --new-sync renamed to --snap-sync

also:
  Normalised logging for secondary/non-protocol handlers.

* Merge protocol wrapper files => protocol.nim

details:
  Merge wrapper sync/protocol_ethxx.nim and sync/protocol_snapxx.nim
  into single file snap/protocol.nim

* Comments cosmetics

* Similar start logic for blockchain_sync.nim and sync/snap.nim

* Renamed p2p/blockchain_sync.nim -> sync/fast.nim
2022-05-13 17:30:10 +01:00
jangko dd339a1fb0
add simulators ci 2022-04-21 12:27:03 +07:00
jangko 6fcd63cb58
modify hive simulators to run in CI 2022-04-21 12:01:18 +07:00
jangko f2f204293e
first step into styleCheck fixes 2022-04-14 08:39:50 +07:00
jangko 4d126f2461
hive: add ethereum/engine simulator
some test with multiple client still need polishing.
merge test using specially crafted blocks need to be added.
2022-04-13 08:05:58 +07:00
Jordan Hrycaj 046c97f18b
Activate wire protocol eth/66 (#993)
* Activate wire protocol eth/66

and:
 Disentangle protocol_eth66.nim from import sections

why:
  Importing the protocol_eth66 module is not necessary. There is
  no need to know too many details of the underlying wire protocol. All
  that is needed will be exported by blockchain_sync.nim.

* fixes, and rebase

* Update nimbus/p2p/blockchain_sync.nim

Co-authored-by: Kim De Mey <kim.demey@gmail.com>

* Fixes and rebase

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
2022-03-21 17:12:07 +00:00
jangko 25e7debf5e
fix broken graphql_sim 2022-03-08 21:43:20 +07:00
jangko 01980041d5
setup nimbus tx pool for app wide usage
currently the txpool is used at:
- sealer engine
- graphql ethapi
- json rpc ethapi
- ws rpc ethapi
2022-01-25 11:38:49 +07:00
Jamie Lokier df29b98079
Hive: Add Arrow Glacier fork to Hive integration + related fixes
Adds changes to Nimbus Hive support for the new
[Arrow Glacier fork](https://eips.ethereum.org/EIPS/eip-4345).

While here:

- Fix typo in `nimbus.sh`:
  `HIVE_FORK_MUIRGLACIER` => `HIVE_FORK_MUIR_GLACIER` (just a comment).

- Add `muirGlacierBlock` to the JSON generated in `extract_consensus_data.nim`.
  This makes it symmetric with the JSON parsed in `mapper.jq`.

- Removed "At5" network names which are not used by any of the test suite.
  These are `ByzantiumToConstantinopleAt5`, `ConstantinopleFixToIstanbulAt5`
  and `IstanbulToBerlinAt5`.

  The motivation for removing these instead of systematically including all
  possibilities was that I realised `LondonToArrowGlacierAt5` does not appear
  anywhere in the current test suite, even though `ArrowGlacier` does.  As each
  section in the code is rather large already, I thought it cleaner to not add
  this one, and keep only the ones the test suite actually uses.

  This also now better matches the code in `test_blockchain_json.nim`.

- Sorted `HomesteadToDaoAt5` before `HomesteadToEIP150At5` because the DAO
  fork happened earlier than EIP-150 in real life.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-12-10 13:40:54 +00:00
jangko cdfcdfc85b
hive: nodocker rpc simulator skeleton 2021-11-30 16:03:41 +07:00
jangko 37fe6fa32f
fixes hive/consensus_sim command line param
recent changes of confutils based config requires
some command line adjustment.
2021-11-09 17:55:13 +07:00
jangko a3badea928
config: fix new config based on input from jamie and zahary 2021-09-18 17:34:51 +07:00
jangko 69f2a0f95a
config: replace stdlib parseOpt with nim-confutils
fixes #581
2021-09-18 17:34:46 +07:00
jangko 48d497580a
config: remove last instance of getConfiguration usage from nimbus code
this is a preparation for migration to confutils based config
although there is still some getConfiguration usage in tests code
it will be removed after new config arrived
2021-09-08 21:25:14 +07:00
jangko c9cfebfa97
config: rearrange getConfiguration usage
avoid using getConfiguration inside object construction and
replace it with passing suitable param
2021-09-08 08:07:10 +07:00
Jamie Lokier 00647b373c
Sync: Switch other modules over to the `eth/65` module
Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-07-27 14:12:41 +01:00
jangko 0245c8e2c7
hive: update extract_consensus_data tool
add London HF changes
2021-06-30 20:43:47 +07:00
Jordan Hrycaj 2d6bf34175
Re-adjust canonical head to parent of block to be inserted (#726)
* Re-adjust canonical head to parent of block to be inserted

why:
  of the failing tests that remain to be solved, 30 of those will succeed
  if the canonical database chain head is cleverly adjusted -- yes, it
  looks like a hack, indeed.

details:
  at the moment, this hack works for the non-hive tests only and is
  triggered by a boolean argument passed on to the chain.persistBlocks()
  method.

* Use parent instead of canonical head for block to be inserted

why:
  side chains need to be inserted typically somewhere before the
  canonical head.

details:
  the previous _hack_ was unnecessary and removed, it was inspired by
  some verification in persistBlocks() which explicitly referenced the
  canonical head (which now might or might not refer to the newly inserted
  header.)

* remove unnecessary code + comment
2021-06-22 17:52:31 +01:00
Jordan Hrycaj cad1b5a678
verify age of uncle's parent (#719)
why:
  parent must be older => check needed for bcFrontierToHomestead test
  cases UncleFromFrontierInHomestead and UnclePopulation
2021-06-18 08:37:59 +01: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
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 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 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