Commit Graph

2481 Commits

Author SHA1 Message Date
yslcrypto 2bc26940d4 update introduction 2020-09-23 15:50:19 +02:00
yslcrypto a84a65bcbe grammar fix 2020-09-23 15:38:35 +02:00
yslcrypto 9613af3391 nimbus book, metric page: integrate feedback 2020-09-23 15:33:20 +02:00
yslcrypto 72c0a3a763 metrics and pretty pictures 2020-09-23 14:26:42 +02:00
Jacek Sieka e1c177cdd1
bump libp2p (#1721)
gossipsub 1.1 can be enabled with -d:nbc_gossipsub_11
2020-09-22 19:34:34 +02:00
Zahary Karadjov 73724b2c4b Add attacknet-beta1-mc-0 2020-09-22 18:51:51 +03:00
Zahary Karadjov 10cfd1ec37 Adds the Spedina testnet; Upgrades the spec presets to spec v0.12.3
Other changes:

* Removed all references to Altona
* Refactored the Makefile to avoid code duplication
2020-09-22 18:51:51 +03:00
Sacha Saint-Leger f8733a4fb6
Update faq.md (#1717)
* Update faq.md

* Update docs/the_nimbus_book/src/faq.md

Co-authored-by: Jacek Sieka <jacek@status.im>

Co-authored-by: Jacek Sieka <jacek@status.im>
2020-09-21 22:11:56 +02:00
Eugene Kabanov 654b8d66bf
Peer management (#1707)
* addPeer() and addPeerNoWait() now returns PeerStatus, not bool.
Minor refactoring of PeerPool.
Fix tests.

* Refactor PeerPool.
Add lenSpace.
Add tests for lenSpace.
PeerPool.add procedures now return different error codes.
Fix SyncManager break/continue problem.
Fix connectWorker break/continue problem.
Refactor connectWorker and discoveryLoop.
Fix incoming/outgoing blocking problem.

* Refactor discovery loop.
Add checkPeer.

* Fix logic and compilation bugs.

* Adjust position of debugging log.

* Fix issue with maximum peers in PeerPool.
Optimize node record decoding.

* fix discoveryLoop.

* Remove aliases and fix tests using aliases.
2020-09-21 18:02:27 +02:00
tersec 3190c695b0
minimal v0.12.3 update (#1716) 2020-09-21 15:58:35 +00:00
Sacha Saint-Leger 3c6f6115eb
Update medalla-troubleshooting.md (#1705)
add section addressing `address already in use error`. we already sort of cover this in the guide, but i think it makes sense to have it explicitly mentioned here.
2020-09-21 15:21:36 +02:00
Jacek Sieka f8e782fb5f
bump nim-eth (#1708)
fixes WAL file growth in sqlite - might cause nbc to freeze once for a
minute or two while clearing the wal
2020-09-21 11:07:59 +02:00
Mamy André-Ratsimbazafy c1413899f5
Merge remote-tracking branch 'origin/master' into devel 2020-09-21 09:34:51 +02:00
Jacek Sieka 59a3862f6f
bump nim-stew, get bitops intrinsics 2020-09-21 08:46:29 +02:00
Ștefan Talpalaru 4c51eee7f9
USE_LIBBACKTRACE=0: speed up compilation by 3.31% (#1686)
* USE_LIBBACKTRACE=0: speed up compilation by 3.31%

* USE_LIBBACKTRACE=0: no line numbers in stack traces; blame Jacek
2020-09-21 08:40:01 +02:00
Ștefan Talpalaru 2b6c287dbb
update: delete "nimcache" dirs (#1706) 2020-09-21 08:39:13 +02:00
yslcrypto 13edb40f46 link to ubuntu guide 2020-09-20 13:49:05 +02:00
Jacek Sieka fc10f5121a protect against data after initial request
spec requires that channel is closed

also, avoid some unnecessary futures
2020-09-18 21:34:07 +03:00
zah 7c688bffda
Address #1586 (#1596) 2020-09-18 18:34:13 +02:00
Mamy Ratsimbazafy ea4ec6a785
Upgrade blst (#1682)
* Bump BLST

* Test for https://github.com/supranational/blst/issues/22 regression

* Use SHA256 from BLST + bump nim-blscurve to reenable fno-tree-vectorize

* SHA256 on non-blst platforms import fixes

* import fixes again

* can't prefix with nimcrypto

* address review comment [skip ci]

* {.noInit.} on the digests
2020-09-18 16:55:55 +02:00
tersec e106549efe
keep REJECT/IGNORE of messages failing validation for libp2p scoring (#1676)
* keep REJECT/IGNORE status of messages failing validation for libp2p scoring

* fix test suite
2020-09-18 13:53:09 +02:00
Jacek Sieka 000a0ecc52
initial e2store file format description (#1355)
This is one way we could organize the flat file storage for blocks - the
alternative would be to not do `type` in the file itself, but have a
single type per file which arguably is simpler but may become annoying.

Another potential restriction would be to require that blocks are
ordered - with this format, it's a little bit more involved to recreate
an index file, and it's easy to accidentally build in assumptions about
the block order in the main data file.
2020-09-17 23:23:54 +02:00
Sacha Saint-Leger e4b4b29320
Update medalla.md (#1685)
minor edits + clarifications
2020-09-17 20:25:21 +02:00
Sacha Saint-Leger 4c0bdffd4c
Update medalla.md (#1681)
explain syncv2 string and terminal status bar
2020-09-17 18:39:49 +02:00
Dmitriy Ryajov 2f89e2ab4e
drop subscribePeer, it's called from pubsub now (#1677) 2020-09-17 11:40:21 +02:00
Sacha Saint-Leger 6bde3b85a7
Book edits: master is now the preferred branch (#1675)
* Update medalla.md

remove `cd devel`

* Update medalla-troubleshooting.md

edits to make clear that master is now the recommended branch
2020-09-17 00:26:51 +02:00
Jacek Sieka dcf8a6b05d
improve slot processing speeds (#1670)
about 40% better slot processing times (with LTO enabled) - these don't
do BLS but are used
heavily during replay (state transition = slot + block transition)

tests using a recent medalla state and advancing it 1000 slots:

```
./ncli slots --preState2:state-302271-3c1dbf19-c1f944bf.ssz --slot:1000
--postState2:xx.ssz
```
pre:

```

All time are ms
Average,       StdDev,          Min,          Max,      Samples,
Test
Validation is turned off meaning that no BLS operations are performed
39.236,        0.000,       39.236,       39.236,            1,
Load state from file
0.049,        0.002,        0.046,        0.063,          968,
Apply slot
256.504,       81.008,      213.471,      591.902,           32,
Apply epoch slot
28.597,        0.000,       28.597,       28.597,            1,
Save state to file
```

cast:
```
All time are ms
Average,       StdDev,          Min,          Max,      Samples,
Test
Validation is turned off meaning that no BLS operations are performed
37.079,        0.000,       37.079,       37.079,            1,
Load state from file
0.042,        0.002,        0.040,        0.090,          968,
Apply slot
215.552,       68.763,      180.155,      500.103,           32,
Apply epoch slot
25.106,        0.000,       25.106,       25.106,            1,
Save state to file
```

cast+rewards:
```
All time are ms
Average,       StdDev,          Min,          Max,      Samples,
Test
Validation is turned off meaning that no BLS operations are performed
40.049,        0.000,       40.049,       40.049,            1,
Load state from file
0.048,        0.001,        0.045,        0.060,          968,
Apply slot
164.981,       76.273,      142.099,      477.868,           32,
Apply epoch slot
28.498,        0.000,       28.498,       28.498,            1,
Save state to file
```

cast+rewards+shr
```
All time are ms
Average,       StdDev,          Min,          Max,      Samples,
Test
Validation is turned off meaning that no BLS operations are performed
12.898,        0.000,       12.898,       12.898,            1,
Load state from file
0.039,        0.002,        0.038,        0.054,          968,
Apply slot
139.971,       68.797,      120.088,      428.844,           32,
Apply epoch slot
24.761,        0.000,       24.761,       24.761,            1,
Save state to file

```
2020-09-16 20:59:33 +00:00
Ștefan Talpalaru 4b38619c4f better handling of Ctrl+C during `make update` (#1588) 2020-09-16 19:21:59 +02:00
nbc-bump-bot[bot] f901c8d55a auto-bump nim-libp2p (#1659)
Co-authored-by: = <arnetheduck@users.noreply.github.com>
2020-09-16 19:21:59 +02:00
Mamy Ratsimbazafy 702b346965 Opt-in Slashing protection + interchange (#1643)
* Slashing protection + interchange initial commit

* Restrict the when UseSlashingProtection dance in other modules

* Integrate slashing tests in other all_tests

* Add attestation slashing protection support

* Add a message that mention if built with/without slashing protection

* no op the initialization proc

* test slashing protection in Jenkins (temp)

* where to configure NIMFLAGS in Jenkins ...

* Jenkins -> ensure Built with slashing protection

* Add slashing protection complete import

* use Opt.get(otherwise)

* Don't use negation in proc name

* Turn slashing protection on by default
2020-09-16 19:21:59 +02:00
Eugene Kabanov 8b492ed1ce PeerPool fixes. (#1654)
* Refactor peer_pool.
Fix eth2_network peer counters.
Fix PeerPool do not allow to add more peers when empty space available.

* Remove unused imports.

* Add test for a bug.

* Fix eth2_network disconnect should deletePeer not release.
More PeerPool refactoring.
2020-09-16 19:21:59 +02:00
tersec 67f3bd203e close block_sim database; remove code duplication in exit_pool (#1656) 2020-09-16 19:21:59 +02:00
Eugene Kabanov 66ba5d072a Fix sync_manager.nim not rewarding peers for good responses. (#1660) 2020-09-16 19:21:59 +02:00
nbc-bump-bot[bot] 3f129d06dc auto-bump nim-libp2p (#1606)
Co-authored-by: = <arnetheduck@users.noreply.github.com>
2020-09-16 19:21:59 +02:00
tersec f566a84f5c 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-16 19:21:59 +02:00
Eugene Kabanov 0b029220ee Bump chronos to fix memory leaks. (#1648) 2020-09-16 19:21:59 +02:00
Jacek Sieka 20dd38fdf9 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-16 19:21:59 +02:00
tersec 804b152d1d [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-16 19:21:59 +02:00
Ștefan Talpalaru aabb47e46c reorder startup steps (#1642)
so the Ctr+C hook and the metrics server go before the potentially slow
`BeaconNode.init()`
2020-09-16 19:21:59 +02:00
Sacha Saint-Leger 942743a356 update medalla guide: advanced options (WIP) (#1623)
* update medalla guide: advanced options

* minor edits
2020-09-16 19:21:59 +02:00
Sacha Saint-Leger 1be5832f9a Update medalla-troubleshooting.md (#1635) 2020-09-16 19:21:59 +02:00
Sacha Saint-Leger 9a99c9b60e Update medalla-troubleshooting.md (#1633)
Add database pruning subsection
2020-09-16 19:21:59 +02:00
tersec 002bdb834d cleanly close kvstore databases and bump nim-eth (#1630)
* cleanly close kvstore databases

* close databases for all subcommands and during error conditions
2020-09-16 19:21:59 +02:00
Kim De Mey 87e3ef7c56 Bump nim-eth to use lrucache for discovery sessions (#1622) 2020-09-16 19:21:59 +02:00
Jacek Sieka bcbc7acd18 remove chronos future tracking from default build (#1628)
uses a lot of memory, specially during sync
2020-09-16 19:21:59 +02:00
tersec c08b786e77 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-16 19:21:59 +02:00
Eugene Kabanov dcdb5dfade 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-16 19:21:59 +02:00
Jacek Sieka 1d3e2935f2 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-16 19:21:59 +02:00
Jacek Sieka 04b49cae35 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-16 19:21:59 +02:00
Eugene Kabanov de238c62b7 Bump chronos to help investigate Index problem. (#1625) 2020-09-16 19:21:59 +02:00