slash

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply added in v1.3.1

func Apply(state *state.DB, slashes []byte) error

Apply ..

func Verify added in v1.3.1

func Verify(candidate *Record) error

Verify checks that the signature is valid

Types

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"`
}

DoubleSignWebHooks ..

func NewDoubleSignWebHooksFromPath added in v1.3.1

func NewDoubleSignWebHooksFromPath(yamlPath string) (*DoubleSignWebHooks, error)

NewDoubleSignWebHooksFromPath ..

type Record

type Record struct {
	Offender shard.BlsPublicKey
	Signed   struct {
		Header    *block.Header
		Signature *bls.Sign
	} `json:"signed"`
	DoubleSigned struct {
		Header    *block.Header
		Signature *bls.Sign
	} `json:"double-signed"`
	Beneficiary common.Address // the reporter who will get rewarded
}

Record is an proof of a slashing made by a witness of a double-signing event

func NewRecord added in v1.3.1

func NewRecord(
	offender shard.BlsPublicKey,
	signedHeader, doubleSignedHeader *block.Header,
	signedSignature, doubleSignedSignature *bls.Sign,
	beneficiary common.Address,
) Record

NewRecord ..

Jump to

Keyboard shortcuts

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