Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
TotalSlashed *big.Int `json:"total-slashed"`
TotalBeneficiaryReward *big.Int `json:"total-beneficiary-reward"`
}
Application tracks the slash application to state
func Apply ¶
func Apply( chain staking.ValidatorSnapshotReader, state *state.DB, slashes Records, rewardBeneficiary common.Address, ) (*Application, error)
Apply ..
func (*Application) String ¶
func (a *Application) String() string
type CommitteeReader ¶
type CommitteeReader interface {
Config() *params.ChainConfig
ReadShardState(epoch *big.Int) (*shard.State, error)
CurrentBlock() *types.Block
}
CommitteeReader ..
type ConflictingVotes ¶
type ConflictingVotes struct {
FirstVote Vote `json:"first-vote"`
SecondVote Vote `json:"second-vote"`
}
ConflictingVotes ..
type Evidence ¶
type Evidence struct {
Moment
ConflictingVotes
Offender common.Address `json:"offender"`
}
Evidence ..
type Moment ¶
type Moment struct {
Epoch *big.Int `json:"epoch"`
ShardID uint32 `json:"shard-id"`
Height uint64 `json:"height"`
ViewID uint64 `json:"view-id"`
}
Moment ..
type Record ¶
type Record struct {
// the reporter who will get rewarded
Evidence Evidence `json:"evidence"`
Reporter common.Address `json:"reporter"`
}
Record is an proof of a slashing made by a witness of a double-signing event
type Records ¶
type Records []Record
Records ..
func (Records) SetDifference ¶
SetDifference returns all the records that are in ys but not in r
Click to show internal directories.
Click to hide internal directories.