Ames Data Types
Here are the data types used by Ames, as defined in lull.hoon.
$address
$address+$ address @uxaddressOpaque atomic transport address to or from Unix. For Ames over UDP, it will encode the IP address and port.
$verb
$verb+$ verb ?(%snd %rcv %odd %msg %ges %for %rot)Verbosity flag for Ames. Use with |ames/verb %flag1 %flag2 ... and turn off with |ames/verb.
%snd- Sending packets.%rcv- Receiving packets.%odd- Unusual events.%msg- Message-level events.%ges- Congestion control.%for- Packet forwarding.%rot- Routing attempts.
$blob
$blobRaw atom to or from Unix, representing a packet.
$error
$errorTagged diagnostic trace.
$lane
$laneShip transport address; either opaque $address or galaxy. The runtime knows how to look up galaxies, so we don't need to know their transport addresses.
$plea
$pleaApplication-level message, as a %pass.
.vane- Destination vane on remote ship..path- Internal route on the receiving ship..payload- Semantic message contents.
$spar
$sparInstead of a fully qualifying scry path, Ames infers rift and life based on the ship.
$bone
$boneMessage flow index - mapped to $ducts in the $ossuary.
The first $bone is 0. They increment by 4, since each flow includes a bit for each message determining forward vs. backward and a second bit for whether the message is on the normal flow or the associated diagnostic flow (for naxplanations).
The least significant bit of a $bone is:
1 if "forward", i.e. we send
%pleas on this flow.0 if "backward", i.e. we receive
%pleas on this flow.
The second-least significant bit is 1 if the $bone is a naxplanation $bone, and 0 otherwise. Only naxplanation messages can be sent on a naxplanation $bone, as %boons.
$fragment
$fragmentA message fragment.
$fragment-num
$fragment-numMessage fragment count.
$message-blob
$message-blobUnfragmented message blob.
$message-num
$message-numMessage count.
$public-key
$public-keyA peer's public key.
$symmetric-key
$symmetric-keyA symmetric key for encrypting messages to a peer. This is produced by performing an elliptic curve Diffie-Hellman using our private key and the peer's public key.
$ack
$ackA message acknowledgement.
%ok- Positive acknowledgement.%nack- Negative acknowledgement.%naxplanation- Nack trace.
$ship-state
$ship-stateAll Ames knows about a peer.
%alien- No PKI data, so enqueue actions to perform once we learn it.%known- We know their$lifeand public keys, so we have a channel.
$alien-agenda
$alien-agendaWhat to do when Ames learns a peer's life and keys.
messages- $pleas local vanes have asked Ames to send.packets- Packets we've tried to send.heeds- Local tracking requests; passed through into $peer-state.keens- Subscribers to remote scry paths.
$peer-state
$peer-stateState for a peer with known life and keys.
.route- Transport-layer destination for packets to the peer..qos- Quality of service; connection status to the peer..ossuary- $bone to$ductmapper..snd- Per-$bonemessage pumps to send messages as fragments..rcv- Per-$bonemessage sinks to assemble messages from fragments..nax- Unprocessed nacks (negative acknowledgments)..heeds- Listeners for%clognotifications..closing: Bones closed on the sender side..corked: Bones closed on both sender and receiver..keens: Remote scry state.
$keen-state
$keen-stateRemote scry state for a peer.
wan: Request packets, sent.nex: Request packets, unsent.hav: Response packets, backwards.num-fragments: Total fragment count.num-received: Fragments received.next-wake: Retry timing.listeners: Ducts waiting for a response.metrics: Stats.
$want
$wantRemote scry request fragment.
$have
$haveRemote scry response fragment.
$meow
$meowRemote scry response fragment data.
sig: signature.num: number of fragments.dat: contents.
$peep
$peepRemote scry fragment request.
$wail
$wailTagged remote scry request fragment.
$roar
$roarRemote scry response message.
A tale:pki:jael is a:
Therefore, a $roar looks like:
In dat, for the (pair path (unit (cask))), the $path is the remote scry path and the (unit (cask)) contains the value, or is null if there's no value at this path and will never be one (equivalent to the [~ ~] case of a local scry).
$purr
$purrResponse packet payload.
$qos
$qosQuality of service; how is the connection to a peer doing?
%live- Peer is ok.%dead- Peer is not responding.%unborn- Peer is sunken.last-contact- Last time Ames heard from the peer, or if%unborn, the time when we first started tracking then.
$ossuary
$ossuary$bone to $duct mapping, $next is the next $bone to map to a $duct.
$message-pump-state
$message-pump-statePersistent state for a |message-pump.
.current- Sequence number of earliest message sent or being sent..next- Sequence number of next message to send..unsent-messages- Messages to be sent after current message..unsent-fragments- Fragments of current message waiting for sending..queued-message-acks- Future message acks to be applied after current..packet-pump-state- State of corresponding|packet-pump.
$static-fragment
$static-fragmentA packet; a fragment of a message and metadata.
$packet-pump-state
$packet-pump-statePersistent state for a |packet-pump.
next-wake- Last timer we've set, or null.live- Packets in flight; sent but not yet acked.metrics- Congestion control information.
$pump-metrics
$pump-metricsCongestion control state for a |packet-pump.
rto- Retransmission timeout.rtt- Roundtrip time estimate, low-passed using EWMA.rttvar- Mean deviation ofrtt, also low-passed with EWMA.num-live- How many packets sent, awaiting ack.ssthresh- Slow-start threshold.cwnd- Congestion window; max unacked packets.
$live-packet
$live-packetA packet in flight, as tracked in the $packet-pump-state.
$live-packet-key
$live-packet-keyIdentifier of a packet in flight.
$live-packet-val
$live-packet-valContent and metadata about a packet in flight.
$packet-state
$packet-stateSending statistics about a packet in flight.
$message-sink-state
$message-sink-stateState of a |message-sink to assemble received messages.
.last-acked- Highest$message-numAmes has fully acknowledged..last-heard- Highest$message-numAmes has heard all fragments for..pending-vane-ack- Heard but not processed by local vane..live-messages- Partially received messages.
$partial-rcv-message
$partial-rcv-messageA message for which Ames has received some fragments.
num-fragments- Total number of fragments in the message.num-received- How many fragments Ames has received so far.fragments- The received fragments themselves.
Last updated