Commit Graph

2663 Commits

Author SHA1 Message Date
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
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
Jordan Hrycaj 534fb528a4
Update terminal total difficulty handling (#992)
why:
  Testing against a replay unit test for Devnet4 made it necessary to
  adjust the TTD handling. Without updated, importing fails at block #5646
  which is the parent of the terminal PoW block. Similar considerations
  apply for Devnet5 and Kiln.
2022-03-15 17:21:41 +00:00
jangko a4b70918ed
temporay disable test_merge 2022-03-11 16:25:23 +07:00
jangko 400722f1fa
inserting header without set head from engine api should also validate the header 2022-03-11 15:13:59 +07:00
jangko 7dbc92f54c
make sure sealing engine produced block and ExecutionPayloadV1 have the same blockHash
- prevRandao/mixDigest = payloadAttrs.prevRandao
- timestamp = payloadAttrs.timestamp
- coinbase = payloadAttrs.suggestedFeeRecipient
- extraData = it can be anything 0-32 bytes, but currently set to empty bytes.
2022-03-11 13:30:46 +07:00
jangko e461248e86
remove cruft 2022-03-09 21:43:51 +07:00
jangko d41a3dedf0
write block ttd in `persistHeaderToDbWithoutSetHead` 2022-03-08 21:47:51 +07:00
jangko 25e7debf5e
fix broken graphql_sim 2022-03-08 21:43:20 +07:00
KonradStaniec a330f0a4ef
Add api to get db size to content db (#987)
* Add size proc to content_db

* Add way to reclaim used space
2022-03-08 14:49:41 +01:00
jangko d74e9cbf49
add warning if engine-api enabled without enabling sealing engine 2022-03-08 14:51:27 +07:00
jangko 9230e6a024
fixes engine api help message in config.nim
somehow a const string still need `$` to display the
content instead of the identifier itself.
2022-03-08 13:29:34 +07:00
jangko d1dd5d5cad
ttd from command-line takes precedence over ttd from config-file 2022-03-08 11:27:14 +07:00
KonradStaniec 2c2bcae00e
Bump nim-eth (#986) 2022-03-04 14:36:32 +01:00
jangko f782327fcf
reimplement engine API rpc kiln spec v2 2022-03-03 11:28:18 +07:00
jangko 2970fc4b02
refactor chain_config and add decodeNetworkParams
allow custom network not only loaded from file but also
decoded from json string
2022-03-03 08:58:55 +07:00
jangko 73e28694b5
move ttd from vm/state to chain_db 2022-03-03 08:58:55 +07:00
jangko 9a1c8fc779
refactor genesis.nim 2022-03-03 08:28:00 +07:00
KonradStaniec b951139af9
Add basic validation of history network (#983)
* Add basic validation of history network

* Save only valid objects to db
2022-03-02 15:29:12 +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 667cb6d750
EIP 4399 changes: random -> prevRandao 2022-02-27 14:37:35 +07:00