Bitcoin Forum
November 09, 2024, 02:12:42 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain/Mockchain learning tool  (Read 65 times)
mocacinno (OP)
Legendary
*
Offline Offline

Activity: 3570
Merit: 5233


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
March 06, 2024, 12:36:03 PM
Last edit: March 06, 2024, 02:57:54 PM by mocacinno
Merited by DdmrDdmr (4), dkbit98 (1)
 #1

In the last decade, quite often i tried to explain bitcoin blockchain basics by pulling quick and dirty sample data out of thin air... Making such posts were always quite timeconsuming, but i usually found them worth my effort to teach newbies some blockchain fundamentals.

The last 2 days, i took some time to write a Mockchain learning tool, in case anybody needs it...
This tool basically generates a fake (but valid) random blockchain in CSV format (so human readable) based on some parameters you can enter when running the tool. The chain is placed in the output/blocks folder and shares some (but not all!!!) basic concepts of the bitcoin blockchain. A LOT of technicality's have been omitted, but a lot of the basics ARE covered...

I hope this tool can be used in the future for learning purposes... If you're explaining the ABSOLUTE BASICS of blockchain technology, feel free to download or build this tool and create your own Mockchain for demo and teaching purposes!

For example:
  • How blocks form a chain, using hashing functionality and a header line (but Mockchain hashes the full block, i omitted merkle tree generation due to the higher difficulty)
  • How transactions use inputs and create outputs. How outputs remain unspent untill somebody spends them ONCE.
  • How the person owning the unspent output has to sign the transaction for it to be valid (but Mockchain uses a pgp keypair to achieve this)

Transactions in Mockchain are very simple, unspent outputs are defined by who received them, in which block, which linenumber in this block and the value of the unspent output. A transaction funds the name of the user (eventough his/her public key is added to add some authenticity).


The tool is open source, and might contain bugs!!! if you find a bug, or if you think a certain feature is needed, feel free to fork the repo, fix whatever is bugging you and submit a pull request afterwards.

The repo:
https://github.com/mocacinno/blockchain_learningtool/

Latest automatic build (*nix):
https://github.com/mocacinno/blockchain_learningtool/actions/runs/8171967162


I quickly compiled the code for windows aswell, here's the first release built for linux or windows on x86 platforms. It's still preferable to actually read the code and build the tool yourself tough...

https://github.com/mocacinno/blockchain_learningtool/releases

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!