pub struct SubnetDescriptor {
pub version: u8,
pub scope: SubnetRef,
pub topology_epoch: u32,
pub issuer: EntityId,
pub revision: u64,
pub issued_at: u64,
pub signature: [u8; 64],
}Expand description
Root-signed declaration that an authority-qualified path exists under a topology epoch (D1: reparenting or reinterpreting a path creates a NEW epoch; adding a fresh descendant under a stable parent does not).
Deliberately carries no name string or metadata: the descriptor is the “this path is live under epoch E” fact, and the packet path’s zero-string-parse budget (D9) starts with the facts themselves.
Fields§
§version: u8Wire version; only 1 decodes.
scope: SubnetRefThe declared authority-qualified path.
topology_epoch: u32Topology epoch the declaration belongs to.
issuer: EntityIdSigning root.
revision: u64Per-(SubnetRef, kind) ordering revision; replay/reorder safe.
issued_at: u64Advisory issue timestamp (unix seconds). A descriptor is superseded by revision, not by expiry.
signature: [u8; 64]ed25519 over SUBNET_DESCRIPTOR_SIG_DOMAIN ‖ payload.
Implementations§
Source§impl SubnetDescriptor
impl SubnetDescriptor
Sourcepub const SIGNED_PAYLOAD_SIZE: usize = 89
pub const SIGNED_PAYLOAD_SIZE: usize = 89
version 1 + authority 32 + path 4 + epoch 4 + issuer 32 + revision 8 + issued_at 8.
Sourcepub fn try_issue(
root_keypair: &EntityKeypair,
scope: SubnetRef,
topology_epoch: u32,
revision: u64,
issued_at: u64,
) -> Result<Self, SubnetAuthError>
pub fn try_issue( root_keypair: &EntityKeypair, scope: SubnetRef, topology_epoch: u32, revision: u64, issued_at: u64, ) -> Result<Self, SubnetAuthError>
Issue signed by root_keypair (issuer is set from it).
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, SubnetAuthError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SubnetAuthError>
Strict decode; signature NOT verified here.
Sourcepub fn verify(&self) -> Result<(), SubnetAuthError>
pub fn verify(&self) -> Result<(), SubnetAuthError>
Signature verification against self.issuer (whether that
issuer is a configured root is the store’s decision).
Trait Implementations§
Source§impl Clone for SubnetDescriptor
impl Clone for SubnetDescriptor
Source§fn clone(&self) -> SubnetDescriptor
fn clone(&self) -> SubnetDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubnetDescriptor
impl Debug for SubnetDescriptor
impl Eq for SubnetDescriptor
Source§impl PartialEq for SubnetDescriptor
impl PartialEq for SubnetDescriptor
impl StructuralPartialEq for SubnetDescriptor
Auto Trait Implementations§
impl Freeze for SubnetDescriptor
impl RefUnwindSafe for SubnetDescriptor
impl Send for SubnetDescriptor
impl Sync for SubnetDescriptor
impl Unpin for SubnetDescriptor
impl UnsafeUnpin for SubnetDescriptor
impl UnwindSafe for SubnetDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.