Commit Graph

2592 Commits

Author SHA1 Message Date
Sacha Saint-Leger 7294d98ed1
Update validator_duties.nim (Improve node out of sync message) (#1933)
* Update validator_duties.nim

Improve node out of sync message

* Update validator_duties.nim
2020-11-02 08:52:16 +01:00
nbc-bump-bot[bot] 446f8cc738
auto-bump nim-libp2p (#1934)
Co-authored-by: = <dryajov@users.noreply.github.com>
2020-11-01 23:04:05 +01:00
nbc-bump-bot[bot] 9e3ca74ee0
auto-bump nim-libp2p (#1930)
Co-authored-by: = <sinkingsugar@users.noreply.github.com>
2020-10-31 15:06:18 +09:00
Zahary Karadjov 67113373f9 Work around BLST build issues 2020-10-30 23:56:04 +02:00
Zahary Karadjov f76679810b Fix #1855; Add support for wallet recovery passwords 2020-10-30 23:56:04 +02:00
Giovanni Petrantoni 63173ab2c1
Gossip11 post audit (#1917)
* bump libp2p gossip

* use gossip 1.1

* use proper libp2p commit hash

* switch to master libp2p, has audit fixes now
2020-10-30 14:26:35 +00:00
nbc-bump-bot[bot] 8d998a5a8b
auto-bump nim-libp2p (#1914)
Co-authored-by: = <dryajov@users.noreply.github.com>
2020-10-30 13:35:01 +01:00
Eugene Kabanov 3f5c7c36bc
Some syncing fixes (#1919)
* Add exponential rewind on MissingParent.

* Try to avoid peers which are useless for syncing.
Fix forward sync restart at proper point.
Fix getLocalWallSlot() to not return slots from the future.

* Fix incorrect logs.

* Fix logging.
Enable peer's status messages log on DEBUG level.

* Fix watch task to monitor operation progress, but not local head progress.

* Add more logging information.
Remove recurring failures detection mechanism.
2020-10-30 13:33:52 +01:00
Jacek Sieka 81f4fe0783
limit fork choice initialization horizon (#1910)
This helps manage the long startup time on chains that are not
finalizing for long periods of time
2020-10-29 12:09:03 +01:00
Jacek Sieka 020a32ffa4
minor api cleanups (#1913)
* readd getNodeVersion
* implement get_v1_config_fork_schedule
* fix formatting of several types
2020-10-28 19:51:38 +01:00
tersec 19c51e5900
use MAXIMUM_GOSSIP_CLOCK_DISPARITY for BeaconBlock verification (#1918) 2020-10-28 14:04:21 +01:00
Jacek Sieka ff3f8741de
handle fork choice selecting a head unknown to chaindag (#1907)
* move head slot metric to head selection
* avoid redundant head selection in validator duties
2020-10-28 07:55:36 +00:00
Ștefan Talpalaru 2396417581
bump nim-libbacktrace (#1799)
so stack traces work with LTO
2020-10-27 13:09:03 +01:00
Jacek Sieka 6050eebec0
document not-nil issues 2020-10-27 13:01:45 +01:00
cheatfate 4caaf86332
Fix permissions on script. 2020-10-27 13:58:56 +02:00
Eugene Kabanov eee01a32d5
Regression fix of eth2_network_simulation on Windows. (#1900)
* Concentrate all sensitive writeFile/createPath calls in one place.
Fix eth2_network_simulation for Windows.

* Remove artifacts.

* fix import

Co-authored-by: Jacek Sieka <jacek@status.im>
2020-10-27 12:04:17 +01:00
Eugene Kabanov c82ff24b5c
Syncing fixes (#1909)
* Fix continuous sync queue rewinds on slow PCs.
Fix recurring disconnects on low peer score.

* Calculate average syncing speed, not the current one.
Move speed calculation to different task.

* Address review comments.
2020-10-27 10:25:28 +01:00
Jacek Sieka ee2ebc96a8
move rpc api to own folder, mimic upstream structure (#1905)
also implements a few more endpoints
2020-10-27 10:00:57 +01:00
Mamy Ratsimbazafy 677f099110
BLS signature v4 (#1912) 2020-10-27 09:37:04 +01:00
Kim De Mey 8102d5dc4d
Bump eth2-testnets for more discv5.1 bootstrap nodes on medalla (#1911)
And improve logging UX a bit by ignoring comments or newlines
2020-10-27 08:44:46 +01:00
Sacha Saint-Leger 8b90a34914
Book overhaul: modularity + raspberry pi guide (#1908)
* add first draft of Pi guide

* pi guide -- edits

* restructure book

* edits

* edits

* deposit page: edits cp

* deposit page edits

* edits

* remove extra emacs files

* remove extra emacs files

* edit toc

* remove outdated overview

* intro edits

* add a note on verifying your validator has successfully attached

* add permissions page placeholder to toc
2020-10-26 18:12:37 +01:00
Kim De Mey 756b62fdf5
Bump nim-eth to get UseDiscv51 flag (#1895)
* Bump nim-eth to get UseDiscv51 flag

* Switch medalla to discovery v5.1, other targets to v5.0

* Bump nim-eth for better discv5.1 logging

* Bump eth2-testnets for updated medalla bootnodes
2020-10-23 18:59:58 +02:00
Jacek Sieka b246d51ac1 test fix 2020-10-23 19:23:36 +03:00
Jacek Sieka 7c0b4d28d2 speed up reward/penalty calculation
Calculating rewards/penalties is slow due to how we compute sets of
attestations validators then use the sets for inclusion checks, to see
who attested. The dominant function during validated block processing /
epoch processing is hash set building and lookup.

This PR inverts the flow by removing the sets and creating a single
large validator status list, then applying all relevant state
attestations, then updating rewards and penalties.

This provides a 10x speedup to epoch processing which in turn speeds up
both empty slot and block processing - for example, on startup, we
replay all non-finalized blocks to prime fork choice - the same when
validating attestations or replaying states on reorg.
2020-10-23 19:23:36 +03:00
Jacek Sieka 499e5ca991
misc memory and perf fixes (#1899)
* misc memory and perf fixes

* use EpochRef for attestation aggregation
* compress effective balances in memory (medalla unfinalized: 4gb ->
1gb)
* avoid hitting db when rewinding to head or clearance state
* avoid hitting db when blocks can be applied to in-memory state -
speeds up startup considerably
* avoid storing epochref in fork choice
* simplify and speed up beacon block creation flow - avoids state reload
thanks to head rewind optimization
* iterator-based committee and attestation participation help avoid lots
of small memory allocations throughout epoch transition (40% speedup on
epoch processing, for example during startup)

* add constant for threshold
2020-10-22 12:53:33 +02:00
tersec decfd66a78
bump libp2p: seq[byte] message IDs and improve reject/ignore handling (#1898)
* bump libp2p: use seq[byte] message IDs and improve reject/ignore handling

* bump libp2p to pick up debug message details
2020-10-21 20:03:12 +00:00
zah 9810a31447
Fix #1838 (#1892) 2020-10-20 15:01:21 +02:00
tersec a136c2e95a
bump libp2p; integrate pubsub.ValidationResult into extended validation (#1893) 2020-10-20 12:31:20 +00:00
tersec e87e0ef179
update to 1.0.0-rc.0 message ID; unexport funcs; enable test in mainnet; remove unused subscribe-with-nondummy-handler function; fix gossip received metric (#1884) 2020-10-20 08:54:11 +00:00
tersec c446eb7cff
update v1.0.0-rc.0 preset spec references (#1891)
* update ve1.0.0-rc.0 preset spec references

* remove runtime preset ETH1_FOLLOW_DISTANCE from preset files; remove two CI build items to try to keep Travis from timing out
2020-10-19 13:53:23 +00:00
tersec 5b13a5ba10
update attestation extended validation to v1.0.0-rc.0 (#1889)
* update attestation extended validation to v1.0.0-rc.0

* attestation block and target must be within same epoch

* remove duplicate attestation epoch/target epoch check

* in spec now
2020-10-19 09:25:06 +00:00
Jacek Sieka 58dcca3364
Merge remote-tracking branch 'origin/devel' 2020-10-19 10:37:55 +02:00
Jacek Sieka df43b8aa8b
save some more states after all (#1887)
Don't save states when replaying history, but do save states when
applying new blocks (!)
2020-10-18 15:47:39 +00:00
Zahary Karadjov dbc90e998a Add Disc v5.1 bootstrap nodes for Zinken
Also prepares the Makefiles for supporting Medalla
through a separate binary
2020-10-18 12:44:52 +03:00
Zahary Karadjov d98be078c3 Address #1690 Min password entropy 2020-10-16 19:34:26 +03:00
Zahary Karadjov 9899578e1c Update get_eth1_data from v0.11.1 to v1.0.0-rc 2020-10-16 11:46:53 +03:00
Dustin Brody 9a543e0af7 partial hotfix for #1879 crash 2020-10-16 11:46:19 +03:00
Zahary Karadjov 948d15ea95 Follow-up on #1687 Don't ask for password on invalid keystores 2020-10-16 11:45:39 +03:00
Viktor Kirilov db70f066ba fixed all crashes which can be triggered through the validator RPC API - fixes #1680 2020-10-15 20:19:43 +03:00
Viktor Kirilov 7ed885f144 configuring a writer for the dynamic log output device for the VC binary as well (same as in the BN) 2020-10-15 20:19:10 +03:00
cheatfate 7ad59b1852 Bump nim-stew. 2020-10-15 20:18:33 +03:00
cheatfate 1742a82ca7 Proper fix for writeFile() places.
Comment unused/insecure procedure.
2020-10-15 20:18:33 +03:00
cheatfate f632a61cb9 Fix posix version. 2020-10-15 20:18:33 +03:00
cheatfate d484ec27f6 Fix mistype. 2020-10-15 20:18:33 +03:00
cheatfate e0fcda090f Fix executable permissions. 2020-10-15 20:18:33 +03:00
cheatfate 84fe294c00 Fix protection of data folder and security files using Windows ACL. 2020-10-15 20:18:33 +03:00
Zahary Karadjov 5f6bdc6709 Store all deposit-derived data in memory 2020-10-15 20:15:51 +03:00
Zahary Karadjov 7a577b2cef More tests for getBlockRange 2020-10-15 20:15:51 +03:00
Zahary Karadjov 080609eee1 Address #1366 Avoid uint64 overflow in getBlockRange when skipStep is large 2020-10-15 20:15:51 +03:00
Zahary Karadjov 2152dc6136 Simplify the mainchain monitor 2020-10-15 20:15:51 +03:00