-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Overview
Add preprocessing configuration flags to the Stoffel CLI and integrate with automatic program analysis.
Tasks
Step 1: Default Behavior (Program-Aware)
- When
stoffel devcompiles a program, analyze bytecode automatically - Display calculated preprocessing values in output
- Use calculated values by default for MPC execution
Step 2: Override Flags
- Add
--preprocessingflag for presets (minimal/standard/production) - Add
--beaver-triplesflag for explicit triple count - Add
--random-sharesflag for explicit share count - Override flags take precedence over automatic analysis
Step 3: Configuration Persistence
- Extend
MpcConfigstruct with optional preprocessing section - Update
Stoffel.tomlschema to include[mpc.preprocessing] - CLI flags override config file, config file overrides automatic analysis
Step 4: Template Updates
- Update
stoffel inittemplates to NOT specify explicit preprocessing - Add comments explaining automatic behavior
- Show how to override if needed
Files to Modify
src/main.rs(CLI flags, program analysis integration)src/init.rs(config struct, templates)src/templates/rust/main.rs(remove hardcoded values)src/templates/stoffel.toml.template(add preprocessing section)
New CLI Syntax
# Automatic (default)
stoffel dev # Analyzes program, calculates preprocessing
# Using presets
stoffel dev --preprocessing=minimal
stoffel dev --preprocessing=standard
stoffel dev --preprocessing=production
# Explicit values
stoffel dev --beaver-triples=64 --random-shares=130Testing
- Test automatic analysis output display
- Test preset override
- Test explicit flag override
- Test config file loading
Reference
- RFC-0001
- Depends on: STO-377 (SDK bytecode analysis)