Enum holochain::prelude::event::HolochainP2pEvent
source · 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>,
from_agent: HoloHash<Agent>,
signature: Signature,
to_agent: HoloHash<Agent>,
zome_name: ZomeName,
fn_name: FunctionName,
cap_secret: Option<CapSecret>,
payload: ExternIO,
nonce: Nonce256Bits,
expires_at: Timestamp,
},
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
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
peer_data: Vec<AgentInfoSigned, Global>
Input parameter.
We need to store signed agent info.
QueryAgentInfoSigned
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
agents: Option<HashSet<Arc<KitsuneAgent>, RandomState>>
Input parameter.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
We need to get previously stored agent info.
QueryGossipAgents
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
We need to get agents that fit into an arc set for gossip.
QueryAgentInfoSignedNearBasis
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<AgentInfoSigned, Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
query agent info in order of closeness to a basis location.
QueryPeerDensity
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<PeerView, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
kitsune_space: Arc<KitsuneSpace>
Input parameter.
Query the peer density of a space for a given [DhtArc
].
CallRemote
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<SerializedBytes, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
fn_name: FunctionName
Input parameter.
nonce: Nonce256Bits
Input parameter.
A remote node is attempting to make a remote call on us.
Publish
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
A remote node is publishing data in a range we claim to be holding.
Get
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<WireOps, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
options: GetOptions
Input parameter.
A remote node is requesting entry data from us.
GetMeta
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<MetadataSet, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
options: GetMetaOptions
Input parameter.
A remote node is requesting metadata from us.
GetLinks
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<WireLinkOps, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
link_key: WireLinkKey
Input parameter.
options: GetLinksOptions
Input parameter.
A remote node is requesting link data from us.
GetAgentActivity
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<AgentActivityResponse<HoloHash<Action>>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
query: ChainQueryFilter
Input parameter.
options: GetActivityOptions
Input parameter.
A remote node is requesting agent activity from us.
MustGetAgentActivity
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<MustGetAgentActivityResponse, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
Input parameter.
filter: ChainFilter<HoloHash<Action>>
Input parameter.
A remote node is requesting agent activity from us.
ValidationReceiptReceived
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
receipt: SerializedBytes
Input parameter.
A remote node has sent us a validation receipt.
QueryOpHashes
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Option<(Vec<HoloHash<DhtOp>, Global>, RangeInclusive<Timestamp>)>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
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
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Vec<(HoloHash<DhtOp>, DhtOp), Global>, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
query: FetchOpDataQuery
Input parameter.
The p2p module needs access to the content for a given set of DhtOpHashes.
SignNetworkData
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<Signature, HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
P2p operations require cryptographic signatures and validation.
CountersigningSessionNegotiation
Fields
respond: GhostRespond<Result<MustBoxFuture<'static, Result<(), HolochainP2pError>>, HolochainP2pError>>
Response callback - respond to the request.
message: CountersigningSessionNegotiationMessage
Input parameter.
Messages between agents that drive a countersigning session.
Implementations§
Trait Implementations§
source§impl Debug for HolochainP2pEvent
impl Debug for HolochainP2pEvent
source§impl<H> GhostDispatch<H> for HolochainP2pEventwhere
H: HolochainP2pEventHandler,
impl<H> GhostDispatch<H> for HolochainP2pEventwhere
H: HolochainP2pEventHandler,
source§fn ghost_actor_dispatch(self, h: &mut H)
fn ghost_actor_dispatch(self, h: &mut H)
impl GhostEvent for HolochainP2pEvent
Auto Trait Implementations§
impl !RefUnwindSafe for HolochainP2pEvent
impl Send for HolochainP2pEvent
impl Sync for HolochainP2pEvent
impl Unpin for HolochainP2pEvent
impl !UnwindSafe for HolochainP2pEvent
Blanket Implementations§
§impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
§fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.