Bitcoin Forum
May 06, 2024, 09:13:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BashCoin - blockchain PoC written in BASH  (Read 78 times)
hazrd (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
February 23, 2018, 03:18:50 PM
 #1

So I got bored... and wrote a simple blockchain implementation in BASH. (Influenced by SHASM, for those who can remember, a BASH Assembly "compiler" a few years back)

What's included:

1. Create a genesis block
2. Use above the chain blocks
3. "Mine" new blocks
4. Output all of this in a small array
5. Difficulty setting is added

What's probably missing:

1. Actual PoW implementation (the implementation I have is basic at best and probably very untidy)
2. Validation of previous blocks
3. Ability to scale
4. A whole bunch more...

If anyone wants to use this opportunity to learn, expand, play and in general just mess around a bit, please feel free to add/comment/PR etc.

Code can be found here: https://github.com/elemantalcode/bash-scripts/blob/master/bashCoin.bash

Edited: fixed some typos
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714986820
Hero Member
*
Offline Offline

Posts: 1714986820

View Profile Personal Message (Offline)

Ignore
1714986820
Reply with quote  #2

1714986820
Report to moderator
1714986820
Hero Member
*
Offline Offline

Posts: 1714986820

View Profile Personal Message (Offline)

Ignore
1714986820
Reply with quote  #2

1714986820
Report to moderator
xiaohang07
Sr. Member
****
Offline Offline

Activity: 392
Merit: 253


Open and Transparent Science Powered By Blockchain


View Profile
February 23, 2018, 03:25:59 PM
 #2

Out of so many price manipulation and altcoins shilling threads, your thread is one of the few high-quality original post out there. Thank you for sharing your code.

hazrd (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
February 23, 2018, 03:26:58 PM
 #3

Thank you!

 Smiley
BitcoinGuruOne
Member
**
Offline Offline

Activity: 364
Merit: 13


View Profile
February 23, 2018, 03:39:04 PM
 #4

wow. it's so uncommon now in this section. actually great post. i would merit this post if i could.
hazrd (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
February 23, 2018, 03:59:49 PM
 #5

Thank you!

Feel free to suggest any tweaks you'd think it would benefit from. I'm busy working on chain validation currently, but any other comments suggestions would be appreciated.
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!