Skip to content

Proof-Work Staging Chunk Commitment + Accumulator v1 (TKT-P3-55)

Status: later-research planning freeze (no implementation in this ticket)
Issue: #86
Scope: staged fallback format definition only

1. Purpose

Freeze one canonical chunk-commitment format and one canonical proof-work accumulator format for staged carriage of large verifier artifacts.

This note exists so later implementation tickets can execute deterministically without format drift.

2. Architectural Position + Scope Discipline

This note preserves Model C and does not alter current execution authority:

  • direct self-sovereign spend remains the base path
  • optional aggregation/staged paths are later and non-mandatory
  • no shared global bottleneck is assumed
  • this note does not make staged fallback mandatory for baseline protocol use

This note does not widen current frozen-lane execution scope.

3. Frozen Constraints Applied Here

  • preserve fixed-statement lane semantics
  • no verifier ABI widening in this ticket
  • no protocol redesign in this ticket
  • no confidential state mutation in proof-work staging lane

4. Canonical Chunk Commitment Format (P3D-CCF-v1)

Chunk commitment is computed per chunk with strict ordering and deterministic preimage bytes.

4.1 Preimage layout

chunk_commitment_preimage_v1 (byte concatenation):

  1. tag8 = ASCII("P3DCHNK1")
  2. version_u8 = 0x01
  3. backend_id_u8 (2 for current TRQ1 lane vectors)
  4. profile_id_u8 (3 for TRQ1 profile id in SRQ3 envelope context)
  5. artifact_id32
  6. session_nonce32
  7. chunk_index_u16le
  8. chunk_count_u16le
  9. chunk_len_u16le
  10. chunk_payload_hash32 = HASH256(chunk_payload_bytes)
  11. prev_accumulator32

4.2 Commitment hash

chunk_commitment32 = HASH256(chunk_commitment_preimage_v1)

4.3 Canonical ordering rule

  • chunk_index MUST start at 0.
  • chunk_index MUST be contiguous and strictly increasing by 1.
  • chunk_count MUST be constant across all chunks in a session.

5. Canonical Proof-Work Accumulator Format (P3D-ACC-v1)

Accumulator is updated once per accepted chunk in canonical order.

5.1 Initial accumulator

acc_0 = HASH256(ASCII("P3DACC-INIT") || artifact_id32 || session_nonce32)

5.2 Update preimage

acc_update_preimage_v1 (byte concatenation):

  1. tag8 = ASCII("P3DACCV1")
  2. version_u8 = 0x01
  3. artifact_id32
  4. session_nonce32
  5. chunk_index_u16le
  6. chunk_commitment32
  7. prev_accumulator32

5.3 Update rule

acc_{i+1} = HASH256(acc_update_preimage_v1(i))

final_accumulator32 = acc_n after the last chunk index n-1.

6. Deterministic Reject Rules

Implementations MUST reject at minimum:

  1. missing chunk index in the expected contiguous sequence
  2. duplicate chunk index
  3. out-of-range chunk index (index >= chunk_count)
  4. chunk_count drift between chunks in same session
  5. chunk_len mismatch vs provided payload bytes
  6. chunk_payload_hash32 mismatch
  7. prev_accumulator32 mismatch vs computed prior accumulator
  8. backend/profile mismatch for the targeted staged lane
  9. malformed header/tag/version bytes

7. Staging-Lane State-Mutation Rule (Authoritative)

Proof-work staging transactions MUST NOT mutate confidential state.

Only a designated final commit transition (outside this format note) may attempt confidential state mutation, and it must consume a fully valid finalized accumulator chain.

8. Canonical Format Vectors

Vector file:

  • spec/vectors/proof-work-staging-chunk-accumulator-v1.json

The vector file includes:

  • one canonical 3-chunk session
  • deterministic commitments and accumulator updates
  • reject-case vectors for malformed/duplicate/missing/parity-drift cases

9. Explicit Non-Goals

This ticket does not:

  • implement staged fallback execution
  • define final atomic commit/expiry semantics (tracked separately by #85)
  • define optional aggregation market behavior (tracked separately by #84)
  • change direct-spend baseline authority

10. Acceptance Mapping (#86)

  • Chunk ordering canonical: covered by section 4.3 and reject rules.
  • Missing/duplicate/malformed chunks rejected: covered by section 6 and vectors.
  • Accumulator update deterministic: covered by section 5.
  • No confidential state mutation in staging lane: covered by section 7.