GithubHelp home page GithubHelp logo

sayeh-1337 / voice_recovery_circuit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sorasuegami/voice_recovery_circuit

0.0 0.0 0.0 58.12 MB

A circuit to verify the voice recovery process.

JavaScript 7.33% Python 13.92% Rust 36.28% TypeScript 4.46% CSS 0.47% HTML 0.88% Solidity 36.66%

voice_recovery_circuit's Introduction

Follow this document to call rust from python https://pyo3.rs/v0.18.3/getting_started

How to rebuild

poetry install
poetry shell
cd voice_recovery_python
maturin develop

Setup

GenParams -> GenKeys -> GenEvmVerifier

見るべきファイルはこちらを参考に

EvmProve {
        /// setup parameter file
        #[arg(short, long, default_value = "./build/params")]
        params_dir: String,
        /// circuit configure file
        #[arg(
            short,
            long,
            default_value = "./eth_voice_recovery/configs/test1_circuit.config"
        )]
        app_circuit_config: String,
        #[arg(
            short,
            long,
            default_value = "./eth_voice_recovery/configs/agg_circuit.config"
        )]
        agg_circuit_config: String,
        /// proving key file path
        #[arg(long, default_value = "./build/pks")]
        pk_dir: String,
        /// input file path
        #[arg(long, default_value = "./build/input.json")]
        input_path: String,
        /// proof file path
        #[arg(long, default_value = "./build/evm_proof.hex")]
        proof_path: String,
        /// public input file path
        #[arg(long, default_value = "./build/evm_public_input.json")]
        public_input_path: String,
    },

Public Inputの中身

pub struct DefaultVoiceRecoverCircuitPublicInput {
    commitment: String,
    commitment_hash: String,
    message: String,
    feature_hash: String,
    message_hash: String,
    // acc: String,
}

Secret Inputの中身

{
    "features": "0x52ad6993e8ed48b87023fa32cb416c49b4e0b87c2c63a8ea8e68818c776d9e7f8efc64a1f3b96e806ec2bc9fb4301ce7c9b47ac29ca143d25ca3b082b8f76c207dcaa671ca4df240d277ffde7d4d37887266e923cc51910039f485823dba94dc02da01bca68bbb7b79695b693341eca4bbd955714e6155d2eb641762a307c2c7e0c021fabb817da4f720f9f9",
    "errors": "0x02000401080080007000040030000110000000000090090010024000000c08008000000000040000000080002000000001c044001800000000080100440100000a00000000004000000000001298a400000049800004900080400000000000000031080110004800200801608410040020000000801000018212000022100000002401160380200080010000",
    "commitment": "0xb577b007bd3c08abfb74aa19c01395a00788c7862913953def64406050c7322ab5a393558c081b143a325c1de06856846f80704900df75be381216f53d7f6651d2557dae5c029b3cc0fbb671f53e11a1745466b4b1d4f39cf52c9e389bfe58796013ee4031816e839041cde2dc8d212ddf488834de1de7164e7f87b0e5ac1af210374da374ca572751247a8a",
    "message": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb9226670997970c51812dc3a010c7d01b50e0d17dc79c8"
}

voice_recovery_circuit's People

Contributors

sorasuegami avatar sheagrief avatar taskooh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.