messages

package
v6.4.3-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSigner

func GetSigner(msg interface{}) primitives.Identity

Types

type AuthChangeMessage

type AuthChangeMessage struct {
	Id     Identity
	Status AuthorityStatus //0 < audit and >0 is leader
	SignedMessage
}

------------------------------------------------------------------------------------------------------------------

func (*AuthChangeMessage) ReadString

func (r *AuthChangeMessage) ReadString(s string)

func (*AuthChangeMessage) String

func (r *AuthChangeMessage) String() string

type DbsigMessage

type DbsigMessage struct {
	Prev   Hash
	Height int
	Eom    EomMessage
	SignedMessage
}

------------------------------------------------------------------------------------------------------------------

func NewDBSigMessage

func NewDBSigMessage(identity Identity, eom EomMessage, prev Hash) DbsigMessage

func (*DbsigMessage) ReadString

func (r *DbsigMessage) ReadString(s string)

func (*DbsigMessage) String

func (r *DbsigMessage) String() string

type EomMessage

type EomMessage struct {
	ProcessListLocation
	SignedMessage
}

func NewEomMessage

func NewEomMessage(identity Identity, loc ProcessListLocation) EomMessage

func (EomMessage) ReadString

func (r EomMessage) ReadString(s string)

func (EomMessage) String

func (r EomMessage) String() string

type FaultMsg

type FaultMsg struct {
	FaultId Identity
	ProcessListLocation
	Round int
	SignedMessage
}

------------------------------------------------------------------------------------------------------------------ Start faulting

func NewFaultMessage

func NewFaultMessage(victim Identity, pl ProcessListLocation, r int, signer Identity) FaultMsg

func (*FaultMsg) ReadString

func (r *FaultMsg) ReadString(s string)

func (*FaultMsg) String

func (r *FaultMsg) String() string

type LeaderLevelMessage

type LeaderLevelMessage struct {
	// Usually to prove your rank you have to explicitly show
	// the votes you used to obtain that rank, however we don't have
	// to here
	Rank int
	// Leaders must never have 2 messages of the same level
	Level             int
	VolunteerPriority int

	VolunteerMessage
	SignedMessage
	TaggedMessage

	// Every vote also includes their previous
	PreviousVote *LeaderLevelMessage

	// For the rank 0 case
	VoteMessages []*VoteMessage

	// messages used to justify
	Justification []LeaderLevelMessage
	Committed     bool

	// 		Used internally
	// If you skip to EOM, set this so we know who you skipped from
	EOMFrom Identity
}

------------------------------------------------------------------------------------------------------------------

func NewLeaderLevelMessage

func NewLeaderLevelMessage(self Identity, rank, level int, v VolunteerMessage) LeaderLevelMessage

func (*LeaderLevelMessage) Copy

func (*LeaderLevelMessage) Less

func (*LeaderLevelMessage) ReadString

func (r *LeaderLevelMessage) ReadString(s string)

func (*LeaderLevelMessage) String

func (r *LeaderLevelMessage) String() string

type NoMessage

type NoMessage struct{}
var Nothing NoMessage

func (*NoMessage) ReadString

func (r *NoMessage) ReadString(s string)

func (*NoMessage) String

func (r *NoMessage) String() string

type SignedMessage

type SignedMessage struct {
	Signer Identity
}

func (*SignedMessage) ReadString

func (r *SignedMessage) ReadString(s string)

func (*SignedMessage) String

func (r *SignedMessage) String() string

type TaggedMessage

type TaggedMessage struct {
	// contains filtered or unexported fields
}

A tagged message has a tag to recall it later. Optional

func (*TaggedMessage) ReadString

func (r *TaggedMessage) ReadString(s string)

func (*TaggedMessage) String

func (r *TaggedMessage) String() string

func (*TaggedMessage) Tag

func (r *TaggedMessage) Tag() [32]byte

func (*TaggedMessage) TagMessage

func (r *TaggedMessage) TagMessage(tag [32]byte)

type VolunteerMessage

type VolunteerMessage struct {
	Id  Identity
	Eom EomMessage
	FaultMsg
	SignedMessage
	TaggedMessage
}

------------------------------------------------------------------------------------------------------------------

func NewVolunteerMessage

func NewVolunteerMessage(e EomMessage, identity Identity) VolunteerMessage

func NewVolunteerMessageWithoutEOM

func NewVolunteerMessageWithoutEOM(identity Identity) VolunteerMessage

func (*VolunteerMessage) ReadString

func (r *VolunteerMessage) ReadString(s string)

func (*VolunteerMessage) String

func (r *VolunteerMessage) String() string

type VoteMessage

type VoteMessage struct {
	Volunteer VolunteerMessage
	// Other votes you may have seen. Help
	// pass them along
	// OtherVotes map[Identity]SignedMessage
	SignedMessage
	TaggedMessage
}

------------------------------------------------------------------------------------------------------------------

func NewVoteMessage

func NewVoteMessage(vol VolunteerMessage, self Identity) VoteMessage

func (*VoteMessage) Copy

func (a *VoteMessage) Copy() *VoteMessage

func (*VoteMessage) ReadString

func (r *VoteMessage) ReadString(s string)

func (*VoteMessage) String

func (r *VoteMessage) String() string

Jump to

Keyboard shortcuts

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