Skip to content

CLI network create should eager-provision role-audience epochs #166

Description

@LiranCohen

Follow-up to #162 (PR #165).

With role-audience writes live, every encrypted node write (nodeInfo/endpoint, etc.) requires a published audienceEpoch record for each reading role (network/member, network/node) to exist on the anchor DWN — BuildWriteEncryption fails closed otherwise (matching the SDK; no self-mint).

The admin-dapp provisions these at network creation via agent.dwn.provisionRoleAudienceEpoch (0.8.8). But the Go CLI path (cmd/meshd network create) does not provision them. So a network created purely via the CLI — without going through the dashboard — will fail-closed on encrypted node writes until epochs exist.

Options:

  • Implement a Go-side eager-provision in cmd/meshd network create (mint an audience keypair per reading role, persist the private half, write the public audienceEpoch record — the Go equivalent of provisionRoleAudienceEpoch), or
  • Document/route network creation through the admin-dapp and have the CLI refuse/warn, or
  • Lazily provision on first member/node add (the SDK's member-triggered path already mints on add, but only for the role being added).

Also worth a live smoke test of the node→anchor fetchInstalledProtocolDefinition path (only reachable at runtime).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions