Zahary Karadjov
d232f16b40
Add more eth1-related logging
2020-11-20 17:13:51 +02:00
Zahary Karadjov
e22248bca1
Tentative fix for the Pyrmont Eth1 voting issue
2020-11-20 17:13:51 +02:00
tersec
3c4cf95d0e
remove v0.12.3 and medalla support ( #2038 )
2020-11-20 14:49:49 +01:00
tersec
54c388b7b4
close slashing protection database ( #2050 )
2020-11-20 14:23:55 +01:00
tersec
1d7fb2ed0c
remove {.inline.} pragmas ( #2033 )
...
* remove {.inline.} pragmas
* re-add inline on bitseqs functions and tweak inlining threshold
* remove macOS/LLVM inlining setting; revert non-init/module-local/tests inline pragma removal
2020-11-20 11:00:22 +01:00
Zahary Karadjov
883e18da81
Hotfix: don't crash on web3 provider errors during initialization
2020-11-20 10:26:47 +02:00
Jacek Sieka
771c1d092a
hotfix fork choice score application ( #2041 )
...
Depending on the order of nodes in fork choice, it seems that the break
here could cause some scores not to be applied correctly
2020-11-19 15:11:08 +01:00
Zahary Karadjov
e370e80aee
Add more Pyrmont bootstrap nodes
2020-11-18 14:40:45 +02:00
Zahary Karadjov
6b6e9b4d77
v0.6.4 Script and instructions for joining Pyrmont; WIP page in the book
2020-11-18 00:27:22 +02:00
Zahary Karadjov
11e1a9e8e8
A hacky work-around for a web3 issue that may cause the client to go into a loop of failing requests
2020-11-18 00:27:21 +02:00
Zahary Karadjov
ebfacf597c
Review and fix some usages of Future.cancel; Bump Chronos
2020-11-18 00:27:21 +02:00
Ștefan Talpalaru
9c5cef346b
set file and dir permissions
2020-11-17 23:28:26 +02:00
Jacek Sieka
4479c0a9f1
fix some libp2p channel hangs ( #2032 )
...
* fix some libp2p channel hangs
* make sure no concurrent reads are issues by awaiting cancellations
* bumps with fixes
* merge bump
2020-11-17 16:07:05 +01:00
tersec
9e716b32bd
address some XDeclaredButNotUsed hints ( #2028 )
2020-11-17 11:14:53 +01:00
Jacek Sieka
a6b188bfd4
misc fixes ( #2027 )
...
* log when database is loading (to avoid confusion)
* generate network keys later during startup
* fix quarantine not scheduling chain of parents for download and
increase size to one epoch
* log validator count, enr and peerid more clearly on startup
2020-11-16 20:15:43 +01:00
tersec
21c4ce8fd4
remove superfluous TODOs/not-really-TODOs, type conversion, imports ( #2025 )
2020-11-16 17:10:51 +01:00
cheatfate
19707e89c2
Change random network key log line and include PeerID.
2020-11-16 17:41:23 +02:00
Jacek Sieka
5b011b65ae
add rpc call to get chronos futures at runtime
2020-11-16 12:31:39 +02:00
tersec
e2f161dbf7
fix attestation sending schedules to avoid timing attack ( #1995 )
2020-11-16 10:44:18 +01:00
Zahary Karadjov
b022dc4d1f
Use O(n) algorithm in initialize_beacon_state_from_eth1; Avoid unnecessary merkle proofs generation
2020-11-15 21:40:40 +02:00
Zahary Karadjov
8012102704
Bugfix: the client can miss the genesis event in the absence of new deposits
2020-11-15 21:40:40 +02:00
Zahary Karadjov
9f28a464fb
[skip ci] Update the version number
2020-11-14 23:26:46 +02:00
kdeme
d02d8f8d51
Drop UseDiscv51 flag and only support discovery v5.1
2020-11-14 19:12:30 +02:00
Zahary Karadjov
80ca7a2d9f
Implement #1768
2020-11-12 22:29:43 +02:00
Zahary Karadjov
17d35e1fd9
Allow the node to start when it fails to initialize the Eth1 monitor
...
* Avoid hangs when wss:// is specified for a non-secure HTTP server
* Produce an ERROR when the web3 provider is unsupported, but still launch the node
2020-11-12 22:29:43 +02:00
Zahary Karadjov
5e45e7429e
Rewrite all HTTP(S) web3 URLs to WebSocket URls
2020-11-12 22:29:43 +02:00
cheatfate
87c92ea05f
Address review comments.
...
Remove `-8.0` bucket because `-4.0` is a limit.
2020-11-12 21:52:01 +02:00
cheatfate
dbb058682c
Add beacon_attestation_sent_delay metric.
2020-11-12 21:52:01 +02:00
Zahary Karadjov
8ad45de65b
Add makefile targets for Pyrmont
2020-11-12 21:51:15 +02:00
tersec
b9e122a60c
address some TODOs ( #2005 )
2020-11-12 19:24:07 +00:00
Eugene Kabanov
e035b7d0c9
Fix status rpc request to use RESP_TIMEOUT. ( #2002 )
2020-11-12 15:30:12 +00:00
tersec
754d65c159
non-spec aggregate validation check now in spec; update genesis times ( #2001 )
2020-11-12 15:29:32 +00:00
tersec
a0621d52f6
bump remaining rc.0 spec ref ( #2003 )
2020-11-12 13:58:41 +00:00
cheatfate
f642f71457
Calculate how much time syncing takes, and show it at statusbar.
2020-11-12 14:16:12 +02:00
Jacek Sieka
332e248d91
rpc: setLogLevel ( #1991 )
...
* rpc: setLogLevel
also change default rpc port to match makefile and manual
* set topic-level formats too
and make feature less secret
2020-11-12 11:46:02 +01:00
Jacek Sieka
43c6c5a0b3
Gossip message id should decompress data ( #1998 )
...
* also fix missing return on empty message
2020-11-12 11:45:28 +01:00
Jacek Sieka
5644cfae8f
increase max db object size ( fixes #1996 )
2020-11-12 08:42:45 +01:00
Jacek Sieka
c5710d97fc
default to gossipsub 1.1 ( #1992 )
2020-11-11 13:30:18 +01:00
Zahary Karadjov
389c11743a
Review TODO items and self-assign the most important ones
2020-11-10 20:41:04 +02:00
Jacek Sieka
6e40ca5e15
Use separate cache for getting epochref
...
...else tmpState gets overwritten when producing blocks and requesting
epochRef for finalized state.
2020-11-10 17:40:32 +02:00
Eugene Kabanov
ea4d94c65c
Add guard task to monitor synchronization worker Future. ( #1972 )
...
* Add guard task to monitor synchronization worker Future.
* Change log events from debug to warning level.
2020-11-10 14:47:26 +01:00
tersec
7eaae89263
keep AllTests-mainnet.md consistent; ensure don't send overly large messages aren't sent ( #1973 )
2020-11-09 18:11:09 +00:00
tersec
a010ef2061
update tests from v1.0.0-rc.0 to v1.0.0 ( #1976 )
2020-11-09 17:44:18 +00:00
Zahary Karadjov
bd1047b715
0.6.0 release fixes
...
* Updated README
* No double v in nimbus_beacon_node --version
* No md5 checksums
2020-11-09 17:09:49 +02:00
tersec
271df8b604
bump 1.0.0rc-0 spec refs to 1.0.0 ( #1974 )
2020-11-09 14:18:55 +00:00
Jacek Sieka
61a3209c24
remove version quotes
2020-11-09 13:37:58 +01:00
Zahary Karadjov
94e9ce3c1f
Add metadata for the toledo network
2020-11-09 11:38:52 +02:00
Zahary Karadjov
4b603d7f5a
Change the default log level to INFO
2020-11-09 11:38:52 +02:00
Zahary Karadjov
e9b9cd75ee
Rename binaries; Mimic the original repo layout in the distribution
2020-11-09 11:38:52 +02:00
Ștefan Talpalaru
bf58915500
release fixes ( #1966 )
2020-11-07 08:46:53 +01:00
Jacek Sieka
d2476b643a
bump version ( #1964 )
...
* bump version
* update version format to "standard" style
* remove zinken/attacknet (both networks deprecated)
* add mainnet warning
2020-11-07 08:45:55 +01:00
kdeme
fb6ce5c804
Enable discv5.1 for general beacon_node and inspector builds
2020-11-07 01:27:02 +02:00
Zahary Karadjov
ac1072b4bb
Add ./run-medalla-beacon-node script
2020-11-07 01:25:02 +02:00
Zahary Karadjov
4a710252d8
Check the web3 provider for network compatibility
2020-11-07 01:25:02 +02:00
Zahary Karadjov
24f8b7d483
[skip ci] Clean up some accidentally commited code
2020-11-06 11:53:44 +02:00
Zahary Karadjov
a8a66fe3f6
Fix #1784 ; Handle Infura HTTPS URLs
2020-11-06 11:15:32 +02:00
Zahary Karadjov
f596a24c4c
Mainnet deposit contract monitoring
2020-11-06 11:15:32 +02: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
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
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
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
Ș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
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
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
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
Jacek Sieka
6050eebec0
document not-nil issues
2020-10-27 13:01:45 +01: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
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
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
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