validation

package
v0.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePubsubMsg

func DecodePubsubMsg(msg *pubsub.Message) (*types.SignedSSVMessage, error)

Types

type MessageValidator added in v0.3.7

type MessageValidator interface {
	ValidateSignedSSVMessage(runner ssv.Runner, signedSSVMessage *types.SignedSSVMessage) error
	// Verifies the message's RSA signature with PKCSv1.5 encoding. Ref: https://datatracker.ietf.org/doc/html/rfc8017#section-8.2.2
	VerifySignature(runner ssv.Runner, signedSSVMessage *types.SignedSSVMessage) error
}

To-Do: better spec the intended Message Validation behavior. Issue #375: https://github.com/bloxapp/ssv-spec/issues/375

type MsgValidatorFunc

type MsgValidatorFunc = func(ctx context.Context, p peer.ID, msg *pubsub.Message) pubsub.ValidationResult

MsgValidatorFunc represents a message validator

func MsgValidation

func MsgValidation(runner ssv.Runner, msgValidator MessageValidator) MsgValidatorFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL