pub enum HolochainP2pEvent {
Show 17 variants PutAgentInfoSigned { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, peer_data: Vec<AgentInfoSigned, Global>, }, QueryAgentInfoSigned { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, agents: Option<HashSet<Arc<KitsuneAgent>, RandomState>>, kitsune_space: Arc<KitsuneSpace>, }, QueryGossipAgents { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, agents: Option<Vec<HoloHash<Agent>, Global>>, kitsune_space: Arc<KitsuneSpace>, since_ms: u64, until_ms: u64, arc_set: Arc<DhtArcSet>, }, QueryAgentInfoSignedNearBasis { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, kitsune_space: Arc<KitsuneSpace>, basis_loc: u32, limit: u32, }, QueryPeerDensity { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<PeerView, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, kitsune_space: Arc<KitsuneSpace>, dht_arc: DhtArc, }, CallRemote { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, from_agent: HoloHash<Agent>, zome_name: ZomeName, fn_name: FunctionName, cap_secret: Option<CapSecret>, payload: ExternIO, }, Publish { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, request_validation_receipt: bool, countersigning_session: bool, ops: Vec<DhtOp, Global>, }, Get { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<WireOps, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, dht_hash: HoloHash<AnyDht>, options: GetOptions, }, GetMeta { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<MetadataSet, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, dht_hash: HoloHash<AnyDht>, options: GetMetaOptions, }, GetLinks { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<WireLinkOps, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, link_key: WireLinkKey, options: GetLinksOptions, }, GetAgentActivity { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<AgentActivityResponse<HoloHash<Action>>, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, agent: HoloHash<Agent>, query: ChainQueryFilter, options: GetActivityOptions, }, MustGetAgentActivity { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<MustGetAgentActivityResponse, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, author: HoloHash<Agent>, filter: ChainFilter<HoloHash<Action>>, }, ValidationReceiptReceived { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, receipt: SerializedBytes, }, QueryOpHashes { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<Option<(Vec<HoloHash<DhtOp>, Global>, RangeInclusive<Timestamp>)>, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, arc_set: DhtArcSet, window: Range<Timestamp>, max_ops: usize, include_limbo: bool, }, FetchOpData { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<(HoloHash<DhtOp>, DhtOp), Global>, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, query: FetchOpDataQuery, }, SignNetworkData { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<Signature, HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, data: Vec<u8, Global>, }, CountersigningSessionNegotiation { span_context: Context, respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>, dna_hash: HoloHash<Dna>, to_agent: HoloHash<Agent>, message: CountersigningSessionNegotiationMessage, },
}
Expand description

The HolochainP2pEvent stream allows handling events generated from the HolochainP2p actor.

Variants§

§

PutAgentInfoSigned

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§peer_data: Vec<AgentInfoSigned, Global>

Input parameter.

We need to store signed agent info.

§

QueryAgentInfoSigned

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§agents: Option<HashSet<Arc<KitsuneAgent>, RandomState>>

Input parameter.

§kitsune_space: Arc<KitsuneSpace>

Input parameter.

We need to get previously stored agent info.

§

QueryGossipAgents

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§agents: Option<Vec<HoloHash<Agent>, Global>>

Input parameter.

§kitsune_space: Arc<KitsuneSpace>

Input parameter.

§since_ms: u64

Input parameter.

§until_ms: u64

Input parameter.

§arc_set: Arc<DhtArcSet>

Input parameter.

We need to get agents that fit into an arc set for gossip.

§

QueryAgentInfoSignedNearBasis

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§kitsune_space: Arc<KitsuneSpace>

Input parameter.

§basis_loc: u32

Input parameter.

§limit: u32

Input parameter.

query agent info in order of closeness to a basis location.

§

QueryPeerDensity

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<PeerView, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§kitsune_space: Arc<KitsuneSpace>

Input parameter.

§dht_arc: DhtArc

Input parameter.

Query the peer density of a space for a given [DhtArc].

§

CallRemote

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§from_agent: HoloHash<Agent>

Input parameter.

§zome_name: ZomeName

Input parameter.

§fn_name: FunctionName

Input parameter.

§cap_secret: Option<CapSecret>

Input parameter.

§payload: ExternIO

Input parameter.

A remote node is attempting to make a remote call on us.

§

Publish

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§request_validation_receipt: bool

Input parameter.

§countersigning_session: bool

Input parameter.

§ops: Vec<DhtOp, Global>

Input parameter.

A remote node is publishing data in a range we claim to be holding.

§

Get

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<WireOps, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§dht_hash: HoloHash<AnyDht>

Input parameter.

§options: GetOptions

Input parameter.

A remote node is requesting entry data from us.

§

GetMeta

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<MetadataSet, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§dht_hash: HoloHash<AnyDht>

Input parameter.

§options: GetMetaOptions

Input parameter.

A remote node is requesting metadata from us.

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<WireLinkOps, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§link_key: WireLinkKey

Input parameter.

§options: GetLinksOptions

Input parameter.

A remote node is requesting link data from us.

§

GetAgentActivity

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<AgentActivityResponse<HoloHash<Action>>, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§agent: HoloHash<Agent>

Input parameter.

§query: ChainQueryFilter

Input parameter.

§options: GetActivityOptions

Input parameter.

A remote node is requesting agent activity from us.

§

MustGetAgentActivity

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<MustGetAgentActivityResponse, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§author: HoloHash<Agent>

Input parameter.

§filter: ChainFilter<HoloHash<Action>>

Input parameter.

A remote node is requesting agent activity from us.

§

ValidationReceiptReceived

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§receipt: SerializedBytes

Input parameter.

A remote node has sent us a validation receipt.

§

QueryOpHashes

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Option<(Vec<HoloHash<DhtOp>, Global>, RangeInclusive<Timestamp>)>, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§arc_set: DhtArcSet

Input parameter.

§window: Range<Timestamp>

Input parameter.

§max_ops: usize

Input parameter.

§include_limbo: bool

Input parameter.

The p2p module wishes to query our DhtOpHash store. Gets all ops from a set of agents within a time window and max number of ops. Returns the actual time window of returned ops as well.

§

FetchOpData

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<(HoloHash<DhtOp>, DhtOp), Global>, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§query: FetchOpDataQuery

Input parameter.

The p2p module needs access to the content for a given set of DhtOpHashes.

§

SignNetworkData

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<Signature, HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

§data: Vec<u8, Global>

Input parameter.

P2p operations require cryptographic signatures and validation.

§

CountersigningSessionNegotiation

Fields

§span_context: Context

Tracing span from request invocation.

§respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>

Response callback - respond to the request.

§dna_hash: HoloHash<Dna>

Input parameter.

§to_agent: HoloHash<Agent>

Input parameter.

Messages between agents that drive a countersigning session.

Implementations§

The dna_hash associated with this network p2p event.

The agent_pub_key associated with this network p2p event.

Trait Implementations§

Formats the value using the given formatter. Read more
Process a dispatch event with a given GhostHandler.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext 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
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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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
The type for metadata in pointers and references to Self.
Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
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.
upcast ref
upcast mut ref
upcast boxed dyn
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
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