Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/denismurphy/simplified-blockchain

Simplified Blockchain: A Playful Approach
https://github.com/denismurphy/simplified-blockchain

blockchain cargo educational merkle-tree proof rust simplified toy transaction zero-knowledge zk-rollup zk-snarks

Last synced: 8 days ago
JSON representation

Simplified Blockchain: A Playful Approach

Awesome Lists containing this project

README

        

![Simplified Blockchain](https://github.com/denismurphy/simplified-blockchain/blob/main/images/blockchain_vector_images.svg?raw=true)

# 🔗 Simplified Blockchain: A Playful Approach 🎮

This repository contains simplified implementations of a Blockchain, Merkle Tree, Zk-SNARK, and Zk-Rollup.

## 🚀 Getting Started

Simplified implementations use `Vec` for all data and variables to keep things straightforward. Here's what we've got:

### 🔐 Simplified zk-SNARK

Our `zksnark` module includes:
- `ProvingKey` struct
- `VerificationKey` struct
- `create_proof()` function
- `verify_proof()` function

### 🌳 Simplified Merkle Tree

The `merkle_tree` module provides:
- `MerkleTree` struct
- Root calculation
- Leaf inclusion verification

### 🔄 Simplified Zk-RollupTransaction

The `ZkRollupTransaction` struct includes:
- `inputs`, `outputs`, `public_inputs`, `snark_proof`, and `snark_input` fields
- `new()` function for generation
- `verify()` function for verification

### ⛓️ Simplified Blockchain

Our `Blockchain` struct offers:
- Storage of `ZkRollupTransaction`s in a HashMap
- `new()` function for creating a new blockchain instance
- `add_transaction` method for adding new transactions

## 📜 License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.