Presentamos Achronyme — un lenguaje para pruebas zero-knowledge. Lee el anuncio arrow_right_alt
La Tri-Arquitectura

Tres maquinas.
Un lenguaje.
Cero confianza.

Tres VMs de bytecode. Akron ejecuta tu codigo. Artik calcula witnesses. Lysis construye el circuito.

$ curl -fsSL https://achrony.me/install.sh | sh
Construido con Rust. Exporta a todo.
.r1cs.wtns.solGroth16PlonK
La Tri-Arquitectura

Conoce las Maquinas

Tres VMs de bytecode. Tres capas del pipeline.

A
Akron La VM de Superficie

Ejecuta Achronyme como lenguaje real. Variables, closures, GC mark-sweep, 40 opcodes. El mismo codigo que pruebas con ach run es el que se compila. Sin brecha de traduccion.

40 opcodes Tagged values Bloques prove {} Interop Circom
A
Artik La VM de Witness

Calcula witnesses donde Circom se estanca. Sin heap, sin GC, aritmetica pura de campo. Corre dentro del backend R1CS para cerrar el gap E212.

25 opcodes Aritmetica de campo Cierre E212 Multi-curva
L
Lysis La VM de Instanciacion

Expande templates a constraints sin explosiones de memoria. Hash-consing colapsa sub-grafos identicos. Convierte expansiones eager de gigabytes en IR optimo.

29 opcodes Hash-consing Loop unrolling Emision de IR
ACH RUN

Modo VM

Un lenguaje de programacion real con closures, recursion, GC mark-sweep, 37 opcodes y 50 metodos de tipo. Construye desde busqueda binaria hasta protocolos criptograficos.

algorithms.ach
VM
// Binary search — full VM mode
fn binary_search(arr, target) {
    mut lo = 0
    mut hi = len(arr) - 1
    while lo <= hi {
        let mid = (lo + hi) / 2
        if arr[mid] == target { return mid }
        if arr[mid] < target {
            lo = mid + 1
        } else {
            hi = mid - 1
        }
    }
    return -1
}

let sorted = [2, 5, 8, 12, 16, 23, 38]
assert(binary_search(sorted, 23) == 5)
terminal
CLI
$ ach circuit vote.ach --inputs "..." --backend r1cs

Compiling vote.ach...
    IR: 18 instructions
    Optimized: 3 eliminated (constant folding + DCE)
    Boolean propagation: 2 proven

R1CS generated:
    Constraints:    2,179
    Public inputs:  4
    Private inputs: 5
    Wrote vote.r1cs (932 bytes)
    Wrote witness.wtns (236 bytes)  verified OK
ACH CIRCUIT

Modo Circuito

La misma sintaxis compila a restricciones R1CS o Plonkish. Propagacion booleana, constant folding y analisis de taint detectan bugs sub-restringidos antes de generar pruebas.

DEPLOY

Verificacion On-Chain

Exporta .r1cs y .wtns para compatibilidad con snarkjs. Genera contratos verificadores en Solidity con --solidity. Despliega y verifica pruebas directamente en Ethereum.

--solidity Groth16 EVM-ready snarkjs-compat
terminal
CLI
$ ach run proof.ach --prove-backend r1cs
Proof generated (Groth16, 855 bytes)
Proof verified — 5 constraints

$ ach circuit proof.ach --solidity Verifier.sol
    Wrote Verifier.sol (Solidity Groth16 verifier)

// Deploy and verify on-chain
commitment.ach
ZK
let secret = 0p12345
let blinding = 0p98765
let commitment = poseidon(secret, blinding)

let proof = prove(commitment: Public) {
    assert_eq(poseidon(secret, blinding), commitment)
}

// proof is a first-class value
let json = proof_json(proof)
assert(verify_proof(proof))
PROVE {}

Pruebas First-Class

Los bloques prove {} retornan objetos de prueba reales. Encadenalos, extrae componentes con proof_json(), verifica inline con verify_proof(). Las pruebas son valores, no artefactos CLI.

prove {} proof_json() verify_proof()
vs Circom

La diferencia

Probar un compromiso Poseidon: Circom + snarkjs vs Achronyme.

Circom + snarkjs
7 pasos, 3 herramientas
// 1. Write the circuit (Circom DSL)
template Commitment() {
    signal input secret;
    signal input blinding;
    signal output cm;
    component h = Poseidon(2);
    h.inputs[0] <== secret;
    h.inputs[1] <== blinding;
    cm <== h.out;
}

// 2. Compile
$ circom commitment.circom --r1cs --wasm

// 3. Witness (JavaScript)
const input = { secret: "12345", blinding: "98765" };
const w = await circuit.calculateWitness(input);

// 4. Powers of Tau
$ wget ptau.hermez.io/powersOfTau28_12.ptau

// 5. Trusted setup
$ snarkjs groth16 setup commitment.r1cs pot.ptau key.zkey
$ snarkjs zkey contribute key.zkey final.zkey

// 6. Prove
$ snarkjs groth16 prove final.zkey witness.wtns proof.json

// 7. Verify
$ snarkjs groth16 verify vkey.json public.json proof.json
Achronyme
6 lineas, 1 archivo
let secret = 0p12345
let blinding = 0p98765
let commitment = poseidon(secret, blinding)

prove(commitment: Public) {
    assert_eq(poseidon(secret, blinding), commitment)
}

// Proof generated + verified (Groth16)
terminal
output
$ ach run commitment.ach

Proof generated (Groth16, 855 bytes)
Proof verified — 361 constraints
2,700+ tests
2 proof backends
50 methods
0 JS deps