Skip to main content

WorkerCell

Struct WorkerCell 

Source
pub struct WorkerCell {
    pub cell_id: usize,
    pub memory_boundary: usize,
    pub attached_blocks: Vec<QualiaSuperBlock>,
    pub dnssec_resolver: Option<DnssecResolver>,
    pub wireguard_interface: Option<SocialWebNetInterface>,
    pub q42_context: Option<Arc<Q42Context>>,
    pub cbor_ld_parser: Option<Arc<Q42CborLdParser>>,
    pub dnssec_cache: HashMap<String, CachedPeer>,
    pub peer_capabilities: HashMap<String, u64>,
    pub semantic_contexts: HashMap<String, u64>,
}
Expand description

A 512MB structural floor bounded worker cell (Fractal Sharding). Each cell runs isolated logic evaluation or physics engines.

Fields§

§cell_id: usize§memory_boundary: usize§attached_blocks: Vec<QualiaSuperBlock>§dnssec_resolver: Option<DnssecResolver>§wireguard_interface: Option<SocialWebNetInterface>§q42_context: Option<Arc<Q42Context>>§cbor_ld_parser: Option<Arc<Q42CborLdParser>>§dnssec_cache: HashMap<String, CachedPeer>

DNSSEC peer-resolution cache keyed by domain (TTL-bounded)

§peer_capabilities: HashMap<String, u64>

Per-peer capabilities bitmask keyed by peer id string

§semantic_contexts: HashMap<String, u64>

Per-peer semantic context keyed by peer id string

Implementations§

Source§

impl WorkerCell

Source

pub fn new(cell_id: usize) -> Self

Source

pub fn init_dnssec_resolver( &mut self, trusted_anchors: HashMap<String, [u8; 32]>, )

Initialize DNSSEC resolver with trusted anchors

Source

pub fn init_wireguard_interface( &mut self, interface_name: String, local_port: u16, )

Initialize SocialWebNet interface

Source

pub fn init_q42_lexicon( &mut self, volume: &Q42Volume, ) -> Result<(), CborLdError>

Initialize Q42 lexicon for CBOR-LD semantic processing

Source

pub fn resolve_peer_dnssec_payload( &mut self, domain: &str, ) -> Result<DnssecSemanticPayload, &'static str>

Resolve CBOR-LD DNSSEC record for peer domain, returning the full semantic payload.

This is the internal semantic-payload resolver used by the WireGuard bootstrap pipeline. The public resolve_peer_dnssec returns a lightweight PeerEndpoint with TTL caching.

Source

pub fn parse_cbor_ld_to_quin( &self, cbor_data: &[u8], ) -> Result<Vec<u64>, DaemonError>

Public CBOR-LD → Quin-pointer parser.

Uses the Q42 lexicon-based CBOR-LD parser when available, deriving a vector of 64-bit Quin pointers (one per 8-byte chunk of the parsed semantic payload). If the parser is not initialised or the payload is invalid, an error is returned.

Source

pub fn resolve_peer_dnssec( &mut self, domain: &str, ) -> Result<PeerEndpoint, DaemonError>

Resolve a peer via DNSSEC, returning a lightweight PeerEndpoint with TTL caching.

Resolution order:

  1. Return a fresh cached PeerEndpoint if one exists and is within its TTL.
  2. Otherwise attempt a live DNSSEC lookup via the dig command (existing behaviour).
  3. If dig is unavailable or fails, fall back to a deterministic mapping from the domain name to a plausible endpoint so bootstrapping can proceed offline.

The result is always cached with [DNSSEC_CACHE_TTL_SECONDS].

Source

pub fn dnssec_cache_size(&self) -> usize

Number of entries currently held in the DNSSEC peer-resolution cache.

Source

pub fn clear_dnssec_cache(&mut self)

Clear all cached DNSSEC peer-resolution entries.

Source

pub fn set_peer_capabilities(&mut self, peer_id: &str, capabilities: u64)

Set the capabilities bitmask for a peer (replaces the peer_capabilities: 0 TODO).

Source

pub fn set_semantic_context(&mut self, peer_id: &str, context: u64)

Set the semantic context for a peer (replaces the semantic_context: 0 TODO).

Source

pub fn get_peer_capabilities(&self, peer_id: &str) -> Option<u64>

Get the capabilities bitmask for a peer, if known.

Source

pub fn get_semantic_context(&self, peer_id: &str) -> Option<u64>

Get the semantic context for a peer, if known.

Source

pub fn establish_wireguard_tunnel( &mut self, peer_payload: &DnssecSemanticPayload, endpoint: IpAddr, port: u16, ) -> Result<u64, &'static str>

Establish SocialWebNet tunnel with peer

Source

pub fn bootstrap_social_wireguard( &mut self, domain: &str, endpoint_ip: IpAddr, endpoint_port: u16, ) -> Result<u64, &'static str>

Bootstrap SocialWebNet tunnel using DNSSEC CBOR-LD resolution

Source

pub fn parse_san_uri(&self, san_bytes: &[u8]) -> Result<u64, &'static str>

Parse SAN URI from certificate or handshake (zero-allocation)

Source

pub fn execute_tensor_contraction( &self, matrix_a: &[f32], matrix_b: &[f32], result: &mut [f32], size: usize, )

Source

pub fn execute_quantum_chemistry(&self, smiles: &str) -> Option<NQuin>

Auto Trait Implementations§

Blanket Implementations§

§

impl<S, A> Aggregate<Result<S, Error>> for A
where A: Aggregate<S>,

§

fn from_shares<T>(iter: T) -> Result<A, Error>
where T: IntoIterator<Item = Result<S, Error>>,

Aggregate shares in an MPC protocol.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,