relab/hotstuff

Sign hash instead of block

Opened this issue · 1 comments

In quorum certificates, we sign the block (encoded). Why do we not just sign the hash of the block?
By just signing the hash, we could verify certificates without having to retrieve the block.
This makes it easier to parallelize such verifications.

func (c crypto) CreatePartialCert(block *hotstuff.Block) (cert hotstuff.PartialCert, err error) {
	sig, err := c.Sign(block.ToBytes())
	if err != nil {
		return hotstuff.PartialCert{}, err
	}
	return hotstuff.NewPartialCert(sig, block.Hash()), nil
}

From here:

func (c crypto) CreatePartialCert(block *hotstuff.Block) (cert hotstuff.PartialCert, err error) {

Add a benchmark and tests (if not already sufficiently tested) and try it.