Commit Graph

1763 Commits

Author SHA1 Message Date
Zahary Karadjov a5713c5d84
v1.0.9 2021-03-09 01:14:50 +02:00
Zahary Karadjov 196e3ea6b6
Switch to slashing DB v2 by default 2021-03-09 00:47:29 +02:00
Mamy Ratsimbazafy de1060e7f3
centralize p2p validation in a single file and address https://github.com/status-im/nimbus-eth2/pull/2377#issuecomment-791313118 (#2383) 2021-03-06 08:32:55 +01:00
kdeme 5f750f84b4 Use setupAddress for better IP and ports configuration 2021-03-06 00:09:09 +02:00
Mamy Ratsimbazafy d47f53cd9d
Reorg (5/5) (#2377)
* Reorg things left into networking and gossip_processing

* time -> beacon_clock

* fix builds
2021-03-05 14:12:00 +01:00
Mamy Ratsimbazafy 5d7f9c3a04
Consensus object pools [reorg 4/5] (#2374)
* Add documentation

* make test doesn't try to build the beacon node :/
2021-03-04 10:13:44 +01:00
tersec 4278e80657
document two uint64 -> int64 conversions (#2375)
* document two uint64 -> int64 conversions

* fix minimal preset slot time & calculation
2021-03-04 10:13:23 +01:00
Jacek Sieka c4edff504b
remove obsolete todo
issue has been fixed
2021-03-03 09:28:26 +01:00
Mamy Ratsimbazafy 2f17ac7b64
Move SSZ, deposit_contracts & eth1_monitor [reorg files 3/5] (#2371)
* move deposit_contract

* Move SSZ

* fix ssz import in tests

* move also eth1_monitor

* forgot to delete the original

* fix comma [skip ci]

* Fix "make" & tools imports

* Fix import

* Fix import again

* rename deposit_contract -> eth1

* Revert ssz move to subfolder

* path fixes [skip ci]
2021-03-03 07:23:05 +01:00
tersec 451cc03d76
datatypes spec ref url updates (#2372) 2021-03-02 17:31:34 +01:00
Mamy Ratsimbazafy 19775c1b22
Move tools (#2370)
* Delete tracing and styled stacktraces

* Move NBC tooling to ncli folder

* fix inspector import [skip ci]

* fix comma
2021-03-02 15:02:10 +01:00
tersec 2b5a3a6810
remove more int64 usage (#2369)
* remove more int64 usage

* explain loop bounds
2021-03-02 13:40:28 +00:00
Mamy Ratsimbazafy 3276dfc683
Consolidate modules by areas [part 1] (#2365)
* Move sync in subfolder

* move validator related thingies in validators

* fix binary builds

* update bounds comment [skip ci]
2021-03-02 11:27:45 +01:00
tersec de643d9926
allow multiple hard fork datatypes to coexist (#2328)
* allow multiple hard fork datatypes to coexist

* update to 1.0.1

* merge recent datatypes.nim updates

* trigger rebuild now the out-of-disk-space machine offline
2021-03-02 10:13:39 +00:00
tersec 5653b2e13c
more spec v1.0.1 spec ref URL and copyright year updates (#2367) 2021-03-02 06:04:14 +00:00
tersec e661f7d0c7
prevent uint64 to int64-induced RangeError/RangeDefects in metrics (#2358)
* prevent uint64 to int64-induced RangeError/RangeDefects in metrics

* remove redundant min(foo, int64.high)

* adjust spacing to be consistent
2021-03-01 20:55:25 +01:00
Jacek Sieka 3f8764ee61
fix replays stalling processing (#2361)
* fix replays stalling processing

Occasionally, attestations will arrive that vote for a target derived
either from the finalized block or earlier. In these cases, Nimbus would
replay the state transition of up to 32 epochs worth of blocks because
the finalized state has been pruned, delaying other processing and
leading to poor inclusion distance.

* put cheap attestation checks before forming EpochRef
* check that attestation target is not from an unviable history with
regards to finalization
* fix overly aggressive state pruning removing the state close to the
finalized checkpoint resulting in rare long replays for valid
attestations
* log long replays
* harden logging and traversal of nil BlockSlot

* simplify target check

no need to lookup target in chain dag again

* fixup

* fixup
2021-03-01 20:50:43 +01:00
Jacek Sieka 3e2c0a220c
refactor slot loop (#2355)
* refactor slot loop

* fix attestations being sent out early when _any_ block arrives (as
opposed to the block for the "correct" slot)
* fix attestations being sent out late when block already arrived
* refactor slot processing loop
* shutdown if clock moves backwards significantly
* fix docs

* notify caller whether the block actually arrived
2021-03-01 17:36:06 +01:00
Mamy Ratsimbazafy 08f063aba9
[RFC - Doc] State of Nimbus block & attestation flows (#2351)
* Expand documentation on block flow [skip ci]

* address review comments [skip ci]

* Update with GossipFlow out [skip ci]

* LocalBlockProposer -> LocalValidatorDuties +  WeakSubjectivitySync

* First outline of attestation flow

* finish up prose
2021-03-01 11:22:16 +01:00
tersec 9c241f805b
don't trigger doppelganger detection on old attestations (#2364) 2021-03-01 10:09:05 +00:00
tersec 97f7284e51
bump spec refs from v1.0.0 to v1.0.1 and update copyright years (#2357) 2021-02-25 13:37:22 +00:00
Dustin Brody f14e7babb6 update eth2 specs to version v1.0.1 2021-02-25 14:21:59 +02:00
Ștefan Talpalaru 44a1263ece fix Eth2Digest compile-time comparison 2021-02-25 14:20:26 +02:00
Ștefan Talpalaru 16abf2989b bump NimYAML 2021-02-25 14:20:26 +02:00
Jacek Sieka 0dbc7162ac startup cleanup
* fix several memory leaks due to temporaries not being reset during
init
* avoid massive main() function with lots of stuff in it
* disable nim-prompt (unused)
* reuse validator pool instance in eth2_processor
* style cleanup
2021-02-22 23:32:54 +02:00
Zahary Karadjov 5f62a3938e
v1.0.8 2021-02-21 21:28:28 +02:00
Zahary Karadjov e1d6df1e5d Continue using the V1 Slashing DB by default 2021-02-20 22:46:35 +02:00
Mamy Ratsimbazafy 5daafd480f
Slashing protection updates (#2333)
* Fix slashing protection always try to migrate at startup
* Add CLI option for dual DB
2021-02-19 17:18:17 +02:00
Mamy André-Ratsimbazafy 597374605a Fork choice update for HF1 2021-02-19 15:57:20 +02:00
tersec a3a0df17f8
remove too-aggressive assertion (#2343) 2021-02-19 10:54:47 +00:00
Dustin Brody c7093c4ab5 show next attestation slot & wait time in Slot end log 2021-02-15 22:49:20 +02:00
tersec 5cab17dc1a
database state storage benchmarking via ncli_db (#2312)
* database state storage benchmarking via ncli_db

* more cleanups from immutable validator state branch

* unexport some eth2_network constants and remove unused variables/templates

* make two PeerScore constants public
2021-02-15 17:40:00 +01:00
tersec aca3e4cd5c
per HF1, split process_final_updates() (#2319) 2021-02-14 19:31:01 +00:00
Jacek Sieka f012d7060b
better error message on disk / database issues (#2307)
bumps stew for better result defects as well
2021-02-10 13:21:06 +01:00
Mamy Ratsimbazafy 03f47c8f2f
Slashing protection refactor - EIP 3076 (#2094)
* Create CLI tool for slashing export

* Use SQLite as a DB instead of a KV-store

* Keeps v1 and v2 DBs around

* Uses the same schema as Lighthouse v1.1.0

* Passes all interchange tests + skeleton of finalization pruning

* Removes tests that would violate v5 / minimal slashing DB and MinSlot rules

* Migration tool added using low-watermark scheme for faster migration of large number of validators
2021-02-09 17:23:06 +02:00
Jacek Sieka 9968944329
more callsigs! (#2302) 2021-02-09 10:23:26 +01:00
Giovanni Petrantoni 72b01161c1
populate gossipsub scores (#2091)
* force pushing to fix unstable base

* increase attestation/aggregate queue sizes

when there are many validators, many aggregates and attestations arrive
every slot - increase the queue size a bit - also do batches on each
idle loop iteration since it's fairly quick

* don't score subnets for now

* wrapping up

* refactor and cleanups

* gossip parameters fixes

* comment fix

Co-authored-by: Jacek Sieka <jacek@status.im>
2021-02-09 10:20:55 +01:00
Jacek Sieka 8a09286423
tune attestation params (#2301)
* a little bit more priority to attestation processing
* better implementation for bytes_to_uint64
2021-02-08 16:13:02 +01:00
tersec 8d25663681
remove several IntSet usages in lieu of seq[ValidatorIndex] (#2288)
* remove several IntSet usages in lieu of seq[ValidatorIndex]

* convert smaller types to larger types

* larger type, again
2021-02-08 08:27:30 +01:00
Zahary Karadjov 596b8c6009
v1.0.7 2021-02-04 17:28:54 +02:00
Zahary Karadjov e0df027c11
Avoid a possible nil dereference 2021-02-04 17:24:34 +02:00
Zahary Karadjov 1394ef37fb
Tentative fix for the freezing Eth1 monitor activity 2021-02-04 17:01:47 +02:00
Ștefan Talpalaru 80c11546ff Windows binary release
CI: use both cores on GitHub Actions and set timeouts for the local testnet tests
2021-02-04 10:25:44 +02:00
Dustin Brody 67e4a045a3 simplify doppelganger detection to boolean 2021-02-03 20:55:33 +02:00
Giovanni Petrantoni 2cd627f21a
hotfix gossip scoring (#2286)
* hotfix gossip scoring

* skip gossip scoring parameters validation as they violate for now (but does not matter cos we don't score)

* workaround again gossip validation
2021-02-02 15:59:18 +01:00
Dustin Brody 707fcd99cb remove unused beacon chain spec and test code 2021-02-02 14:56:38 +02:00
Jacek Sieka 5d3c995d42 json-rpc fixes
* expose node signatures
* format bitseqs as hex strings
* format trusted sigs as hex strings (same as untrusted)
* reuse rpc client sigs
* include validator index in duties
* move SyncInfo to spec
2021-02-02 14:55:36 +02:00
Kim De Mey 73d9c2aa53
Add enr auto update cli option and bump nim-eth (#2278) 2021-02-02 09:07:21 +01:00
tersec 6141286547
rename doppelganger protection to doppelganger detection; switch default from warn to stop (#2281) 2021-02-01 12:18:16 +01:00
Zahary Karadjov fa99c3b417 Fix #2261
Also bumps Confutils to allow setting the hidden --web3-mode param
(to allow testing the eth1 syncing without validators)
2021-01-30 01:32:20 +02:00