Documentation ¶
Index ¶
- Constants
- type NoopSignatureRequestHandler
- type SignatureRequestHandler
- type SignatureRequestHandlerP2P
- func (s *SignatureRequestHandlerP2P) AppGossip(ctx context.Context, nodeID ids.NodeID, gossipBytes []byte)
- func (s *SignatureRequestHandlerP2P) AppRequest(ctx context.Context, nodeID ids.NodeID, deadline time.Time, ...) ([]byte, *common.AppError)
- func (s *SignatureRequestHandlerP2P) GetBlockSignature(blockID ids.ID) ([bls.SignatureLen]byte, error)
- func (s *SignatureRequestHandlerP2P) GetMessageSignature(messageID ids.ID) ([bls.SignatureLen]byte, error)
Constants ¶
const ( ErrFailedToParse = iota ErrFailedToGetSig ErrFailedToMarshal )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopSignatureRequestHandler ¶
type NoopSignatureRequestHandler struct{}
func (*NoopSignatureRequestHandler) OnBlockSignatureRequest ¶ added in v0.5.7
func (s *NoopSignatureRequestHandler) OnBlockSignatureRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, signatureRequest message.BlockSignatureRequest) ([]byte, error)
func (*NoopSignatureRequestHandler) OnMessageSignatureRequest ¶ added in v0.5.7
func (s *NoopSignatureRequestHandler) OnMessageSignatureRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, signatureRequest message.MessageSignatureRequest) ([]byte, error)
type SignatureRequestHandler ¶
type SignatureRequestHandler struct {
// contains filtered or unexported fields
}
SignatureRequestHandler serves warp signature requests. It is a peer.RequestHandler for message.MessageSignatureRequest. TODO: After E-Upgrade, this handler can be removed and SignatureRequestHandlerP2P is sufficient.
func NewSignatureRequestHandler ¶
func NewSignatureRequestHandler(backend warp.Backend, codec codec.Manager) *SignatureRequestHandler
func (*SignatureRequestHandler) OnBlockSignatureRequest ¶ added in v0.5.7
func (s *SignatureRequestHandler) OnBlockSignatureRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, request message.BlockSignatureRequest) ([]byte, error)
func (*SignatureRequestHandler) OnMessageSignatureRequest ¶ added in v0.5.7
func (s *SignatureRequestHandler) OnMessageSignatureRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, signatureRequest message.MessageSignatureRequest) ([]byte, error)
OnMessageSignatureRequest handles message.MessageSignatureRequest, and retrieves a warp signature for the requested message ID. Never returns an error Expects returned errors to be treated as FATAL Returns empty response if signature is not found Assumes ctx is active
type SignatureRequestHandlerP2P ¶ added in v0.6.9
type SignatureRequestHandlerP2P struct {
// contains filtered or unexported fields
}
SignatureRequestHandlerP2P serves warp signature requests using the p2p framework from avalanchego. It is a peer.RequestHandler for message.MessageSignatureRequest.
func NewSignatureRequestHandlerP2P ¶ added in v0.6.9
func NewSignatureRequestHandlerP2P(backend warp.Backend, codec codec.Manager) *SignatureRequestHandlerP2P
func (*SignatureRequestHandlerP2P) AppRequest ¶ added in v0.6.9
func (*SignatureRequestHandlerP2P) GetBlockSignature ¶ added in v0.6.9
func (s *SignatureRequestHandlerP2P) GetBlockSignature(blockID ids.ID) ([bls.SignatureLen]byte, error)
func (*SignatureRequestHandlerP2P) GetMessageSignature ¶ added in v0.6.9
func (s *SignatureRequestHandlerP2P) GetMessageSignature(messageID ids.ID) ([bls.SignatureLen]byte, error)