2692 Commits

Author SHA1 Message Date
jangko
fdbabf0b80
unify eip1559TxNormalization
result.gasPrice = baseFee + min(result.maxPriorityFee, result.maxFee - baseFee)
cannot be simplified into
result.gasPrice = min(result.maxPriorityFee + baseFee, result.maxFee)
the expression is not commutative
2022-04-05 17:22:46 +07:00
jangko
64c2227c7c
json rpc test: fix getStorageAt return type 2022-04-05 16:02:20 +07:00
Jordan Hrycaj
7c603672d3
Comment out unnecessary action in unit test (#1036) 2022-04-05 09:52:24 +01: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
Jordan Hrycaj
f11b1a8d8e
Fix typo in tx_head.nim delta calculator
why:
  Causes havoc in most bit fringe cases.

details:
  When setting the head forward, the delta was wrongly registered from
  the static "left" end (which limits the loop) rather than the moving
  "right" end.
2022-04-04 17:07:48 +01:00
Jordan Hrycaj
4ad566a86a
Test bed for chasing issue #1031 2022-04-04 12:42:23 +01:00
jangko
2746f52cc8
txPool: add PoS feeRecipient setter 2022-04-04 09:01:39 +07:00
jangko
5fc121ce08
wire txpool to sealing engine 2022-04-03 20:15:24 +07:00
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