https://github.com/tendermint/tendermint
Raw File
Tip revision: 1b2d33f5b778398f61b80e07116f5ce73d5128e6 authored by Jasmina Malicevic on 26 January 2022, 16:36:53 UTC
Merge branch 'master' into jmalicevic/4729-evidence-individual-processing
Tip revision: 1b2d33f
signable.go
package types

import (
	"github.com/tendermint/tendermint/crypto/ed25519"
	tmmath "github.com/tendermint/tendermint/libs/math"
)

var (
	// MaxSignatureSize is a maximum allowed signature size for the Proposal
	// and Vote.
	// XXX: secp256k1 does not have Size nor MaxSize defined.
	MaxSignatureSize = tmmath.MaxInt(ed25519.SignatureSize, 64)
)

// Signable is an interface for all signable things.
// It typically removes signatures before serializing.
// SignBytes returns the bytes to be signed
// NOTE: chainIDs are part of the SignBytes but not
// necessarily the object themselves.
// NOTE: Expected to panic if there is an error marshaling.
type Signable interface {
	SignBytes(chainID string) []byte
}
back to top