Documentation
¶
Index ¶
- type NoProtection
- func (p *NoProtection) IsSlashableAttestation(pubKey []byte, attestation *eth.AttestationData) (*core.AttestationSlashStatus, error)
- func (p *NoProtection) IsSlashableProposal(pubKey []byte, block *eth.BeaconBlock) (*core.ProposalSlashStatus, error)
- func (p *NoProtection) RetrieveHighestAttestation(pubKey []byte) (*eth.AttestationData, error)
- func (p *NoProtection) UpdateHighestAttestation(pubKey []byte, attestation *eth.AttestationData) error
- func (p *NoProtection) UpdateHighestProposal(pubKey []byte, block *eth.BeaconBlock) error
- type NormalProtection
- func (protector *NormalProtection) IsSlashableAttestation(pubKey []byte, attestation *eth.AttestationData) (*core.AttestationSlashStatus, error)
- func (protector *NormalProtection) IsSlashableProposal(pubKey []byte, block *eth.BeaconBlock) (*core.ProposalSlashStatus, error)
- func (protector *NormalProtection) RetrieveHighestAttestation(pubKey []byte) (*eth.AttestationData, error)
- func (protector *NormalProtection) UpdateHighestAttestation(pubKey []byte, attestation *eth.AttestationData) error
- func (protector *NormalProtection) UpdateHighestProposal(key []byte, block *eth.BeaconBlock) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoProtection ¶
type NoProtection struct {
}
func (*NoProtection) IsSlashableAttestation ¶
func (p *NoProtection) IsSlashableAttestation(pubKey []byte, attestation *eth.AttestationData) (*core.AttestationSlashStatus, error)
func (*NoProtection) IsSlashableProposal ¶
func (p *NoProtection) IsSlashableProposal(pubKey []byte, block *eth.BeaconBlock) (*core.ProposalSlashStatus, error)
func (*NoProtection) RetrieveHighestAttestation ¶
func (p *NoProtection) RetrieveHighestAttestation(pubKey []byte) (*eth.AttestationData, error)
func (*NoProtection) UpdateHighestAttestation ¶
func (p *NoProtection) UpdateHighestAttestation(pubKey []byte, attestation *eth.AttestationData) error
func (*NoProtection) UpdateHighestProposal ¶
func (p *NoProtection) UpdateHighestProposal(pubKey []byte, block *eth.BeaconBlock) error
type NormalProtection ¶
type NormalProtection struct {
// contains filtered or unexported fields
}
func NewNormalProtection ¶
func NewNormalProtection(store core.SlashingStore) *NormalProtection
NewNormalProtection is the constructor of NormalProtection
func (*NormalProtection) IsSlashableAttestation ¶
func (protector *NormalProtection) IsSlashableAttestation(pubKey []byte, attestation *eth.AttestationData) (*core.AttestationSlashStatus, error)
will detect double, surround and surrounded slashable events
func (*NormalProtection) IsSlashableProposal ¶
func (protector *NormalProtection) IsSlashableProposal(pubKey []byte, block *eth.BeaconBlock) (*core.ProposalSlashStatus, error)
func (*NormalProtection) RetrieveHighestAttestation ¶
func (protector *NormalProtection) RetrieveHighestAttestation(pubKey []byte) (*eth.AttestationData, error)
func (*NormalProtection) UpdateHighestAttestation ¶
func (protector *NormalProtection) UpdateHighestAttestation(pubKey []byte, attestation *eth.AttestationData) error
Will potentially update the highest attestation given this latest attestation.
func (*NormalProtection) UpdateHighestProposal ¶
func (protector *NormalProtection) UpdateHighestProposal(key []byte, block *eth.BeaconBlock) error
Click to show internal directories.
Click to hide internal directories.



