Travis Person
a584fcb935
sync: log a message when there aren't enough peers
2020-12-03 01:27:07 +00:00
whyrusleeping
7921f8d713
drop a few logs down to debug
2020-11-12 11:25:22 -08:00
zgfzgf
1301fd6ddb
2k sync BootstrapPeerThreshold
2020-11-11 12:20:31 +08:00
vyzo
f6ecff0e26
check recent syncs in selectSyncTarget/selectDeferredSyncTarget
2020-10-30 07:50:26 +02:00
vyzo
57234d8ef3
fix spelling in comment to satisfy linter
...
this is ridiculous; since when do linters apply spellchecking on comments???
2020-10-29 19:13:45 +02:00
vyzo
47830efbf5
set BootstrapPeerThreshold to 4, add env variable to override
2020-10-29 19:08:58 +02:00
vyzo
a650641813
transition out of initial sync only if sync finishes within 15min
2020-10-29 17:27:13 +02:00
vyzo
8702ff8b7e
rename initialSync to initialSyncDone
2020-10-29 17:12:47 +02:00
vyzo
a26420f6e8
add missing return for deferrals during initial sync
2020-10-29 09:40:41 +02:00
Jakub Sztandera
ad905fc310
Expose WorkerID
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-28 20:22:07 +01:00
vyzo
ba2512655e
track last few worker states for debug purposes
2020-10-28 14:08:06 +02:00
vyzo
6266bae1d3
log worker spawning from initial sync deferrals
2020-10-28 11:44:16 +02:00
vyzo
188d1649d3
stop the ticker when done with it
2020-10-28 11:41:40 +02:00
vyzo
9ddf7bbd15
better handling of initial sync
2020-10-28 11:36:34 +02:00
vyzo
469666de82
limit max active sync workers
2020-10-28 10:33:22 +02:00
vyzo
fc1ac3e752
simplify circular buffer code
...
we don't care about order of checks!
2020-10-28 00:02:08 +02:00
vyzo
ab7a66b90d
track recently synced tipsets to avoid unnecessary worker spawning
2020-10-27 23:48:31 +02:00
Jakub Sztandera
2b82e5a118
Fix tipset coalescing in case of repeated blocks
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-27 21:23:16 +01:00
Jakub Sztandera
16d2cb6309
Add flag to coalesce Tipsets in pending queue
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-27 18:00:34 +01:00
vyzo
2fd0d430c8
set BootstrapPeerThreshold to 1, to mimic old code
...
which incidentally fixes tests
2020-10-26 15:49:24 +02:00
vyzo
c0a039ee11
fix logging
2020-10-26 15:19:09 +02:00
vyzo
f26385d0c6
use weight as the sync target selector
2020-10-26 14:51:26 +02:00
vyzo
af53b72eb8
fix typo
2020-10-26 14:36:34 +02:00
vyzo
5d34b7d618
rewrite sync manager
2020-10-26 14:11:19 +02:00
Jakub Sztandera
580a2f4dc6
Add option to join by common parents
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-23 01:35:26 +02:00
Jakub Sztandera
c8fe21c1ef
PopRelated aggretates the bucket
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-23 01:18:13 +02:00
Jakub Sztandera
810feee5a1
PopRelated should pop all
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-23 00:39:08 +02:00
Jakub Sztandera
24fc7d4cbd
Add reproduction test and fix the issue
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-23 00:34:04 +02:00
Jakub Sztandera
5edfc527b0
More than one bucket
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-23 00:34:03 +02:00
Jakub Sztandera
febc28f83f
Add log and Insert
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-22 23:39:54 +02:00
Jakub Sztandera
5c9c08ef85
heaviestTipSet reurning nil is a ok
...
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-21 22:16:01 +02:00
whyrusleeping
608010c35d
add some extra logging to try and debug sync issues
2020-10-19 19:09:49 -07:00
Steven Allen
7245ac2b69
fix a race in the sync manager
...
1. SyncerState contains a mutex and should never be copied. Honestly, this case
was probably fine but it's just as easy to create a separate snapshot type and
easier to reason about.
2. We need to initialize the syncStates array once at start, before accessing
it. By each syncer state inside each worker, we were racing with calls to
`State()`. Again, this was probably benign, but I don't trust optimizing
compilers.
2020-10-10 08:31:04 -07:00
Raúl Kripalani
dd841f32db
syncer: make SyncManager an interface.
2020-09-14 21:58:59 +01:00
Steven Allen
5733c71c50
Lint everything
...
We were ignoring quite a few error cases, and had one case where we weren't
actually updating state where we wanted to. Unfortunately, if the linter doesn't
pass, nobody has any reason to actually check lint failures in CI.
There are three remaining XXXs marked in the code for lint.
2020-08-20 20:46:36 -07:00
Lucas Molas
469eef8231
Lotus architecture notes ( #1768 )
...
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2020-06-09 20:17:28 -03:00
Jeromy
686c543778
clean up some of the more spammy logs
2020-06-09 12:49:31 -07:00
whyrusleeping
6e94377469
cache load tipset
2019-12-16 11:22:56 -08:00
whyrusleeping
f141849df5
fix incoming tipset bucketing
2019-12-11 21:41:24 +01:00
whyrusleeping
a06c2b15ef
remove debug prints
2019-12-08 16:04:44 +01:00
whyrusleeping
17b0cb1d3d
improve bootstrap sync handling
2019-12-08 12:44:47 +01:00
whyrusleeping
80595e4dd5
remove debug prints
2019-12-07 19:16:17 +01:00
whyrusleeping
7363fa2e8e
fix tests, add tipset expansion to relation criteria
2019-12-07 17:04:04 +01:00
whyrusleeping
7a308b60a6
Better track related incoming sync targets
2019-12-07 12:17:36 +01:00
whyrusleeping
1b475ba6fe
some fixes from staticcheck in ./chain
2019-12-04 17:18:30 -08:00
whyrusleeping
1b8aa2c2b4
fix propagation delay to be a sane number
2019-12-02 20:34:41 -08:00
Jakub Sztandera
6dafca7aac
Use local type as ctx key
...
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2019-11-19 14:38:05 -06:00
whyrusleeping
43447ca1bf
cleanup and add some tests
2019-11-16 13:36:21 -08:00
whyrusleeping
251ff41134
plumb through new sync status logic
2019-11-15 17:05:16 -08:00
whyrusleeping
7aa76d21d1
It works!
2019-11-15 13:35:29 -08:00