1.4. Implementing a Second Node

1.4.1. Implementing a fleetmesh node

This is the map a second implementation works from. It says what a node must get byte-for-byte right, what it may do its own way, and where each obligation lives in the schema, the vectors and the reference. It does not describe how the Python node is decomposed internally: the compartments in docs/compartments.md are one runtime’s answer, and a Rust node is free to give a different one inside every plane below.

Three sources are normative, in this order. Where they disagree the earlier wins.

  1. schema/ — kinds.json, messages.json, constants.json and the JSON schemas under schemas/. Their digest is the protocol version a node declares (fleetmesh/0.1-draft@<digest>; scripts/check-package.py).

  2. vectors/ — conformance vectors generated from the reference (scripts/gen-vectors.py); an implementation that reproduces every vector and refuses every refusal case is wire-compatible for that mechanism.

  3. fleetmesh_core/ — the stdlib-only reference (core/fleetmesh_core). Where prose, schema and vector leave a gap, the reference’s bytes are the answer, and the gap is a bug to file against the schema.

docs/mechanisms.md is the prose closure over all three: one section per mechanism asking “could two people implement this from the prose and get the same bytes?”. docs/conformance.md is the machine that asks it: a harness (scripts/conform.py) that drives any implementation through every vector over stdin/stdout and gives a verdict per plane below.

1.4.1.1. Labels

Every wire surface the node has carries exactly one label, recorded in schema/messages.json under surfaces. scripts/check-implementing.py fails when the code names a surface the table does not, or the table names one the code no longer does.

label

meaning

what is normative

owned

fleetmesh invented the bytes

schema/, vectors/, fleetmesh_core/

reused

an upstream spec (NIP, BUD, NUT, DIDComm) is spoken unchanged

the upstream spec; docs/interop.md proves which clauses

profiled

upstream spec plus fleetmesh constraints

the profile section below and its vector

internal

between fleetmesh components only (meshctl, sidecars)

pinned by the component contracts, outside the protocol digest

planned

the identifier is reserved under owned or reused and no fleetmesh node speaks it yet

nothing yet; a second implementation may skip it without losing conformance

local

never observed by another node

nothing; differ freely

planned is listed under surfaces.planned and replaces the label the surface would otherwise carry, so the tables below never say “declared only”: either the reference speaks a surface and names where, or the schema says out loud that nobody does. Today: kinds 1984, 10002, 10040, 10166, NIP-65, and the DIDComm out-of-band/2.0 and report-problem/2.0 protocols.

surfaces.reused.fronted names the reused surfaces an off-the-shelf sidecar speaks on the node’s behalf — GRASP’s NIP-34 kinds, ncontainer’s kind 30624, NostrHub’s kind 30817 — declared by the node as a c tag and never parsed by it. Their evidence in the tables is the sidecar manifest, not node code.

Anything not listed under surfaces is local. A second implementation that disagrees with the Python node about a local matter — tick order, retention policy, where state is kept, what the CLI prints — is not wrong.

The transport table in messages.json carries a status per rung: implemented means the reference node serves it; declared means the protocol names it and a node MAY serve it, and a node that does not MUST answer 501 Not Implemented on that face so a peer records a refusal rather than a miss. Today https (POST /didcomm) is declared.

1.4.1.2. The six planes

A plane is a bundle of obligations that a Rust author can build and test as one unit. Each plane names the mechanisms it owns, the surfaces it speaks and their labels, and the persistence a node needs for it. The persistence column is descriptive of what state exists, not of how it is stored: every .sqlite name below is local.

The tables between the markers are regenerated from the code with scripts/check-implementing.py --write; the prose is hand-written.

1.4.1.2.1. 1. Identity & Keys

Who a node is, how it proves it, and how it tells others.

Mechanisms: key derivation and the DID document with its did:key / did:peer aliases (fleetmesh_core/crypto/keys, fleetmesh_core/identity/identity, fleetmesh_core/crypto/crypto, fleetmesh_core/identity/did), the descriptor and its NIP-66 / NIP-85 derivations (fleetmesh_core/services/discovery, fleetmesh_core/peering/projection), the shared-protocol match two peers make before anything else (shared_protocols in fleetmesh_core/identity/identity), DIDComm sealing and the gift-wrap carrier (fleetmesh_core/identity/didcomm), CBOR for the places bytes must be canonical (fleetmesh_core/wire/cbor).

A node is wire-compatible for this plane when it reproduces vectors/discovery.json, vectors/projection.json, vectors/envelope.json, vectors/roster.json and vectors/did.json and refuses what they refuse.

1.4.1.2.1.1. Reading the wire strictly

Two implementations once disagreed because each leaned on its language’s parser. vectors/strict.json pins the reading every plane shares; an implementation reproduces it, in every language, by these rules:

  • A wire integer is ASCII digits. A tag value that means a number (expiration, rank, N, an endpoint preference, a protocol major or minor, sample_window) is one or more of 0–9 and nothing else: no sign, no whitespace, no _, no other script’s digits, no ., no 0x. Anything else is not a number; the tag is skipped where a value is optional and reported where it is required.

  • A JSON integer means integer. A kind of 30166.0, a created_at of true, an n of "5" are not the integers they resemble. In an event they are a problem (or a refusal to project); as an argument on the conformance wire they are bad_args.

  • A tag is a non-empty array of strings. Anything else in tags is not a tag: skipped by readers, reported by validators, never a crash. The first well-formed expiration tag wins; malformed ones are skipped, not fatal.

  • A key is exactly 64 hex digits — lowercase on the wire, a secret key additionally 1 <= d < n. A caller handing a bad key to crypto.* or giftwrap.* gets bad_args; a signature over a bad pubkey verifies false, never errors.

  • A sender is did:nostr: plus 64 lowercase hex. A proposal from anything else is declined BAD_DESCRIPTOR, not dropped on the floor.

  • Only null or absent means absent. A policy with transports: {} declares none (every proposal declines UNSUPPORTED_TRANSPORTS); only the JSON literal false closes open_enrolment, and 0, "", "false" are bad_args; a window_seconds of 0 is bad_args, not a default.

  • did:peer:2 is strict base64url. No padding, no +//, canonical (re-encoding reproduces the input), decoding to a JSON object; an empty element is refused. id is dropped only at the top level of the service and abbreviation recurses into nested objects and lists.

  • A relay address is spelt canonically or refused. canonical_relay lowercases the scheme and host, drops the default port, trailing slashes, query and fragment, and does nothing else: a U-label, 127.1, an IPv4-mapped or non-RFC-5952 IPv6 literal, /a/../b, //, a percent-escape in the host, a zone id, a port with leading zeros are refused, not fixed, because no two URL parsers fix them the same way. vectors/projection.json lists both columns.

  • Problem and refusal text is informative. A check_* returns a list of problems and never raises; a refusal carries a message. Vectors compare the count of problems and the refused flag, never the wording, so an implementation phrases them in its own language’s idiom (Python %r quotes with ', Rust {:?} with "). Decline codes are the wire.

1.4.1.2.1.2. The owner’s private fleet roster (kind 30835)

Plan D26 blinds node ownership. A node’s public descriptor (kind 11801) no longer names its operator unless the node opts in with config publish_operator (a public anchor or mediator, so a leaf can check operator independence), so nobody can list the nodes a person or circle operates by reading public descriptors. The node still knows and enforces its operator from its own config and enrolment, never from its own descriptor.

The fleet is then the owner’s own roster: an addressable kind 30835 signed by the owner, whose content is NIP-44 v2 to the author’s OWN pubkey - the conversation key of (author_sk, author_pk), which is exactly what a browser extension’s nip44.encrypt(own_pubkey, text) produces - of the canonical JSON {"v": 1, "nodes": [{"pubkey", "label"?, "hosted"?, "added_at"}]}, nodes sorted by pubkey with no duplicates. Only the owner can open it, and the NIP-44 padding hides how many nodes there are, so a relay learns only that this key keeps a roster, never who is in it. The tags are exactly one d - the roster name, "fleet" by default - and nothing else: no operator, no expiration, because a roster does not expire, it is replaced. The newest event at the coordinate is the whole roster, so adding or removing a node republishes it.

fleetmesh_core/network/roster implements it: seal (a raw key, or an event signer with get_public_key / sign_event / nip44_encrypt), open (a raw key, or a signer with nip44_decrypt) returning {name, nodes} or refusing with one of roster.refusal_codes (not_roster, not_author, bad_content, bad_shape - another key opening a roster is not_author, never an empty fleet), and the pure edits add / remove. fleet.from_roster joins the roster to the newest current kind 11801 and the newest kind 21801 read by each node’s own pubkey - the roster decides membership, the descriptor decorates - and reports online / stale / unknown by roster.status.max_age_seconds (7200, two missed hourly heartbeats), the same rule the web client uses. fleet.members stays for the nodes that opt in to publishing an operator tag. A circle’s roster reserves d = the group DID, sealed under the circle’s current epoch key; that form is the browser’s (circles) and the reference does not open it.

Reference: fleetmesh_core/network/roster, fleetmesh_core/network/fleet (from_roster, heartbeat_status). Vector: vectors/roster.json (a raw-key and an event-signer roster, the empty roster, labels and hosted, one case per refusal code, and the joined entries with their liveness).

1.4.1.2.1.3. Brands: a NIP-32 label and the tool’s own claim (plan D28)

A brand is run by an authority key: a person’s own key (an attributable brand) or a key kept only for the brand (a blinded brand, where nothing public links it to the person behind it). It is built from standards this protocol already speaks - NIP-32 labels, NIP-99 listings, NIP-40 expiry, a NIP-09 deletion - and adds no new event kind, tag name or fiber role.

  • The profile is a brand strand of one identity fiber (name, mark, description) authored by the authority; the fiber describes the brand and never makes it a principal. The strand kind is declared with the others in fleetmesh_core/textile/strand.py (STRAND_KINDS).

  • The endorsement is a kind 1985 NIP-32 label the authority signs: ["L", "org.fleetmesh.brand"], ["l", "<brand strand id>", "org.fleetmesh.brand"], a target and a NIP-40 expiration. The target is a/e for a strand or product listing event and p for a node key. NIP-09 withdraws it.

  • The claim is NIP-32 self-reporting: the same L/l tags on the tool’s own event - a node descriptor (kind 11801’s L/l optional tags, written by meshnode from its brands config), a tool-kind strand event (kind 30821, its strand_kind a tool kind) or a NIP-99 product listing (kind 30402) - signed by its author or key. The claim doubles as the request for recognition: the authority finds claimants with one query on the label.

Fleetmesh adds two rules, and fleetmesh_core/network/brand.py is the whole of them. A brand shows on a tool only when BOTH the endorsement and the claim exist - a tool cannot borrow a brand, a brand cannot conscript a tool - so brand.members returns exactly the refs that are both endorsed and claimed. A claim counts only on a node descriptor, a tool-kind strand event or a product listing, never on a person’s or circle’s profile (kind 0, a quilt, a group document); read_claim refuses anything else not_a_tool. An endorsement outlives nothing: its expiration is no later than created_at plus brand.max_endorsement_lifetime_sec (90 days, the grant standing tier’s MAX_TTL), so a brand is re-issued, not granted forever.

Reference: fleetmesh_core/network/brand (read_endorsement, read_claim, members, BrandRefused). Ops: brand.read_endorsement, brand.read_claim, brand.members. Vector: vectors/brand.json (a p, an a and an e endorsement; each tool kind; one case per refusal code - not_brand_label, wrong_namespace, bad_signature, expired, ttl_exceeded, not_claimed, not_a_tool, brand_unsupported; and members showing both halves, hiding a claim-only and a label-only tool, keeping two brands apart, and never counting a kind 0 self-label). CLI: meshctl brand endorse|withdraw|members. Kind 30831 (the old node-only fleet profile) is retired, superseded by the brand strand.

surface

label

named in

Kinds

kind:10040

planned

kind:10166

planned

kind:27235

reused (declared only)

kind:30166

reused

fleetmesh_core/services/discovery.py, fleetmesh_node/planes/identity/discovery/compartment.py

kind:30385

reused

fleetmesh_core/peering/projection.py, fleetmesh_node/planes/peering/reporter/core.py, fleetmesh_node/planes/peering/reporter/publish.py

kind:30801

owned

fleetmesh_core/accounting/window.py, fleetmesh_core/crypto/nip44.py, fleetmesh_core/identity/identity.py +12

kind:30831

owned

fleetmesh_core/identity/did.py, fleetmesh_core/network/__init__.py

kind:30832

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/__init__.py, fleetmesh_core/network/control.py +5

kind:30833

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/enrol_token.py, fleetmesh_core/network/grant.py +8

kind:30834

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/identity/did.py, fleetmesh_core/network/__init__.py +8

kind:30835

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/fleet.py, fleetmesh_core/network/roster.py

Standards

std:NIP-66

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/services/discovery.py, fleetmesh_node/planes/identity/discovery/compartment.py +3

std:NIP-73

reused

fleetmesh_core/peering/projection.py

std:NIP-85

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/peering/projection.py, fleetmesh_node/planes/peering/reporter/publish.py

std:NIP-98

reused (declared only)

Profiles

profile:did-aliases

profiled

schema/messages.json

profile:didcomm-over-giftwrap

profiled

schema/messages.json

profile:nip66-descriptor

profiled

schema/messages.json

profile:nip85-projection

profiled

schema/messages.json

Reference modules

fleetmesh_core/conformance/errors

reference

fleetmesh_core/conformance/errors.py

fleetmesh_core/crypto/bech32

reference

fleetmesh_core/crypto/bech32.py

fleetmesh_core/crypto/crypto

reference

fleetmesh_core/crypto/crypto.py

fleetmesh_core/crypto/curve

reference

fleetmesh_core/crypto/curve.py

fleetmesh_core/crypto/giftwrap

reference

fleetmesh_core/crypto/giftwrap.py

fleetmesh_core/crypto/http_signatures

reference

fleetmesh_core/crypto/http_signatures.py

fleetmesh_core/crypto/keys

reference

fleetmesh_core/crypto/keys.py

fleetmesh_core/crypto/nip44

reference

fleetmesh_core/crypto/nip44.py

fleetmesh_core/crypto/ssb

reference

fleetmesh_core/crypto/ssb.py

fleetmesh_core/identity/atproto

reference

fleetmesh_core/identity/atproto.py

fleetmesh_core/identity/auth_wire

reference

fleetmesh_core/identity/auth_wire.py

fleetmesh_core/identity/did

reference

fleetmesh_core/identity/did.py

fleetmesh_core/identity/didcomm

reference

fleetmesh_core/identity/didcomm.py

fleetmesh_core/identity/identity

reference

fleetmesh_core/identity/identity.py

fleetmesh_core/identity/origin

reference

fleetmesh_core/identity/origin.py

fleetmesh_core/identity/web_auth

reference

fleetmesh_core/identity/web_auth.py

fleetmesh_core/network/enrol_token

reference

fleetmesh_core/network/enrol_token.py

fleetmesh_core/network/fleet

reference

fleetmesh_core/network/fleet.py

fleetmesh_core/network/grant

reference

fleetmesh_core/network/grant.py

fleetmesh_core/network/group

reference

fleetmesh_core/network/group.py

fleetmesh_core/peering/projection

reference

fleetmesh_core/peering/projection.py

fleetmesh_core/services/discovery

reference

fleetmesh_core/services/discovery.py

fleetmesh_core/storage/linked_data

reference

fleetmesh_core/storage/linked_data.py

fleetmesh_core/textile/attestations

reference

fleetmesh_core/textile/attestations.py

fleetmesh_core/textile/bip340

reference

fleetmesh_core/textile/bip340.py

fleetmesh_core/textile/circle_keys

reference

fleetmesh_core/textile/circle_keys.py

fleetmesh_core/textile/principal

reference

fleetmesh_core/textile/principal.py

fleetmesh_core/textile/privacy_ladder

reference

fleetmesh_core/textile/privacy_ladder.py

fleetmesh_core/textile/signing

reference

fleetmesh_core/textile/signing.py

fleetmesh_core/wire/cbor

reference

fleetmesh_core/wire/cbor.py

fleetmesh_core/wire/interfaces

reference

fleetmesh_core/wire/interfaces.py

fleetmesh_core/wire/p2panda

reference

fleetmesh_core/wire/p2panda.py

fleetmesh_core/wire/schema_files

reference

fleetmesh_core/wire/schema_files.py

fleetmesh_core/wire/spelling

reference

fleetmesh_core/wire/spelling.py

fleetmesh_core/wire/validate

reference

fleetmesh_core/wire/validate.py

fleetmesh_core/wire/wire_types

reference

fleetmesh_core/wire/wire_types.py

Compartments (reference node)

cmp:announce

local

fleetmesh_node/app/core.py

cmp:discovery

local

fleetmesh_node/app/core.py

cmp:linked

local

fleetmesh_node/app/core.py

cmp:network

local

fleetmesh_node/app/core.py

cmp:presence

local

fleetmesh_node/app/core.py

Config blocks (reference node)

cfg:announce

local

fleetmesh_node/config/node.py

cfg:brands

local

fleetmesh_node/config/node.py

cfg:capabilities

local

fleetmesh_node/config/node.py

cfg:class

local

fleetmesh_node/config/node.py

cfg:endpoints

local

fleetmesh_node/config/node.py

cfg:enrolment

local

fleetmesh_node/config/node.py

cfg:heartbeat

local

fleetmesh_node/config/node.py

cfg:name

local

fleetmesh_node/config/node.py

cfg:network

local

fleetmesh_node/config/node.py

cfg:operator

local

fleetmesh_node/config/node.py

cfg:operator_relays

local

fleetmesh_node/config/node.py

cfg:projection

local

fleetmesh_node/config/node.py

cfg:protocols

local

fleetmesh_node/config/node.py

cfg:publish_operator

local

fleetmesh_node/config/node.py

cfg:telemetry

local

fleetmesh_node/config/node.py

cfg:visibility

local

fleetmesh_node/config/node.py

1.4.1.2.2. 2. Store & Reconciliation

What a node keeps for others and how two nodes agree on it.

Mechanisms: the event store and its admission door (fleetmesh_core/storage/store), shards and coverage claims (fleetmesh_core/peering/coverage), negentropy set reconciliation and the sync/1.0 protocol over it (fleetmesh_core/storage/negentropy, fleetmesh_core/storage/sync), blob replication over the peering transport and the Blossom face (fleetmesh_core/storage/replication, blob/1.0, BUD-01..04), retention and handover (fleetmesh_core/services/lifecycle).

Rules of the store every backend shares, stated once:

  • The filter subset. A coverage claim’s filter is NIP-01’s, narrowed: ids, authors, kinds, since, until and #x where x is one character. since/until/kinds are JSON integers (4.5 is not a time, "1" is not a kind); a filter key outside the subset (#tt, limit, search) is not a condition a claim can make, and a claim that makes one should be refused rather than read with the key ignored. An empty list for any field matches nothing: the field is present and names no value.

  • Ids and pubkeys are lowercase hex on the wire, and verify holds them to that. The replaceable-event tie-break at equal created_at is bytewise on the lowercase id, so it is the same comparison in any language.

  • The first d tag wins, NIP-01’s rule, including a value-less ["d"], which is the empty identifier "" and shadows a later ["d","x"].

1.4.1.2.2.1. Products: the fiber, the lifecycle log and the NIP-99 listing (plan D29)

A product is a product strand (the kind is declared in fleetmesh_core/textile/strand.py). The rules live in fleetmesh core, so any maker builds on one implementation, with the canonical byte forms fixed there: a product or an event sealed by either implementation has the same digest and Bao root. An application’s own store, waterfall metrics, health summary, credit/USD conversions and tool catalog stay in the application.

  • The record fiber (fleetmesh_core/products/fiber.py) is canonical JSON of the manifest: schema, product_id, slug, title, product_kind, current_version, owner_did, sku, upc, the three price fields, and supply_chain_count/lifecycle_count (the lengths of those arrays, not the arrays - the fiber commits to how many, so an appended event moves the product’s digest). Whole floats are written as integers. The fiber’s MIME is application/vnd.fleetmesh.product+json; any other MIME is refused bad_mime. The two schema strings inside the sealed bytes are fleetmesh.*: they are part of the bytes, so they are stated once and used verbatim.

  • The lifecycle log (fleetmesh_core/products/lifecycle.py) is the product’s lifecycle_events array. An event’s canonical bytes are the schema then every present, non-empty field of the fifteen lifecycle_event_fields, created_at as a number and the rest as strings; resolved is log state, not part of the identity. The append rule seals each event (event_digest_hex = sha256 of its bytes, bao_root = the 1,024-byte Bao root - the digest a signature names and the link back to the event’s own bytes), makes an unresolved recall_notice the product’s active_recall, advances current_version for a release/BOM/upgrade, and recomputes the product’s own sha256/bao_root over the new fiber. Verifying the log recomputes everything: the product’s stored commitment against its current fields (fiber_digest_mismatch catches an event appended or removed after sealing), then each event’s kind, product, recall severity and digest.

  • Attestations already live in fleetmesh_core/textile/attestations.py; the product read/verify path applies the same rule (attestation_holds, as keep_verified_attestations does) - a stage counts only while its signature verifies, names its signer and signs the hop as it stands, and verify_log reports the stage ids that still hold.

  • The NIP-99 listing (fleetmesh_core/products/listing.py, kind 30402, GammaMarkets market-spec) is what a buyer discovers: d, title, a price [amount, currency[, frequency]] whose frequency states a subscription interval, and a reference to the product strand. Fleetmesh layers the strand onto NIP-99’s a/e tags, so an a reference’s coordinate kind is 30821. Reading one back refuses not_a_listing, bad_listing, bad_price, no_product_ref. No checkout happens here (plan D30/P3c).

Reference: fleetmesh_core/products (fiber, lifecycle, listing, ProductRefused). Ops: product.read_fiber, product.verify_log, product.listing. Vector: vectors/products.json (the fiber built and read back, a foreign MIME refused; a sealed log verified with an attested stage and a price point; a one-time and a recurring listing built and read back; one case per refusal code - not_a_product, bad_mime, bad_price, bad_recall, bad_event_digest, event_wrong_product, unknown_event_kind, fiber_digest_mismatch, not_a_listing, bad_listing, no_product_ref).

surface

label

named in

Protocols

blob/1.0

owned

fleetmesh_node/planes/store/blob_wire/messages.py

sync/1.0

owned

fleetmesh_core/peering/coverage.py, fleetmesh_core/storage/sync.py, fleetmesh_node/app/router.py +1

Kinds

kind:10063

reused

fleetmesh_core/services/nsite.py, fleetmesh_node/planes/services/nsite/compartment.py

kind:24242

reused

fleetmesh_core/storage/blossom_auth.py, fleetmesh_node/planes/store/blob_replication/compartment.py, fleetmesh_node/protocols/nostr/blossom.py

kind:30803

owned

fleetmesh_core/peering/coverage.py, fleetmesh_core/peering/reports.py, fleetmesh_node/commands/sync.py +5

kind:30820

planned

kind:30821

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/brand.py, fleetmesh_core/products/listing.py

kind:30822

planned

kind:30823

planned

Standards

std:BUD-01

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/storage/blossom_auth.py, fleetmesh_node/planes/services/compute/common.py +3

std:BUD-02

reused

fleetmesh_core/storage/linked_data.py, fleetmesh_node/protocols/nostr/blossom.py, fleetmesh_node/protocols/nostr/package.py

std:BUD-03

reused

fleetmesh_core/services/nsite.py

std:BUD-04

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/storage/blossom_auth.py, fleetmesh_node/planes/store/blob_replication/compartment.py +3

std:NIP-77

reused

fleetmesh_core/peering/coverage.py, fleetmesh_core/storage/negentropy.py, fleetmesh_core/storage/replication.py +9

Profiles

profile:blossom-mirror

profiled

schema/messages.json

Transports & faces

http:/cid/

reused via std:BUD-01

fleetmesh_node/protocols/nostr/blossom.py

http:/list/

reused via std:BUD-02

fleetmesh_node/protocols/nostr/blossom.py

http:/mirror

profiled via profile:blossom-mirror

fleetmesh_node/protocols/nostr/blossom.py

http:/upload

reused via std:BUD-02

fleetmesh_node/protocols/nostr/blossom.py

Reference modules

fleetmesh_core/identity/cid

reference

fleetmesh_core/identity/cid.py

fleetmesh_core/peering/coverage

reference

fleetmesh_core/peering/coverage.py

fleetmesh_core/products/fiber

reference

fleetmesh_core/products/fiber.py

fleetmesh_core/products/lifecycle

reference

fleetmesh_core/products/lifecycle.py

fleetmesh_core/products/refusals

reference

fleetmesh_core/products/refusals.py

fleetmesh_core/services/lifecycle

reference

fleetmesh_core/services/lifecycle.py

fleetmesh_core/services/telemetry

reference

fleetmesh_core/services/telemetry.py

fleetmesh_core/storage/blossom_auth

reference

fleetmesh_core/storage/blossom_auth.py

fleetmesh_core/storage/car

reference

fleetmesh_core/storage/car.py

fleetmesh_core/storage/mst

reference

fleetmesh_core/storage/mst.py

fleetmesh_core/storage/negentropy

reference

fleetmesh_core/storage/negentropy.py

fleetmesh_core/storage/projection

reference

fleetmesh_core/storage/projection.py

fleetmesh_core/storage/replication

reference

fleetmesh_core/storage/replication.py

fleetmesh_core/storage/store

reference

fleetmesh_core/storage/store.py

fleetmesh_core/storage/store_postgres

reference

fleetmesh_core/storage/store_postgres.py

fleetmesh_core/storage/sync

reference

fleetmesh_core/storage/sync.py

fleetmesh_core/textile/bao

reference

fleetmesh_core/textile/bao.py

fleetmesh_core/textile/canonical

reference

fleetmesh_core/textile/canonical.py

fleetmesh_core/textile/code_repo

reference

fleetmesh_core/textile/code_repo.py

fleetmesh_core/textile/git_objects

reference

fleetmesh_core/textile/git_objects.py

fleetmesh_core/textile/quilt

reference

fleetmesh_core/textile/quilt.py

fleetmesh_core/textile/shards

reference

fleetmesh_core/textile/shards.py

fleetmesh_core/textile/spool_cuts

reference

fleetmesh_core/textile/spool_cuts.py

fleetmesh_core/textile/spools

reference

fleetmesh_core/textile/spools.py

fleetmesh_core/textile/strand

reference

fleetmesh_core/textile/strand.py

fleetmesh_core/textile/strand_event

reference

fleetmesh_core/textile/strand_event.py

fleetmesh_core/textile/types

reference

fleetmesh_core/textile/types.py

fleetmesh_core/wire/varint

reference

fleetmesh_core/wire/varint.py

Compartments (reference node)

cmp:blob_replication

local

fleetmesh_node/app/core.py

cmp:blob_wire

local

fleetmesh_node/app/core.py

cmp:retention

local

fleetmesh_node/app/core.py

cmp:sync

local

fleetmesh_node/app/core.py

Config blocks (reference node)

cfg:blob_replication

local

fleetmesh_node/config/node.py

cfg:blob_wire

local

fleetmesh_node/config/node.py

cfg:blobs

local

fleetmesh_node/config/node.py

cfg:coverage

local

fleetmesh_node/config/node.py

cfg:handover

local

fleetmesh_node/config/node.py

cfg:retention

local

fleetmesh_node/config/node.py

cfg:storage

local

fleetmesh_node/config/node.py

Persistence (reference node)

db:blob_replicas.sqlite

local

fleetmesh_node/commands/account.py, fleetmesh_node/planes/store/blob_replication/compartment.py, fleetmesh_node/planes/store/blob_wire/core.py

db:blobs.sqlite

local

fleetmesh_node/commands/account.py, fleetmesh_node/protocols/nostr/blobstore.py

db:events.sqlite

local

fleetmesh_node/app/core.py, fleetmesh_node/commands/account.py, fleetmesh_node/commands/core.py

db:rhio_blobs.db

local

fleetmesh_node/protocols/rhio/package.py

1.4.1.2.3. 3. Peering & Accounting

Who a node talks to, on what terms, and how it keeps the terms honest.

Mechanisms: offers, grants and amendments (fleetmesh_core/peering/peering), budget windows, receipts and closes (fleetmesh_core/accounting/accounting, fleetmesh_core/accounting/window, budget/1.0), capacity and strain (fleetmesh_core/accounting/capacity, fleetmesh_core/accounting/strain), reports and complaints (fleetmesh_core/peering/reports, fleetmesh_core/peering/complaint, complaint/1.0), standing and bad-peer memory (fleetmesh_core/accounting/standing, fleetmesh_core/peering/badpeer, standing/1.0).

surface

label

named in

Protocols

budget/1.0

owned

fleetmesh_node/planes/peering/budget/meter.py

complaint/1.0

owned

fleetmesh_core/peering/complaint.py

network/1.0

owned

fleetmesh_core/network/join_request.py

peering/1.0

owned

fleetmesh_core/peering/peering.py, fleetmesh_node/planes/peering/budget/meter.py

standing/1.0

owned

fleetmesh_core/accounting/standing.py

Kinds

kind:11801

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/identity/did.py, fleetmesh_core/identity/identity.py +28

kind:11802

owned

fleetmesh_core/peering/peering.py, fleetmesh_core/services/lifecycle.py, fleetmesh_node/app/control.py +1

kind:11803

owned

fleetmesh_node/planes/services/compute/common.py, fleetmesh_node/planes/services/compute/compartment.py, fleetmesh_node/planes/services/compute/market.py

kind:1984

planned

kind:1985

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/brand.py, fleetmesh_core/peering/projection.py +3

kind:21801

owned

fleetmesh_core/network/fleet.py, fleetmesh_core/services/lifecycle.py, fleetmesh_node/planes/identity/presence/compartment.py

kind:21802

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/services/telemetry.py, fleetmesh_node/config/node.py +1

kind:30802

owned

fleetmesh_core/accounting/standing.py, fleetmesh_core/peering/complaint.py, fleetmesh_core/peering/projection.py +9

kind:30804

owned

fleetmesh_core/wire/wire_types.py, fleetmesh_node/commands/gossip_cmds.py, fleetmesh_node/planes/services/gossip/core.py +2

kind:30810

owned

fleetmesh_node/planes/services/compute/common.py, fleetmesh_node/planes/services/compute/compartment.py, fleetmesh_node/planes/services/compute/market.py

kind:30811

owned

fleetmesh_core/identity/identity.py, fleetmesh_node/planes/services/compute/common.py, fleetmesh_node/planes/services/compute/compartment.py +2

kind:30817

reused (declared only)

kind:30830

owned

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/__init__.py, fleetmesh_core/network/definition.py +6

Standards

std:NIP-32

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/__init__.py, fleetmesh_core/network/brand.py +3

Reference modules

fleetmesh_core/accounting/accounting

reference

fleetmesh_core/accounting/accounting.py

fleetmesh_core/accounting/capacity

reference

fleetmesh_core/accounting/capacity.py

fleetmesh_core/accounting/standing

reference

fleetmesh_core/accounting/standing.py

fleetmesh_core/accounting/strain

reference

fleetmesh_core/accounting/strain.py

fleetmesh_core/accounting/window

reference

fleetmesh_core/accounting/window.py

fleetmesh_core/network/brand

reference

fleetmesh_core/network/brand.py

fleetmesh_core/network/definition

reference

fleetmesh_core/network/definition.py

fleetmesh_core/network/descriptor_split

reference

fleetmesh_core/network/descriptor_split.py

fleetmesh_core/network/join

reference

fleetmesh_core/network/join.py

fleetmesh_core/network/join_request

reference

fleetmesh_core/network/join_request.py

fleetmesh_core/network/relay_allow

reference

fleetmesh_core/network/relay_allow.py

fleetmesh_core/network/roster

reference

fleetmesh_core/network/roster.py

fleetmesh_core/peering/badpeer

reference

fleetmesh_core/peering/badpeer.py

fleetmesh_core/peering/complaint

reference

fleetmesh_core/peering/complaint.py

fleetmesh_core/peering/peering

reference

fleetmesh_core/peering/peering.py

fleetmesh_core/peering/reports

reference

fleetmesh_core/peering/reports.py

fleetmesh_core/services/discover

reference

fleetmesh_core/services/discover.py

Compartments (reference node)

cmp:budget

local

fleetmesh_node/app/core.py

cmp:capacity

local

fleetmesh_node/app/core.py

cmp:peering

local

fleetmesh_node/app/core.py

cmp:reporter

local

fleetmesh_node/app/core.py

cmp:strain

local

fleetmesh_node/app/core.py

cmp:trust

local

fleetmesh_node/app/core.py

Config blocks (reference node)

cfg:capacity

local

fleetmesh_node/config/node.py

cfg:peers

local

fleetmesh_node/config/node.py

cfg:policy

local

fleetmesh_node/config/node.py

cfg:pow_bits

local

fleetmesh_node/config/node.py

cfg:trust

local

fleetmesh_node/config/node.py

Persistence (reference node)

db:accounts.sqlite

local

fleetmesh_node/app/core.py, fleetmesh_node/commands/account.py, fleetmesh_node/commands/core.py +1

db:grants.sqlite

local

fleetmesh_node/app/core.py, fleetmesh_node/commands/base.py, fleetmesh_node/commands/core.py

What a second implementation must reproduce, stated so that it can be written without reading fleetmesh_core/ (the conformance cases in schema/conformance.json drive every line of this):

  • Pricing a window. Every limit is priced against the receipt counter grant.counter_of names for it (conn_rate against conn_open; every other limit against its own name). Overrun is max(0, measured/limit − 1); infinite when the limit is 0 and anything was measured. Divergence is |measured − claimed| / max(measured, floor) and is not evaluated when measured < floor, where floor = max(limit × divergence_floor_fraction, divergence_floor_sessions × per_session) and per_session is 1 except tier_limits.ranges_per_session for sync_ranges. dup_ratio is dups_sent / events_in, priced only when events_in is at or above the events_in floor, with a claimed value of null and zero divergence. Severity by overrun: S1 at s1_overrun_fraction, S2 at s2_overrun_fraction, S3 at s3_overrun_fraction; a divergence above s2_divergence_fraction is a floor of S2, never a ceiling. The window’s severity is the worst limit’s. Overrun and divergence are reported rounded to six places.

  • The remedy ladder. window.adjust(limits, tier, severity, measured): S0 — each limit grows by ceiling × max(aimd_min_increase_fraction, aimd_increase_fraction × strain) where strain = min(1, used/limit); an evaluation that offers no counters gets the floor step; a limit above its opening value that a measured window used nothing of instead decays to max(opening, limit × decay_fraction). Results are held inside the tier ceilings. S1 — every limit halves (decrease_s1_fraction), floored at the probation ceiling, tier unchanged. S2 — every limit quarters (decrease_s2_fraction), floored at probation, tier becomes probation. S3 — every limit is 0, tier unchanged. S4 — every limit is 0, tier revoked. Limits are integers: floor after arithmetic.

  • Opening limits of a tier are the ceilings with the four volume limits (events_in, bytes_in, bytes_out, blob_bytes) at opening_fraction, floored; dup_ratio is not a grant limit.

  • Reporter weight is tier_weight × min(1, clean_windows / age_factor_windows) × (1 − contradicted/evaluated), the false-report rate being 0 when nothing has been evaluated. View is a threshold, not a mean: the most severe of S4..S1 whose backing weight (reports at or above it) reaches view_threshold_theta, or the node’s own severity if worse.

  • Capacity pressure is the largest measured/total share over the declared counters, with the binding counter named; rungs are every shed_ladder entry at or below the pressure, in order; the shed floor is shed_floor_fraction of the probation ceilings, floored.

  • Offer. Checks run cheapest first and the first failure is the decline code: UNSUPPORTED_VERSION (protocol name), BAD_DESCRIPTOR (class), UNSUPPORTED_PROTOCOL (the required protocols, then the acceptor’s own policy list, by shared name/major at or above the floor), BAD_DESCRIPTOR (the signed descriptor’s own problems, or its c tags disagreeing with the proposal’s protocols), INSUFFICIENT_POW (leading zero bits of pow.event), UNSUPPORTED_TRANSPORTS, POLICY_MISMATCH (closed enrolment). Transports are the mutually supported schemes ranked by the sum of both preferences (the proposer’s list order is its preference), ties bytewise. An offer carries the subject’s configured tier or the policy’s opening tier, that tier’s opening limits, and the ladder. Two edges of that order: the version check precedes the body-shape check, so a body that is both unversioned and malformed declines UNSUPPORTED_VERSION; and a missing protocols is an empty declaration (UNSUPPORTED_PROTOCOL) while a present non-array protocols (including null) is BAD_DESCRIPTOR: absent is not null.

  • Policy keys. policy.tiers is keyed by the 64-hex pubkey, not the did:nostr: form; a DID-keyed entry is never matched and the subject takes the opening tier. Unknown policy keys are ignored, so a policy file can carry forward-looking settings.

  • Receipts. The chain link is SHA-256 of the canonical body with sig removed; the signature is BIP-340 over that link; an evidence tag cites an inline receipt by the same link. A report (kind 30802) is admissible only if its outcome is S1..S4, it names a subject in d, its grant resolves (or is carried inline) to a kind 30801 published by the reporter, and at least one evidence entry is something the subject itself signed (receipt, envelope hop, event, or handover); an inline artefact that does not hash to its id is ignored, and a reporter barred by a handover it signed is refused.

  • Standing tell reports the tier the newest window left, clean_windows as the trailing streak of S0, and evaluated_windows as the count.

  • Complaints of S3/S4 publish at once; S1/S2 wait notice_wait_windows windows after the notice unless the subject is unreachable.

  • discover-features/2.0 discloses the fleetmesh c tags of the descriptor; a match ending in * is a prefix, anything else an exact id; non-protocol feature types are ignored.

  • Join request (network/1.0, vector join-request.json). Under an approved policy a node asks the controller on the wire: it publishes a join-request - {network, descriptor, note?} - as the plaintext of a kind 13 seal inside the usual kind 1059 wrap (the sealed-control binding), signed by the node key, addressed to the controller, and sent to the definition’s relays and nowhere else. The controller accepts it only when all of these hold, else it refuses with the code naming the rule (constants.json join_request.codes): type is https://fleetmesh.org/network/1.0/join-request and the body is that shape - else not_join_request; from names the seal signer - else from_mismatch; to is exactly the definition’s controller - else to_mismatch; created_time is present and numeric, no more than grant.max_clock_skew_seconds in the future and no older than join_request.max_age_seconds (7 days: a join request is an asynchronous ask, so the bound is age and not skew - a controller reviews it later and replay is harmless) - else stale; body.network is the definition’s id - else wrong_network; the current policy is approved - else not_approved; the current roster does not already name the node - else already_member; the embedded descriptor is present, verifies, is unexpired and is the sender’s - else bad_descriptor. A did:group controller is controller_unsupported at both build and open (circle controllers wait on the D23/D26 design). Approval is not a message: the controller publishes a new version of the kind 30830 whose tags are the current ones plus one member tag naming the node, everything else unchanged and created_at strictly later. A join-decline ({network, code: "declined"}, thid = the request id) is the controller’s optional sealed refusal and leaves no roster trace.

1.4.1.2.4. 4. Transport & Doors

How bytes reach a node and what is checked before anything acts on them.

Mechanisms: the transport ladder and its negotiation (iroh, libp2p, https, nostr gift wrap), the relay face (NIP-01/11/42/77), mDNS LAN discovery, the DIDComm mediation protocols for nodes that cannot be reached directly, the announce topic, and the single validation door every plaintext passes (fleetmesh_node/validate in the reference; the schema’s body fields are what it checks).

surface

label

named in

Kinds

kind:10002

planned

kind:10050

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/identity/relaylist.py, fleetmesh_core/storage/linked_data.py +5

kind:1059

reused

fleetmesh_core/commerce/__init__.py, fleetmesh_core/commerce/messages.py, fleetmesh_core/commerce/sealed.py +11

kind:21059

reused

fleetmesh_core/crypto/giftwrap.py, fleetmesh_core/network/control.py, fleetmesh_node/app/core.py +8

kind:22242

reused

fleetmesh_node/protocols/nostr/client.py, fleetmesh_node/protocols/nostr/relayserver.py, fleetmesh_node/transport/relay_rung/core.py +1

Standards

piuri:https://didcomm.org/coordinate-mediation/2.0

reused

fleetmesh_node/planes/transport/mediation/messages.py

piuri:https://didcomm.org/discover-features/2.0

reused

fleetmesh_core/services/discover.py, fleetmesh_node/transport/const.py

piuri:https://didcomm.org/empty/1.0

reused

fleetmesh_node/transport/const.py

piuri:https://didcomm.org/messagepickup/2.0

reused

fleetmesh_node/planes/transport/mediation/messages.py

piuri:https://didcomm.org/out-of-band/2.0

planned

piuri:https://didcomm.org/report-problem/2.0

planned

piuri:https://didcomm.org/routing/2.0

reused

fleetmesh_node/planes/transport/mediation/messages.py, fleetmesh_node/transport/const.py

piuri:https://didcomm.org/trust-ping/2.0

reused

fleetmesh_node/transport/const.py

std:NIP-01

reused

fleetmesh_core/commerce/messages.py, fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/crypto/giftwrap.py +26

std:NIP-09

reused

fleetmesh_core/network/brand.py, fleetmesh_core/storage/store.py, fleetmesh_node/app/control.py +5

std:NIP-11

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/services/discovery.py, fleetmesh_node/planes/identity/discovery/compartment.py +4

std:NIP-13

reused

fleetmesh_core/identity/identity.py, fleetmesh_node/app/core.py, fleetmesh_node/protocols/nostr/descriptor.py +1

std:NIP-17

reused

fleetmesh_core/commerce/__init__.py, fleetmesh_core/commerce/messages.py, fleetmesh_core/commerce/payment.py +6

std:NIP-19

reused

fleetmesh_core/crypto/bech32.py

std:NIP-40

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/brand.py, fleetmesh_core/network/fleet.py +8

std:NIP-42

reused

fleetmesh_core/network/relay_allow.py, fleetmesh_node/planes/transport/bridge/compartment.py, fleetmesh_node/protocols/nostr/client.py +4

std:NIP-44

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/crypto/giftwrap.py, fleetmesh_core/crypto/nip44.py +11

std:NIP-59

reused

fleetmesh_core/commerce/messages.py, fleetmesh_core/commerce/sealed.py, fleetmesh_core/crypto/giftwrap.py +15

std:NIP-65

planned

Profiles

profile:sealed-control

profiled

schema/messages.json

Transports & faces

http:/didcomm

owned via transport:https

fleetmesh_node/protocols/nostr/relayserver.py

http:/gossip

local

fleetmesh_node/protocols/nostr/relayserver.py

http:/metrics

local

fleetmesh_node/protocols/nostr/relayserver.py

http:/nip11

reused via std:NIP-11

fleetmesh_node/protocols/nostr/relayserver.py

http:/xrpc/

local

fleetmesh_node/protocols/atproto/xrpc.py

internal:fleetmesh-fips/1

internal

schema/messages.json

lan:_fleetmesh._tcp.local

owned

fleetmesh_node/planes/transport/lan/compartment.py

topic:/fleetmesh/announce/1

owned

fleetmesh_node/planes/identity/announce/compartment.py, fleetmesh_node/sidecar/fleetmesh_announce.py

transport:https

owned

schema/messages.json

transport:iroh

owned

schema/messages.json

transport:libp2p

owned

schema/messages.json

transport:nostr

owned

schema/messages.json

Reference modules

fleetmesh_core/identity/iroh_ticket

reference

fleetmesh_core/identity/iroh_ticket.py

fleetmesh_core/identity/relaylist

reference

fleetmesh_core/identity/relaylist.py

fleetmesh_core/netfetch

reference

fleetmesh_core/netfetch.py

fleetmesh_core/textile/leaf_crypto

reference

fleetmesh_core/textile/leaf_crypto.py

fleetmesh_core/textile/leaf_envelope

reference

fleetmesh_core/textile/leaf_envelope.py

Compartments (reference node)

cmp:bridge

local

fleetmesh_node/app/core.py

cmp:lan

local

fleetmesh_node/app/core.py

cmp:link

local

fleetmesh_node/app/core.py

cmp:mediation

local

fleetmesh_node/app/core.py

cmp:p2p

local

fleetmesh_node/app/core.py

Config blocks (reference node)

cfg:bridge

local

fleetmesh_node/config/node.py

cfg:face

local

fleetmesh_node/config/node.py

cfg:lan

local

fleetmesh_node/config/node.py

cfg:magpie

local

fleetmesh_node/config/node.py

cfg:mediation

local

fleetmesh_node/config/node.py

cfg:p2p

local

fleetmesh_node/config/node.py

cfg:protocol_suites

local

fleetmesh_node/config/node.py

cfg:relays

local

fleetmesh_node/config/node.py

cfg:transport

local

fleetmesh_node/config/node.py

Persistence (reference node)

db:mediation.sqlite

local

fleetmesh_node/planes/transport/mediation/compartment.py

1.4.1.2.5. 5. Services

What a node offers beyond keeping and forwarding: compute, group gossip, paid fetch, sidecars, DVM ingress, static sites.

Mechanisms: the compute market (fleetmesh_core/accounting/market, compute/1.0, compute/1.1), epidemic gossip (gossip/1.0), paid fetch over Blossom and sidecar sessions (profile paid-fetch-402), the NIP-90 DVM gateway (profile nip90-ingress), nsite static hosting (profile nsite-face), settlement rails (Cashu NUTs, NIP-47, NIP-60/61 — all reused; the ledger is local).

1.4.1.2.5.1. Commerce: checkout on the market-spec, and the fulfiller’s rule (plan D30)

Checkout follows the GammaMarkets market-spec (the e-commerce extension NIP-99 names), pinned in constants.json#commerce.market_spec at commit 5dc79c5db0d41c0bea774debf445cce041192840 (GammaMarkets/market-spec, spec.md, a draft). Order traffic is NIP-17 sealed DMs: an unsigned kind 16 rumor carries the order process, distinguished by a type tag (1 order, 2 payment request, 3 status, 4 shipping), and a kind 17 receipt carries the buyer’s payment inside a kind 13 seal in a kind 1059 store-and-forward wrap. The seal’s own BIP-340 signature is the sender’s proof, so a reader learns which key wrote the message and the rumor’s pubkey must be that signer. The carrier is the reference gift wrap unchanged (fleetmesh_core/crypto/giftwrap.py, the same one control/1.0 rides) - no new cryptography.

  • The messages (fleetmesh_core/commerce/messages.py) are built and read: the four kind 16 rumors and the kind 17 receipt. Reading is deliberately small and refuses only the shapes the market-spec fixes - not_order_message (not a kind 16/17 order message), wrong_type (a kind 16 type that is not one of the four), bad_amount (an amount that is not a non-negative integer of sats), bad_payment (a payment option malformed for a named medium, or a request with none) and expired_request (a payment request dated past its expiration). The maker chooses how to be paid: the payment request offers lightning (bolt11 or lud16), bitcoin, ecash (Cashu) or any other non-empty medium (a card processor’s, say) - only the three named mediums have their shape validated.

  • The fulfiller’s rule (fleetmesh_core/commerce/payment.py) is the one thing fleetmesh adds. An order is PAID when a kind 16 type 3 status confirmed for that order id arrives sealed, with the seal signed by the product’s maker - the author of the kind 30402 listing the order’s items name. A buyer’s kind 17 receipt is evidence for the maker, never proof for the fulfiller, and in v1 only the maker’s own key counts (no delegated processor keys). Whoever fulfils acts only on order_paid, the way the operator acts only under a valid host grant (D27). It refuses not_sealed_by_maker, unknown_order (a status for another order, or none for this one) and not_confirmed.

  • Recurring billing is the listing’s price frequency: each period is a new order, and paid_through tells a fulfiller whether the current period is covered, from the orders it has already resolved with order_paid. Existing subscriptions keep paying through the current rails, which then send the period’s confirmed, so nobody re-subscribes.

Reference: fleetmesh_core/commerce (messages, sealed, payment, CommerceRefused). Ops: commerce.read_message, commerce.order_paid, commerce.paid_through. Vector: vectors/commerce.json (the four kind 16 rumors and the kind 17 receipt built and read back; the maker’s sealed confirmed accepted; a buyer receipt alone, a confirmed status from anyone but the maker, a status for another order and a pending status each refused; a recurring listing covered for one period and not the next; one case per refusal code - not_order_message, wrong_type, not_sealed_by_maker, unknown_order, bad_amount, bad_payment, expired_request, not_confirmed).

surface

label

named in

Protocols

compute/1.0

owned

fleetmesh_node/compartment/handler.py, fleetmesh_node/planes/services/compute_wire/messages.py

compute/1.1

owned

fleetmesh_node/planes/services/compute_wire/messages.py

gossip/1.0

owned

fleetmesh_node/planes/services/gossip/envelope.py

grasp/1.0

reused

fleetmesh_node/planes/identity/visibility.py, fleetmesh_node/planes/services/sidecars/manifests/10-grasp.json

magpie/1.0

reused

fleetmesh_node/planes/services/sidecars/manifests/30-magpie.json

ncontainer/1.0

reused

fleetmesh_node/planes/services/sidecars/manifests/20-ncontainer.json

video-transit/1.0

owned

fleetmesh_core/wire/video_transit.py, fleetmesh_node/planes/services/video/compartment.py

Kinds

kind:15128

reused

fleetmesh_core/services/nsite.py

kind:16

reused (declared only)

kind:1617-1633

reused

fleetmesh_node/planes/services/sidecars/manifests/10-grasp.json

kind:17

reused (declared only)

kind:23194

reused

fleetmesh_node/planes/services/settle/gateways.py

kind:23195

reused

fleetmesh_node/planes/services/settle/gateways.py

kind:30402

reused

fleetmesh_core/commerce/payment.py, fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/network/brand.py +3

kind:30617

reused

fleetmesh_node/planes/services/paidfetch/compartment.py, fleetmesh_node/planes/services/sidecars/manifests/10-grasp.json

kind:30618

reused

fleetmesh_node/planes/services/sidecars/manifests/10-grasp.json

kind:30624

reused

fleetmesh_node/planes/services/sidecars/manifests/20-ncontainer.json

kind:34128

reused

fleetmesh_core/services/nsite.py

kind:35128

reused

fleetmesh_core/services/nsite.py

kind:5000-5999

reused

fleetmesh_core/services/dvm.py, fleetmesh_node/planes/services/compute/executors/media.py, fleetmesh_node/planes/services/dvm/__init__.py

kind:5128

reused

fleetmesh_core/services/nsite.py, fleetmesh_node/commands/nsite_cmds.py, fleetmesh_node/planes/services/nsite/compartment.py

kind:6000-6999

reused

fleetmesh_node/planes/services/dvm/__init__.py

kind:7000

reused

fleetmesh_core/services/dvm.py, fleetmesh_node/planes/services/dvm/__init__.py

kind:9321

reused

fleetmesh_core/accounting/cashu.py

Standards

std:NIP-04

reused

fleetmesh_node/planes/services/settle/gateways.py

std:NIP-47

reused

fleetmesh_node/planes/services/settle/gateways.py

std:NIP-60

reused

fleetmesh_node/planes/services/settle/__init__.py, fleetmesh_node/planes/services/settle/payment.py

std:NIP-61

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_node/planes/services/settle/__init__.py, fleetmesh_node/planes/services/settle/compartment.py +2

std:NIP-90

reused

fleetmesh_core/services/dvm.py, fleetmesh_node/commands/compute_cmds.py, fleetmesh_node/config/compartments.py +8

std:NIP-99

reused

fleetmesh_core/commerce/__init__.py, fleetmesh_core/commerce/messages.py, fleetmesh_core/commerce/payment.py +4

std:NUT-00

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_node/planes/services/settle/gateways.py, fleetmesh_node/planes/services/settle/payment.py

std:NUT-02

reused

fleetmesh_node/planes/services/paidfetch/compartment.py

std:NUT-03

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_node/planes/services/paidfetch/compartment.py, fleetmesh_node/planes/services/settle/gateways.py +2

std:NUT-04

reused

fleetmesh_node/planes/services/settle/gateways.py

std:NUT-05

reused

fleetmesh_node/planes/services/paidfetch/compartment.py, fleetmesh_node/planes/services/settle/gateways.py

std:NUT-07

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_node/planes/services/settle/engine.py, fleetmesh_node/planes/services/settle/gateways.py

std:NUT-10

reused

fleetmesh_core/accounting/cashu.py

std:NUT-11

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_node/planes/services/video/packager.py, fleetmesh_node/planes/services/video/player.py

std:NUT-12

reused

fleetmesh_core/accounting/cashu.py

std:NUT-18

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_core/wire/cbor.py, fleetmesh_node/planes/services/compute/executors/harness.py +2

std:NUT-24

reused

fleetmesh_core/accounting/cashu.py, fleetmesh_core/accounting/paidfetch.py, fleetmesh_node/planes/services/gateway/settle.py +2

Profiles

profile:market-spec-checkout

profiled

schema/messages.json

profile:nip90-ingress

profiled

schema/messages.json

profile:nsite-face

profiled

schema/messages.json

profile:paid-fetch-402

profiled

schema/messages.json

Transports & faces

http:/grasp-session/

profiled via profile:paid-fetch-402

fleetmesh_node/protocols/nostr/blossom.py

http:/nsite/_ask

profiled via profile:nsite-face

fleetmesh_node/planes/services/nsite/compartment.py

http:/sidecar-session/

profiled via profile:paid-fetch-402

fleetmesh_node/protocols/nostr/blossom.py

http:/video/watch

local

fleetmesh_node/planes/services/video/player.py

Reference modules

fleetmesh_core/accounting/cashu

reference

fleetmesh_core/accounting/cashu.py

fleetmesh_core/accounting/market

reference

fleetmesh_core/accounting/market.py

fleetmesh_core/accounting/paidfetch

reference

fleetmesh_core/accounting/paidfetch.py

fleetmesh_core/commerce/messages

reference

fleetmesh_core/commerce/messages.py

fleetmesh_core/commerce/payment

reference

fleetmesh_core/commerce/payment.py

fleetmesh_core/commerce/refusals

reference

fleetmesh_core/commerce/refusals.py

fleetmesh_core/commerce/sealed

reference

fleetmesh_core/commerce/sealed.py

fleetmesh_core/crypto/zk

reference

fleetmesh_core/crypto/zk.py

fleetmesh_core/products/listing

reference

fleetmesh_core/products/listing.py

fleetmesh_core/services/dvm

reference

fleetmesh_core/services/dvm.py

fleetmesh_core/services/nsite

reference

fleetmesh_core/services/nsite.py

fleetmesh_core/wire/video_transit

reference

fleetmesh_core/wire/video_transit.py

Compartments (reference node)

cmp:compute

local

fleetmesh_node/app/core.py

cmp:compute_wire

local

fleetmesh_node/app/core.py

cmp:dvm

local

fleetmesh_node/app/core.py

cmp:gossip

local

fleetmesh_node/app/core.py

cmp:nsite

local

fleetmesh_node/app/core.py

cmp:paidfetch

local

fleetmesh_node/app/core.py

cmp:settle

local

fleetmesh_node/app/core.py

cmp:sidecars

local

fleetmesh_node/app/core.py

cmp:video

local

fleetmesh_node/app/core.py

Config blocks (reference node)

cfg:compute

local

fleetmesh_node/config/node.py

cfg:dvm

local

fleetmesh_node/config/node.py

cfg:executors

local

fleetmesh_node/config/node.py

cfg:fetch_pricing

local

fleetmesh_node/config/node.py

cfg:gossip

local

fleetmesh_node/config/node.py

cfg:grasp

local

fleetmesh_node/config/node.py

cfg:ncontainer

local

fleetmesh_node/config/node.py

cfg:nsite

local

fleetmesh_node/config/node.py

cfg:settlement

local

fleetmesh_node/config/node.py

cfg:sidecars

local

fleetmesh_node/config/node.py

cfg:video

local

fleetmesh_node/config/node.py

Persistence (reference node)

db:cashu_wallet.sqlite

local

fleetmesh_node/commands/account.py, fleetmesh_node/planes/services/paidfetch/compartment.py

db:fetch_prices.sqlite

local

fleetmesh_node/commands/account.py, fleetmesh_node/planes/services/paidfetch/compartment.py

db:gossip_rosters.sqlite

local

fleetmesh_node/planes/services/gossip/core.py

db:gossip_seen.sqlite

local

fleetmesh_node/planes/services/gossip/core.py

db:nsite.db

local

fleetmesh_node/planes/services/nsite/compartment.py

db:settlements.sqlite

local

fleetmesh_node/commands/account.py, fleetmesh_node/planes/services/settle/compartment.py

db:sidecar_sessions.sqlite

local

fleetmesh_node/commands/account.py, fleetmesh_node/planes/services/paidfetch/compartment.py

1.4.1.2.6. 6. Operations

What an operator sees and does. Almost entirely local; the two exceptions are the control socket, which meshctl (Rust) speaks, and the sidecar manifest, which a sidecar author writes.

surface

label

named in

Protocols

control/1.0

owned

fleetmesh_core/network/control.py

Kinds

kind:9900

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/peering/release.py, fleetmesh_core/storage/linked_data.py +2

kind:9901

reused

fleetmesh_core/conformance/conformance_ops.py, fleetmesh_core/peering/release.py

Transports & faces

internal:meshnode-control/1

internal

schema/messages.json

internal:sidecar-manifest/1

internal

schema/messages.json

Reference modules

fleetmesh_core/conformance/conformance

reference

fleetmesh_core/conformance/conformance.py

fleetmesh_core/conformance/conformance_ops

reference

fleetmesh_core/conformance/conformance_ops.py

fleetmesh_core/conformance/harness

reference

fleetmesh_core/conformance/harness.py

fleetmesh_core/network/control

reference

fleetmesh_core/network/control.py

fleetmesh_core/peering/release

reference

fleetmesh_core/peering/release.py

fleetmesh_core/services/unplug

reference

fleetmesh_core/services/unplug.py

Compartments (reference node)

cmp:remote

local

fleetmesh_node/app/core.py

cmp:scheduler

local

fleetmesh_node/app/core.py

cmp:updates

local

fleetmesh_node/app/core.py

Config blocks (reference node)

cfg:extensions

local

fleetmesh_node/config/node.py

cfg:plugins

local

fleetmesh_node/config/node.py

cfg:tick_seconds

local

fleetmesh_node/config/node.py

cfg:updates

local

fleetmesh_node/config/node.py

Persistence (reference node)

db:updates.sqlite

local

fleetmesh_node/compartment/need.py, fleetmesh_node/planes/operations/updates/core.py

Release channel (fleetmesh_core/peering/release, kinds 9900/9901, vectors release.json). A release is an npack kind 9900 by the operator’s pinned release key, read in this order with the first failure as the one-line refusal: kind, pubkey (the hex compared case-folded), signature, name tag (a different package is skipped silently, never counted), version tag, x tag, provides tags. The version grammar is N.N.N with an optional - prerelease of [0-9A-Za-z.-]+; whitespace around it is tolerated; v1.2.3, 1.2.3+build and a fourth component are not semvers. Order is numeric on the three components, a prerelease below its release, and two prereleases compared as plain strings (rc.10 < rc.9) - SemVer 2’s dotted-identifier rule is not used. x must be 64 characters and is lower-cased; os and arch default to any. provides values are fleetmesh/0.1-draft@<digest>; only the digests after that prefix are kept, and a release naming none is refused.

A kind 9901 by the same key that verifies and names an e revokes that release; its reason is the reason tag, else the content. A 9901 by any other key, or without an e, is nothing - not a refusal.

Selection (release.select): apply every revocation first regardless of the order events arrived, skip revoked and not-newer-than-running releases, then the newest release speaking this node’s digest is newest_compatible and the newest speaking another digest is incompatible_newer - reported, never installed (docs/versioning.md). A tie on version keeps the first seen. classify(running, candidate) names the jump major/minor/patch by the first differing component, or null when the candidate is not newer.

1.4.1.3. Profiles

A profile is the fleetmesh-specific constraint on a reused protocol. Each has a name in messages.json under surfaces.profiled, a normative paragraph here, and a vector where the constraint is on bytes.

1.4.1.3.2. didcomm-over-giftwrap

A DIDComm JWE travels as the content of a NIP-59 rumor, wrapped and addressed to the peer’s node pubkey. Kind 21059 (ephemeral) is the default; kind 1059 when store-and-forward is required (the peer is unreachable and has a kind 10050 relay list). A stored wrap is published to the relays the peer’s kind 10050 names (NIP-17, read by fleetmesh_core/identity/relaylist: relay tags, ws(s) only, deduplicated, at most 8) and then to the sender’s own; a peer with no list gets the sender’s relays alone. The wrap carries no other tags than NIP-59 requires; any other wrap kind is refused. The seal, and a stored (1059) wrap, carry a created_at randomised backwards within two days less twice grant.max_clock_skew_seconds of now (NIP-59’s two-day window, kept honest under skew). A live (21059) wrap is dated now, not randomised: relays (strfry, and the public relays) refuse an ephemeral event whose created_at is more than about a minute old with invalid: ephemeral event expired, so a skewed live wrap never reaches anyone. The wrap’s date says nothing the relay’s own receipt time does not; the privacy the randomisation buys sits on the seal inside, which stays randomised. The NIP-44 v2 bytes are fleetmesh_core/crypto/nip44’s. A relay that answers a wrap with an OK whose reason is prefixed rate-limited: or banned:, or refuses the handshake with HTTP 429, is left out of publishing for a window that starts at a minute and doubles per repeat up to fifteen, while the subscription on it stays up; meshnode health lists it under cooling and the node reports it as a note, not a fault. Reference: fleetmesh_core/crypto/giftwrap. Vector: vectors/giftwrap.json (NIP-44 under a fixed nonce, one live and one stored wrap opened, with the three dates pinned).

1.4.1.3.3. sealed-control

For control/1.0 only, a request, result or refused may travel as the plaintext of the kind 13 seal inside the usual wrap, with no DIDComm JWE. A node accepted a control sender before only through authcrypt, which needs the sender’s X25519 agreement key from a published descriptor, so only a node could send: not a person on a NIP-07 extension or a NIP-46 signer (they can NIP-44 encrypt and sign events, nothing more), not meshctl without a running node, not a browser. With the message as the seal’s plaintext, the seal’s own BIP-340 signature is the proof of who sent it and the receiver needs no descriptor: the seal signer is the sender.

A receiver accepts the plaintext only when all of these hold, and otherwise refuses with the code naming the rule (constants.json control.seal.codes):

  • it is a JSON object with a string id and type, and type is one of https://fleetmesh.org/control/1.0/{request,result,refused} - else not_control;

  • from names the seal signer, as did:nostr:<hex> or the bare hex spelling (the same-operator comparison fleetmesh_core/identity/did) - else from_mismatch;

  • to is a list naming the receiving key’s did:nostr - else to_mismatch;

  • created_time is present, a number, and within grant.max_clock_skew_seconds of the receiver’s now - else stale. Absent counts as stale here, unlike the JWE path where an absent created_time is tolerated;

  • the body passes the receiver’s own control body check (fleetmesh_core/wire/validate) - else body_invalid.

Replay is the receiver’s state, not the transport’s: the message comes back and the node applies its own seen-id guard, exactly as it does for a JWE. A reply travels the same way - result or refused as the seal’s plaintext to the sender’s key, wrapped and published to the node’s relays, with thid = the request id - and never needs the sender’s descriptor. Every other fleetmesh protocol stays authcrypt-only.

Reference: fleetmesh_core/network/control (seal, open_sealed) over fleetmesh_core/crypto/giftwrap. Vector: vectors/control.json (an accepted request, result and refused, a stored wrap, a message sealed by an event signer, and one case per refusal code).

1.4.1.3.4. nip66-descriptor

Kind 30166 is derived from the node descriptor as fleetmesh_core/services/discovery does, one event per ws/wss endpoint, with d the canonical relay URL. Liveness tags are a monitor’s to add, never the node’s. Vector: vectors/discovery.json.

The derivation is deterministic so that two implementations produce the same id: the event is unsigned (the publisher signs it), its pubkey and created_at are the descriptor’s, and the tags come in this order: d, n (tor for a .onion host, i2p for .i2p, else clearnet), one N per entry of the NIP-11 document’s supported_nips in the order given, one R per limitation the document mentions in the order auth_required → auth, payment_required → payment, restricted_writes → writes, min_pow_difficulty → pow (! prefix when false; pow is true only above zero; a key the document omits is asserted neither way), one t per claimed shard sorted and deduplicated, then expiration copied from the descriptor when it has one. content is the NIP-11 document in canonical form, or empty when there is none. A validator’s d check uses the same canonical form and relay_endpoints as the derivation.

1.4.1.3.5. nip85-projection

Kind 30385 is derived from the node’s own kind 30802 reports as fleetmesh_core/peering/projection does: d is the subject relay URL in canonical form, k is web, a cites the report. Vector: vectors/projection.json.

Deterministic like the discovery event: unsigned, pubkey and created_at the report’s, content empty, tags in the order d, k, p (the report’s d, the subject pubkey), a (30802:<reporter>:<subject>), rank (the report’s outcome priced by constants.json#projection.rank_by_outcome: S1 50, S2 25, S3 0, S4 0, as a decimal string), then expiration copied from the report when it has one. Endpoints are deduplicated and sorted; an endpoint that is not already canonical, a report of another kind, or an outcome the ladder does not price is refused rather than silently fixed.

1.4.1.3.6. nip90-ingress

A NIP-90 request (kind 5000–5999) is translated to a job descriptor by the mapping in fleetmesh_core/services/dvm: i tags are inputs, param tags a map (last wins), the executor is chosen zk → llm → bacalhau → agent → wasm from the kind first and then the executor/engine params. Feedback is kind 7000 with tags e, p, status[, extra] and status one of NIP-90’s payment-required, processing, error, success, partial; the result is kind request+1000 with tags e, p, request (the request JSON, compact) then amount / commit when non-zero. A WASM request that names no param module is refused rather than run. Kind 5128 is nsite’s and is dispatched by the nsite face, never as a job. Vector: vectors/nip90.json.

What a second implementation must reproduce. Parsing: output sets output_mime (default text/plain), bid is an integer of msat (default 0), relays keeps only ws:///wss:// entries; parsed is {id, pubkey, kind, content, inputs, params, output_mime, bid_msat, relays}. Executor choice: zk when the kind is 5055/5905 or executor/engine is one of zk-verify-groth16|zk|zkvm; else llm when the kind is 5050 or the name is llm|ai|inference|vllm|ollama; else bacalhau when the kind is 59xx or the name is bacalhau|docker|container; else agent for agent|react; else wasm. Every job carries fuel_max 2 500 000 000 unless overridden. The wasm job’s input.raw is the canonical form of {prompt: content, inputs, params}, input.sha256 its digest, module = {runtime: wasm[, sha256: param module lower-cased][, url: param module_url]}, wasi_profile fleetmesh-wasi-v1, nonce = request id, verify none. The llm job defaults to model meta-llama/Llama-3.3-70B-Instruct, sampling {max_tokens 512, temperature 0.7, top_p 1.0[, seed]}, messages from a json input’s messages/prompt else one user message of the content; param schema makes a json_schema grammar, response_format / regex likewise, and verify is schema-bounds when any grammar is asked for, else delivery. The zk job’s module runtime is zk-verify-groth16, its module.sha256 = sha256(nip90-zk-verify-<curve>) with curve default bn254; proof / public_inputs / vk come from JSON content or from i tags whose role is proof|zk-proof, inputs|public_inputs (JSON array), input|public_input (one each), vk|verification_key; verify is {mode: proof, proof_system}. The bacalhau job is engine docker, image alpine:latest, entrypoint /bin/sh -c split on whitespace, one storage_mount {cas_provider blossom, source_cid, mount_path} per i tag (third field or /inputs), resources cpu 2, gpu 0, memory_gib 4.0, timeout_seconds 300. The agent job is {task: content, max_steps 25, verify delivery}. Feedback with an unknown status is refused (null); feedback content is the extra text, else the status. The result’s request tag is the request event in the protocol’s canonical form (constants.json#canonical.form: sorted keys, no whitespace, UTF-8) - the same bytes every digest here is taken over, so two nodes answering one request embed identical bytes; a verifier still re-parses and re-checks the embedded signature rather than byte-comparing. amount appears only when positive, commit only when non-empty, extra tags after both. Non-integer values for integer params (max_tokens, seed, cpu, gpu, timeout, max_steps) are refused, not rounded. A zk request whose executor param names some other proof system keeps that name as executor/module.runtime/ proof_system; an empty or groth16-containing name, or a zk kind, means zk-verify-groth16.

1.4.1.3.7. nsite-face

Host routing by the left-most label selects a site, as fleetmesh_core/services/nsite parses it: <npub> is the owner’s root site (kind 15128), <base36 pubkey, 50 chars><name> a named site (kind 35128, d = name, 1–13 chars of [a-z0-9-]), v<base36 event id> a pinned snapshot (kind 5128); legacy 34128 is read for compatibility and never written. A manifest’s path tags map /<path> to a blob sha256; / and /<dir>/ fall to index.html, anything missing to /404.html with status 404; .. is normalised before lookup. Blossom servers are tried in manifest order, then the owner’s kind 10063, then the node’s own, deduplicated. GET /nsite/_ask returns the resolved manifest as JSON. Vector: vectors/nsite.json.

What a second implementation must reproduce. Base36 is the 32-byte big-endian integer in 0-9a-z, left-padded with 0 to exactly 50 chars; decoding rejects any other width and values ≥ 2^256. A site ref is {kind, pubkey, d, event_id} with the unused fields empty strings; its filter is {ids: [id], kinds: [5128]}, {kinds: [35128], authors, #d, limit 1} or {kinds: [15128], authors, limit 1}. A host is lower-cased, a single :port stripped, a trailing . dropped, then matched against each suffix (lower-cased, dots trimmed): the remainder must be exactly one label. A TXT binding is trimmed of whitespace and quotes and may carry the DNS key convention nsite=; it is then npub1…, npub1…:<name> (name folded to lower case, then the named-site grammar) or v<snapshot>; anything else is not a binding. domain tags are trimmed, lower-cased, stripped of a trailing ., and a tag left empty by that names no domain. path tags count only when the path is absolute and the digest is 64 hex chars (lower-cased); the aggregate is sha256 over the sorted "<sha> <path>\n" lines. Resolution strips ?/#, prefixes /, collapses a leading //, normalises ./.., and appends index.html when the request ended in / or its last segment has no extension (an extension is text after a . that is not the segment’s first character: /..a and /.hidden have none). Content types come from the pinned table fleetmesh_core/services/nsite.EXT_TYPES (html htm css js mjs json txt md xml svg png jpg jpeg gif webp ico woff woff2 ttf otf wasm pdf mp4 webm mp3 csv; extension case-folded) with ; charset=utf-8 appended to text/*, application/json and image/svg+xml; unknown is application/octet-stream - never the host’s mime database. Blossom server URLs must be http(s), lose a trailing /, and are deduplicated first-seen.

1.4.1.3.8. blossom-mirror

Blob replication asks a partner to PUT /mirror (BUD-04) with {url} naming this node’s public Blossom URL for the blob (<base>/<sha256>), authorised by a kind 24242 event with t=mirror, x=<sha256> and an expiration tag, carried as Authorization: Nostr <base64 JSON>. The receiver checks signature, kind, verb, hash and expiry in that order and answers 200 with the blob descriptor plus cid. Nothing beyond BUD-04 is required of the receiver; the constraint is on what the sender puts in the auth event. Reference: fleetmesh_core/storage/blossom_auth. Vector: vectors/blossom-mirror.json.

1.4.1.3.9. did-aliases

A node is its did:nostr; nothing here changes that. did:key and did:peer are deterministic re-encodings of the keys the descriptor already carries, so DIDComm and verifiable-credential tooling that has never heard of nostr can address a node without a did:nostr resolver. The node key’s did:key is z + base58btc of multicodec 0xe7 0x01 over the compressed point 02 || x (the even-y point a BIP-340 x-only key stands for); the agreement and transport keys use 0xec 0x01 and 0xed 0x01 over their raw 32 bytes - the same bytes the descriptor’s f-prefixed Multikeys carry, in a different base. The did:peer is numalgo 2: .V the node key, .E the agreement key, .S the DIDCommMessaging service abbreviated per the did:peer spec as base64url-nopad JSON with sorted keys; elements appear in that order and are omitted when the descriptor lacks them. A did:peer:2 is a snapshot - it changes when the endpoint or a key does - so the descriptor is the source of truth and a node compares the parsed node key, never the string. The resolved node profile lists the node did:key then the did:peer in alsoKnownAs. A did:key on another curve is refused: a different curve is a different network. Constants: constants.json#did. Reference: fleetmesh_core/identity/did. Vector: vectors/did.json.

1.4.1.3.10. market-spec-checkout

The GammaMarkets market-spec checkout (plan D30): an unsigned kind 16 rumor (the order process - order, payment request, status update or shipping update, by its type tag) or a kind 17 receipt travels as the plaintext of a NIP-59 kind 13 seal inside a kind 1059 store-and-forward wrap, addressed to the other party, and the seal’s signer is the message’s author. The maker’s own sealed confirmed status is the proof of payment (commerce.order_paid); a listing’s price frequency makes a subscription (commerce.paid_through). Constants: constants.json#commerce (the pinned market_spec.commit, 5dc79c5db0d41c0bea774debf445cce041192840). Reference: fleetmesh_core/commerce. Vector: vectors/commerce.json.

1.4.1.4. Declared and now spoken

Three surfaces the schema reserved before any node spoke them. Each has a reference module and shares vectors/declared.json.

1.4.1.4.1. kind 21802 — diagnostic telemetry

Owned, opt-in (telemetry: true in the node config; off by default). One ephemeral event per sample window, aggregated over the whole node. Tags: sample_window (seconds, positive), then one ["metric", name, bin] per metric in the fixed order wraps_in, wraps_seen_again, wraps_dropped, strain, peers, then expiration if given; content empty. A bin is the largest of 0, 1, 10, 100, 1000, 10000 at or below the count — an order of magnitude and nothing finer — and a metric name outside the five is dropped, not carried, so a node cannot leak a per-peer counter under a name of its own. A reader refuses a non-positive window, an unknown metric, a bin that is not a floor, a metric given twice, or non-empty content. Reference: fleetmesh_core/services/telemetry.

1.4.1.4.2. kind 10050 — inbox relays

Reused (NIP-17). Every node publishes one. The relay rung is the floor of the transport ladder - not a node class, not a capability, but the one way a node can always be reached - and a kind 10050 is where that floor is stated, in the place any Nostr client already looks. A node publishes the relays it reads as relay tags (relaylist.build: ws(s) only, deduplicated, at most 8, a non-relay URL refused rather than dropped), signed by the node key, on its first presence tick and again only when the set changes. A kind 11801 descriptor therefore need not, and does not, carry its inbox relays: endpoint wss on a descriptor means the node hosts a relay face, which is a different fact.

Read by the transport when it must store a wrap for a peer that is not listening; the shape and the delivery rule are under didcomm-over-giftwrap above. The list is trusted for an hour before it is read again. Reference: fleetmesh_core/identity/relaylist.

1.4.1.4.3. discover-features/2.0

Reused (DIDComm). A queries message, anonymous allowed, carries [{feature-type, match}]; a match ending in * is a prefix, anything else must equal a protocol identifier, and only feature-type: protocol is answered. The disclose reply is threaded to the query’s id and its disclosures are the descriptor’s c tags that are protocol identifiers (plain capability hints such as relay are not protocols and are not disclosed). The answer comes from fleetmesh_core/peering/peering.Node.disclose, which reads the descriptor, so a disclose cannot name a protocol the descriptor does not. Reference: fleetmesh_core/services/discover.

1.4.1.5. Internal contracts

contract

spoken by

where defined

meshnode-control/1

meshctl ↔ meshnode

fleetmesh_node/app/control.py; verb table checked by scripts/check-cli.py

fleetmesh-fips/1

meshnode ↔ FIPS sidecar

docs/fips-native-transport.md

sidecar-manifest/1

meshnode ↔ a sidecar’s manifest

fleetmesh_node/planes/services/sidecars/manifest.py

These are pinned by schema/INTERNAL, a digest over the contract texts, separate from the protocol digest so a control-verb rename does not move the version a node declares to peers.