Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/denismurphy/simplified-blockchain
- Owner: denismurphy
- License: mit
- Created: 2023-01-10T12:11:42.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-18T17:02:00.000Z (3 months ago)
- Last Synced: 2024-08-18T18:23:36.375Z (3 months ago)
- Topics: blockchain, cargo, educational, merkle-tree, proof, rust, simplified, toy, transaction, zero-knowledge, zk-rollup, zk-snarks
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.