Skip to content
Juvix imports

module arch.node.engines.naming_messages;

import prelude open;
import arch.node.types.identities open;

Naming Messages

Message interface

type NamingMsg :=
| ResolveNameRequest {identityName : IdentityName}
| ResolveNameResponse {
externalIdentities : Set ExternalIdentity;
err : Option String
}
| SubmitNameEvidenceRequest {evidence : IdentityNameEvidence}
| SubmitNameEvidenceResponse {err : Option String}
| QueryNameEvidenceRequest {externalIdentity : ExternalIdentity}
| QueryNameEvidenceResponse {
externalIdentity : ExternalIdentity;
evidence : Set IdentityNameEvidence;
err : Option String
};

ResolveNameRequest message

ResolveNameRequest

ResolveNameRequest {
  identityName : IdentityName
}

A ResolveNameRequest asks the Naming Engine which ExternalIdentitys are associated with a given IdentityName.

  • identityName: The name to resolve.

ResolveNameResponse message

ResolveNameResponse

ResolveNameResponse {
  externalIdentities : Set ExternalIdentity;
  err : Option String
}

A ResolveNameResponse is returned in response to a ResolveNameRequest.

  • externalIdentities: A set of ExternalIdentitys associated with the IdentityName.
  • err: An error message if the resolution failed.

SubmitNameEvidenceRequest message

SubmitNameEvidenceRequest

SubmitNameEvidenceRequest {
  evidence : IdentityNameEvidence
}

A SubmitNameEvidenceRequest instructs the Naming Engine to store a new piece of IdentityNameEvidence.

  • evidence: The evidence supporting the association between an IdentityName and an ExternalIdentity.

SubmitNameEvidenceResponse message

SubmitNameEvidenceResponse

SubmitNameEvidenceResponse {
  err : Option String
}

A SubmitNameEvidenceResponse is sent in response to a SubmitNameEvidenceRequest.

  • err: An error message if the submission failed.

QueryNameEvidenceRequest message

QueryNameEvidenceRequest

QueryNameEvidenceRequest {
  externalIdentity : ExternalIdentity
}

A QueryNameEvidenceRequest instructs the Naming Engine to return any known IdentityNames and IdentityNameEvidence associated with a specific ExternalIdentity.

  • externalIdentity: The identity for which to retrieve evidence.

QueryNameEvidenceResponse message

QueryNameEvidenceResponse

QueryNameEvidenceResponse {
  externalIdentity : ExternalIdentity;
  evidence : Set IdentityNameEvidence;
  err : Option String
}

A QueryNameEvidenceResponse provides the requested evidence.

  • evidence: A set of IdentityNameEvidence related to the identity.
  • err: An error message if the query failed.

Message sequence diagrams

Resolving a Name

sequenceDiagram
    participant Client
    participant NamingEngine

    Client->>NamingEngine: ResolveNameRequest (name)
    Note over NamingEngine: Check stored evidence
    NamingEngine->>Client: ResolveNameResponse
Resolving a name

Submitting Name Evidence

sequenceDiagram
    participant Client
    participant NamingEngine

    Client->>NamingEngine: SubmitNameEvidenceRequest
    Note over NamingEngine: Verify and store evidence
    NamingEngine->>Client: SubmitNameEvidenceResponse
Submitting name evidence

Querying Name Evidence

sequenceDiagram
    participant Client
    participant NamingEngine

    Client->>NamingEngine: QueryNameEvidenceRequest (for ExternalIdentity)
    Note over NamingEngine: Retrieve relevant evidence
    NamingEngine->>Client: QueryNameEvidenceResponse
Querying name evidence for an identity.

Engine Components

  • Naming Engine Environment
  • Naming Engine Dynamics