Giter VIP home page Giter VIP logo

mina-state-proof's Introduction

In-EVM Mina State Verification

Discord Telegram Twitter

This repository contains In-EVM Mina State verification project.

Dependencies

Clone

git clone [email protected]:NilFoundation/mina-state-proof.git
cd mina-state-proof

Install dependency packages

npm i

Compile contracts

npx hardhat compile

Test

npx hardhat test #Execute tests
REPORT_GAS=true npx hardhat test # Test with gas reporting

Deploy

Launch a local-network using the following

npx hardhat node

To deploy to test environment (ex: Ganache)

npx hardhat deploy  --network localhost 

Hardhat re-uses old deployments, to force re-deploy add the --reset flag above

Usage

Below are two tasks that execute flows to validate the ledger state and validate the account state. Please note, these work against the above deployment, hence, you must run the deployment before executing the following.

Validate Ledger State

npx hardhat validate_ledger_state --proof ./test/data/proof_v.data \ 
--ledger jwYPLbRQa4X86tSJs1aTzusf3TNdVTj58oyWJQB132sEGUtKHcB \  
--network localhost

Inputs

  • proof : File path with the full Mina ledger state proof retrieved from proof market.
  • ledger: This is the hash of the ledger which this proof attests.
  • network: Network to run this task against.

Validate Account State

npx hardhat validate_account_state --proof dummyFlag \  
--state ./examples/data/account_data.json \
--ledger jwYPLbRQa4X86tSJs1aTzusf3TNdVTj58oyWJQB132sEGUtKHcB \ 
--network localhost

Inputs

  • proof : File path of the account state proof retrieved from the proof market.
  • state : File path of the account state which the above proof attests to.
  • ledger: Hash of the ledger against which the account state is validated.
  • network: Network to run this task against.

Community

Issue reports are preferred to be done with Github Issues in here: https://github.com/nilfoundation/mina-state-proof/issues.

Forum-alike discussion topics are better to be done with Discussions section in here: https://github.com/NilFoundation/mina-state-proof/discussions

Usage and development questions are preferred to be asked in a Telegram chat: https://t.me/nilfoundation or in Discord (https://discord.gg/KmTAEjbmM3)

mina-state-proof's People

Contributors

307sagar avatar alexandra-mara avatar etatuzova avatar hgedia avatar jayrajrodage avatar luannet avatar nemothenoone avatar nkaskov avatar shatooon avatar sk0m0r0h avatar vitalylativ avatar zerg1996 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mina-state-proof's Issues

[Question] Mina SNARK verification cost on Ethereum

Thanks for your great work and I had fun reading your blogs and playing with the demo. Just a rudimentary question re the demo if I may: it's stated that 'the verification cost on Ethereum is 3.5M gas (0.0035 ETH)'. I'm a bit confused about the 0.0035ETH part, since I thought the actual cost should be 3.5M gas * gas price (138 gWei at the time of this post), so the total cost would be 0.0035*138 = 0.47ETH? Could you clarify this please, thank you very much.

Move testing framework to hardhat from python

Currently, all testing for verifiers is done manually launching cli python scripts/ganache & setting parameters. This issue is to track work related to moving the contracts/frameworks to hardhat.

Mina snapp verification question

Hi,

Very excited to see this great work around evm verification of Mina state come to life. I was wondering if this framework could be applied to evm verification of a Mina snapp (mina smart contract) directly without the proof having to pass through the mina blockchain and into mina state? The reason I would like this is because it could be a way to achieve low latency verification of snapps in evm. Even if this is not necessarily possible with this framework do you know if it is theoretically possible to build something of this nature?

Many thanks.

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.