Documentation
¶
Index ¶
- Variables
- func AsSha256(o interface{}) string
- func CanonicalizeBlockID(bid tmproto.BlockID) *tmproto.CanonicalBlockID
- func CanonicalizePartSetHeader(psh tmproto.PartSetHeader) tmproto.CanonicalPartSetHeader
- func CanonicalizeVote(chainID string, vote *tmproto.Vote) tmproto.CanonicalVote
- func GenerateKeyFile(fileLocation string)
- func RunDataConnect(peerAddr string, marlinTo chan marlinTypes.MarlinMessage, ...)
- func RunSpamFilter(rpcAddr string, marlinTo chan marlinTypes.MarlinMessage, ...)
- func VerifyKeyFile(fileLocation string) (bool, error)
- func VoteSignBytes(chainID string, vote *tmproto.Vote) []byte
- type BlockID
- type BlockPartMessage
- type HasVoteMessage
- type Message
- type NewRoundStepMessage
- type NewValidBlockMessage
- type P2PConnection
- type Part
- type PartSetHeader
- type Proposal
- type ProposalMessage
- type ProposalPOLMessage
- type TendermintHandler
- type Validator
- type Vote
- type VoteMessage
- type VoteSetBitsMessage
- type VoteSetMaj23Message
Constants ¶
This section is empty.
Variables ¶
var ServicedKeyFile string = "iris"
var ServicedTMCore chains.NodeType = chains.NodeType{Version: "", Network: "irishub-1", ProtocolVersionApp: "0", ProtocolVersionBlock: "11", ProtocolVersionP2p: "8"}
ServicedTMCore is a string associated with each TM core handler to decipher which handler is to be attached.
Functions ¶
func CanonicalizeBlockID ¶
func CanonicalizeBlockID(bid tmproto.BlockID) *tmproto.CanonicalBlockID
func CanonicalizePartSetHeader ¶
func CanonicalizePartSetHeader(psh tmproto.PartSetHeader) tmproto.CanonicalPartSetHeader
CanonicalizeVote transforms the given PartSetHeader to a CanonicalPartSetHeader.
func CanonicalizeVote ¶
func CanonicalizeVote(chainID string, vote *tmproto.Vote) tmproto.CanonicalVote
CanonicalizeVote transforms the given Vote to a CanonicalVote, which does not contain ValidatorIndex and ValidatorAddress fields.
func GenerateKeyFile ¶
func GenerateKeyFile(fileLocation string)
func RunDataConnect ¶
func RunDataConnect(peerAddr string, marlinTo chan marlinTypes.MarlinMessage, marlinFrom chan marlinTypes.MarlinMessage, isConnectionOutgoing bool, keyFile string, listenPort int)
func RunSpamFilter ¶
func RunSpamFilter(rpcAddr string, marlinTo chan marlinTypes.MarlinMessage, marlinFrom chan marlinTypes.MarlinMessage)
RunSpamFilter serves as the entry point for a TM Core handler when serving as a spamfilter
func VerifyKeyFile ¶
Types ¶
type BlockID ¶
type BlockID struct {
Hash []byte `json:"hash"`
PartSetHeader PartSetHeader `json:"parts"`
}
-------------------------------------
func BlockIDFromProto ¶
FromProto sets a protobuf BlockID to the given pointer. It returns an error if the block id is invalid.
type BlockPartMessage ¶
BlockPartMessage is sent when gossipping a piece of the proposed block.
type HasVoteMessage ¶
type HasVoteMessage struct {
Height int64
Round int32
Type tmproto.SignedMsgType
Index int32
}
HasVoteMessage is sent to indicate that a particular vote has been received.
type Message ¶
type Message interface {
}
Message is a message that can be sent and received on the Reactor
type NewRoundStepMessage ¶
type NewRoundStepMessage struct {
Height int64
Round int32
Step int8
SecondsSinceStartTime int64
LastCommitRound int32
}
NewRoundStepMessage is sent for every step taken in the ConsensusState. For every height/round/step transition
type NewValidBlockMessage ¶
type NewValidBlockMessage struct {
Height int64
Round int32
BlockPartSetHeader PartSetHeader
BlockParts *bits.BitArray
IsCommit bool
}
NewValidBlockMessage is sent when a validator observes a valid block B in some round r, i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. In case the block is also committed, then IsCommit flag is set to true.
type P2PConnection ¶
type P2PConnection struct {
// contains filtered or unexported fields
}
type Part ¶
type Part struct {
Index uint32 `json:"index"`
Bytes []byte `json:"bytes"`
Proof merkle.Proof `json:"proof"`
}
-------------------------------------
type PartSetHeader ¶
-------------------------------------
func PartSetHeaderFromProto ¶
func PartSetHeaderFromProto(ppsh *tmproto.PartSetHeader) (*PartSetHeader, error)
FromProto sets a protobuf PartSetHeader to the given pointer
func (*PartSetHeader) ToProto ¶
func (psh *PartSetHeader) ToProto() tmproto.PartSetHeader
ToProto converts PartSetHeader to protobuf
type Proposal ¶
type Proposal struct {
Type tmproto.SignedMsgType
Height int64 `json:"height"`
Round int32 `json:"round"` // there can not be greater than 2_147_483_647 rounds
POLRound int32 `json:"pol_round"` // -1 if null.
BlockID BlockID `json:"block_id"`
Timestamp time.Time `json:"timestamp"`
Signature []byte `json:"signature"`
}
type ProposalMessage ¶
type ProposalMessage struct {
Proposal *Proposal
}
ProposalMessage is sent when a new block is proposed.
type ProposalPOLMessage ¶
ProposalPOLMessage is sent when a previous proposal is re-proposed.
type TendermintHandler ¶
type TendermintHandler struct {
// contains filtered or unexported fields
}
type Vote ¶
type Vote struct {
Type tmproto.SignedMsgType `json:"type"`
Height int64 `json:"height"`
Round int32 `json:"round"` // assume there will not be greater than 2_147_483_647 rounds
BlockID BlockID `json:"block_id"` // zero if vote is nil.
Timestamp time.Time `json:"timestamp"`
ValidatorAddress crypto.Address `json:"validator_address"`
ValidatorIndex int32 `json:"validator_index"`
Signature []byte `json:"signature"`
}
-------------------------------------
func VoteFromProto ¶
FromProto converts a proto generetad type to a handwritten type return type, nil if everything converts safely, otherwise nil, error
type VoteMessage ¶
type VoteMessage struct {
Vote *Vote
}
VoteMessage is sent when voting for a proposal (or lack thereof).
type VoteSetBitsMessage ¶
type VoteSetBitsMessage struct {
Height int64
Round int32
Type tmproto.SignedMsgType
BlockID BlockID
Votes *bits.BitArray
}
VoteSetBitsMessage is sent to communicate the bit-array of votes seen for the BlockID.
type VoteSetMaj23Message ¶
type VoteSetMaj23Message struct {
Height int64
Round int32
Type tmproto.SignedMsgType
BlockID BlockID
}
VoteSetMaj23Message is sent to indicate that a given BlockID has seen +2/3 votes.
Directories
¶
| Path | Synopsis |
|---|---|
|
merkle
Package merkle computes a deterministic minimal height Merkle tree hash.
|
Package merkle computes a deterministic minimal height Merkle tree hash. |
|
xchacha20poly1305
Package xchacha20poly1305 creates an AEAD using hchacha, chacha, and poly1305 This allows for randomized nonces to be used in conjunction with chacha.
|
Package xchacha20poly1305 creates an AEAD using hchacha, chacha, and poly1305 This allows for randomized nonces to be used in conjunction with chacha. |
|
libs
|
|
|
autofile/cmd
command
|
|
|
events
Package events - Pub-Sub in go with event caching
|
Package events - Pub-Sub in go with event caching |
|
flowrate
Package flowrate provides the tools for monitoring and limiting the flow rate of an arbitrary data stream.
|
Package flowrate provides the tools for monitoring and limiting the flow rate of an arbitrary data stream. |
|
json
Package json provides functions for marshaling and unmarshaling JSON in a format that is backwards-compatible with Amino JSON encoding.
|
Package json provides functions for marshaling and unmarshaling JSON in a format that is backwards-compatible with Amino JSON encoding. |
|
pubsub
Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients).
|
Package pubsub implements a pub-sub model with a single publisher (Server) and multiple subscribers (clients). |
|
pubsub/query
Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar.
|
Package query provides a parser for a custom query format: abci.invoice.number=22 AND abci.invoice.owner=Ivan See query.peg for the grammar, which is a https://en.wikipedia.org/wiki/Parsing_expression_grammar. |
|
proto
|
|