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.
npm run build
-
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
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
npm run coverage