18 Commits

Author SHA1 Message Date
Jacek Sieka
22998fdfd4 avoid double deserialization
When blocks and attestations arrive, they are SSZ-decoded twice: once
for validation and once for processing. This branch enqueues the decoded
block directly for processing, avoiding the second, slow
deserialization.

* move processing of blocks and attestations to queue
* ...and out from beacon_node
* split attestation processing into attestations and aggregates
  * also updates metrics
* clean up logging to better follow the lifetime of gossip: arrival,
validation and processing
* drop attestations and aggregates if there are too many
* try to prioritise blocks and aggregates before single-validator
attestations
2020-08-21 11:46:25 +03:00
Eugene Kabanov
55fcece0b2
SyncManager fix to process blocks one by one. (#1464)
* Allow sync manager process blocks one by one.

* Log storeBlock() and updateHead() duration.

* Calculate duration only for blocks added without any error.

* Fix float compilation error.

* Fix duration.

* Fix SyncQueue tests.
2020-08-10 09:15:50 +02:00
Eugene Kabanov
1fc9413c48
Fix #1153. (#1160)
Add ability for SyncQueue to recover from unexpected MissingParent.
2020-06-11 16:20:53 +02:00
cheatfate
12e28a1fa9 Add proper concurrent connections.
Add SeenTable to avoid continuous attempts to dead peers.
Refactor onSecond.
Block backward sync while forward sync is working.
SyncManager now checks responses according corresponding requests + tests.
SyncManager now watching for not progressing local_head_slot and resets SyncQueue.
2020-06-03 12:53:57 +03:00
Eugene Kabanov
21131e629b
Sync freeze fixes. (#1072)
* Add ability to reset state of sync manager.
Fix bug when sync got stuck on `zero-point` reset.
Fix bug when sync got stuck when some of the workers waiting for failing one.

* Remove debugging comments and imports.

* Remove not used pendingLock.
2020-05-28 07:02:28 +02:00
Eugene Kabanov
ea95021073
Fix sync issues. (#1035)
* Fix sync issues.

* Add documentation about zero-point.
Add more comments about syncing loops.
Change to 4 blocks per request.
2020-05-19 14:08:50 +02:00
Jacek Sieka
ed74770451
spec: regulate exceptions (#913)
* spec: regulate exceptions

* a few more simple raises
2020-04-22 07:53:02 +02:00
Eugene Kabanov
3d42da90a8
Syncing. (#909) 2020-04-20 16:59:18 +02:00
Ștefan Talpalaru
b7a32a17ba
bump submodules
and remove failing syncManagerGroupRecoveryTest
2020-04-14 18:21:56 +02:00
Zahary Karadjov
22876da593 Fix gcsafety issues in the test suite 2020-03-24 22:14:40 +02:00
Zed
6ba7b4b117 Generate markdown test reports 2020-03-13 14:38:59 +00:00
Ștefan Talpalaru
1caafba79c
Merge pull request #803 from status-im/misc/bump-libp2p
bumping libp2p to latest master
2020-03-12 01:57:11 +01:00
cheatfate
399e91fe5b
Fix failing test. 2020-03-12 02:02:33 +02:00
Dustin Brody
0d3de00714 remove unused imports 2020-03-11 10:50:55 +00:00
cheatfate
98dc701473 Add PeerPool.addPeer async version and tests. 2020-01-29 15:28:41 +00:00
cheatfate
8b229d68ad Add testutil and timedTest. 2020-01-29 15:28:41 +00:00
cheatfate
db20fc1172 Fix SyncQueue push(data) bug.
Rename lastSlot to HeadSlot.
Add failure test.
2020-01-29 15:28:41 +00:00
cheatfate
73dc72583f Initial commit. 2020-01-29 15:28:41 +00:00