Commit Graph

124 Commits

Author SHA1 Message Date
andri lim 04c7ed8ec9
Change EthTime from std.Time to distinct uint64 (#1820)
* Change EthTime from std.Time to distinct uint64

* Bump nimbus-eth2
2023-10-18 09:16:11 +07:00
andri lim 744e4f9739
bump web3 and add shouldOverrideBuilder field to GetPayloadV3Response (#1807)
* bump web3 and add shouldOverrideBuilder field to GetPayloadV3Response

* Resolve ambiguous identifier error
2023-10-05 20:54:51 +07:00
andri lim 34b1e29ac9
Fix test_blockchain_json and pyspec simulator for Cancun (#1805)
* Fix test_blockchain_json and pyspec simulator for Cancun

* Preserve applyDeletes comments

* Fix redefinition error

* Move test_macro to tests folder
2023-10-05 10:04:12 +07:00
andri lim 12f494e669
Only one place to declare gwei (#1802)
* Only one place to declare gwei

* Fix weiAmount overflow
2023-10-04 10:47:18 +07:00
Kim De Mey 1bb389ad4e
Use admin prefix for nodeInfo and addPeer JSON-RPCs (#1799) 2023-10-03 14:44:08 +02:00
jangko 5754a9079b
Simplify pyspec simulator 2023-09-30 21:31:57 +07:00
jangko 369a54d62a
Add makeNextWithdrawals to engine api simulator 2023-09-30 20:16:45 +07:00
andri lim 501d8a369a
Add BeaconSync reorg tests (#1782)
* Add BeaconSync reorg tests

* Fix redefinition error in tx_sender.nim
2023-09-30 19:20:29 +07:00
andri lim e8d59bc7a7
Working prototype of beacon downloader (#1780)
* Working prototype of beacon downloader

* Use KeyedQueue for setSyncTarget queue

* Convert MergeTracker and PayloadQueue to non ref object
2023-09-28 13:20:12 +07:00
andri lim 9cce31d921
Prepare pyspec sim for Cancun (#1773) 2023-09-25 06:53:33 +07:00
andri lim b7f0be5468
Fix Windows simulators CI (#1743)
* update simulator cache key

* enable libbacktrace in hive simulators
2023-09-10 21:13:09 +07:00
andri lim 948c94763c
Bump nim-eth: Add closeWait to EthereumNode (#1742) 2023-09-09 13:54:58 +07:00
andri lim 348a9aea6f
Close eth node after usage (#1741) 2023-09-08 21:37:50 +07:00
jangko 5fb0fc65ba
Implement beacon sync stub
- Prepare a test env for beacon sync in engine api simulator.
- Wiring beacon sync to the rest of subsystems.
2023-09-07 08:49:31 +07:00
jangko 6139152143
Add multiple clients support to engine api simulator 2023-09-06 18:51:02 +07:00
jangko 7a1fe5707c
Refactor engine api and cleanup web3 types conversion 2023-08-30 10:42:46 +07:00
jangko 820525d78c
Fix outdated EIP-4844 constants 2023-08-24 12:11:19 +07:00
jangko 8773eb609d
Fix engine api client ambiguity in engine api sim 2023-08-24 11:34:12 +07:00
jangko 38c0c34331
hive: Engine api simulator overhaul 2023-08-22 21:19:43 +07:00
jangko ec17a5a348
engine_api: add getPayloadV3 and newPayloadV3 to echangeCapabilities
also add echangeCapabilities test to hive sim
2023-08-08 10:50:28 +07:00
jangko 7514cfc63f
increase jwt auth max time drift to 60 seconds
per engine api spec v1.0.0.beta.3
2023-08-08 08:26:08 +07:00
jangko 7ec298d49d
fix block import 2023-08-06 10:42:28 +07:00
andri lim bdaeedb09f
rename data gas to blob gas (#1659)
* rename data gas to blob gas

* bump more submodules
* extend evmc tx_context with EIP-4844 blob_hashes
2023-08-04 19:43:30 +07:00
Jordan Hrycaj 221e6c9e2f
Unified database frontend integration (#1670)
* Nimbus folder environment update

details:
* Integrated `CoreDbRef` for the sources in the `nimbus` sub-folder.
* The `nimbus` program does not compile yet as it needs the updates
  in the parallel `stateless` sub-folder.

* Stateless environment update

details:
* Integrated `CoreDbRef` for the sources in the `stateless` sub-folder.
* The `nimbus` program compiles now.

* Premix environment update

details:
* Integrated `CoreDbRef` for the sources in the `premix` sub-folder.

* Fluffy environment update

details:
* Integrated `CoreDbRef` for the sources in the `fluffy` sub-folder.

* Tools environment update

details:
* Integrated `CoreDbRef` for the sources in the `tools` sub-folder.

* Nodocker environment update

details:
* Integrated `CoreDbRef` for the sources in the
  `hive_integration/nodocker` sub-folder.

* Tests environment update

details:
* Integrated `CoreDbRef` for the sources in the `tests` sub-folder.
* The unit tests compile and run cleanly now.

* Generalise `CoreDbRef` to any `select_backend` supported database

why:
  Generalisation was just missed due to overcoming some compiler oddity
  which was tied to rocksdb for testing.

* Suppress compiler warning for `newChainDB()`

why:
  Warning was added to this function which must be wrapped so that
  any `CatchableError` is re-raised as `Defect`.

* Split off persistent `CoreDbRef` constructor into separate file

why:
  This allows to compile a memory only database version without linking
  the backend library.

* Use memory `CoreDbRef` database by default

detail:
 Persistent DB constructor needs to import `db/core_db/persistent

why:
 Most tests use memory DB anyway. This avoids linking `-lrocksdb` or
 any other backend by default.

* fix `toLegacyBackend()` availability check

why:
  got garbled after memory/persistent split.

* Clarify raw access to MPT for snap sync handler

why:
  Logically, `kvt` is not the raw access for the hexary trie (although
  this holds for the legacy database)
2023-08-04 12:10:09 +01:00
jangko 70d718119e
fix txpool usage at the beginning of process 2023-08-04 10:59:12 +07:00
jangko 81b7a8c682
graphql: add Shanghai and Cancun fields 2023-07-29 20:16:03 +07:00
jangko 7229bca033
fix consensus-sim genesis parser 2023-07-25 12:00:59 +07:00
jangko 18587c3abe
use axplicit 127.0.0.1 instead of localhost string
on windows, using "localhost" for rpc test is very slow.
both pyspec_sim and engine_sim will need more than one hour.
while on linux and macos only few minutes.
2023-07-24 21:50:39 +07:00
jangko 1eca772a08
hive: pyspec simulator implementation 2023-07-19 20:33:02 +07:00
jangko 2446c22138
pyspec sim: add test cases 2023-07-19 08:28:49 +07:00
jangko 217068790d
update graphql simulator test vector 2023-07-07 14:40:48 +07:00
jangko dac1454a15
consensus-sim: importing blocks individually instead of concatenating them.
This is a workaround following hive example, because one of the test case
withdrawalsAmountBounds.json, have bad blocks between good blocks.
And that bad blocks contains big int too big to fit in uint64 of
withdrawal amount field.

Clients who still importing concatenated blocks cannot pass all tests.
2023-06-27 07:30:05 +07:00
jangko ff1a45e095
fix shanghai withdrawal validation
previously, the withdrawal validation is in process_block only,
but the one in persist block, which is also used in synchronizer
is not validated properly.
2023-06-26 07:46:09 +07:00
jangko f8c1a7f0a8
fix rpc_sim receipt unmarshalling 2023-06-25 13:52:31 +07:00
Adam Spitz d8a1adacaa
More work on withdrawals (#1482)
* Part of EIP-4895: add withdrawals processing to block processing.

* Refactoring: extracted the engine API handler bodies into procs.

Intending to implement the V2 versions next. (I need the bodies to be
in separate procs so that multiple versions can use them.)

* Working on Engine API changes for Shanghai.

* Updated nim-web3, resolved ambiguity in Hash256 type.

* Updated nim-eth3 to point to master, now that I've merged that.

* I'm confused about what's going on with engine_client.

But let's try resolving this Hash256 ambiguity.

* Still trying to fix this conflict with the Hash256 types.

* Does this work now that nimbus-eth2 has been updated?

* Corrected blockValue in getPayload responses back to UInt256.

c834f67a37

* Working on getting the withdrawals-related tests to pass.

* Fixing more of those Hash256 ambiguities.

(I'm not sure why the nim-web3 library introduced a conflicting type
named Hash256, but right now I just want to get this code to compile again.)

* Bumped a couple of libraries to fix some error messages.

* Needed to get "make fluffy-tools" to pass, too.

* Getting "make nimbus_verified_proxy" to build.
2023-03-09 18:40:55 -05:00
Kim De Mey 8523d8b40e
Bump submodules and fix related issues (#1448)
* Updated to the latest nim-eth, nim-rocksdb, nim-web3

* Bump nimbus-eth2 module and fix related issues

Temporarily disabling Portal beacon light client network as it is
a lot of copy pasted code that did not yet take into account
forks. This will require a bigger rework and was not yet tested
in an actual network anyhow.

* More nimbus fixes after module bumps

---------

Co-authored-by: Adam Spitz <adamspitz@status.im>
Co-authored-by: jangko <jangko128@gmail.com>
2023-01-27 15:57:48 +01:00
jangko 13e5b1a76b
fix persistHeaderToDb, allow POS block header to be canonical 2022-12-10 09:02:30 +07:00
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 6b28b64395
update hive statistics 2022-11-18 11:58:04 +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