Skip to content

How does CEL handle a large, frequently-mutated text field? #233

Closed

Description

@brianorwhatever

Part of #227

Question

How does Originals / CEL handle a large, frequently-mutated text field across events?

Factual groundwork for the sealing decision. Needed:

  • How AssetEnvelope events are structured, and what the size cost per event actually is (the schema comment cites ~1.8KB at genesis, growing per event).
  • Whether CEL supports content hashes / references rather than inline content, so prose can be committed to without being embedded.
  • What did:webvh publishing does to the envelope, and whether the log has a practical size ceiling.
  • Whether anything in the Originals SDK already models a mutable document as opposed to an append-only item log.

Sources: the @originals/sdk package in node_modules, convex/originals.ts, convex/listEnvelopes usage, and the Originals 3.0.0-next.0 upgrade in #223.

Resolve with a /research subagent; capture findings on a throwaway research/cel-mutable-content branch and link them here.

Activity

  1. brianorwhatever commented on Sep 30, 2026

    @brianorwhatever
    ContributorAuthor

    Findings: https://github.com/aviarytech/boop/blob/research/cel-mutable-content/docs/research/cel-mutable-content.md (SDK 3.0.0-next.1 / cel 0.2.0-next.1, measured against the real SDK)

    • CEL events don't hold content, only hashes. An update event is a constant ~720 B (resourceId, previousVersionHash, toHash, toVersion + 1 Ed25519 proof), whatever the document size. Genesis envelope is 1,809 B, so the schema comment's "~1.8KB" is right.
    • The envelope does hold content: every version, inline, never pruned (AssetEnvelope.resources). Growth per sealed version is ~720 B plus the full note. A 20 KB note passes Convex's 1 MiB document limit after ~50 seals (1,048,706 B measured) and reaches 4.1 MB at 200.
    • Hash-only commitment works today. loadAsset accepts resource rows without content as "pure references". Stripping content from old versions or dropping their rows still verifies: 200 versions came to 166–227 KB.
    • The log can't be compacted. The verifier requires events[0] to be create and walks every event (~0.6 ms per event). previousLog chunking is inert. The SDK has no checkpoint or snapshot model, only hash-linked immutable versions.
    • Today boop appends one kind of event: the publish snapshot (recordPublishedVersion). Item edits, renames, and checks produce no events. Publish stays on did:cel; boop never calls publishToWeb.
    • Implication (inferred): sealing every save with inline content won't fit. Seal-on-publish or checkpoints only scale if old content goes hash-only (bytes kept elsewhere, e.g. the bucket + sha256 pattern attachments already use). Every strategy seals only from the device holding the key.
  2. brianorwhatever commented on Sep 30, 2026

    @brianorwhatever
    ContributorAuthor

    Resolved by the findings above (doc). Feeds the sealing decision (#229).

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions