Skip to content

Simplified Blockchain: A Playful Approach

License

Notifications You must be signed in to change notification settings

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.