Documentation ¶
Overview ¶
Package blocksigner implements remote block signing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConsensusChange = errors.New("consensus program has changed")
ErrConsensusChange is returned from ValidateAndSignBlock when a new consensus program is detected.
var ErrInvalidKey = errors.New("misconfigured signer public key")
ErrInvalidKey is returned from SignBlock when the key specified on the Signer is invalid. It may be not found by the mock HSM or not paired to a valid private key.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
Signer validates and signs blocks.
func (*Signer) SignBlock ¶
SignBlock computes the signature for the block using the private key in s. It does not validate the block.
func (*Signer) ValidateAndSignBlock ¶
ValidateAndSignBlock validates the given block against the current blockchain and, if valid, computes and returns a signature for the block. It is used as the httpjson handler for /rpc/signer/sign-block.
This function fails if this node has ever signed a different block at the same height as b.