Shigoto-dev19 / message-batch-validator

A MINA zkApp for batch message processing, ensuring secure storage of the highest valid message number.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mina zkApp: Message Batch Validator

This repository provides the solution for Challenge2 in the Mina Navigator 'Learn-to-Earn' curriculum.

Note: While batch proof verification on-chain is fast, generating the batch proof still requires significant computation off-chain. This makes it less ideal for processing batches of 50-200 messages.

The challenge proposed certain actions to save computation. However, technically, none of the challenge requirements save computation off-chain, as the conditional workflow in a zkapp processes all and selects a condition rather than skipping a condition branch.

How to build

npm run build

How to run tests

  • npm test unit to run the unit tests for message details validation.

  • npm test integration to run the zkapp integration tests.
    Note these tests might take around 5 minutes

  • To run all the tests together:

    npm run test
    npm run testw # watch mode

How to run batch-process simulation

  • npm run process-batch to
    • display zkProgram summary
    • generate valid & invalid messages
    • generate message proofs
    • generate batch proof
    • verify batch proof
    • display highest message number processed

How to run coverage

npm run coverage

License

Apache-2.0

About

A MINA zkApp for batch message processing, ensuring secure storage of the highest valid message number.

License:Apache License 2.0


Languages

Language:TypeScript 91.0%Language:JavaScript 9.0%