Documentation
¶
Index ¶
Constants ¶
const ( GovProposalMonitorMemo = "New Governance Proposals" GovProposalMonitorName = "govProposal/new" GovVotingMonitorMemo = "New Active Governance Proposals" GovVotingMonitorName = "govProposal/voting" )
Governance monitor alert related constants.
const ( MissingSigMonitorMemo = "Missing Signatures From Validators" MissingSigMonitorName = "slashing/missingSig" DoubleSignMonitorMemo = "Discovered Double Signing Validators" DoubleSignMonitorName = "slashing/doubleSign" )
Slashing monitor alert related constants.
const ( JailedValidatorMonitorMemo = "New Jailed Validators" JailedValidatorMonitorName = "staking/jailed" )
Staking monitor alert related constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoubleSignMonitor ¶
type DoubleSignMonitor struct {
// contains filtered or unexported fields
}
DoubleSignMonitor defines a monitor responsible for monitoring when filtered validators double sign a block.
func NewDoubleSignMonitor ¶
func NewDoubleSignMonitor(logger core.Logger, cfg config.Config, name, memo string) *DoubleSignMonitor
NewDoubleSignMonitor returns a reference to a new DoubleSignMonitor.
func (*DoubleSignMonitor) Exec ¶
func (dsm *DoubleSignMonitor) Exec() (resp, id []byte, err error)
Exec implements the Monitor interface. It attempts to fetch validators that have double signed the latest block and match against a given filter of validator addresses. Upon success, the serialized encoding of the filtered validator addresses and an ID that is the SHA256 of said encoding will be returned and an error otherwise.
type DoubleSigners ¶
type DoubleSigners struct { Height int64 `json:"height"` DoubleSigners []string `json:"double_signers"` }
DoubleSigners defines a structure for containing addresses of validators that have double signed for a given block height.
type GovProposalMonitor ¶
type GovProposalMonitor struct {
// contains filtered or unexported fields
}
GovProposalMonitor defines a monitor responsible for monitoring new governance proposals.
func NewGovProposalMonitor ¶
func NewGovProposalMonitor(logger core.Logger, cfg config.Config, name, memo string) *GovProposalMonitor
NewGovProposalMonitor returns a reference to a new GovProposalMonitor.
func (*GovProposalMonitor) Exec ¶
func (gpm *GovProposalMonitor) Exec() (resp, id []byte, err error)
Exec implements the Monitor interface. It will attempt to fetch new governance proposals. Upon success, the raw response body and an ID that is the SHA256 of the response body will be returned and an error otherwise.
type GovVotingMonitor ¶
type GovVotingMonitor struct {
// contains filtered or unexported fields
}
GovVotingMonitor defines a monitor responsible for monitoring governance proposals that are in the voting stage.
func NewGovVotingMonitor ¶
func NewGovVotingMonitor(logger core.Logger, cfg config.Config, name, memo string) *GovVotingMonitor
NewGovVotingMonitor returns a reference to a new GovVotingMonitor.
func (*GovVotingMonitor) Exec ¶
func (gvm *GovVotingMonitor) Exec() (resp, id []byte, err error)
Exec implements the Monitor interface. It will attempt to fetch governance proposals that are in the voting stage. Upon success, the raw response body and an ID that is the SHA256 of the response body will be returned and an error otherwise.
type JailedValidatorMonitor ¶
type JailedValidatorMonitor struct {
// contains filtered or unexported fields
}
JailedValidatorMonitor defines a monitor responsible for monitoring when certain validators become jailed.
func NewJailedValidatorMonitor ¶
func NewJailedValidatorMonitor(logger core.Logger, cfg config.Config, name, memo string) *JailedValidatorMonitor
NewJailedValidatorMonitor returns a reference to a new JailedValidatorMonitor.
func (*JailedValidatorMonitor) Exec ¶
func (jvm *JailedValidatorMonitor) Exec() (resp, id []byte, err error)
Exec implements the Monitor interface. It attempts to fetch validators that are jailed and match against a given filter of validator addresses. Upon success, the serialized encoding of the filtered validators and an ID that is the SHA256 of said encoding will be returned and an error otherwise.
type MissingSigMonitor ¶
type MissingSigMonitor struct {
// contains filtered or unexported fields
}
MissingSigMonitor defines a monitor responsible for monitoring when filtered validators fail to sign a block.
func NewMissingSigMonitor ¶
func NewMissingSigMonitor(logger core.Logger, cfg config.Config, name, memo string) *MissingSigMonitor
NewMissingSigMonitor returns a reference to a new MissingSigMonitor.
func (*MissingSigMonitor) Exec ¶
func (msm *MissingSigMonitor) Exec() (resp, id []byte, err error)
Exec implements the Monitor interface. It attempts to fetch validators that have missed signing the latest block based on a given filter of validator addresses. Any matches are serialized and an ID that is the SHA256 of said encoding will be returned and an error otherwise.
type MissingSigners ¶
type MissingSigners struct { Height int64 `json:"height"` MissingSigners []string `json:"missing_signers"` }
MissingSigners defines a structure for containing addresses of validators that have missed a signature/precommit for a given block height.