Commit Graph

2376 Commits

Author SHA1 Message Date
tersec 7e10b9850b
enable topic unsubscribing and attestation subnet cycling (#1646)
* enable topic unsubscribing and attestation subnet cycling

* remove refences to states

* waitFor -> await

* revert exit pool changes for a cleaner PR
2020-09-15 12:40:43 +00:00
Eugene Kabanov 617c295839
Bump chronos to fix memory leaks. (#1648) 2020-09-15 11:45:00 +02:00
Jacek Sieka c76305f824
fix some todo (#1645)
* remove some superfluous gcsafes
* remove getTailState (unused)
* don't store old epochrefs in blocks
* document attestation pool a bit
* remove `pcs =` cruft from log
2020-09-14 14:50:03 +00:00
tersec 9f21bbd666
[WIP] skeleton of attester slashing pool & validators (#1639)
* skeleton of attester slashing pool & validators

* add skeleton for proposer slashings and voluntary exits; rename pool to more inclusive exit pool to stay consistent with all three; ensure is initialized by beacon_node so is safe to merge, even if it doesn't do much yet
2020-09-14 16:26:31 +02:00
Ștefan Talpalaru 60b8905852
reorder startup steps (#1642)
so the Ctr+C hook and the metrics server go before the potentially slow
`BeaconNode.init()`
2020-09-14 08:24:31 +02:00
Sacha Saint-Leger ca2e7e2239
update medalla guide: advanced options (WIP) (#1623)
* update medalla guide: advanced options

* minor edits
2020-09-13 23:58:19 +02:00
Sacha Saint-Leger 7d00ca2e86
Update medalla-troubleshooting.md (#1635) 2020-09-13 11:17:27 +02:00
Sacha Saint-Leger e6c82d1815
Update medalla-troubleshooting.md (#1633)
Add database pruning subsection
2020-09-13 10:29:05 +02:00
tersec aca1a318f2
cleanly close kvstore databases and bump nim-eth (#1630)
* cleanly close kvstore databases

* close databases for all subcommands and during error conditions
2020-09-12 05:35:58 +00:00
Kim De Mey 5fff800cf8
Bump nim-eth to use lrucache for discovery sessions (#1622) 2020-09-11 17:46:48 +00:00
Jacek Sieka eaea3dbc94
remove chronos future tracking from default build (#1628)
uses a lot of memory, specially during sync
2020-09-11 17:07:16 +02:00
tersec 48893f1c2e
add ncli_db subcommand to prune database of unnecessary blocks and states (#1593)
* add ncli_db subcommand to prune database of unnecessary blocks, states, and state roots

* tweak comments

* reduce default aggressiveness in pruning old states

* move copyPrunedDatabase() to ncli_db, as it's not generally useful as part of beacon_chain_db and doesn't use any internal interfaces
2020-09-11 15:20:34 +02:00
Eugene Kabanov c7c9b9d5f1
Syncing V2 (#1602)
* Syncing workers now not bound to peers.
Sync status is now printed in statusbar.

* Add `SyncQueue.outSlot` to statusbar too.

* Add `inRangeEvent` and `rangeAge` parameter.

* Fix rangeAge is not depends on SyncQueue latest slot.
Fix syncManager to start from latest local head slot.

* Add notInRange event.

* Remove suspects field.
2020-09-11 14:46:01 +02:00
Jacek Sieka 775683cf2e
await validator duties (#1626)
Validator duties proceed slot-by-slot - we should not start a new
validator duty iteration before the previous one is gone or we might run
into consistency and voting issues
2020-09-11 09:50:00 +00:00
Jacek Sieka 8a5a261fcd
Quick fix to prune some states, pending smarter state storage (#1624)
* Quick fix to prune some states, pending smarter state storage

Adverse effects might include slow rewinds - typically the protocol
doesn't ask for pre-finalized states but RPC might

* document issue, add test

* fix cache miss log
2020-09-11 10:03:50 +02:00
Eugene Kabanov 9db05c484d
Bump chronos to help investigate Index problem. (#1625) 2020-09-11 07:12:12 +02:00
Jacek Sieka a087909683
fix req/resp protocol (#1621)
per spec, we must half-close request stream - not doing so may lead to
failure of the other end to start processing our request leading to
timeouts.

In particular, this fixes many sync problems that have been seen on
medalla.

* remove safeClose - close no longer raises
* use per-chunk timeouts in request processing
2020-09-10 21:40:09 +02:00
Sacha Saint-Leger 697bd23c9b
fix low peer count command typo (#1619) 2020-09-10 12:05:14 +02:00
Jacek Sieka 7c21fa983a
bump libp2p, introduce AsyncQueue BufferStream (#1599)
* Syncing workers now not bound to peers.
Sync status is now printed in statusbar.

* Add `SyncQueue.outSlot` to statusbar too.

* Add `inRangeEvent` and `rangeAge` parameter.

* Fix rangeAge is not depends on SyncQueue latest slot.
Fix syncManager to start from latest local head slot.

* Add notInRange event.

* bump libp2p, introduce AsyncQueue BufferStream

* bump

Co-authored-by: cheatfate <eugene.kabanov@status.im>
2020-09-10 08:22:39 +02:00
tersec 67f44d4bd2
use V=1 in Jenkinsfile (#1618) 2020-09-09 14:33:51 +00:00
tersec 5d1ea5e440
match log filenames more precisely for logtrace analysis (#1617)
* match log filenames more precisely for logtrace analysis
2020-09-09 13:08:21 +00:00
Dustin Brody 990bc2ea52
remove obsolete comment 2020-09-09 11:00:02 +02:00
tersec d0de1a49a3
Fix some warnings and hints and partly revert #1610 (#1615)
* address some XDeclaredButNotUsed, ConvFromXtoItselfNotNeeded, and UnusedImport hints and warnings

* partly revert #1610
2020-09-08 11:32:43 +00:00
tersec b3b578501a
mark comments documenting functions as a whole as such (#1613) 2020-09-08 08:54:55 +00:00
Jacek Sieka dde26f359f
better state cache reuse (#1612) 2020-09-08 09:23:48 +02:00
tersec 3d5f24f14c
stop discarding future epochs; remove a StateCache() construction (#1610)
* stop discarding non-existent future epochs during epoch state transitions; remove a pointless StateCache() construction in advance_slots()

* update nbench to pass StateCache to process_slots()
2020-09-07 15:04:33 +00:00
Jacek Sieka 4c3dd853e1
bump libp2p (#1609) 2020-09-07 14:17:15 +02:00
Jacek Sieka d584591ded
simplify libp2p logging (#1605)
and a few other small logging fixes
2020-09-06 10:39:25 +02:00
nbc-bump-bot[bot] c5f8ef8e40
auto-bump nim-libp2p (#1604)
Co-authored-by: = <arnetheduck@users.noreply.github.com>
2020-09-05 08:28:03 +02:00
Jacek Sieka f61fdf93d3
bump chronos (#1598)
* bump chronos

this reverts backwards-incompatible changes to CancelledError and
resores other functionality.

chronos metrics are lost and will need to be reimplemented.

* bump
2020-09-04 21:27:54 +02:00
tersec 456bdc87cd
address issue #1552 (#1601) 2020-09-04 08:39:46 +02:00
Jacek Sieka aed57df957
avoid hash tree root calculation when loading blocks from database (#1572) 2020-09-04 08:35:10 +02:00
Ștefan Talpalaru aa3298f0ea
support spaces in $(MAKE) (#1603) 2020-09-04 08:33:37 +02:00
tersec e4a43f7628
address issue #1580 (#1600)
* address issue #1580

* Update beacon_chain/spec/beaconstate.nim

Co-authored-by: Jacek Sieka <jacek@status.im>
2020-09-02 16:16:25 +00:00
Viktor Kirilov d9f9949ef0 use a separate process for the private keys (Off by default) - there is a new signing_process binary which loads all validators of the beacon node and the BN dictates through stdin of the signing process what to be signed and when and reads from stdout of the process 2020-09-02 12:47:00 +03:00
Viktor Kirilov 65d7787b1e 50/50 bn/vc split for the validator keys ON by default for the testnet scripts 2020-09-01 16:39:07 +03:00
nbc-bump-bot[bot] 6000a49e84
auto-bump nim-libp2p (#1484)
Co-authored-by: = <arnetheduck@users.noreply.github.com>
2020-09-01 11:26:20 +02:00
Viktor Kirilov 67d73c4c60 added the --network=<x> option to the tools for which it matters 2020-09-01 12:02:22 +03:00
Ștefan Talpalaru 43c6a3634b
remove template expansion file from Git control (#1589)
because it changes by simply building the software, creating problems
for beta testers
2020-09-01 09:59:19 +02:00
Jacek Sieka 124ec4b737
perform slashing check before mutation (#1594)
avoid copy of validator as well
2020-09-01 09:49:55 +02:00
tersec 02ddc41960
ignore sqlite WAL journals in git; increase logging priority of attestation/block sending (#1590)
* ignore sqlite WAL journal files in git; switch attestation resolved from info to debug

* promote sent attestations/blocks to notice rather than demote resolved attestations/blocks to debug
2020-08-31 14:34:04 +00:00
tersec ab255662df
bound block quarantine size (#1564)
* bound block quarantine size

* add additional logging for block quarantining

* re-add quarantine.add() call

* remove pre-finalization blocks; add logging for full quarantine

* clear quarantine on chain reorganization

* update block_sim and tests

* update test_attestation_pool
2020-08-31 11:00:38 +02:00
tersec d9f926b33d
bump nim-eth (#1579) 2020-08-31 10:50:48 +02:00
Zed f2500127ed
Makefile: add clean-cross task for cross compiling (#1554) 2020-08-28 14:50:50 +02:00
Sacha Saint-Leger b457da37f2
update troubleshooting medalla (#1578) 2020-08-27 22:24:00 +02:00
Ștefan Talpalaru 504e96ca68 fix medalla-dev 2020-08-27 18:44:10 +03:00
Ștefan Talpalaru ecc70c6405 remove BUILD_LOG_LEVEL 2020-08-27 18:44:10 +03:00
tersec b8da265f89
add setting for benchmarking and profiling of sqlite block storage times (#1575) 2020-08-27 14:52:22 +02:00
Jacek Sieka c810b64ed8
log getblocks error 2020-08-27 10:24:41 +02:00
Jacek Sieka fa1621db46
implement clock disparity for attestation validation (#1568)
This implements disparity, resolving a part of
https://github.com/status-im/nim-beacon-chain/issues/1367

* make BeaconTime a duration for fractional seconds
* factor out attestation/aggregate validation
* simplify recording of queued attestations
* simplify attestation signature check
* fix blocks_received metric
* add some trivial validation tests
* remove unresolved attestation table - attestations for unknown blocks
are dropped instead (cannot verify their signature)
2020-08-27 09:34:12 +02:00