Commit Graph

2817 Commits

Author SHA1 Message Date
Zahary Karadjov f596a24c4c Mainnet deposit contract monitoring 2020-11-06 11:15:32 +02:00
Ștefan Talpalaru c7d8b81c86 dist: add Medalla binary and starting script 2020-11-06 01:29:03 +02:00
yslcrypto 24d6618ceb remove guide on creating deposits/keys using nimbus, edit toc 2020-11-05 19:24:38 +01:00
Sacha Saint-Leger d84cc14e40
update book for mainnet (#1959) 2020-11-05 16:35:41 +01:00
Jacek Sieka 95f5f76180
Datatype cleanup (#1953)
* clear up spec todo

* test fix

* remove unnecessary toSszType

* type

* one more
2020-11-04 21:52:47 +00:00
Jacek Sieka fc7885b27e Store block summary in database
This introcudes a cache for block summaries, useful for instantiating
the block dag on startup, bringing medalla startup times down from
minutes to seconds.

This is something of a temporary band-aid that would be obsoleted by a
finalized block store.
2020-11-04 11:28:55 +02:00
Zahary Karadjov 7823c25ba8
Hotfix for a failing assert during block production 2020-11-04 11:06:58 +02:00
Ștefan Talpalaru cde970c513
dist: build on Ubuntu 20.04 (LTS) (#1949)
And a new Make target: "dist-test" - it simply runs the beacon_node
binary produced by "make dist", with "--help", inside a Debian Bullseye
image.
2020-11-04 00:46:23 +01:00
Sacha Saint-Leger 36b54fe091 Update eth2_network.nim
More informative and friendlier log message (from the user's perspective). Also helps avoid the potential for confusion with the validator key.
2020-11-03 23:23:32 +02:00
Zahary Karadjov 6ee80651c7 Rename mainchain_monitor to eth1_monitor 2020-11-03 23:23:10 +02:00
Zahary Karadjov 2f29e3e7f3 Further reduce the number of RPC requests; Significantly faster ETH1 syncing 2020-11-03 23:23:10 +02:00
Zahary Karadjov e414d964f0 Address review comments: delete obsolete TODO item 2020-11-03 23:23:10 +02:00
Zahary Karadjov 14b2d4324d openarray -> openArray 2020-11-03 23:23:10 +02:00
Zahary Karadjov 18639c3eff Don't require requests that might fail on non-archive Geth nodes 2020-11-03 23:23:10 +02:00
Zahary Karadjov 79f1b6117e Remove dead code from the beacon node binary; Fix 'make test' 2020-11-03 23:23:10 +02:00
Zahary Karadjov 07206ca264 An efficient algorithm for incremental generation of multiple merkle proofs 2020-11-03 23:23:10 +02:00
Zahary Karadjov d913273dcc Fix #1823 2020-11-03 23:23:10 +02:00
Jacek Sieka ee663d9fc2
move libp2p back a few commits (#1948)
to see if it helps with connectivity issues
2020-11-03 17:04:16 +01:00
Jacek Sieka 937decb0e9
Revert "Gossip11 post audit (#1917)" (#1947)
This reverts commit 63173ab2c1.

It appears the cluster is having trouble staying connected - since the culprit is unknown, this is a first step on the way to what was stable.

Notably, this does not fully revert libp2p itself, merely the gossip version.
2020-11-03 11:45:40 +01:00
Sacha Saint-Leger 9255945fb0
Update mainchain_monitor.nim (#1945)
Make it clear that this failure concerns the eth1 chain
2020-11-02 21:16:24 +01:00
yslcrypto eef31e53cb Nimbus book: eth2stats guide 2020-11-02 19:10:31 +01:00
Ștefan Talpalaru 002a3dfa54
graceful shutdown: move the hook registration (#1940)
...closer to where it starts having an effect.
2020-11-02 19:02:27 +01:00
Jacek Sieka 2f049dc6e7
Fix init condition for fork choice (#1941)
... or we choose the wrong head on startup, sometimes.
2020-11-02 18:51:08 +01:00
Jacek Sieka ca63d48b82
tone down validator exit logging (#1939)
Validators exiting is normal, no need to scream about it

* avoid reallocating seq on big exit queue
* avoid fetching state cache when updating head (it's rarely needed)
* remove incorrectly implemented live validator counts (avoids memory
allocs)
2020-11-02 18:34:23 +01:00
yslcrypto e7943b088b Nimbus book: sync before deposit 2020-11-02 17:30:25 +01:00
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