Learn how to write your own Blockchain with JavaScript. In this video I’ll show you what is behind a blockchain by using simple code. It’s not a complete implementation, but enough to understand how blockchains work and how they guarantee that blocks can never be changed.
After creating our blockchain we’ll try and tamper with it. This will demonstrate a blockchains ability to detect fraud.
Next video (implementing proof-of-work):
💰 Want to buy Bitcoin or Ethereum?
Buy for $100 and get $10 free (through my affiliate link):
https://www.coinbase.com/join/59284524822a3d0b19e11134
► Source code
Available on GitHub:
https://github.com/SavjeeTutorials/SavjeeCoin
► About me
🐦 Follow me on Twitter:
Tweets by Savjee
✏️ Check out my blog:
https://www.savjee.be
✉️ Subscribe to newsletter:
https://goo.gl/nueDfz
👍🏻 Like my Facebook page:
https://www.facebook.com/savjee
Original source
25 responses to “Creating a blockchain with Javascript (Blockchain, part 1)”
excellent video
what can I do with this blockchain? when I can use IT ?
Cannot find module 'crypto-js/sha256'
Everyone can make his own Crypto, and its simple as A,B ,C.
for the first time in life i have watched the whole info stuffed youtube video in one go. keep it up man!!
Thank you.great explanation
Extremely simple and well explained amazing.
For me,thats not works. ''cannot read property 'hahs' of undefined.Hash mean of method isChainValid.
this.bullshit = bullshit
That is a varey good tutorial TBH, but I don't think we should even do this in Node, as it runs on a single thread. Mining is a CPU Intensive Process, which blocks the nodeJS event loop
I was writing an article on medium n the same. And I found that my code matches with the code in this video up to 90%, even the variables name. So, probably now I'll skip this idea.
your hash calculation is a bit redundant in the constructor, considering you call the method manually elsewhere in your code.
super explanation thanks
I will now create a decentralised internet using this video as my sole source of instruction.
it's awesome, but what does blockchain need for? what kind of problem can be solved by using it?
if it doesn't work for you at 12.05 , just use toString() ,
For example :
currentBlock.hash.toString() instead of currentBlock.hash
So nicely explained
I'm really scared that JavaScript programmers never learn how to code… you called that "blockchain" for hundred years old fashioned "linked list data structure".
Great video! Thanks!
One question. What if you copied the hash, then change the amount of coins and add the hash to block one? Hashes would be True right? Because every thing you added is Factor ( even timestamp )
Is this any different from a slightly modified linked list data structure?
Nicely explained with simple examples. Thanks
Well explained
what's the development of the using tool in the video?
Great explaining!