Commit Graph

2734 Commits

Author SHA1 Message Date
jangko 1404f45a88
wire txpool to json rpc 2022-04-03 20:15:23 +07:00
KonradStaniec b3570fae6a
Add api to get n furthest elements from db (#1026)
* Add api to get n furthest elements from db
2022-04-03 15:14:44 +02:00
jangko e04c69df18
txpool: add more test to cover untested features
fix #1029
2022-04-03 15:06:24 +07:00
jangko ef1a68867b
txpool: fix wrong baseFee usage in runTx and runTxCommit 2022-04-03 13:23:10 +07:00
jangko 00e2ec7d38
txpool: fix eip1559TxNormalization bug 2022-04-03 13:23:10 +07:00
jangko 61d7a9acea
fix txpool prevRandao setter 2022-04-03 13:23:10 +07:00
Kim De Mey 6a90937d4b
Add Trin and Ultralight bootstrap nodes to Fluffy (#1028) 2022-04-01 20:37:38 +02:00
Kim De Mey 9d656e99c4
Add concurrency to the content offers of neighborhoodGossip proc (#1027)
* Add concurrency to the content offers of neighborhoodGossip proc

And remove some whitespace

* Remove more whitespace and adjust for 80 char line limit

* Update fluffy grafana dashboard to include gossip offer results
2022-04-01 18:01:50 +02:00
Jordan Hrycaj 84ff179cd9
Jordan/fix txs sort order (#1025)
* Fix database sort order for local txs

why:
  For convenience, packed txs were stored in the block sorted by
  rank->nonce. Using local accounts, the greedy grabber uses the sort
  order (local,non-local)->rank->nonce which leads to a wrong calculation
  of the txRoot.

* Housekeeping

details:
  Replaced a couple of local eip1559TxNormalization() functions by a
  single public
2022-03-31 17:17:22 +01:00
Jacek Sieka 60032bf106
Bump chronos (#925)
Memory fixes, http fixes, fix for issue #963, etc
2022-03-31 14:55:01 +02:00
Zahary Karadjov 6d7a80e6e3 Add a Nimble lock file 2022-03-31 12:29:11 +03:00
Jordan Hrycaj 2eb3f414d8
Support for local accounts (#1019)
* Support for local accounts

why:
  Accounts tagged local will be packed with priority over untagged
  accounts

* Added functions for queuing txs and simultaneously setting account locality

why:
  Might be a popular task, in particular for unconditionally adding txs to
  a local (aka prioritised account) via "xp.addLocal(tx,true)"

caveat:
  Untested yet

* fix typo

* backup

* No baseFee for pre-London tx in verifier

why:
  The packer would wrongly discard valid legacy txs.
2022-03-31 09:21:36 +01:00
Zahary Karadjov 6c94291eee
Fix the build under Nim 1.2 2022-03-30 23:27:10 +03:00
Zahary Karadjov c8dff12591
Specify some binaries in the nimble file; Add a Nimble lock file 2022-03-30 23:08:43 +03:00
Zahary Karadjov 69cc7c0c13
Specify some binaries in the nimble file 2022-03-30 18:59:09 +03:00
Ștefan Talpalaru 262f7b0826
CI: nightly build workflow (#1023) 2022-03-30 15:19:42 +02:00
Kim De Mey 8c3f210526
Add blockwalk tool to test range of blocks on Portal network (#1020) 2022-03-30 08:55:38 +02:00
KonradStaniec 4cb4f50bf3
Refactor connection process (#1016)
* Refactor connection process
2022-03-30 07:12:39 +02:00
KonradStaniec 75f2c76ad0
Bump nim-eth module (#1017) 2022-03-29 21:09:49 +02:00
Kim De Mey 392a540eb5
Remove unused import of config to avoid select_backend db import (#1018)
* Remove unused import of config to avoid select_backend db import

- Importing nimbus-eth1 config.nim causes import of select_backend
which will default cause an import of kvstore_rocksdb and thus a
require rocksdb. Remove unused one to avoid rocksdb dependency
for Fluffy.
- Remove some whitespace in bridge_client (to make fluffy CI
trigger for sure).

* Use specific cache keys for fluffy CI workflow

* Disable Fluffy CI reproducibility test
2022-03-29 15:51:48 +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
Jordan Hrycaj a64da329e8
Jordan/ttd debugging helpers (#1013)
* De-noisify some Clique logging

why:
  Too annoying when syncing against Goerly

* Replay devnet# and kiln sessions

why:
  Compiled as local program, the unit test was used for TDD.
2022-03-28 09:35:26 +01:00
Kim De Mey 97c0cea767
Add grafana dashboard for Fluffy metrics (#1012) 2022-03-28 09:43:55 +02:00
Ștefan Talpalaru 0165e43753
dist: dir fix 2022-03-27 13:49:00 +02: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 c704626ea8
mark the new chain as canonical when calling db.setHead
the new chain marked as canonical is from the new head down to
forking point. most of the time, the forking point is the parent
itself.
2022-03-26 13:23:08 +07: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
jangko e628c8dc88
temporary fix db.setHead before actual fix 2022-03-25 14:01:32 +07:00
jangko 54724b87dc
fix safeBlockHash handling in engine_forkchoiceUpdatedV1 2022-03-25 14:01:26 +07:00
jangko 1008e87ec2
disable discovery if maxPeers set to zero 2022-03-25 14:01:18 +07:00
jangko a90bf1c99a
fix ttd handling in sealing engine 2022-03-25 14:00:44 +07:00
jangko effc874d47
fix header.extraData printer in debug.nim 2022-03-25 14:00:44 +07:00
Kim De Mey 89023782f3
Let Portal wire protocol adhere to the discv5 packet size limits (#1008)
- Truncate returned number of ENRs in Portal Nodes message to fit
the discv5 max. packet size
- Truncate returned number of ENRs in Portal Content message to
fit the discv5 max. packet size
- Use more detailed packet size calculation for max content payload
in Portal Content message.
- Add metrics to track how many ENRs get packed in the Portal
Nodes and Content messages.
2022-03-24 21:06:13 +01:00
Jordan Hrycaj 0d99e8003c
remove cruft (#1007)
why:
  Accidentally left over after trying several solutions
2022-03-24 10:28:28 +00:00
Jordan Hrycaj 7b9fe94d1a
Handle EIP-3675 (TheMerge) switch block (#1005)
why:
  If configured/activated, this block is advertised as FORK_NEXT in the
  status(0x01) message of the RPLx wire protocol.
2022-03-24 08:54:11 +00:00
Kim De Mey bde07054d1
Add metrics to the Portal wire protocol (#1006) 2022-03-23 16:32:59 +01:00
jangko 727a3ee7b1
fix BlockHeader object of json-rpc
- add missing baseFeePerGas field
- add missing mixHash field
2022-03-22 08:35:07 +07:00
jangko 89fd986a00
fix ttd logic in sealing engine
also fix isBlockAfterTtd in chain_desc.nim
2022-03-22 08:35:06 +07:00
jangko cf0cc531c3
add block header debug/pretty print 2022-03-22 08:35:06 +07:00
jangko 32915fde46
move eth_callsigs from test_rpc to rpcclient/eth_api 2022-03-22 08:34:57 +07:00
KonradStaniec ad51bd68fc
Bump nim-eth (#1004) 2022-03-21 20:18:43 +01: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
Kim De Mey 74127644db
Adjust findNodes proc naming for consistency (#1002) 2022-03-19 08:54:42 +01:00
Kim De Mey aff785ab48
Avoid opening an uTP stream when no content was accepted (#1001)
When the returned content key bitlist of an accept message is all
zeroes, neither side should try to set up an uTP stream.
2022-03-18 18:29:06 +01:00
Kim De Mey 08aa20a791
Fix error when dataDir does not exist (#1000)
- When dataDir does not exist, attempt to create the dir
- Some additional logging improvements
- Whitespace clean-up
2022-03-18 13:06:57 +01:00
Kim De Mey d3b0254d15
Update fluffy README with docs on testnet0 (#999) 2022-03-17 22:41:43 +01:00
Kim De Mey ae4aef6065
Add bootstrap nodes at compile time for testnet0 (#998)
- Add bootstrap nodes from a bootstrap_nodes.txt file at compile
time
- Add --network flag to select network specific bootstrap nodes
2022-03-17 18:39:24 +01:00
Kim De Mey b14dfea553
Improve portal wire logging by adding protocolId (#997) 2022-03-17 13:19:36 +01:00
jangko a3fe57f2b8
reenable testEngineAPI in test_merge 2022-03-17 12:54:04 +07:00
Jordan Hrycaj ed0e882387
Exported blobs and some scripts to parallel project nimbus-eth1-blobs (#995)
why:
  TDD data and test script that are not needed for CI are externally held.
  This saves space.

also:
  Added support for test-custom_networks.nim to run import Devnet5 dump.
2022-03-16 09:13:17 +00:00