Commit Graph

611 Commits

Author SHA1 Message Date
Kim De Mey 494a61ceb6
Bump nim-eth for duplicate metrics fix (#1874) 2023-10-31 19:51:37 +01:00
jangko 26ede94a73
Add Holesky testnet configuration 2023-10-25 14:06:36 +07:00
andri lim d1252665b2
Bump nim-eth: remove EIP-4844 blobs before hashing tx (#1840) 2023-10-22 15:59:05 +07:00
jangko 87fbc43867
Bump nim-kzg4844: Use official trusted setup 2023-10-19 12:23:48 +07:00
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
Kim De Mey ca61a7009d
Bump submodules and related fixes (#1729)
* Bump submodules and related fixes

* Fix some warnings due to chronos and Nim bumps

* Seems macOS and Windows have different behavior
2023-10-17 14:19:50 +02:00
andri lim 750a075a6c
nimbus-build-system: Bump Nim to version 1.6.16 (#1818) 2023-10-16 22:12:41 +02:00
Kim De Mey 3444ffaf30
Update test to latest beacon LC test vectors (#1815) 2023-10-11 15:44:23 +02:00
Kim De Mey 7b313ec1ac
Use signature slot instead of attested header slot (#1811)
Use signature slot instead of attested header slot in the
OptimisticUpdate content key.
2023-10-06 17:42:34 +02:00
Kim De Mey f72f02c88b
Remove optimistic slot from FinalityUpdate content key (#1810) 2023-10-06 15:46:53 +02: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 b7365085ae
Implement EIP-7516: BLOBBASEFEE opcode (#1791)
* Implement EIP-7516: BLOBBASEFEE opcode
2023-10-01 14:24:15 +07:00
andri lim dc1dcfb206
EIP-4844: Fix excessBlobGas handling (#1771)
* EIP-4844: Fix excessBlobGas handling

* Change vmState.difficulty to vmState.difficultyOrPrevRandao
2023-09-24 22:25:41 +07:00
andri lim 56215ed83f
Bump stint to v2.0: new array backend (#1747)
* Bump stint to v2.0: new array backend
2023-09-13 09:32:38 +07:00
andri lim 948c94763c
Bump nim-eth: Add closeWait to EthereumNode (#1742) 2023-09-09 13:54:58 +07:00
andri lim db6bd9af16
Switch to llvm-mingw for faster Windows CI (#1740) 2023-09-08 22:10:16 +07:00
Kim De Mey c04f2477ac
Add version to fluffy cli flags and metrics (#1736)
Also update Grafana dashboard to incorperate the metrics and do
a confutils module bump.
2023-09-07 16:27:13 +02:00
Kim De Mey 2b23fe2ba4
Bump chronos submodule (#1735) 2023-09-07 16:15:58 +02:00
Kim De Mey 7ae333ac8b
Add discv5 provided ENR directly to Portal protocol routing table (#1714)
* Add discv5 provided ENR directly to Portal protocol routing table

Previous version of getting the ENR from the discv5 routing table
would not work due to the order of first calling the talk protocol
handler and only after that the addEnr to the disc5 routing table.

Instead of changing this order, pass along the ENR directly to
avoid this additional getNode call.

* Still request ENR from discv5 if it wasn't passed via handshake
2023-08-30 20:38:15 +02:00
andri lim bf65378006
Bump nim-web3 and nim-eth: Add EIP-4788 parentBeaconBlockRoot field (#1696) 2023-08-19 16:33:41 +07:00
jangko dd9e181acc
EIP-1153: completing transient storage on EVMC side 2023-08-18 10:19:34 +07:00
jangko 53d7165f6d
bump web3: Change withdrawals field of ExecutionPayloadBodyV1 become optional 2023-08-17 11:31:43 +07:00
jangko 629970dab8
bump nim-web3: add engine_getPayloadBodiesByRangeV1 callsig 2023-08-17 06:46:28 +07:00
jangko a7db7b9101
add engine API V3 of Cancun 2023-08-08 21:41:40 +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
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
Kim De Mey 89b3e679e2
Add new portal beacon chain lc content encoding tests (#1636) 2023-07-08 17:01:33 +02:00
jangko 08bc05a56a
stew without results 2023-07-06 15:49:03 +07:00
Kim De Mey 9a360793db
Bump nimbus-eth2 and (limited) nim-stew (#1618) 2023-06-28 09:35:36 +02:00
Kim De Mey 8ebac4c878
Some more Options to Opt and similar changes (#1611)
Includes nim-eth bump.
2023-06-27 19:43:32 +02:00
jangko e183449072
update nim-json-rpc
httpserver.nim: adding 'Content-Type: application/json' header to
the response.
2023-06-27 07:19:51 +07:00
andri lim 26a8759c34
implementation of EIP-4844: Shard Blob Transactions (#1440)
* EIP-4844: add pointEvaluation precompiled contract

* EIP-4844: validate transaction and block header

* EIP-4844: implement DataHash Op Code

* EIP-4844: txPool support excessDataGas calculation

* EIP-4844: make sure tx produce correct txHash

* EIP-4844: node should not automatically broadcast blob tx to it's peers

* EIP-4844: add test cases

* EIP-4844: add EIP-4844 support to t8n tool

* EIP-4844: update nim-eth to branch eip-4844

* fix t8n transaction decoding

* add t8n test data

* EIP-4844: fix blobHash opcode

* disable blobHash test when evmc_enable
2023-06-24 20:56:44 +07:00
Kim De Mey 2de9c95770
Remove a socket.close after destroy + bump nim-eth for uTP fixes (#1604) 2023-06-21 18:56:57 +02:00
jangko 8700d8b1e1
reduce compiler warnings 2023-06-12 12:58:53 +07:00
jangko 67aaf92c1d
bump submodules 2023-06-07 18:12:02 +07:00
jangko cbd593f514
bump nim-eth and accompanying fixes 2023-05-31 19:10:17 +07:00
Kim De Mey c9f3f82877
Add new Portal BlockBody type for Shanghai fork (#1589) 2023-05-30 06:56:54 +02:00
jangko 9868eceed1 fix withdrawals problem in tx-pool 2023-05-23 11:36:20 +03:00
jangko 4e58f9d79a
modexp precompile allow arbitrary input length 2023-05-11 07:21:03 +07:00
Kim De Mey 408394a2bd
Bump nim-eth and remove unneeded Defect raises (#1575) 2023-05-10 18:04:35 +02:00
Kim De Mey f565b2bc57
Bump nim-eth and accompanying nim-secp2561k module (#1574) 2023-05-09 21:40:59 +02:00
Adam Spitz 7f56e90654
Revert "Some work on speculative execution (#1552)" (#1561)
This reverts commit ddbdf34c3d.
2023-04-24 16:59:38 -04:00
Adam Spitz ddbdf34c3d
Some work on speculative execution (#1552)
* Recreating some of the speculative-execution code.

Not really using it yet. Also there's some new inefficiency in
memory.nim, but it's fixable - just haven't gotten around to it yet.

The big thing introduced here is the idea of "cells" for stack,
memory, and storage values. A cell is basically just a Future (though
there's also the option of making it an Identity - just a simple
distinct wrapper around a value - if you want to turn off the
asynchrony).

* Bumped nim-eth.

* Cleaned up a few comments.

* Bumped nim-secp256k1.

* Oops.

* Fixing a few compiler errors that show up with EVMC enabled.
2023-04-22 10:17:37 -04:00
Jordan Hrycaj 0387afb7b1
Remove local block body rlp fix (#1555)
* Remove local block body rlp fix

why:
  Fix moved to `nim-eth` module

* Update nim-eth bumper
2023-04-21 20:08:18 +01:00
Kim De Mey ff90f4fd22
Improve logging and logging options in Fluffy (#1548)
* Improve logging and logging options in Fluffy

- Allow selection of log format, including:
  - JSON
  - automatic selection based on tty
- Allow log levels per topic configured on cli
2023-04-19 17:01:01 +02:00
jangko b378e19892
bump submodules and accompanying fixes 2023-04-17 15:52:14 +07:00
Kim De Mey 3eafb15d7c
Make beacon LC adjustements to support capella in light clients (#1545)
- Bump nimbus-eth2 repo
- Beacon LC adjustements in fluffy
- Beacon LC adjustements in nimbus_verified_proxy
2023-04-13 18:40:01 +02:00
Adam Spitz c58d83efd5
More work on stateless mode (#1535)
* Reviving more of the code for stateless mode.

* Made asyncProcessTransaction.

* More work on stateless mode.
2023-04-12 08:39:11 -04:00
Kim De Mey 2d51196645
Add usage of header 14764013 for historya content test vectors (#1533) 2023-04-06 19:57:01 +02:00
Kim De Mey 0b960f323c
Add test vectors for history content block bodies and receipts (#1525) 2023-03-30 14:21:09 +02:00
Adam Spitz 8d9b2522ea
More on withdrawals (#1508)
* Gwei conversion should use u256 because u64 can overflow.

* Make withdrawals follow the EIP-158 state-clearing rules.

(i.e. Empty accounts should be deleted.)

* Allow the zero address in normalizeNumber.

(Necessary for one of the new withdrawals-related tests.)

* Another fix with a withdrawals-related test.
2023-03-17 14:16:24 -04:00
Kim De Mey 6bc1fedf59
Bump nim-eth module for rlpx improvements (#1502) 2023-03-16 21:21:49 +01:00
Zahary Karadjov db0a117f54 Bump Nim to 1.6.12 2023-03-16 12:37:07 +02:00
Kim De Mey e724feaf96
Bump nim-eth module and related dependency modules (#1498) 2023-03-14 21:13:37 +01: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 b64135b830
Bump nimbus-eth2 and fix beacon LC related changes (#1473)
* Bump nimbus-eth2 and fix beacon LC related changes

* Disable local_testnet test in CI
Latest version is no longer compatible with the old nightlies that are being downloaded for the test
2023-02-26 16:44:05 +01:00
jangko 55b4baa6ba bump submodules to reduce compiler warnings 2023-02-23 20:14:29 +07:00
jangko f5c12062bd
bump submodules to reduce compiler warnings 2023-02-22 12:21:41 +07:00
jangko 54958d4731 bump submodules to reduce compiler warnings 2023-02-16 08:56:37 +07:00
jangko 0f065e91b5
bump submodules to further reduce compiler warnings 2023-02-02 09:29:02 +07: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
Kim De Mey a669b51ec5
Bump Nim to 1.6 and resolve the related issues (#1445)
Two unresolved items currently:
- Three tests that are temporarily disabled as they fail in the
macro_assembler code, which seems to be due to an ambigious
identifier Stop (Ops and chronos ServerCommand enum).
- i386 CI disabled as it fails at Nim compilation already. Failed
tests where already ignored for this target.
2023-01-26 13:37:19 +01:00
Kim De Mey 9b1193c402
Revert "Updated to the latest nim-eth, nim-rocksdb, nim-web3. (#1441)" (#1443)
This reverts commit 1c1a3352b3.
2023-01-23 10:50:17 +01:00
Adam Spitz 1c1a3352b3
Updated to the latest nim-eth, nim-rocksdb, nim-web3. (#1441) 2023-01-21 15:04:22 +01:00
Kim De Mey 12f66ae598
Move BlockHeaderWithProof content to content key selector 0 (#1379)
* Move BlockHeaderWithProof content to content key selector 0

- Remove as content type with content key selector 4
- Replace regular block header with BlockHeaderWithProof at
content key selector 0

* Apply blockHeader content key also to bridge

* Add tests for header with proof generation and verification
2023-01-20 23:04:58 +01:00
jangko cdf40b2d37
emergency fix windows ci 2023-01-13 11:18:30 +07:00
Kim De Mey abafc3e91f
Bump nim-eth for rlpx disconnect rlp decode fix (#1370) 2022-12-14 14:00:04 +01:00
Etan Kissling 22338b7870 bump `nim-eth` for `eip4844` support
The `BlockHeader` structure in `nim-eth` was updated with support for
EIP-4844 (danksharding). To enable the `nim-eth` bump, the ingress of
`BlockHeader` structures has been hardened to reject headers that have
the new `excessDataGas` field until proper EIP4844 support exists.
https://github.com/status-im/nim-eth/pull/570
2022-12-14 11:04:13 +02:00
KonradStaniec 1cc6fc5cff
bump nimbus-eth2 and web3 (#1360)
- nimbus-eth2 exposes new callbacks in LightClient
- web3 exposes createAccessList call
2022-12-09 18:00:45 +01:00
KonradStaniec f4cacdfc6a
bump nimbus-eth2 (#1345)
* bump nimbus-eth2
2022-12-02 16:09:31 +01:00
KonradStaniec e78110202b
bump nim-eth (#1342) 2022-11-30 12:05:41 +01:00
Etan Kissling bc3f164b97
bump `nim-eth` for `withdrawalsRoot` support (#1326)
The `BlockHeader` structure in `nim-eth` was updated with support for
EIP-4895 (withdrawals). To enable the `nim-eth` bump, the ingress of
`BlockHeader` structures has been hardened to reject headers that have
the new `withdrawalsRoot` field until proper withdrawals support exists.
https://github.com/status-im/nim-eth/pull/562
2022-11-26 15:59:19 +01:00
KonradStaniec 4b497ec3ca
bump nim-web3 (#1309) 2022-11-21 08:02:15 +01:00
Kim De Mey ced7db901b
Bump nim-eth module for bug fixes in RLPx (#1306)
- RLP Enum DisconnectionReason deserialization fixes
- RLPx auth RangeError fixes
2022-11-17 13:52:55 +01:00
Kim De Mey cbe40285cf
Bump nim-eth for discv4 assertion error fix (#1289) 2022-11-07 17:24:19 +01:00
Kim De Mey 36d430aaa2
Add headers with proof content type and use it for verification (#1281)
* Add headers with proof content type and use it for verification

- Add BlockHeaderWithProof content type & content
- Use BlockHeaderWithProof content to verify if chain data is
part of the canonical chain
- Adjust parser & seeder code to be able to seed these headers
with proof
- Adjust eth_data_exporter to be able to export custom header
ranges for which to build proofs (mostly for testing)

There is currently quite some ugliness & clean-up needed for which
a big part is due tos upporting both BlockHeader and
BlockHeaderWithProof on the network.

* Change accumulator proof to array / SSZ vector type

- Change accumulator proof to SSZ vector instead of SSZ list.
- Add and use general buildProof and buildHeaderWithProof func.

* Make the BlockHeaderWithProof an SSZ Union with None option

* Update portal-spec-tests to master commit
2022-11-04 09:27:01 +01:00
Kim De Mey 425b3ae322
Bump stint to (hopefully) resolve issue #1275 (#1276) 2022-10-21 08:54:12 +02: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
Kim De Mey 9430619272
Remove Accumulator as network content type and add it to binary (#1267)
Portal master accumulator was removed from the network specs as a
content type shared on the network, as since the merge this is
a finite accumulator (pre-merge only).
So in this PR the accumulator gets removed as network type and
gets instead baked into the library. Building it is done by
seperate tooling (eth_data_exporter).
Because of this a lot of extra code can be removed that was
located in history_network, content_db, portal_protocol, etc.

Also removed to option to build the accumulator at start-up
of fluffy as this takes several minutes making it not viable.
It can still be loaded from a provided file however.

The ssz accumulator file is for now stored in the recently
created portal-spec-tests repository.
2022-10-17 20:38:51 +02:00
jangko a813865788
bump nim-eth: move eth1 specific code to here 2022-10-15 19:48:22 +07:00
KonradStaniec 538efad325
Bump nimbuseth2 (#1255)
* bump nimbus-eth2

* Remove win i386 from CI due to the fact that it is not tested in dependencies, which can lead to CI failures with updates.
2022-10-10 07:58:12 +02:00
Kim De Mey 5b4643b8ff
Bump nim-eth for rlpx double future completion fix (#1254) 2022-10-06 19:20:39 +02:00
jangko ae20b92428
bump nim-evmc 2022-10-03 16:38:32 +07:00
KonradStaniec b84c59eef2
bump nim-web3 (#1244) 2022-09-28 08:11:23 +02:00
jangko 8dff89ecad
bump confutils, serialization family, and stew 2022-09-23 10:09:53 +07:00
KonradStaniec ef54204fdc
Bump nim-json-rpc (#1236) 2022-09-22 15:21:50 +02:00
KonradStaniec 5be329741a
Bump deps related to lc-proxy (#1230) 2022-09-19 16:25:25 +02:00
KonradStaniec 2503964149
Add improved mpt trie proof verification (#1223) 2022-09-15 13:04:41 +02:00
KonradStaniec b43709f473
Add missing nimbus-eth2 modules (#1224) 2022-09-14 15:10:05 +02:00
Zahary Karadjov 4b83208a19 Switch to the new style of importing vendor packages
In preparation of our migration to the new Nimble-based setup
and [nim-workspace][1], we switch to a new model where the vendor
packages are no longer imported through a locally generated Nimble
dir, but rather through an auto-generated `nimbus-build-system.paths`
file that features regular `--path:` statements.

This file will be imported only within the nimbus-build-system
environment in order to avoid any unwanted interference in working
copies based on the new Nimble setup.

[1]: https://github.com/status-im/nim-workspace
2022-09-12 22:56:08 +03:00
jangko 113de71252
bump nim-eth: fix discovery ping pong handler 2022-09-12 15:00:28 +07:00
KonradStaniec c138a4913c
Implement getStorageAt endpoint (#1216)
* Implement getStorageAt endpoint
2022-09-09 15:59:36 +02:00
KonradStaniec 9d10f8fbae
Add mpt proof verification to proxy (#1213)
* Add mpt proof verification to proxy
2022-09-06 18:14:50 +02:00
Jacek Sieka 8d6ec3dd1a bumps
cleanups mostly
2022-09-06 11:00:40 +07:00
andri lim ad4e25b27e
Fix eth66 and eth67 handshake (#1214)
* bump nim-eth

* fix eth66 and eth67 handshake
2022-09-05 23:37:58 +02:00
KonradStaniec d6322aab22
Bump nim-web3 (#1212) 2022-09-05 11:30:18 +02:00
Jacek Sieka c2ed731fa5
eth: adapt to smaller eth_types (#1210) 2022-09-03 20:15:35 +02:00
KonradStaniec 5aaf16049f
Use separeate client and server in lcproxy (#1208)
* Use separate client and server in lc proxy
2022-08-31 07:48:48 +02:00
jangko c6f35142a8
simple peer manager to handle static peers reconnection
fix #618
2022-08-26 22:07:56 +07:00
KonradStaniec caa5e009ff
Initial Binary for light client proxy (#1202)
* Initial Binary for light client proxy
2022-08-26 13:54:10 +02:00
Kim De Mey 91a3425731
Bump nim-secp256k1 module for signature recovery id check (#1196) 2022-08-23 16:28:24 +02:00
jangko fe54f93ab6
bump nim eth
better method not implemented message of AbstractChainDB
2022-08-22 20:11:36 +07:00
Zahary Karadjov daac75796f
Extract the EIP1559 gas fee calculation in nim-eth, so it can be reused in nimbus-eth2 2022-08-22 10:52:20 +07:00
Nikolay Mitev 1e4f138574 Add nimbus-eth2 as submodule. Add launch_local_testnet script to CI. 2022-08-18 18:06:38 +03:00
Jordan Hrycaj f07945d37b
Misc snap sync updates (#1192)
* Bump nim-stew

why:
  Need fixed interval set

* Keep track of accumulated account ranges over all state roots

* Added comments and explanations to unit tests

* typo
2022-08-17 08:30:11 +01:00
KonradStaniec c5101c16e9
Bump nim eth (#1188)
* Bump nim eth

* Bump actions ubuntu
2022-08-16 09:17:57 +02:00
Jordan Hrycaj 7d7e26d45f
Experimental bulk loader tests (#1187)
why:
  Rocksdb bulk loading might provide a slight advantage when loading
  larger data sets into the system
2022-08-12 16:42:07 +01:00
KonradStaniec 4f8d10f338
Bump nim-eth (#1185) 2022-08-06 10:11:36 +02:00
Jordan Hrycaj 5f0e89a41e
Snap accounts bulk import preparer (#1183)
* Provided common scheduler API, applied to `full` sync

* Use hexary trie as storage for proofs_db records

also:
 + Store metadata with account for keeping track of account state
 + add iterator over accounts

* Common scheduler API applied to `snap` sync

* Prepare for accounts bulk import

details:
+ Added some ad-hoc checks for proving accounts data received from the
  snap/1 (will be replaced by proper database version when ready)
+ Added code that dumps some of the received snap/1 data into a file
  (turned of by default, see `worker_desc.nim`)
2022-08-04 09:04:30 +01:00
jangko a5d4759bfd
enhance net-key command line option to accept random, hex, and path
- previously it only accept hex
- fix #587
2022-07-30 08:46:11 +07:00
Jordan Hrycaj 5d98f68c09
Sync update to work with sepolia reorgs (#1168)
* Error return in `persistBlocks()` on initial `VmState` roblem

why:
  previously threw an exception

* Updated sync mode option

why:
 using enum rather than bool => space for more

* Added sync mode `full`, re-factued legacy sync

also:
  rebased

* Fix typo (crashes `pesistBlocks()` otherwise)

also:
  rebase to master

* Reduce log ticker noise by suppressing duplicate messages

* Clarify staged queue overflow handling

why:
  backtrack/re-org mode in `stageItem()` should be detected by both,
  the global indicator or the work item where it might have moved into.

also:
  rebased
2022-07-21 13:14:41 +01:00
jangko 76e438da2a
bump submodule: json-rpc and graphql
this is an update to support jwt auth and cors hook
2022-07-18 16:56:44 +07:00
jangko 6cfaaf5b45
bump json-rpc, secp256k1, blscurve, and accompanying fixes 2022-07-12 20:01:02 +07:00
Kim De Mey 87ea6ffb92
Bump most of the submodules (#1156) 2022-07-08 20:28:31 +02:00
Kim De Mey fb12793482
Bump nim-eth and nim-bearssl and accompanying fixes (#1150) 2022-07-04 09:38:02 +02:00
Kim De Mey 0068e3b427
Bump some modules to fix breakage from #1145 (#1149) 2022-07-01 22:46:36 +02:00
Jordan Hrycaj 134fe26997
Store proved snap accounts (#1145)
* Relocated `IntervalSets` to nim-stew repo

* Accumulate accounts on temporary kv-DB

why:
  Explore the data as returned from snap/1. Will be converted to a
  `eth/db` next.

details:
  Verify and accumulate per/state-root accounts downloaded via snap.

also:
  Some unit tests

* Replace `Table` by `TrieDatabaseRef` for accounts accumulator

* update ticker statistics

details:
  mean/variance based counter update

* allow persistent db for proved accounts

* rebase, and globally activate unit test

* fix statistics
2022-07-01 12:42:17 +01:00
Kim De Mey d4d4e8c28f
Add accumulator buildProof, verifyProof and verifyHeader (#1132) 2022-06-23 21:00:59 +02:00
Jacek Sieka 9e8d2d0550
sqlite: bump 2022-06-21 16:18:41 +02:00
andri lim 5374874552
bump serialization family(serialization, json, toml) (#1135) 2022-06-20 11:32:41 +02:00
KonradStaniec 0776f35e0c
Use queries with custom xor function (#1113)
* Use queries with custom xor function
2022-06-03 13:44:42 +02:00
KonradStaniec 5c78fe64e4
Fix utp connection leak on cancel (#1107)
* Fix utp connection leak on cancel
2022-05-31 14:28:02 +02:00
KonradStaniec b975d35c84
Bump sqlite-abi (#1108) 2022-05-31 12:37:10 +02:00
jangko b03c2dca4f
bump nim-web3: engine api version alpha.9 2022-05-29 11:23:57 +07:00
Jordan Hrycaj ba940a5ce7
Snap sync simplify object inheritance (#1098)
* Reorg SnapPeerBase descriptor, notably start/stop flags

details:
  Instead of using three boolean flags startedFetch, stopped, and
  stopThisState a single enum type is used with values SyncRunningOk,
  SyncStopRequest, and SyncStopped.

* Restricting snap to eth66 and later

why:
  Id-tracked request/response wire protocol can handle overlapped
  responses when requests are sent in row.

* Align function names with source code file names

why:
  Easier to reconcile when following the implemented logic.

* Update trace logging (want file locations)

why:
  The macros previously used hid the relevant file location (when
  `chroniclesLineNumbers` turned on.) It rather printed the file
  location of the template that was wrapping `trace`.

* Use KeyedQueue table instead of sequence

why:
  Quick access, easy configuration as LRU or FIFO with max entries
  (currently LRU.)

* Dissolve `SnapPeerEx` object extension into `SnapPeer`

why;
  It is logically cleaner and more obvious not to inherit from
  `SnapPeerBase` but to specify opaque field object references of the
  merged `SnapPeer` object. These can then be locally inherited.

* Dissolve `SnapSyncEx` object extension into `SnapSync`

why;
  It is logically cleaner and more obvious not to inherit from
  `SnapSyncEx` but to specify opaque field object references of
  the `SnapPeer` object. These can then be locally inherited.

  Also, in the re-factored code here the interface descriptor
  `SnapSyncCtx` inherited `SnapSyncEx` which was sub-optimal (OO
  inheritance makes it easier to work with call back functions.)
2022-05-23 17:53:19 +01:00
jangko 41e9ea8d45
bump nim-confutils
why:
- fix Acc Quoted ident processsing bug in config-file
- fix Dot Expr processsing bug in config-file
2022-05-10 16:04:21 +07:00
Jordan Hrycaj 3b9f0e3980
Proper Uint256 parser for JSON genesis (#1071)
* Update exception tracinig

* Use lazy JSON parser

why:
  Uint246 type is not directly supported by the JSON serializer

* Json parser update for stringified UInt256 integers

why:
  Now available

* update sub-module branch reference
2022-05-06 09:02:28 +01:00
Kim De Mey 7bd9afa465
Bump nim-eth for max discv5 packet size (#1070) 2022-05-03 09:18:33 +02:00
jangko e2c9ec4f84
update submodules to accomodate styleCheck 2022-04-14 08:39:50 +07:00
Kim De Mey d337806301
Improve logs and loglevels, and general cleanup (#1059) 2022-04-13 07:56:01 +02:00
Kim De Mey 82aab2a404
Bump chronos and json-rpc and avoid http conn re-use for blockwalk (#1053)
Currently re-using http connections for the json-rpc requests
seems to slow down the requests considerably. Avoid this by
forcing a close after each requests in the blockwalk tool.
2022-04-11 19:39:45 +02:00
Jordan Hrycaj 8af5c33ef9
Facilitate http code response on websocket JWT authentication failure (#1043)
* Facilitate http code response on websocket JWT authentication failure

* Update JSON-RPC link
2022-04-07 10:37:35 +01:00
Jordan Hrycaj 737236fd6e
Enable JWT authentication for websockets (#1039)
* Enable JWT authentication for websockets

details:
  Currently, this is optional and only enabled when the jwtsecret option
  is set.

  There is a default mechanism to generate a JWT secret if it is not
  explicitly stated. This mechanism is currently unused.

* Make JWT authentication compulsory for websockets

* Fix unit test entry point + cosmetics

* Update JSON-RPC link

* Improvements as suggested by Mamy
2022-04-06 15:11:13 +01:00
Kim De Mey 16ecbeb902
Bump nim-eth for lower loglevel of rlpx and discv4 harmless errors (#1041) 2022-04-06 11:57:08 +02:00
Jacek Sieka 1d6a9951d6
move rocksdb support to eth1 (#927)
* move rocksdb support to eth1

only used here / causes unnecessary build deps
2022-04-06 07:28:19 +02:00
Jacek Sieka e9afa00f16 snappy revamp
not entirely sure why nimbus-eth1 has a copy of snappy but here's a new
version: https://github.com/status-im/nim-snappy/pull/10
2022-04-05 12:03:01 +07:00
Jacek Sieka 60032bf106
Bump chronos (#925)
Memory fixes, http fixes, fix for issue #963, etc
2022-03-31 14:55:01 +02:00
KonradStaniec 75f2c76ad0
Bump nim-eth module (#1017) 2022-03-29 21:09:49 +02:00
Jordan Hrycaj 4696a53302
Enable optional chunked RLPx messages (#1010)
* Enable optional chunked RLPx messages

why:
  Legacy feature used by Nethermind

details:
  Disable with make flag: ENABLE_CHUNKED_RLPX=0

* Rebase & bump nim-eth

* Fix default behaviour

why:
  Got lost somehow. Comments do not match GNU make code directives.
2022-03-29 10:19:32 +01:00
Ștefan Talpalaru 51bc1cf87f
dist: precompiled binaries and Docker images (#1015)
* dist: precompiled binaries and Docker images

The builds are reproducible, the binaries are portable and statically link librocksdb.

This took some patching. Upstream PR: https://github.com/facebook/rocksdb/pull/9752

32-bit ARM is missing as a target because two different GCC versions
fail with an ICE when trying to cross-compile RocksDB. Using Clang
instead is too much trouble for a platform that nobody should be using
anyway.

(Clang doesn't come with its own target headers and libraries, can't be
easily convinced to use the ones from GCC, so it needs an fs image from
a 32-bit ARM distro - at which point I stopped caring).

* CI: disable reproducibility test
2022-03-27 13:21:15 +02:00
jangko a0ba5a492c
bump some submodules
- graphql: bump version 0.2.20 to 0.2.22
- json-rpc: various bug fixes
- websock: various bug fixes
- http-utils: chronos dependancy
2022-03-25 17:16:21 +07:00
KonradStaniec ad51bd68fc
Bump nim-eth (#1004) 2022-03-21 20:18:43 +01:00
Kim De Mey b00ac490a9
Bump nim-eth and adjust API to support binding to specific address (#994)
- Fixes also a bug which would not start an EthereumNode properly
when no bootstrap nodes are provided
2022-03-16 09:01:35 +01:00
KonradStaniec 2c2bcae00e
Bump nim-eth (#986) 2022-03-04 14:36:32 +01:00
jangko 0d18b606f5
bump json-rpc 2022-02-28 10:36:35 +07:00
jangko 1f9ed449d9
bump nim-web3
update Engine API from v1-alpha6 to v1-alpha7
2022-02-27 14:37:35 +07:00
jangko b46d60f65d
bump nim-json-rpc
null value of optional param rejected by serializer
because of a bug in `jsonmarshal.nim` now fixed
2022-02-14 21:23:00 +07:00
Kim De Mey 38036966a6
Improve the tests of the local testnet (#953)
* Improve the tests of the local testnet

The local testnet test was rather flaky and would occasionally
fail. It has been made more robust by adding the ENRs directly
to the routing table instead of doing some random lookups.

Additionally, the amount of nodes were increased (=64), ip limits
configuration was added, and the bits-per-hop value was set to 1
in order to make the lookups more likely to hit the network
instead of only the local routing table.

Failure is obviously still possible to happen when sufficient
packets get lost. If this turns out to be the case with the current
amount of nodes, we might have to revise the testing strategy here.

* Disable lookup test for State network

Disable lookup test for State network due to issue with custom
distance function causing the lookup to not always converging
towards the target.
2022-02-02 22:48:33 +01:00
jangko 3e60948785 bump nim-eth
changes because of EIP-4399 preparation:
- `mixDigest` field of BlockHeader got alias `random`
2022-02-01 18:11:14 +02:00
Kim De Mey ac1196d915
Bump nim-ssz-serialization and clean-up fromSszBytes raises (#948) 2022-01-31 21:57:34 +01:00
KonradStaniec 296bf3156d
Bump nim-eth (#946)
implementation of utp fast resends
implementation of utp fast resends when processing selective acks
more logging for utp
2022-01-28 06:55:13 +01:00
Zahary Karadjov 3cbb920406
Migrate to Engine API spec version v1.0.0-alpha.5; More progress towards working M1 2022-01-25 12:52:50 +02:00
KonradStaniec 990846135a
Bump nim-eth (#941)
* Bump nim-eth
2022-01-25 10:19:16 +01:00
Zahary Karadjov 137eb97766 Initial implementation of the merge spec
Includes a simple test harness for the merge interop M1 milestone

This aims to enable connecting nimbus-eth2 to nimbus-eth1 within
the testing protocol described here:

https://github.com/status-im/nimbus-eth2/blob/amphora-merge-interop/docs/interop_merge.md

To execute the work-in-progress test, please run:

In terminal 1:
tests/amphora/launch-nimbus.sh

In terminal 2:
tests/amphora/check-merge-test-vectors.sh
2022-01-24 09:44:39 +02:00
Zahary Karadjov e7adc609f4
Bump nim-stew 2022-01-23 19:25:46 +02:00
Zahary Karadjov 8ef9c620cb
Bump nim-json-rpc 2022-01-23 19:19:24 +02:00
Jacek Sieka f47c710ada
stew: bump (#924)
`Result` changes and `endians2` performance fix
2022-01-13 21:11:54 +01:00
Kim De Mey 73b4a73423
Bump nim-eth and nim-ssz-serialization vendor modules (#926)
- nim-eth: uTP updates, ENR improvemens and extra discv5 metrics
- nim-ssz-serialization: require BitList pairs
- update github actions cache keys to invalidate cache
2022-01-12 21:41:23 +01:00
Jordan Hrycaj 1f774c01a2
Jordan/accounts cache scenario (#904)
* crash test scenario

details:
  Example code for inspecting nested block chain and accounts cache
  database transaction framework. There seems to be a pathological
  case where the system crashes after a rollback (as appeared in the
  tx-pool packer code.)

* simplified crash scenario

* Workable solution (as suggested by Andri)

details:
  Avoiding db.rollback() (db.commit() is OK) while vmState.stateDB is
  alive.

* Rename text_txcrash => test_accounts_cache

why:
  Unit tests covers part of accounts_cache handling

* comment update
2021-12-13 11:58:05 +00:00
Kim De Mey 70625bc02c
Use one bootstrap nodes argument for discv5 and Portal (#911)
Currently bootstrap nodes for discv5 and for the Portal nodes
were provided through separate cli arguments. This is however
confusing and cumbersome as typically when (currently) testing
a node will have both discv5 and the Portal networks enabled.
We merge them into one argument.

If a node happens not to support a Portal network, it will be
removed after message request failure.

Commit also contains additional clean-up and nim-eth bump.
2021-12-13 09:06:29 +01:00
jangko d5d0a44b0e
bump nim-confutils with addition features needed by nimbus-eth1
new features:
- multiple lines long description
- ignore property in addition to hidden
2021-12-12 16:38:10 +07:00
Kim De Mey 63b0945b52
Use json rpc client to run tests on portal testnet (#899)
Tests have also been added & adjusted. Original ones were actually
failing but unnoticed due to mistake in port passed in curl command.
2021-12-03 09:51:25 +01:00
jangko dcd86bb221
vendor: bump nim-json-rpc
bugfix and features:
- Switch to the Chronos HTTP client (adds support for HTTPS)
- Allow dynamic RPC method names in the 'rpc' macro
- Restore the support for using the news package
2021-11-30 11:47:11 +07:00
Kim De Mey 903350bdde
Add local testnet script and required json-rpc calls (#891)
- Add basic discv5 and portal json-rpc calls and activate them in
fluffy
- Renames in the rpc folder
- Add local testnet script and run this script in CI
- bump nim-eth
2021-11-24 08:45:55 +01:00
KonradStaniec f9ed83c221
bump nim eth (#890) 2021-11-22 12:35:08 +01:00
Kim De Mey 02afda1b45
Run everything fluffy with chronosStrictException (#889) 2021-11-18 17:52:44 +01:00
Kim De Mey 78f585399f
Bump submodules (#887)
* Bump submodules

* Fix missing import for state and history networks
2021-11-18 12:06:53 +01:00
Kim De Mey bdbd8e4c87
Add SSZ Unions through case objects (#882)
* Add SSZ Unions through case objects

* Add connection id content response test and improve other test vectors

* Implement content keys and ids for state network as per spec

Content keys case object is used so that it can be serialized and
deserialized as an SSZ Union.

* Let message Union in Portal wire protocol start at 0 as per new spec
2021-11-17 17:11:17 +01:00
kdeme 6de2be146a
Bump unittest2 and testutils 2021-11-14 16:02:22 +07:00
Kim De Mey 0ba3c682e4
Use SSZ code from nim-ssz-serialization module (#875) 2021-10-23 14:28:12 +02:00
Kim De Mey 447deb29ff
Add HistoryNetwork that uses Portal wire protocol (#856)
* Add HistoryNetwork that uses Portal wire protocol

* Further implement getContent and adjust naming of distance calc calls
2021-10-09 13:22:03 +02:00
jangko 7757b03d0b
vendor: bump nim-graphql version from 0.2.18 to 0.2.20
features:
- playground: add support to run inside docker
- add secure mode to graphql http server
- add secure mode to graphql http client
- httpclient: add unzip dan chunked transfer of HTTP 1.1

bugfixes:
- fix accept-encoding bug in httpserver
2021-09-21 13:35:52 +07:00
KonradStaniec 8f683bd318
bump nim-eth module (#828)
* bump-nim-eth

* fix breaking changes

* Increase result limit
2021-09-15 11:24:03 +02:00
jangko 3f60764675
vendor: bump nim-confutils
new features:
- add compile time check to detect duplicate abbr and duplicate name
- separator text when displaying help
2021-09-09 07:44:34 +07:00
Kim De Mey 07b2116f6b
Another nim-eth bump and API changes fix (#821) 2021-09-07 15:56:51 +02:00
Kim De Mey 832a50df6e
Bump nim-eth module and adjust for `distanceTo` API change (#819) 2021-09-06 17:04:21 +02:00
jangko e357a4ea5d
vendor: update websock and json-rpc
websock:
- "Host" header override (#87)
- Use caps for log-levels in tests
- Perform utf-8 validation at message boundaries (#90)

json-rpc:
- fix both ws rpc server and client due to websock breaking changes
2021-08-05 17:30:49 +07:00
KonradStaniec 4b1fa050e9
Use websockets in proxy (#779) 2021-08-05 08:14:25 +02:00
Ștefan Talpalaru e43e1cc932
bump nimbus-build-system (#775) 2021-08-03 14:13:05 +02:00
Kim De Mey e2b50d2339
Add routing table and required lookup code to Portal protocol (#773)
* Add routing table and required lookup code to Portal protocol

* Enable Portal lookup and validate loops + minor adjustments
2021-07-30 21:19:03 +02:00
Kim De Mey e9bfcedcaf
Bump nimbus-build-system and nim-eth vendor modules (#774) 2021-07-30 13:11:25 +02:00
Kim De Mey 66532e8ad5
Use ssz vectors for the hashes and add enrs in the tests (#763) 2021-07-20 14:04:57 +02:00
Kim De Mey 25522b2c24
Further implement Portal Nodes and FoundContent messages (#757) 2021-07-13 15:15:33 +02:00
KonradStaniec bd862cd649
[BUMP] bump json rpc module (#758) 2021-07-13 13:34:52 +02:00
Kim De Mey 117f744f52
Bump nim-eth to test after removing portal code (#755) 2021-07-09 23:55:02 +02:00
KonradStaniec aaab0d7bfd
[BUMP] bump json rpc (#745) 2021-07-02 16:45:53 +02:00
jangko 02afb27e47
vendor: update graphql, json-rpc, chronicles, http-utils, websock
- nim-graphql from v0.2.16 to v0.2.18:
  - replace nim-miniz with nim-zlib
  - replace unittest with unittest2

- nim-http-utils:
  - Fix to handle HTTP response with `<space>CRLF` after response status code.

- nim-json-rpc:
  - rename ws to websocket

- nim-websock:
  - rename ws to websock
  - fix mutual closing bug
  - fix compile time error when using chronicles sink:json

- nim-chronicles:
  - add isLogFormatUsed, used by nim-websock
2021-06-29 12:15:36 +07:00
jangko 1cdb30df90
bump nim-emvc with evmc revision 8.0.0 to 9.0.0
- EIP-1559: add block_base_fee to tx_context
- EVMC_API_VERSION from 8 to 9
- add EVMC_LONDON to evmc_revision enum
2021-06-29 07:34:45 +07:00
jangko b5de442d33
bump submodule nim-eth with EIP-1559 addition 2021-06-29 07:34:00 +07:00
jangko 8cde70c573
vendor: update json-rpc, ws, and chronos, remove news
- nim-json-rpc already replace news with nim-ws
- we also remove news from dependency
- we already have include nim-ws as dependency
- new chronos features is needed by nim-ws
2021-06-24 08:29:06 +07:00
jangko 41c4d186b5
vendor: update nim-graphql, replace nim-miniz with nim-zlib, add nim-ws
- we replace nim-miniz with nim-zlib because nim-ws requires
  features not available in miniz
- nim-graphql also switch to nim-zlib
- nim-ws depends on nim-zlib and we need it for upcoming
  websocket rpc
2021-06-21 16:30:02 +07:00
Kim De Mey 4ce9b5883c
Add Portal eth json-rpc stubs and Portal content file (#720)
* Bump nim-json-rpc module

* Add eth json rpc stubs

* Add portal content file
2021-06-18 19:20:48 +02:00
Kim De Mey 137875ba36
Bump nim-eth vendor repository (#713) 2021-06-15 12:38:54 +02:00
jangko f42c76467b
bump nim-graphql from 0.2.14 to 0.2.16
- fixes non repeatable directive error message
- refactor nim caching in github action ci
- refactor github action ci matrix
- extract miniz to it's own repo
2021-06-06 11:27:12 +07:00
jangko 051957c464
add nim-miniz submodule to vendor
nim-miniz now sit in it's own repo after
extracted from nim-graphql

it also a dependency of incoming nim-ws
2021-06-06 11:23:30 +07:00
Jamie Lokier ee88e0266a EVMC: Bump `nim-evmc` module for type improvements (API 7.5 branch)
This bump is required by `TransactionHost` coming next.

There have been many changes to `nim-evmc` since earlier developments on
`nimbus-eth1`.  The types in the API have changed, and there is no longer a
need to cast the function types.

This commit bumps the submodule while keeping with EVMC API 7.5 for now.
`.gitmodules` is updated to follow the module branch `api-version-7.5`.

Submodule changes:

  > Nim: Function casts no longer required, type-checking finally works
  > Nim: Make the test host use exactly the type signatures in the API
  > add github action script
  > Nim: Export `evmc_create_vm_name_fn`
  > Nim: Use `var` instead of `ptr` for arguments that are pass-by-ref
  > Nim: Fix missing `ptr` in signature of `execute`
  > Nim: Use `ptr` in `release` for API consistency
  > Nim: Disable "Imported and not used" warning in test program
  > Nim: Remove unnecessary exports from the Nim example host/VM
  > Nim: Simplify Nim C++ codegen bug workaround
  > Nim: Add type and documentation for `evmc_create_example_fn`
  > Nim: Workaround Nim compiler bug with Nim 1.2.10
  > Nim: Workaround Nim compiler bug with `uint32`-sized bitset
  > Nim: Use a more varied bit pattern in `get_capabilities` test
  > Nim: Convert `evmc_capabilities` to Nim bitset
  > Nim: Convert `evmc_flags` to Nim bitset
  > Nim: Compile time verify that target C enums are `int` sized
  > Nim: Recognise that target C enums are not always `cint`
  > Nim: Make `evmc_status_code` a normal enum
  > Nim: Use `csize_t` in test program and Nim example host/VM
  > Nim: Use `csize_t` in the VM support API
  > Nim: Use `csize_t` in appropriate places to match EVMC API
  > Nim: Use binary-compatible C99 `bool` without target assumptions
  > Version (README): Announce we support EVMC 7.5.0 and Istanbul fork
  > Doc: Tweak GitHub badges on README
  > Doc: Make title fit on GitHub page without wrapping
  > Doc: README edits
  > Doc: Update the README for 2021 - the year of Nimbus!
  > License: Add licensing info about third-party files
  > License: Update license text in README
  > License: Fix incorrect name of Apache v2 license file and tweak
  > License: Add missing MIT license file
  > Nim: Add and update copyright headers
  > Nim: Update Nim API to follow EVMC API 7.5.0
  > Nim: Update doc comments and fix formatting
  > Make the tests work with the new C++ mini-EVM in EVMC 7.5.0
  > Change C++ `example_host` to workaround Nim -> C call type mismatch
  > The EVMC package expects C++14 now
  > Upgrade C++ `example_host` in `tests/evmc_c` to EVMC 7.5.0
  > Upgrade C++ `example_vm` in `tests/evmc_c` to EVMC 7.5.0
  > Upgrade C/C++ headers in `tests/evmc_c` to EVMC 7.5.0

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-28 13:14:17 +03: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 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
kdeme 273a94ed76 Bump nim-eth to get better exception tracking 2021-05-12 00:35:37 +03: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