Evidence and purpose
At public source edce1f779a9d0c9856647873a4d354d2d0ea37d3, signed_message! implements signing_bytes by cloning the complete message, clearing its signature vector and serializing it. sign, digest and verify each call that method. Sending a message serializes again; a teaching frame additionally copies the encoded message behind its tag. Encrypted writes collect pending bytes, create a separately padded record, encrypt to a returned buffer and write it. Unpadding drains a four-byte prefix after truncation, shifting the retained bytes.
This is an inspected call path, not an invented generic optimization: run_once receives/verifies/trains/sends and checks a receipt against update.digest(); coordinator run_round sends base and work-unit frames. It is the experimental Open Humanity coordinator/volunteer protocol using its bounded reference workload, not proof of a deployed 27B/35B inference or distributed training path.
The question is whether one admitted immutable byte representation can serve canonical encoding, digest/signature inputs and bounded transport staging with fewer allocations and copies. Cryptographic computations, privacy gates and consent still apply.
Ownership and deduplication
This is a finite performance experiment in the existing protocol implementation. #31 owns counter exhaustion, session lifecycle and interrupted-I/O semantics and is a correctness dependency for changing transport buffering. #27 owns any trace-publication envelope, #26 consent, and #33 withdrawal/future-use enforcement. Reuse their authoritative contracts; no new protocol, signer, publication channel, collector, ledger or canonical Cortex. Never smuggle trace publication into volunteer updates.
Planning readback checked the open issues and #31 comments; no open Open Humanity PR was returned, and no existing issue owns this allocation/copy experiment. Recheck current source, active claims, PRs and #31 progress before editing shared transport or wire files.
Conditional cost model
Let S be the bytes in cloneable payload vectors and q the number of signature/digest/verification preparations on the same unchanged message. q full clones contribute approximately 2qS logical read/write bytes, before allocation, serialization, cryptography, padding and transport. Reusing one canonical representation can also avoid up to q-1 equivalent encodings when ownership makes the bytes provably immutable. These are conditional source-level counts, not physical DRAM savings or predicted network throughput.
Track at least M_peak = canonical_bytes + queued_bytes + sum(per_session_record_buffers) + decode_scratch, with declared bounds before allocation. Record retained capacity, padding bytes/zeroing, cryptographic passes, copy bytes, bytes on the wire, CPU time and wall time separately. A cached representation is worthwhile only when total measured costs, including retained-memory and invalidation costs, improve.
Signing, hashing and encryption remain distinct algorithms. Do not silently replace Ed25519 with a prehash variant, change the signed transcript or its domain separation, skip any hash, or reuse a ciphertext/nonce between messages, recipients or sessions. Avoiding a copy does not imply avoiding authentication work.
Experiment
- Freeze synthetic valid messages and malformed controls across current permitted sizes, padding boundaries and repeated-operation counts. Preserve exact signed bytes, digests, signatures, frame layout and recipient behavior. Use no private trace, real secret or production key.
- Compare baseline with serialization from a borrowed unsigned view that avoids deep-cloning payload vectors, then with a bounded immutable prepared canonical-message object. A changed field, signature state, owner/recipient scope or relevant consent/revocation state invalidates reuse as appropriate. Check current authorization again at the actual send boundary; a prepared buffer is not permission.
- Compare bounded private transport buffers against the current pending/pad/ciphertext allocations. Preserve record bucket sizes, nonce/counter progression, fresh directional session keys, exact additional authenticated data and #31's partial-I/O terminal/resume contract. No unbounded writes while waiting for flush or a slow peer.
- On receive, evaluate keeping an offset/length view into a private authenticated buffer rather than shifting the plaintext. No consumer can see unauthenticated or stale bytes; failed authentication zeroizes/quarantines scratch according to the existing lifecycle contract. Reuse cannot outlive the borrow or transfer a buffer still in use.
- Report the strongest beneficial variant and no-payoff regimes. Leave defaults unchanged until correctness, bounded-memory and independent measured-performance gates pass.
Acceptance
- Exact interoperability and canonical-byte equivalence for all frozen valid vectors, including signatures and digest inputs. Unknown versions, malformed lengths and over-capacity records refuse before disproportionate allocation.
- Allocation/copy/memory ledger distinguishes static logical estimates from measured cache/DRAM traffic. Include payload size, q, queue/record limits, compiler/source pins, machine and raw results.
- Existing #31 replay, wrong-session/direction, counter exhaustion, interrupted/partial I/O and failure handling tests remain effective. Include mutation of a prepared message, stale borrow, cross-recipient reuse, revocation-before-send, slow-peer/backpressure and buffer-reuse mutants.
- No benefit from weakening privacy padding, discarding authentication, dropping data silently, widening consent, changing output, or omitting required work from timing. No new network deployment is needed; bounded offline loopback/synthetic streams suffice for this phase.
- Final first-party algorithms, production code and owned tests are qualified seeded handwritten
.om, through the existing Omega/compiler/protocol migration owners. Inspect historical Rust/C transiently as immutable migration evidence; do not preserve an additional permanent legacy reference implementation or alternate runtime. Permitted declarative vectors and provenance may be retained. Missing native serialization/crypto/ABI capability is an explicit owning-repository blocker. - Report PASS / FAIL / INCONCLUSIVE / NOT_RUN separately from issue completion. No public listener, actual training, private-data transfer, credit issuance, live Spark service change or automatic publication is part of this issue.
Status at filing: SCOPED / NOT_RUN. Source analysis identified redundant preparation/copy sites; this audit has not measured a speedup.