go-spacemesh icon indicating copy to clipboard operation
go-spacemesh copied to clipboard

tortoise, sync: required data for tortoise when syncing a new node

Open dshulyak opened this issue 3 years ago • 1 comments

In the current tortoise version expected weight is computed based on the difference from the last layer with the layer that we want to verify (target layer). Currently last layer is just a last layer that was ever received by the tortoise. But the last layer must be set according to the clock as defined in https://github.com/spacemeshos/go-spacemesh/issues/2921.

It brings up two additional requirements on sync:

  • [x] all atxs must be added to the database before tortoise will start verification, otherwise, it won't be able to compute the expected weight
  • [ ] in order to use verifying tortoise we need to get input vectors from peers. previously it was mistakenly assumed that input vector means hare output, in fact it means actual local peer opinion from layers before hdist, and hare output for layers in the hdist distance.

Basically we will have to implement this issue before https://github.com/spacemeshos/go-spacemesh/issues/2921 is implemented.

cc @countvonzero

dshulyak avatar Dec 16 '21 07:12 dshulyak

the second part of this issue is currently blocked by #3283

countvonzero avatar Jul 25 '22 13:07 countvonzero