Skip to content
This repository was archived by the owner on Dec 13, 2024. It is now read-only.

denismurphy/simplified-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Simplified Blockchain

๐Ÿ”— 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<u8> 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 ZkRollupTransactions 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 file for details.

Languages