Implementing Proof-of-Work in Javascript (Blockchain, part 2)

  Рет қаралды 328,611

Simply Explained

Simply Explained

Күн бұрын

Пікірлер: 328
@exo.master
@exo.master 6 жыл бұрын
It is kinda funny how we, software developers with some knowledge about Object Oriented Programming, can understand the concepts very fast when classes are given in OOP. Between .. dear Savjee, your techniques show excellence on teaching, congratulations!!
@jgttech
@jgttech 6 жыл бұрын
So true. I was just saying to a co-worker of mine that I wish everything was explained in OOP, then I could learn physics and anything at that point lol. OOP is how you communicate to a modern developer lol. So freaking true.
@fxstreamer238
@fxstreamer238 3 жыл бұрын
@@jgttech If you dont understand physics you probably wont understand oop
@_jko
@_jko 3 жыл бұрын
This is exactly I came to watch the video. I watched a bunch of other videos that tried to explain the concept, but it generated MORE questions, not less. It's easier to understand things in code, because there are no contingencies. All the ideas, advantages, disadvantages, potential for bug, etc., are all in the code, whereas spoken words are so malleable and leave a lot of room for interpretation.
@jordixboy
@jordixboy 2 жыл бұрын
@@fxstreamer238 what has physics to do with OOP lol. It's just a way to model data, another data structure, nothing more.
@fxstreamer238
@fxstreamer238 2 жыл бұрын
@@jordixboy ask the other guy. he wants to learn physics with oop. you thought you were smart but you just caught off guard didnt you
@jessss7792
@jessss7792 7 жыл бұрын
Another solid video. Please continue this series, I'd love to see part 3!
@elgrimoriodelchamo1017
@elgrimoriodelchamo1017 7 жыл бұрын
Same here. Amazing videos. Greetings from Venezuela, thank you very much Savjee!
@LeandrocBr
@LeandrocBr 7 жыл бұрын
one more here!!
@BFFGamingHD
@BFFGamingHD 7 жыл бұрын
YES, YES AND YEEEEES!
@austinkim1735
@austinkim1735 6 жыл бұрын
one more!
@joaofrutinho
@joaofrutinho 6 жыл бұрын
Epale chamo, yo también estoy en Venezuela, estoy interesado en hacer contacto con otros desarrolladores de aquí, si quieres nos contactamos, yo soy autodiacta. Así que sería genial poder ver en qué podemos ayudarnos.
@drbasavarajans
@drbasavarajans 7 жыл бұрын
And finally I could comprehend what bitcoin is. Thanks for that crisp and neat threadbare tutorial. Thanks. Hats off to your skill of telling.
@fxstreamer238
@fxstreamer238 3 жыл бұрын
congrats now you are 0.0001 % closer to understand btc.
@rishabhsingal9423
@rishabhsingal9423 3 жыл бұрын
I've watched more than 6 hours worth of videos on blockchain but still never understood how it really works. But this 6-minute video quick explains how blockchain works in such an easy-to-understand way! Hats off, thank you!
@xCoKeZx
@xCoKeZx 3 жыл бұрын
I never really understood how blockchains work until now. Apparently all I needed was an illustration in an OOP-way. Thanks a lot!
@waseem_498
@waseem_498 2 жыл бұрын
Thought the same
@cameronm9968
@cameronm9968 6 жыл бұрын
Seriously helpful video man! Seeing it implemented made blockchains so much easier to understand. I finally get why proof-of-work actually works and how it prevents and slows malicious modifications to the chain. Incredible work.
@_jko
@_jko 3 жыл бұрын
Thanks for the video. I watched a bunch of other videos that tried to explain block chain in plain English, but they utterly failed. You started with the basic idea, and improved it as you went on through the video to show how to address potential pitfalls. That was really helpful. None of the other videos do that. They just simply throw a definition at you and hope that you understand it from there.
@JackSparrah
@JackSparrah 3 жыл бұрын
Just starting to learn about blockchain in 2021, and this was super helpful. Seeing it coded live made it so much more clear. Thank you!
@g_pazzini
@g_pazzini 6 жыл бұрын
awesome.... i'm an OOP developer... and i can finally understand blockchain by watching your videos... thanks!
@rum81
@rum81 7 жыл бұрын
Thank you very much for these two videos, i have understood in 15-20 minutes what could not understand after months of blog and videos on block chain
@kkode001
@kkode001 5 жыл бұрын
Very helpful series. Awesome!!! 10 mins of code is better than 10 hrs of talk. Thanks and keep it up.
@vsowill
@vsowill 2 жыл бұрын
It’s wild how relevant this video is in 2022 and it’s 4 years old. 🔥🔥
@therealguanzo
@therealguanzo 3 жыл бұрын
This is so informative for someone that knows nothing about blockchain tech. Thanks!
@fredkilby5535
@fredkilby5535 6 жыл бұрын
Great video in explaining the technical aspects of blockchain and how to parts fit together.
@kp8752
@kp8752 7 жыл бұрын
These videos are fantastic honestly. Also the easiest to understand blockchain intro tutorial
@arsnakehert
@arsnakehert 6 жыл бұрын
Damn, what a brilliant little series! This is so very illustrative! Thank you!
@phillipesmith5401
@phillipesmith5401 3 жыл бұрын
Belittling?
@ankitasaxena5891
@ankitasaxena5891 5 жыл бұрын
This channel has liberated my mind! I repeat 'LIBERATE'!
@jamallucas
@jamallucas 7 жыл бұрын
I finally understood the logic behind blockchain. Great video buddy!!!!!
@ayuthmang
@ayuthmang 5 жыл бұрын
Thank you for explaining block chain and proof-of-work in the easiest way. Hope to see more videos. -)
@jimannothe
@jimannothe 3 жыл бұрын
In the easiest way. though that's subjective
@vprnet
@vprnet 6 жыл бұрын
Surah, you are a very talented instructor!
@LucasAdSantos
@LucasAdSantos Жыл бұрын
I'm a professor watching the playlist from Brazil! Tranks!
@aeonreigh
@aeonreigh 6 жыл бұрын
I love this! way better from the talks I've been to about block chain!!!
@BFFGamingHD
@BFFGamingHD 7 жыл бұрын
Savjee, please continue this series! I love it and I love you
@chrisc9725
@chrisc9725 3 жыл бұрын
Wow man I've just come across your channel, its amazing, thank you.
@DurgaPrasad3496
@DurgaPrasad3496 7 жыл бұрын
This is Awesome. After watching this video i get into better perspective of blockchain. Thank You!
@FreedomForKashmir
@FreedomForKashmir 3 жыл бұрын
I LOVE your videos on blockchain ..... you are the best teacher over the internet You cleared a lot of my concepts
@yohan_aka_spof
@yohan_aka_spof 5 жыл бұрын
Very interesting ! There is just two small bugs: 1) in the constructor of your block you call calculateHash before setting the nonce, which will be then undefined. Overall, I wouldn't call calculateHash in constructor as you will anyway overwrite it inserting it in the chain. 2) in your mining function, you first increment nonce, then you calculate your hash so you will never test the case with nonce = 0
@danilosampaio6493
@danilosampaio6493 2 жыл бұрын
Someone gives an Oscar for this guy! This is simply awesome
@cazino4
@cazino4 4 жыл бұрын
Fantastic video, great to see a practical examples of what a block chain implementation might look like. Thank you.
@lovebajpai5288
@lovebajpai5288 7 жыл бұрын
Great work Savjee!! It simply explains the nonce, difficulty and mining in such an easily understandable way!!! Thank you!!Can you also do something around Valet and how it fits in all this?
@freddie2153
@freddie2153 7 жыл бұрын
Great series so far, easy listen but packed full of info!! Looking forward to more.
@adams1378
@adams1378 7 жыл бұрын
Amazing video dude. Please continue along that path, really interesting !
@saumilkapadia88
@saumilkapadia88 6 жыл бұрын
mind blowing brilliant video and explanation.
@nandusuy
@nandusuy 2 жыл бұрын
Thank you. Learning with you is a comforable experience!
@4by4rusjo44
@4by4rusjo44 6 жыл бұрын
Great stuff mate. Thanks for sharing
@Grkashani
@Grkashani 4 жыл бұрын
you are awsome man !!!!!!!!!!!!! , after many years looking for understanding blockchain I found my answer from you , thank you so much,
@lapsedubstep
@lapsedubstep 6 жыл бұрын
AMAZING video. thankyou! Hope to see part 3 ❤
@jobsphil9553
@jobsphil9553 7 жыл бұрын
Thanks for your sharing.. You are the great.. definitely .
@artofchickens
@artofchickens 6 жыл бұрын
I just recently found your channel. This and your previous video are awesome! I have yet to watch the rest. Thanks so much for such valuable information!
@gilbueno5181
@gilbueno5181 7 жыл бұрын
Make a Part 3 please :)
@RyanHooGeek
@RyanHooGeek 6 жыл бұрын
Really nice video, it explains a lot! Words in the paper of bitcoin were so confusing before I watch this.
@rleevzlno
@rleevzlno 6 жыл бұрын
Awesome content. Thanks for share it
@nouhbelahcen4486
@nouhbelahcen4486 4 жыл бұрын
Really amazing explain, Thank you very much.
@kejoe100
@kejoe100 7 жыл бұрын
Thanks for the videos, I love this kind of series!!! Plz plz make next videos
@yousafhassan8655
@yousafhassan8655 6 жыл бұрын
Thank you so much Sir. The mining concept was very well explained.
@JChengZhang
@JChengZhang 6 жыл бұрын
Explained so simple. Please continue with this!
@phet1574
@phet1574 7 жыл бұрын
Great series! I would love to see the part3 :D
@kejoe100
@kejoe100 7 жыл бұрын
Your way of teaching is really good, very easy ro understand blockchain, its been 2 months u had not uploaded any video on this series, should we expect more videos???
@simplyexplained
@simplyexplained 7 жыл бұрын
Sometime in the future yes. Been busy with the Simply Explained series. Been thinking where I can take this Javascript implementation next.
@kejoe100
@kejoe100 7 жыл бұрын
Thanks Savjee!! Good to here, looking for next videos 😊
@phnxbr
@phnxbr 6 жыл бұрын
Hi! It was a pleasure to watch these videos, really simple comparing to others overсomplicating it. Just keep going.
@jazztwk
@jazztwk 7 жыл бұрын
Great video, really explain clearly in the technical prospective of proof of work, please make more example video
@AnishSingh-st5yl
@AnishSingh-st5yl 5 жыл бұрын
Merci beaucoup Xavier...
@PavonDunbar
@PavonDunbar 6 жыл бұрын
Amazing video. Subscribed. Thank you!
@mikeigoe
@mikeigoe 6 жыл бұрын
Brilliant tutorial, thanks.
@klx450dude
@klx450dude 6 жыл бұрын
greaaat greaaat video! Best explanation so far i found online about blockchain and mining, thank you! Please continue! :D
@simplyexplained
@simplyexplained 6 жыл бұрын
Working on something right now. Will be published after next Explained video 🤐
@maxbruhn8383
@maxbruhn8383 7 жыл бұрын
Very good video. Keep em coming.
@kinershah464
@kinershah464 2 жыл бұрын
Wow that was simple and it seems to be quite effective solution.
@shgazda
@shgazda 6 жыл бұрын
Man, great video! Thanks!!
@techtantrik
@techtantrik 6 жыл бұрын
Well paced lab and very well explained. Thanks!
@j8577798yt
@j8577798yt 6 жыл бұрын
Best explanation on the net !!!
@RaceBook.
@RaceBook. 6 жыл бұрын
Please upload the 3rd part also. great video lecture
@نورمحمد-د7ك2ب
@نورمحمد-د7ك2ب 2 жыл бұрын
my English is not very well but i can understand what you say, this thing not often happened ,about blockchain you do amazing job mashallah 🤩
@ivanche8051
@ivanche8051 3 жыл бұрын
You can also create a string of all zeros of an exact length by using repeat method ‘0’.repeat(difficulty)
@LeandrocBr
@LeandrocBr 7 жыл бұрын
Fantastic!!! I would like see another videos about this...
@munezhans7735
@munezhans7735 5 жыл бұрын
Well done. Thank you
@neerajkulkarni6506
@neerajkulkarni6506 3 жыл бұрын
This is so well explained!
@gabrielmicko4771
@gabrielmicko4771 3 жыл бұрын
Very great, solid video. Thanks
@YogeshPadsala
@YogeshPadsala 6 жыл бұрын
yes this is a great video. thank you
@christopheverdot9075
@christopheverdot9075 6 жыл бұрын
Very nice video, doing a POS instead of POW would also be possible on this javascript Blockchain demonstration ?
@buzonliao
@buzonliao 7 жыл бұрын
Awesome video!
@trungkienle3714
@trungkienle3714 6 жыл бұрын
thank you so much! It really helpful to me
@juancarlosgonzalez9722
@juancarlosgonzalez9722 3 жыл бұрын
Solid explanation my dude. Thank you.
@samueleagostinelli5346
@samueleagostinelli5346 7 жыл бұрын
Loving this
@ruiminti8528
@ruiminti8528 6 жыл бұрын
Nice,Thank you
@Mentaleak
@Mentaleak 6 жыл бұрын
Great Video, Please do another one for Smart Contracts
@JohnWeland
@JohnWeland 7 жыл бұрын
I would love to see a part 3 where there would be a wallet and transactions.
@john-blair
@john-blair 3 жыл бұрын
Great video. Simply Explained. Thanks.
@Raayol
@Raayol 7 жыл бұрын
Thank you!!! You are awesome!!
@FredChevitarese
@FredChevitarese 7 жыл бұрын
Very nice videos. Keep doing this :) Thanks!
@vectorfield
@vectorfield 7 жыл бұрын
Thanks a bunch for this series, this has helped me tremendously in my quest to grasp how blockchains/cryptocurrencies work. One thing I don't understand though is how you would now allow others to make use of this blockchain. Coming from a web background my first instinct tells me that you need to host this somewhere in order for other people to make use of it. However, I've heard a lot about decentralization with regards to this technology so that can't be it. Is this where the Bitcoin protocol / P2P decentralized networks come into play? Also, a video on how to implement your own smart contracts would be awesome as well.
@simplyexplained
@simplyexplained 7 жыл бұрын
Thanks for the kind words! Yes, in order for others to be able to use this blockchain, it would need a P2P network. Each node that has to announce itself on the network and find the longest valid chain available. Once that is found, the node needs to copy the entire chain and then he can start using it. It also needs a broadcast system for new blocks. As soon as a node mined a new block it should broadcast this to the entire network so others can add that block to their own chain and keep the consensus. I'm still thinking about extending this series with more video's (thanks for the smart contract suggestion).
@adldesigner
@adldesigner 7 жыл бұрын
Hey Savjee, keep this series going. I'd love to know how to setup a simple P2P network like that.
@vectorfield
@vectorfield 7 жыл бұрын
Thanks for clearing that up for me, I appreciate it tremendously. Here's another question: What happens when two random nodes successfully mine a block at the same time and then both broadcast it onto the network? How will this algorithm decide which block is the block they should continue the chain with in that situation? Does the losing block get destroyed?
@simplyexplained
@simplyexplained 7 жыл бұрын
Chances of that happening are pretty low. But it can occur. In that case one of the blocks will go around the network faster than the other, and that one will win. The other one is then abandoned and becomes orphaned.
@flamingwoodz
@flamingwoodz 7 жыл бұрын
This video series is awesome
@SafalLamsal
@SafalLamsal 7 жыл бұрын
great video!! part3 smart contracts?
@AmitYadav786
@AmitYadav786 7 жыл бұрын
Another good video !!
@jaikant931
@jaikant931 3 жыл бұрын
Brilliant explanation. cheers
@i6mi6
@i6mi6 7 жыл бұрын
Excellent work!
@saumilkapadia88
@saumilkapadia88 6 жыл бұрын
Is there any next part of this??? Plz plz plz make it if not. With javascript only please
@neethucheriyan1077
@neethucheriyan1077 5 жыл бұрын
sir could you pls explain how can we update the previous hash of a particular block, when the data in the previous block is updated
@mralextacy
@mralextacy 7 жыл бұрын
fantastic! subscribed.
@hadireg
@hadireg 4 жыл бұрын
excellent explanation!!!👍👍
@tobyn6050
@tobyn6050 7 жыл бұрын
Amazing video plz make a wallet with this. Like if you agree.
@BFFGamingHD
@BFFGamingHD 7 жыл бұрын
Yes, yes, and YES! Savjee, good luck ;)
@erik-sandberg
@erik-sandberg 6 жыл бұрын
If it takes a considerable amount of time to calculate a valid hash, how does one quickly verify the whole chain? In the last video, Savjee's isChainValid function calculated the hash for each block, but that would take way too much time, right?
@erik-sandberg
@erik-sandberg 6 жыл бұрын
To make it quick to verify each hash in the chain of blocks, the 'nonce' value must be included in the block's data then, right? Then the none value doesn't need to be guessed when verifying a block that already exists
@footstepparecords
@footstepparecords 3 жыл бұрын
wow.. this is so dope!
@mtiderman
@mtiderman 6 жыл бұрын
outstanding! Thanks
@SvartAdamSolander
@SvartAdamSolander 6 жыл бұрын
Really good video that really explaines it very well! I'm subscribing!
@cheatcode9296
@cheatcode9296 6 жыл бұрын
I am making a blockchain. Its just a concept..(NO ONE TOOK SERIOUSLY) BAAAM BITCOIN
@potterprasant380
@potterprasant380 3 жыл бұрын
Osm... Thank You For This video ❤
@SoubhikSenArts
@SoubhikSenArts Жыл бұрын
The only loophole is that the latest block can be tampered by changing its body and recalculating the hash since the correct hash of the latest block is stored nowhere as there is no successive block. How do you handle this?
@LeifDeJong
@LeifDeJong 7 жыл бұрын
How would one conceivably implement the P2P part of this?
@dipanshunegi9805
@dipanshunegi9805 3 жыл бұрын
Thank you do much sir .. love you for this.
@x2i
@x2i 3 жыл бұрын
As a brit... I still lose it whenever you say nonce... it means a very different thing here in the UK LOL!
@awekeningbro1207
@awekeningbro1207 4 жыл бұрын
what if we used settimeout function for proof-of-work instead?
Mining rewards & transactions - Blockchain in Javascript (part 3)
12:11
Simply Explained
Рет қаралды 191 М.
Creating a blockchain with Javascript (Blockchain, part 1)
14:52
Simply Explained
Рет қаралды 1,2 МЛН
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 84 МЛН
But how does bitcoin actually work?
25:16
3Blue1Brown
Рет қаралды 16 МЛН
Zero Knowledge Proof - ZKP
10:18
Simply Explained
Рет қаралды 189 М.
Proof-of-Stake (vs proof-of-work)
7:59
Simply Explained
Рет қаралды 1,4 МЛН
What is Proof of Work? (Cryptocurrency Explanation)
9:36
Whiteboard Crypto
Рет қаралды 255 М.
Blockchain 101 - Part 2 - Public / Private Keys and Signing
8:54
Anders Brownworth
Рет қаралды 499 М.
Should you still LEARN Java in 2023
8:16
Amigoscode
Рет қаралды 271 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31