Skip to content

docs(rfc): core-resolved public profiles - #1709

Open
corey-hathaway wants to merge 29 commits into
mainfrom
cbh/rfc-core-resolved-public-profiles
Open

corey-hathaway wants to merge 29 commits into
mainfrom
cbh/rfc-core-resolved-public-profiles

Conversation

@corey-hathaway

Copy link
Copy Markdown

RFC: Core-resolved public profiles

Summary

A person's public profile is one dotNS text record, profile, under their own name: a SCALE record of typed entries (avatar as a Bulletin CID with its format, display name, pinned items, feeds). The core resolves it with the walk it already makes for product manifests, fetches the avatar bytes through the host's preimage backend, checks them against the CID, and answers the host with the profile, a definite absence, or a failure. Hosts decode nothing and fetch from no gateway. The call is host-facing only; no product can reach it.

Checklist

  • Added docs/rfcs/core-resolved-public-profiles.md (no number)
  • Summary, Motivation, Approach (the design and its Rust shapes), Trade-offs, Open questions
  • Rust traits: none change; the call is a method on NativeTrUApiHostRuntime, not a product trait. Implementation follows in a separate PR.
  • Label: rfc

Motivation

Contacts are letter tiles because no record a person can publish is read by every host. Seity now writes one under the person's name (seity cbh/profile-envelope, proven on paseo-next-v2 on 26 October). Reading it in the core gives one decoder for iOS, Android and dotli, and keeps avatar fetches off any HTTP gateway, which would otherwise learn which contacts a user looks at. Who may write the record, under which permission and who pays, is deliberately left to a follow-up RFC.

🤖 Generated with Claude Code

A person's public profile is one dotNS text record, `profile`, under their
own name: a SCALE record of typed entries (avatar as a Bulletin CID with its
format, display name, pinned items, feeds). The core resolves it with the
walk it already makes for product manifests, fetches the avatar bytes through
the host's preimage backend, checks them against the CID, and answers the
host with the profile, a definite absence, or a failure. Hosts decode nothing
and fetch from no gateway. The call is host-facing only; no product can reach
it. Who writes the record, under which permission, is left to a separate RFC.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@corey-hathaway
corey-hathaway requested a review from a team October 27, 2026 10:31
@corey-hathaway corey-hathaway added the area:rfc An RFC, or work tracked by one under docs/rfcs label Oct 27, 2026
@github-actions github-actions Bot added the area:docs Touches documentation label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at e61b7e3.

Raw Gzip Brotli
truapi-host 8.40 MiB 5.83 MiB 5.51 MiB
truapi-provider 4.04 MiB 1.27 MiB 961.4 KiB
truapi 7.50 MiB 1.04 MiB 870.7 KiB
trinity-stack 634.2 KiB 247.5 KiB 204.8 KiB
Total 20.56 MiB 8.39 MiB 7.50 MiB

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.29 MiB 1.14 MiB 870.3 KiB
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 4.00 MiB 1.27 MiB 953.6 KiB
trinity-stack/wasm/trinity_stack_bg.wasm 564.4 KiB 230.5 KiB 190.0 KiB

No file changed size.

Commit: c5d3303

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 24 required jobs green, 16 passed and 8 skipped by path filter.

All job results
job result
android-app skipped
android-bindings skipped
bundle-size success
changes success
changeset-guard skipped
cli-package skipped
codegen success
e2e skipped
explorer success
headless-install success
host-wasm success
ios-app skipped
ios-bindings success
licenses success
playground success
provider-android-bindings skipped
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
ts-trinity-stack success
wasm-provider success
workflow-lint skipped

Signing credentials: valid as of 2026-11-03

Commit c5d33034 · run log

…ne collides with Optional

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@TarikGul TarikGul added size:L 100 to 499 lines changed status:waiting-on-review Ready for a reviewer labels Oct 30, 2026
corey-hathaway and others added 2 commits October 30, 2026 13:32
…n<PublicProfile>, _>

Applies the first review:

- The record is Vec<Skippable<ProfileEntry>>, an indexed enum inside a length-prefixed
  wrapper a reader steps over when it cannot decode it. Same bytes as
  frame_support's WrapperKeepOpaque<T>. An index table replaces string kinds, with the
  rule for allocating the next one.
- The host call returns Result<Option<PublicProfile>, PublicProfileError>. The avatar is
  a reference with its bytes optional, so "avatar the core could not fetch" is distinct
  from "no avatar" and a host keeps its copy when Bulletin retention lapses.
- The avatar format stays declared, as the product-manifest RFC requires for an icon.
- The core does no image work; hosts keep and resize the bytes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pgherveou
pgherveou requested a review from a team as a code owner November 2, 2026 14:50
@pgherveou
pgherveou added this pull request to stack #1841 November 2, 2026 17:25
@github-actions github-actions Bot added size:XXL 1000 lines or more; split it, or say in the description why it cannot be and removed size:L 100 to 499 lines changed labels Nov 3, 2026
@pgherveou
pgherveou removed this pull request from stack #1841 November 3, 2026 08:55
@pgherveou
pgherveou changed the base branch from main to pg/alloy-sol-abi November 3, 2026 08:55
@pgherveou
pgherveou added this pull request to stack #1853 November 3, 2026 08:55
Base automatically changed from pg/alloy-sol-abi to main November 3, 2026 12:41
…-public-profiles

# Conflicts:
#	rust/crates/truapi/src/host_logic/dotns_gateway.rs
#	rust/crates/truapi/src/runtime/identity.rs
@github-actions github-actions Bot added size:L 100 to 499 lines changed and removed size:XXL 1000 lines or more; split it, or say in the description why it cannot be labels Nov 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Touches documentation area:rfc An RFC, or work tracked by one under docs/rfcs size:L 100 to 499 lines changed status:waiting-on-review Ready for a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants