Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultWebHookPath ..
DefaultWebHookPath = "staking/slash/webhook.example.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func Verify ¶ added in v1.3.1
func Verify(chain CommitteeReader, candidate *Record) error
Verify checks that the signature is valid
Types ¶
type Application ¶ added in v1.3.3
Application ..
func Apply ¶ added in v1.3.1
func Apply( chain staking.ValidatorSnapshotReader, state *state.DB, slashes Records, rate numeric.Dec, ) (*Application, error)
Apply ..
func (*Application) String ¶ added in v1.3.3
func (a *Application) String() string
type CommitteeReader ¶ added in v1.3.3
CommitteeReader ..
type ConflictingBallots ¶ added in v1.3.3
type ConflictingBallots struct {
AlreadyCastBallot votepower.Ballot `json:"already-cast-vote"`
DoubleSignedBallot votepower.Ballot `json:"double-signed-vote"`
}
ConflictingBallots ..
type DoubleSignWebHooks ¶ added in v1.3.1
type DoubleSignWebHooks struct {
WebHooks *struct {
OnNoticeDoubleSign string `yaml:"notice-double-sign"`
OnThisNodeDoubleSigned string `yaml:"this-node-double-signed"`
} `yaml:"web-hooks"`
Malicious *struct {
Trigger *struct {
PublicKeys []string `yaml:"list"`
DoubleSignNodeURL string `yaml:"double-sign"`
} `yaml:"trigger"`
} `yaml:"malicious"`
}
DoubleSignWebHooks ..
func NewDoubleSignWebHooksFromPath ¶ added in v1.3.1
func NewDoubleSignWebHooksFromPath(yamlPath string) (*DoubleSignWebHooks, error)
NewDoubleSignWebHooksFromPath ..
type Evidence ¶ added in v1.3.3
type Evidence struct {
Moment
ConflictingBallots
ProposalHeader *block.Header `json:"header"`
}
Evidence ..
func (Evidence) MarshalJSON ¶ added in v1.3.3
MarshalJSON ..
type Moment ¶ added in v1.3.3
type Moment struct {
Epoch *big.Int `json:"epoch"`
Height *big.Int `json:"block-height"`
TimeUnixNano *big.Int `json:"time-unix-nano"`
ViewID uint64 `json:"view-id"`
ShardID uint32 `json:"shard-id"`
}
Moment ..
type Record ¶
type Record struct {
// the reporter who will get rewarded
Evidence Evidence `json:"evidence"`
Reporter common.Address `json:"reporter"`
Offender common.Address `json:"offender"`
}
Record is an proof of a slashing made by a witness of a double-signing event
func (Record) MarshalJSON ¶ added in v1.3.3
MarshalJSON ..
type Records ¶ added in v1.3.3
type Records []Record
Records ..
func (Records) SanityCheck ¶ added in v1.3.3
SanityCheck fails if any of the slashes fail
type ReportResult ¶ added in v1.3.3
ReportResult ..
Click to show internal directories.
Click to hide internal directories.