Enum safe_network::messaging::node::NodeMsg[][src]

pub enum NodeMsg {
Show 21 variants ForwardDataMsg { msg: DataMsg, user: EndUser, data_signed: DataSigned, }, SectionKnowledge { src_info: (SectionSigned<SectionAuthorityProvider>, SecuredLinkedList), msg: Option<Box<NodeMsg>>, }, Sync { section: Section, network: Network, }, Relocate(RelocateDetails), RelocatePromise(RelocatePromise), JoinRequest(Box<JoinRequest>), JoinResponse(Box<JoinResponse>), JoinAsRelocatedRequest(Box<JoinAsRelocatedRequest>), JoinAsRelocatedResponse(Box<JoinAsRelocatedResponse>), BouncedUntrustedMessage { msg: Box<NodeMsg>, dst_section_pk: BlsPublicKey, }, DkgStart { dkg_key: DkgKey, elder_candidates: ElderCandidates, }, DkgMessage { dkg_key: DkgKey, message: DkgMessage, }, DkgFailureObservation { dkg_key: DkgKey, sig: DkgFailureSig, failed_participants: BTreeSet<XorName>, }, DkgFailureAgreement(DkgFailureSigSet), Propose { content: Proposal, sig_share: SigShare, }, StartConnectivityTest(XorName), SectionKnowledgeQuery { last_known_key: Option<BlsPublicKey>, msg: Box<NodeMsg>, }, NodeCmd(NodeCmd), NodeQuery(NodeQuery), NodeQueryResponse { response: NodeQueryResponse, correlation_id: MessageId, }, NodeMsgError { error: Error, correlation_id: MessageId, },
}
Expand description

Message sent over the among nodes

Variants

ForwardDataMsg

Forward a data message.

Fields of ForwardDataMsg

msg: DataMsg

The msg

user: EndUser

The origin

data_signed: DataSigned

Signature provided by the requester.

SectionKnowledge

Inform other sections about our section or vice-versa.

Fields of SectionKnowledge

src_info: (SectionSigned<SectionAuthorityProvider>, SecuredLinkedList)

SectionAuthorityProvider and SecuredLinkedList of the sender’s section, with the proof chain.

msg: Option<Box<NodeMsg>>

Message

Sync

Message sent to all members to update them about the state of our section.

Fields of Sync

section: Section

Information about our section.

network: Network

Information about the rest of the network that we know of.

Relocate(RelocateDetails)

Send from a section to the node to be immediately relocated.

RelocatePromise(RelocatePromise)

Send:

  • from a section to a current elder to be relocated after they are demoted.
  • from the node to be relocated back to its section after it was demoted.
JoinRequest(Box<JoinRequest>)

Sent from a bootstrapping peer to the section requesting to join as a new member

JoinResponse(Box<JoinResponse>)

Response to a JoinRequest

JoinAsRelocatedRequest(Box<JoinAsRelocatedRequest>)

Sent from a peer to the section requesting to join as relocated from another section

JoinAsRelocatedResponse(Box<JoinAsRelocatedResponse>)

Response to a JoinAsRelocatedRequest

BouncedUntrustedMessage

Sent from a node that can’t establish the trust of the contained message to its original source in order for them to provide new proof that the node would trust.

Fields of BouncedUntrustedMessage

msg: Box<NodeMsg>

Untrsuted Node message

dst_section_pk: BlsPublicKey

Currently known section pk of the source

DkgStart

Sent to the new elder candidates to start the DKG process.

Fields of DkgStart

dkg_key: DkgKey

The identifier of the DKG session to start.

elder_candidates: ElderCandidates

The DKG particpants.

DkgMessage

Message exchanged for DKG process.

Fields of DkgMessage

dkg_key: DkgKey

The identifier of the DKG session this message is for.

message: DkgMessage

The DKG message.

DkgFailureObservation

Broadcast to the other DKG participants when a DKG failure is observed.

Fields of DkgFailureObservation

dkg_key: DkgKey

The DKG key

sig: DkgFailureSig

Signature over the failure

failed_participants: BTreeSet<XorName>

Nodes that failed to participate

DkgFailureAgreement(DkgFailureSigSet)

Sent to the current elders by the DKG participants when at least majority of them observe a DKG failure.

Propose

Message containing a single Proposal to be aggregated in the proposal aggregator.

Fields of Propose

content: Proposal

The content of the proposal

sig_share: SigShare

BLS signature share

StartConnectivityTest(XorName)

Message that notifies a section to test the connectivity to a node

SectionKnowledgeQuery

Message sent by a node to indicate it received a message from a node which was ahead in knowledge. A reply is expected with a SectionKnowledge message.

Fields of SectionKnowledgeQuery

last_known_key: Option<BlsPublicKey>

Last known key by our node, used to get any newer keys

msg: Box<NodeMsg>

Routing message

NodeCmd(NodeCmd)

Cmds only sent internally in the network.

NodeQuery(NodeQuery)

Queries is a read-only operation.

NodeQueryResponse

The response to a query, containing the query result.

Fields of NodeQueryResponse

response: NodeQueryResponse

QueryResponse.

correlation_id: MessageId

ID of causing query.

NodeMsgError

The returned error, from any msg handling on recipient node.

Fields of NodeMsgError

error: Error

The error.

correlation_id: MessageId

ID of causing cmd.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more