Skip to content

Mycelium: per-operator log scoping + witness checkpoint stub (JFA §5)#142

Open
NetworkTheoryAppliedResearchInstitute wants to merge 3 commits into
refactor/economy-net-zero-feefrom
refactor/mycelium-operator-witness
Open

Mycelium: per-operator log scoping + witness checkpoint stub (JFA §5)#142
NetworkTheoryAppliedResearchInstitute wants to merge 3 commits into
refactor/economy-net-zero-feefrom
refactor/mycelium-operator-witness

Conversation

@NetworkTheoryAppliedResearchInstitute

Copy link
Copy Markdown
Collaborator

Makes Mycelium a per-operator log instead of a single global chain (P3-013 §5). There is no global chain and no consensus; cross-operator non-equivocation is by witnessing (§5.1), which remains intended-not-built.

Changes

  • migration 20260709 — add operator_id to mycelium_log + mycelium_anchors; existing single-backend history adopts this node's OPERATOR_ID (env, default agrinet).
  • myceliumServiceoperator_id written on every transmission/anchor; the anchor chain, its tail lock, and verifyChain are scoped per operator; operator_id is bound into the anchor hash so logs can't be spliced.
  • checkpoint(operatorId) — returns a signed-monotonic-checkpoint body { operator_id, tree_size, head_hash } for witnessing. Signing, witness publication, and inclusion proofs are not built (the highest-leverage federation step).
  • specs: §5.1 → Implemented; §5.2 notes the checkpoint stub.

Verification (in-container)

operator_id stored on log + anchor; verifyChain scoped per operator (other operators' chains independent); tamper detected and localized to the altered seq; checkpoint() returns a body with witnessed:false.

Stacked on #141 (economy) — the DB already records that migration. Base is the economy branch for a clean diff; rebase to agrinet-backend after #141 merges. Aligns with the NTARI-RAND/Mycelium reference implementation.

🤖 Generated with Claude Code

…FA §5)

Mycelium is no longer a single global chain — each operator keeps its own
append-only log (P3-013 §5).

- migration 20260709: add operator_id to mycelium_log + mycelium_anchors;
  existing single-backend history adopts this node's OPERATOR_ID.
- myceliumService: operator_id written on every transmission/anchor; the anchor
  chain, its tail lock, and verifyChain are all scoped per operator; operator_id
  is bound into the anchor hash so logs cannot be spliced.
- checkpoint(operatorId): returns a signed-monotonic-checkpoint BODY
  { operator_id, tree_size, head_hash } for witnessing (§5.1). Signing, witness
  publication, and inclusion proofs remain intended-not-built.
- specs: §5.1 marked Implemented; §5.2 notes the checkpoint stub.

Verified: operator_id stored; verifyChain scoped per operator; tamper detected
and localized; checkpoint body returned (witnessed=false). Stacks on the economy
PR (#141); rebase onto agrinet-backend after it merges.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Molded to Janus-Facing Architecture 2026-07-22 (standard check 7):
the living open-questions document naming what remains unresolved,
and a conformance self-description citing invariant IDs from the JFA
conformance suite. Docs only; no code touched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants