Skip to content

RFC-0001: MPC Preprocessing Configuration - Implementation #7

@Mikerah

Description

@Mikerah

Overview

Implement program-aware preprocessing configuration as defined in RFC-0001.

Problem

Current hardcoded preprocessing defaults (n_triples=10, n_random_shares=20) are arbitrary and can cause silent runtime failures.

Solution

Automatically analyze compiled bytecode to determine preprocessing requirements:

  • Count MUL instructions → n_triples = mul_count + 2 (safety margin)
  • Apply formula: n_random_shares = 2 + 2 * n_triples
  • Allow explicit override via .with_preprocessing() or CLI flags

Implementation Phases

  1. SDK Changes (stoffel-rust-sdk) - Sub-issue STO-XXX
  2. CLI Changes (Stoffel) - Sub-issue STO-XXX
  3. Documentation (docs) - Sub-issue STO-XXX

Related

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions