ssbc / ssb-ebt

secure scuttlebutt replication with epidemic-broadcast-trees
MIT License
18 stars 10 forks source link

Recovery sync does not trigger #48

Closed staltz closed 3 years ago

staltz commented 3 years ago

Manyverse has some automated tests for benchmarking how long does recovery sync last, and currently it doesn't even trigger.

Reproduction:

On startup, Bob logs the output of friends.hops and getVectorClock:

@Ju6ir (Alice) is at hops 1
clock[alice] is 173

Bob automatically connects to LAN peer Alice, and then Bob logs:

ssb:conn-hub connecting to net:192.168.1.105:26831~shs:Ju6irD0MKhroDkcz1FKkc7W8LMIyWYWVqBAo4DTHZnM= +0ms
EBT:conn @Ju6irD0MKhroDkcz1FKkc7W8LMIyWYWVqBAo4DTHZnM=.ed25519
ssb:conn-hub connected to net:192.168.1.105:26831~shs:Ju6irD0MKhroDkcz1FKkc7W8LMIyWYWVqBAo4DTHZnM= +50ms
EBT:recv {
  "@Ju6irD0MKhroDkcz1FKkc7W8LMIyWYWVqBAo4DTHZnM=.ed25519": 0
}
EBT:send { '@Ju6irD0MKhroDkcz1FKkc7W8LMIyWYWVqBAo4DTHZnM=.ed25519': -1 }

Note the last part, EBT:send { '@Ju6ir...': -1 }, I fully expected it to be 173 but actual was -1 which signals (as far as I understand) "will not replicate".

staltz commented 3 years ago

PS: In subsequent connections, Bob logs:

ssb:conn-hub connected to net:192.168.1.105:26831~shs:Ju6irD0MKhroDkcz1FKkc7W8LMIyWYWVqBAo4DTHZnM= +44ms
EBT:recv {}
EBT:send {}
staltz commented 3 years ago

I have tried downgrading Bob to ssb-ebt 5.6.7 (e-b-t 7.0) and the behavior is the same.

staltz commented 3 years ago

KILL ME. I forgot to install ssb-replication-scheduler on Bob.