itsgoin/crates
Scott Reimers bdcd2142cd feat(fof-layer2): author publish-side build_fof_comment_gating
New crates/core/src/fof.rs module owns the author-side FoF Layer 2
publish path:

- build_fof_comment_gating(storage, author_persona_id): gathers the
  author's keyring (own current V_me + every distinct received V_x),
  generates a fresh CEK + slot_binder_nonce, generates a fresh per-V_x
  (priv_x, pub_x) Ed25519 keypair per real slot, seals each slot, pads
  with random-bytes dummies to the next bucket (min 8, power-of-2 to
  256, +128 above per Layer 3), shuffles real + dummy together, and
  returns the FoFCommentGating wire block + author-local CEK + the
  slot_binder_nonce.

- Dedup at V_x byte level: a key held under multiple owners produces
  exactly one slot.

- next_vouch_batch_bucket promoted to pub(crate) in profile.rs so the
  Layer 2 fof module can reuse the bucket rule from Layer 3.

Three unit tests cover:
- Real-count + padding + roundtrip (Alice's own V_me unlocks her slot;
  Bob's V_x unlocks his slot; both yield same CEK).
- No V_me → returns None (graceful).
- Duplicate V_x bytes across owners are deduped (single slot).

134 → 138 tests pass (no regressions).

Subsequent slices wire this into the post-create path, add the
reader/commenter side, the CDN four-check verification, and the
revocation/access-grant diff handlers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 13:50:56 -04:00
..
cli Network-wide announcements signed by the bootstrap anchor posting id 2026-04-23 01:50:12 -04:00
core feat(fof-layer2): author publish-side build_fof_comment_gating 2026-05-14 13:50:56 -04:00
tauri-app feat(fof-layer1): Tauri commands + frontend UI for vouches 2026-05-13 06:47:18 -04:00