cothority
cothority copied to clipboard
Target height signed alonside forward-link
Backwards incompatible
We can only insure that From
and To
have been verified and signed by the conodes but you can't be sure of the position of the forward-link if you don't have access to the target block which happens in catch up scenarios.
It would nice and cheap to append the target height to the forward-link so that it can be verified easily when the block is stored.
well you can calculate the height of the forward-link if you have the indexes of the 'from' and 'to' blocks. Would that be enough?
Unfortunately no because for instance during catch up, the target block (To) is not yet stored and then you don't know the index. But that's what I'm doing when the block is known yes.
OK - I think I don't know exactly how the catching up works - wouldn't you have at least one of the blocks, and then being able to look up the height, and infer the destination-index, too?
Anyway, if this doesn't work, then you could store in fact any two of the following fields:
-
from
-index -
to
-index -
height
The third can then be calculated from the other two. And I'm sure that sooner or later you'd want to not only have theheight
, but also one of the indexes...
I guess it doesn't matter between height
or the to
-index (from is necessarily available) as you can go from one to another if the information is signed and thus you can trust it.
So should it be from
and height
then? Supposing it's easier to calculate the to
from those two...