slashing

package
v0.37.19 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer added in v0.27.3

type Consumer struct {
	// contains filtered or unexported fields
}

Consumer is a struct that logs a message for any slashable offenses. This struct will be updated in the future when slashing is implemented.

func NewSlashingViolationsConsumer

func NewSlashingViolationsConsumer(log zerolog.Logger, metrics module.NetworkSecurityMetrics, misbehaviorReportConsumer network.MisbehaviorReportConsumer) *Consumer

NewSlashingViolationsConsumer returns a new Consumer.

func (*Consumer) OnInvalidMsgError added in v0.27.3

func (c *Consumer) OnInvalidMsgError(violation *network.Violation)

OnInvalidMsgError logs an error for messages that contained payloads that could not be unmarshalled into the message type denoted by message code byte and reports a misbehavior to alsp misbehavior report manager.

func (*Consumer) OnSenderEjectedError added in v0.27.3

func (c *Consumer) OnSenderEjectedError(violation *network.Violation)

OnSenderEjectedError logs an error for sender ejected error and reports a misbehavior to alsp misbehavior report manager.

func (*Consumer) OnUnAuthorizedSenderError added in v0.27.3

func (c *Consumer) OnUnAuthorizedSenderError(violation *network.Violation)

OnUnAuthorizedSenderError logs an error for unauthorized sender error and reports a misbehavior to alsp misbehavior report manager.

func (*Consumer) OnUnauthorizedPublishOnChannel added in v0.32.0

func (c *Consumer) OnUnauthorizedPublishOnChannel(violation *network.Violation)

OnUnauthorizedPublishOnChannel logs an error for messages unauthorized to be sent via pubsub.

func (*Consumer) OnUnauthorizedUnicastOnChannel added in v0.29.0

func (c *Consumer) OnUnauthorizedUnicastOnChannel(violation *network.Violation)

OnUnauthorizedUnicastOnChannel logs an error for messages unauthorized to be sent via unicast and reports a misbehavior to alsp misbehavior report manager.

func (*Consumer) OnUnexpectedError added in v0.28.0

func (c *Consumer) OnUnexpectedError(violation *network.Violation)

OnUnexpectedError logs an error for unexpected errors. This indicates message validation has failed for an unknown reason and could potentially be n slashable offense and reports a misbehavior to alsp misbehavior report manager.

func (*Consumer) OnUnknownMsgTypeError added in v0.27.3

func (c *Consumer) OnUnknownMsgTypeError(violation *network.Violation)

OnUnknownMsgTypeError logs an error for unknown message type error and reports a misbehavior to alsp misbehavior report manager.

Jump to

Keyboard shortcuts

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