I did the changes discussed in the last PR. Moreover, the current spec is adapted to capture V2, highlights issues, and discusses solutions. In particular:
I have added
func CommitMatchesBlock(a Block, b Block) Boolean
that checks whether "b.Commit" is a commit for "a". We should rename it with the name used in the Golang implementation, I guess.
Execute(): the postcondition corresponds to the current checks in V2 (there is also a second version of Execute that describes the fix)
I say if peerID is empty we abort. Is this OK? Or should we wait until we hear from other peers. Then we have to redo the termination condition of TargetHeight, because that needs some care if peerIDs is empty
I added a section "Analysis" that describes the issues and the discussed ways to fix that.
I did the changes discussed in the last PR. Moreover, the current spec is adapted to capture V2, highlights issues, and discusses solutions. In particular:
I have added func CommitMatchesBlock(a Block, b Block) Boolean that checks whether "b.Commit" is a commit for "a". We should rename it with the name used in the Golang implementation, I guess.
Execute(): the postcondition corresponds to the current checks in V2 (there is also a second version of Execute that describes the fix)
I say if peerID is empty we abort. Is this OK? Or should we wait until we hear from other peers. Then we have to redo the termination condition of TargetHeight, because that needs some care if peerIDs is empty
I added a section "Analysis" that describes the issues and the discussed ways to fix that.