Skip to content

Stuart meets Satoshi: data

Each message names the data that moves. An icon marks each data type (see the table). The diagram uses an SMT Beacon. With the other Beacon Types, only the announcement is different (key rotation).

---
title: Data movement with an SMT Beacon
config:
  sequence:
    actorMargin: 20
    width: 110
---

%% Each message names the data that moves. An icon marks each data type. The page has the legend:
%% πŸ”‘ public key Β· 🧾 BTCR2 Signed Update Β· πŸ”– 32-byte hash Β· 🌲 SMT Proof Β· πŸ“ Unsigned Beacon Signal
%% ✍ signature Β· β›“ Beacon Signal Β· 🏷 Beacon Address Β· πŸ†” did Β· πŸ’¬ channel message Β· 🧳 Sidecar Data Β· πŸ“„ DID document

sequenceDiagram
    autonumber
    actor Stu as Stuart
    participant AS as Aggregation<br/>Service 🀝
    participant BTC as Bitcoin β›“
    actor Sat as Satoshi

    Stu->>Stu: πŸ”‘ new key β†’ 🧾 update<br/>β†’ πŸ”– hash of the update
    Stu->>AS: πŸ”– leaf value
    AS->>Stu: 🌲 SMT Proof,<br/>πŸ“ Unsigned Beacon Signal
    Stu->>AS: ✍ signature
    AS->>BTC: β›“ Beacon Signal<br/>with the 🌲 SMT root
    Stu->>Sat: πŸ’¬ message, πŸ†” did, 🧳 Sidecar Data<br/>(🧾 update, 🌲 SMT Proof)
    Sat->>BTC: Find the Beacon Signals<br/>of the 🏷 Beacon Addresses
    BTC-->>Sat: β›“ Beacon Signals
    Sat->>Sat: πŸ“„ DID document<br/>with the πŸ”‘ new key

Source: data-movement.mmd

Icon Data Icon Data
πŸ”‘ public key β›“ Beacon Signal (on-chain)
🧾 BTCR2 Signed Update 🏷 Beacon Address
πŸ”– 32-byte hash πŸ†” did
🌲 SMT Proof πŸ’¬ channel message
πŸ—Ί CAS Announcement 🧳 Sidecar Data
πŸ“ Unsigned Beacon Signal πŸ“„ resolved DID document
✍ signature 🀝 Aggregation Service
πŸ“¦ CAS

Each color is one data source. Only the cohort gets data from the Aggregation Service. Satoshi gets the SMT Proofs only from the Sidecar Data, because CAS never stores them.

---
title: Data sources
---

%% Each color is one data source. The icons are the same as in data-movement.mmd.

flowchart TD
    classDef chain fill:#fff1dd,stroke:#f7931a,stroke-width:2px,color:#4a2a00
    classDef agg fill:#efe7fb,stroke:#7e57c2,stroke-width:2px,color:#2e1a4f
    classDef sidecar fill:#e3f4e6,stroke:#2e7d32,stroke-width:2px,color:#123d17
    classDef cas fill:#e2eefb,stroke:#1565c0,stroke-width:2px,color:#0b2d55
    classDef actor fill:#f4f4f4,stroke:#555555,color:#111111

    Agg["🀝 Aggregation Service<br/>cohort only<br/><br/>πŸ“ Unsigned Beacon Signals<br/>πŸ—Ί CAS Announcements<br/>🌲 SMT Proofs"]:::agg
    Stu(["Stuart"]):::actor
    Sidecar["🧳 Sidecar Data<br/>private<br/><br/>🧾 updates<br/>πŸ—Ί CAS Announcements<br/>🌲 SMT Proofs"]:::sidecar
    CAS["πŸ“¦ CAS / IPFS<br/>public<br/><br/>🧾 updates<br/>πŸ—Ί CAS Announcements"]:::cas
    Chain["β›“ Bitcoin<br/>public<br/><br/>β›“ Beacon Signals"]:::chain
    Res(["Satoshi's resolver"]):::actor

    Agg --> Stu
    Stu --> Sidecar
    Stu -.-> CAS
    Sidecar --> Res
    CAS -.-> Res
    Chain --> Res

    linkStyle 0 stroke:#7e57c2,stroke-width:2px
    linkStyle 1,3 stroke:#2e7d32,stroke-width:2px
    linkStyle 2,4 stroke:#1565c0,stroke-width:2px
    linkStyle 5 stroke:#f7931a,stroke-width:2px

Source: data-sources.mmd

Stuart rotates a key with an SMT Beacon. For each Beacon Signal, the leaf of Stuart in the SMT has one of three states:

  • βœ“ inclusion: the leaf is hash(hash(nonce) + updateId). Satoshi applies the update.
  • β—‹ non-inclusion: the leaf is hash(hash(nonce)). There is no update.
  • βœ— gibberish: no SMT Proof of Stuart gives the SMT root. The DID is invalid (INVALID_SIGNAL_DATA or MISSING_UPDATE_DATA). With a k-of-n fallback, this can occur if Stuart did not sign.
---
title: Data flow - SMT Beacon, one leaf for each Beacon Signal
config:
  flowchart:
    nodeSpacing: 20
    rankSpacing: 30
---

%% Technical version of the hand sketch "btcr2 data flow visualization".
%% Sketch element β†’ diagram element:
%%   smiley at the left β†’ Stuart; smiley with a top hat at the right β†’ Satoshi
%%   "Agg" with three small faces β†’ Aggregation Service
%%   cloud with a tree, "search by did", "Map" β†’ SMT: the leaf index of a DID is hash(did)
%%   "k/n", "signed? yes" β†’ the cohort signs: all n (n-of-n), or k of n (k-of-n fallback)
%%   tower β†’ SMT Beacon
%%   "Sidecar" stack β†’ Sidecar Data
%%   bar with cells and dots β†’ Bitcoin blocks with Beacon Signals
%%   "Q", "inclusion, non-inclusion, gibberish", tall box with 3 parts β†’ the 3 states of the leaf of Stuart
%%   faces under the bar β†’ the leaf state for each Beacon Signal
%%   stars, papers, "K1" β†’ the update of Stuart (detail on the key rotation page)
%%   crossed-out figure β†’ not used

flowchart TD
    classDef chain fill:#fff1dd,stroke:#f7931a,stroke-width:2px,color:#4a2a00
    classDef agg fill:#efe7fb,stroke:#7e57c2,stroke-width:2px,color:#2e1a4f
    classDef sidecar fill:#e3f4e6,stroke:#2e7d32,stroke-width:2px,color:#123d17
    classDef ok fill:#e3f4e6,stroke:#2e7d32,color:#123d17
    classDef none fill:#f4f4f4,stroke:#777777,color:#333333
    classDef bad fill:#fdecea,stroke:#b3261e,color:#7a1d15

    Stuart(["Stuart<br/>🧾 update: new key"])
    Agg["🀝 Aggregation Service"]:::agg
    SMT@{ shape: cloud, label: "🌲 SMT<br/>leaf at hash(did)" }
    class SMT agg
    Beacon["🏷 SMT Beacon"]:::chain
    Sidecar[("🧳 Sidecar Data")]:::sidecar
    Satoshi(["Satoshi's resolver"])

    subgraph Chain["β›“ Bitcoin blocks"]
      direction LR
      B1["βœ“"]:::ok --- B2["–"]:::none --- B3["βœ“ new key"]:::ok --- B4["β—‹"]:::none --- B5["βœ—"]:::bad
    end

    subgraph Q["Q: the leaf of Stuart"]
      direction TB
      Inclusion["βœ“ inclusion: apply the update"]:::ok
      NonInclusion["β—‹ non-inclusion: no update"]:::none
      Gibberish["βœ— gibberish: DID invalid"]:::bad
      Inclusion ~~~ NonInclusion ~~~ Gibberish
    end

    Stuart -->|"πŸ”– leaf value"| Agg
    Agg --> SMT
    SMT -->|"signed? yes<br/>n of n, or k of n"| Beacon
    Beacon -->|"β›“ SMT root"| Chain
    Stuart -.->|"🧾 update,<br/>🌲 SMT Proofs"| Sidecar
    Sidecar -.-> Satoshi
    Chain --> Satoshi
    Satoshi --> Q

Source: data-flow.mmd