Bitcoin Mining Fundamentals in Python | Python Bitcoin Tutorial
HTML-код
- Опубликовано: 28 июн 2024
- Learn the fundamentals of Bitcoin mining in Python. We will write code to understand the mining concepts, this will not do the actual Bitcoin mining but give you an understanding of how crypto mining works.
Easy explanation of what is bitcoin: • What is Bitcoin | How ...
Video in Hindi: • Bitcoin Mining Fundame...
🤝 Support my youtube channel by buying a data science, coding 👕 T-shirt: kaaipo.com/collections/coding...
How does one redeem bitcoin reward after producing correct hash? : • How bitcoin miners col...
Code: github.com/codebasics/cool_py...
Cool python apps playlist: • Cool Python Apps
#bitcoin #cryptocurrencies
⭐️ Timestamps ⭐️
00:00 Introduction
00:19 Theory
09:21 Coding
Do you want to learn technology from me? Check codebasics.io/?... for my affordable video courses.
🌎 My Website For Video Courses: codebasics.io/?...
Need help building software or data analytics and AI solutions? My company www.atliq.com/ can help. Click on the Contact button on that website.
#️⃣ Social Media #️⃣
🔗 Discord: / discord
📸 Dhaval's Personal Instagram: / dhavalsays
📸 Instagram: / codebasicshub
🔊 Facebook: / codebasicshub
📱 Twitter: / codebasicshub
📝 Linkedin: / codebasics
❗❗ DISCLAIMER: All opinions expressed in this video are of my own and not that of my employers'.
I want to clarify that this video was to show simple explanation of how core bitcoin mining algo works, to earn actual bitcoin in your wallet you need to integrate mining code with rest of the bitcoin ecosystem. Also you need to have specialized hardware and datacenter with GPUs and ASIC devices that can compute the hash very fast. People run C++ or even assembly code (that is equivalent of the python code shown in this video) to make it faster. Also pending transactions get buffered in a transaction mem pool and miners would get these transactions->mine the valid blocks to add them to a blockchain.
I will be adding more videos covering these topics in future.
To learn AI concepts in a simplified and practical manner check our course "AI for everyone": codebasics.io/courses/ai-for-everyone-your-first-step-towards-ai
when i heard the indian accent, i knew i would be learning something today
@@hamzaseif4992 If you look at his nickname you should probably think that he is black
@@konstantinsolkin487 XDD
I am happy this was helpful to you.
@@hamzaseif4992 Ok racist boi.
@Note Salad He is talking about the guy named ooga booga I think
god bless those indian tutorial guys.
😊👍
Pretty true
True heros🙏🏿
When you have a very specific problem, they're there and has a tutorial out which is super damn nice
🤣🤣🤣👌
me as 13 year old guy trying to mine bitcoin with 2 gb ram and Duo core processor 🤣🤣
solid 25 cents a day if youre lucky
Lol
@@user-hh1ys9hb9o more like .000025 cents
So with 32gb ram i will earn 8$ per day with this code ???
@David Nekeman how much per day U earn ? and what pc do U have ?
Success is about focusing Your energy on what creates results and using what you already know
I pray whoever reads this should become successful. keep l for success. the rich stay rich by spending like the poor and investing why the poor stay poor and be spending like the rich yet not investing. Roar! Invest earn and be successful.
Assets that can make you rich!
I.Crypto
2.Stocks
3.Shores
This is the best way I've seen anyone explain what exactly bitcoin mining is. Great job!
Glad you found it useful
@@codebasics Can you bring a complete video of actual bitcoin mining ⛏️ and GPUs and ASIC ?
Means full info and the cost and time that will taken in 1 bitcoin mining process with electricity cost ? Please 🥺
Me too
Agreed!
shrinke.me/BCHBitcoincash
Indian guys are like the Morgan Freeman of IT. Always there to explain things we don’t get.
I get everything what he is saying but i dont get a Point is there something he sells at the end of the vid
No he is not selling anything. Just telling about his video coming in some weeks
in all my 20 years of education, no one could explain the subject as perfectly as this wonderful guy....simply stunning man
Thanks for your kind words daniel 👍
It takes WAY more than 15 lines of code to write successful mining software. You think parallelism, distributed code, network throughput/latency, cpu cycles, memory usage/latency and many more.
15 lines is good start though, agreed. Thanks for explaining the basics 💪
+1 for taking the time to explain the theory (blockchain). When I'm looking to learn something new I need to understand some concepts before diving straight into code, otherwise I don't remember well
Glad you liked the format of the video.
@@satish8437 its not fake, rlly man. He legit has the check
@@codebasics can u do tutoriel how to make blockchain from scratch in dynamic algorithme whith own her coin
@@codebasics replay on me
@@codebasics so how do i make bitcoin transact the reward to my account?
The lesson. Vegetables are more expensive than medicine.
Wtf man 😂
"Medicus curata, natura sanat"😉
@@nieczerwony very nice.
vegie tables*
@@TazerGames ?
Holy sh*t I never thought it is possible to explain mining in such a simple and concise way. Best explanation I've seen.
this is the best damn tutorial ever. When i heard that accent, I clicked like instantly and continued watching :)
Friends some fraud BOTS are posting in comments below that someone helped them earn bitcoins, guidance on telegram etc. Don't trust on them, they are all frauds. Someone created even youtube account with my logo and posting as well. If someone is telling you that you can earn money easily then that would be a FRAUD for sure.
And you not right ???? LOL
Poor man
Hahaha
Lol
Poor man
THANKS FOR COMMENTING 💯WRITE MY BROKER FRED TAYLOR ON WHAT SAPP TO MAKE GREAT RIO IN BTC He's currently handling my crypto for me and he's making me huge profit turning 2 BTC into 4 BTC in 9 days and making me $400,000 weekly by putting $50,000 indeed am amazed
His what Sapp
+ 1 3. 8. 5. 8. 8. 7. 0. 1. 6. 1💬
Do well to tell him that i reffered you to him, his strategies are top notch, he will help you
I saw the article published in one of the leading news paper in India. Never knew that you are such an amazing guy. Good on you. Stay blessed..
Thanks mirza for your kind words
Perfect video, omg I never have seen an video like it before in youtube, great work!!
I have been looking for something re: Bitcoin for my very young Python students. Your video is the simplest and most accessible I have found, my 12 year old student can understand it. I think the magic is in its concreteness (and the smoothness of your presentation). As simple as it looks, the art of toning down abstraction for the sake of pedagogy is one of the hardest skills for a teacher to master, and it is rare (probably exacerbated by the curse of knowledge). My AI professor (also Indian) was a master of it, and as near as I could tell he was the only one in the department. Great work, and thanks!
Thanks for your kind words of appreciation :)
Kohli -> Dhoni, I know what sport this guy likes.
can I use this for dogecoin if I change the hash?
This dude explains Bitcoin mechanics better than any other channels I’ve seen. Kudos!
Glad it was helpful!
When it comes to the world of investing,most people don't know where to start. Fortunately, great investors of the present and investors of the past can provide us with guidance on how to invest 🙏🙏
Personally as a first time investor, I started trading with Mr George William With $1,000 now my portfolio is worth $5,400 within the space of few months trading with him
A friend that I referred to him from UK just received£9,055 profit after 14days of trading... just jealous asf...lol
My first investment with Mr George William gave me $24,300 and that has made me invest without the fear of losing, I got four of my friends that I referred to him and they are making profit just like me. May God bless Mr George William
I trade with him, The profit are secured and over a 100% return on investment directly sent to your wallet.
you don't make money on cryto by holding your coins rather you trade to make gain
Hello, I'm new to Biticon trade and l've been making huge losses but recently i see a lot of
people earning from it. Please can someone tell me what to do?
@Kelvin Well, you are saying the fact. I invested
$4,000 with Mrs Annabelle Hartfield , and earned $12,000 in 7 working days.
In Bitcoin investment, determination to take risk is one of the major factor required because it takes a
brave heart to make money this days.
Being a newbie in Bitcoin investment and trading is
very discouraging but since I met Mrs Annabelle Hartfield , she has really been careful in handling my investment.
Many people are afraid to be invest because of the Scammers in the business
Yes there are scammers in the business just like it's in every other business but there are also legit brokers out there for investors and Mrs Annabelle Hartfield is one of the real and legit brokers out there.
I couldn't leave without liking this video 😲😲😲😲😲
9/10 for the drain pipe effect burp lmao like it didn't even happen. great video man thank you for the in-depth explanation
Great video. I read my blockchain blogg but this video is lit. Hatss Off.........
9:37 zen meditation mode 😂😂😂
ha ha :) I like zen meditation
I see you are a man of culture as well
it starts 9:48
Him: We will be writing a bitcoin mining code.
Me: Yes this video will make me rich.
but illegally hahah
stonks
Really
@Michael Weis Because in some countries owning, mining and trading bitcoin is illegal
@@100ciafacil7 Bitcoin is not illegal
great job, for someone who has been following Bitcoin since it was created, you make it look like something new.
dude. you are really cool. most bitcoin videos are either for pure amateur or go into unnecessary details right away. thank you for your great video.
That's the best thumbnail I have ever seen in a tutorial video lol.
even tho I didn't really get the coding part, this still gave me lots of knowledge. thanks! 😊😊
Glad I could help!
Very good, high quality with real education. I feel like I learned something after watching. Instead of having more questions.
This was SO informative. Using Python, you explained bitcoin mining so well, it's now easy for me to understand. Good Video!!!
Glad you enjoyed it Theo!
I want to clarify that this video was to show simple explanation of how core bitcoin mining algo works, to earn actual bitcoin in your wallet you need to integrate mining code with rest of the bitcoin ecosystem. Also you need to have specialized hardware and datacenter with GPUs and ASIC devices that can compute the hash very fast. People run C++ or even assembly code (that is equivalent of the python code shown in this video) to make it faster. Also pending transactions get buffered in a transaction mem pool and miners would get these transactions->mine the valid blocks to add them to a blockchain.
I will be adding more videos covering these topics in future.
u forgot to pin this, my friend
how can i sell my hash ?
:)
@@claud5367 it is pinned now. thanks.
Thanks, you explained what I asked about already in a previous comment.
*THANK YOU SO MUCH YOU ARE THE BEST IMMEDIATELYHACKER,TECH* 💗
This is the first explanation of blockchain that made sense.... you made it easily understood... THANK YOU!
Glad it was helpful!
god bless u. i finally understand how it works from it perspective.. guess all the big companies only try to add ledger to their transactions detail and called it sophisticatedly 'blockchain technology'
I wasn't really expecting a lot when I opened this video, and I am pleased to be surprised.
The explanation is simple and -as far as I can tell- correct, so good job with this video!
Thank you to spread knowledge on the internet.
Glad you liked it!
Hello everyone i'm actually looking for a good expert trader that can help me trade and make good profit.....but it's very hard to see trusted one. Any idea?
speaking of forex trading.its the best business in the world right now,I know a couple of friends who make alot of money trading the financial market
you are right forex is profiting if you are using a good forex expert with unending zeal of making profit for his/her client
Trading forex is a good business one can look for trading
Then I will like to introduce you to my expert Mrs Stacy Bill Griffin, have been Investing with her for months now and it's been awesome
If you ask me I think forex has something big for the world but having a good expert to mentor you is the best
love the vid man ! especially the way you explained the bitcoin mining , just wow !
Great little refresher for python coding but with a mining twist! Subscribed and looking at your other vids! Thanks!
Glad it was helpful!
Great explanation with the practical implementation of how actually mining works.
Many thanks for providing this great video.
Really appreciate your effort !!
😊👍
@@jordanwelch6728 I have been trying to get this for decades but I couldn't. I really appreciate your time explaining how this works. In between how do I get a hold on you?
trust me if you want to turn a profit this is not anywhere near practical
know that meme with the lady holding one kid in the pool while the other one was drowning behind her? well that kid is x = - 4 at 2:45
ikr I got so mad because of it lol
This guy is God for me. You made it really easy to understand. Thank you.
I am a programmer from last 7 years and I now know what exactly bitcoin is and how it is working behind the scene lol, very interesting.
Thanks so much for this video! One question: After mining the nonce, who uses that value, and for what purpose?
Awesome video! Waiting for your future videos on blockchain. 😀
Yup at some point I will have full fledge blockchain tutorials series on the channel
Finally, I get what blockchain is... finally...
Thanks for getting the grasp of this subject down to earth for us "the mere mortals"...
Kudos to you...
👍😊
Just found your videos but you are a very good teacher, thank you!
Nice info on bitcoin mining, hope to see more
Great proof of concept. Looking forward to the next video!
😊👍
Cool thanks for the nice explanation! Will now create my botnet to start mining BTC :D
i will come back once i study python, very interested in cypto and mining stuff. In my school we have started doing python so good thing i can watch this later.
Really enjoyed your tutorial ! Learnt something today 😀
Glad it was helpful!
Great introduction to the concept, thanks!
Glad it was helpful!
It's the first time I actually understand this. You're the best bro
This has been the clearest explanation of how the Bitcoin Blockchain works thanks Dhaval! Great tutorial/guide
Glad to hear that Miles!
When I learned programming decades ago, there was this recurring joke that in the future, all programming classes will be some form of 'if you want to do X, all you need to do is call function X'. It's now 2021, and the joke has become real.
2030 will be "hey computer read my mind and write code based on my thoughts"
@@codebasics that will help a noob like me ill wait till it just kdding
The best explaination I have seen, thank you so much.
You're very welcome!
Man i love these indian tutorial guys
keep buying and investing in stocks or crypto,soon Bitcoin will hit $100,000
Btc going to achieve this Target 🎯 🎯 Soon Already hit $73000 🎉 🎉
I’m just here to day to thank you the generosity you have showing we will be forever grateful In my hart thanks you so much sir
I have watched many video's but couldn't understand the concept but this one has broken the ice
@10:42 4bit groups are called nibbles (one hex digit) , just to not use "bit" which is a bit confusing. Thank you for the explanation.
Thanks for simplifying the concept and at the same time teaching us the how to implement coding for a real life example. I however felt that you are using "bitcoin' and " blockchain" terms interchangeably while they are not the same thing.
bitcoin uses blockchain. That's what I meant in the video.
Great video! It was informative and I learned a lot. The example was awesome and I was able to follow along using Python. I really appreciate your efforts.
Glad it was helpful!
Very simple explanation. I wasn't aware about this algorithm before. Now it's more clear for me, thanks a lot for sharing !
😃👍
The best explanation I ever got about BLOCKCHAIN .... THANK YOU SO MUCH
Glad it was helpful!
wow im just amazed the quality of the video crispy clean
The camera quality is really awesome bro.
Woohoo so many bots replied me lol
Excellent tutorial ! Learnt something today 😀
Glad it was helpful!
thanks very much to the author for a good explanation of how the blockchain principle works!
Today I got it ,all these years I wasted my time to know what the exact thing is going on ,
Investing in crypto now is very cool especially with the current rise in the market now
Yes you are right
Thanks for introducing me to Mrs Allen Lisa
People are scared of investing because of the high rate of scam in the business
Making them to remain poor out Of ignorance
There are scammers but there are real brokers waiting for investors out there
New suscriber from Mexico :D
Very good video
Welcome aboard! I've been to Mexico, Cancun. I absolutely loved that trip :)
Golds is good but crypto are better, contact hackerlucas directly on telegram they are the best when it comes to bitcoin flipping 💯 reliable ‘ legit
Hey. Thank you for the very informative video, and for breaking down a complex problem into something that can be more easily understood. I have one question: Is there only one nonce value that can solve each blockchain, and any other nonce is incorrect, even if it gets the same amount of zeros?
Please make a video on Data Mining with Python.🙏
Its interesting to learn how it works and thank you for that. But is useless without the real blockheight, lasthash and difficulty... why not include how to connect to bitcoin core to get that information in realtime via rpc and make a REAL miner. Because at this point, the title is missleading. Educative nontheless, but otherwise incomplete. You could use you awesome and simplified way of explaining to enlight a lot of people. No thumbs down, no negative hate, it is just what I felt. It would've been nice to have all this wrapped in one well explained tutorial.
So u only make a tutorial for us
I watched this, also an explanation from a mathematician on SHA-256, and an advertisement on a bitcoin miner site which they explain what is bitcoin.
truly, right now I am much better understanding it and can confidently explain to others.
I am happy this was helpful to you.
Easiest Explanation I have ever seen.Great Job.
Glad it helped
I absolutely loved the tutorial. Excellent explanation at the beginning. I finally understand what bitcoin mining is. So how would you actually deploy in really life for doing the mining? Would be great to see a tutorial on that. Thank you again, greetings from Mexico.
This video has some (if not all) answers: ruclips.net/video/QAsZgzLPaWU/видео.html
very interesting video, thanks. But if I, for example, could find a very fast way to verify a block and calculate a nounce that generates a string starting with 20 zeros how would I practically close a block of the blockchain manually?
who should I give this string to? or rather ... how can I communicate this nounce to the blockchai that I have verified the block and therefore win the prize for having found the right nounce?
God bless you, such a great way of explaining 🙏🙏
glad you liked it ismail
Super awesome @codebasics .. I was actually trying to understand the concept and your video is what i was looking.
make a video on how to make it run on GPU.
INVESTING IN CRYPTO NOW IS VERY COOL EXPECIALLY WITH THE CURRENT RISE IN THE MARKET NOW.
Most intelligent words I've heard,
Crypto is the new gold,
I'm a huge fan of crypto, I hold some few coins in my wallet.
The rich get wealthier as they trade, the poor remain and get even more poorer because of skepticism and fear of taking risk,
The fruitfulness of your trading lies on the account manager or the expert,
how you write the subtitle for your videos?
Your the only One i ever stood well,
Thank you for the Concise efforts and awesome work.
subscribed !
Bro you are Boss educator!!!!!
4:35 the burp.
How does one redeem bitcoin reward after producing correct hash? Here is the video to answer that question: ruclips.net/video/QAsZgzLPaWU/видео.html
Easy explanation of bitcoin that even a high school student can understand easily: ruclips.net/video/qHlpvKjA-lk/видео.html
How i can publish the hash block?
Hi Dhaval, so how are the confirmed blocks published to the network, and how do they come to an agreement? really easy to understand explanation btw!
So far this the best explanation I have come across about bitcoin mining.
🖕 send a direct message to her and she will assist you in whatever way you need assistance..
I can’t imagine life with your scripts sir 👆👆it worked for me successfully 💯
Thanks Brother... Keep teaching new things ❤️
Its a great help for a noob lyk me in blockchain
4:35 nice
belch and sound like beer... XD
Nice explanation. I was hoping you would show how to get the actual transactions from a bitcoin block into python. Is there a library function that allows you to get a bitcoin block from a node into a python string?
I would like to know what you are telling
@@rishimn2522 This would be for chain analysis. Some of this can be done by using bitcoin-cli, but it would be nice to automate so that as a block is mined, external UTXO databases can be updated where classification can occur similar to the way glass node or other services do on chain analysis.
It's really simple explanation of the mining. Thank you.
Glad you liked it
Thank you code basic I am an 11-year-old and from this tutorial, I have written my own program and now I have a good understanding of bitcoin.
Great. Markas I am happy you are self learning and this video was helpful to you
@@codebasics Thank you so much 👍
Keep going! When I was your age all I did was programming. It ended up saving my life. I went through university and got a good job. I remember the first year of university. It was very hard. Lots of new stuff and my math skills were subpar.
I remember to this day... I took a train north and I was doing calculus. Reading. Writing. Very focused. After about an hour the train halted at a station. The women sitting across from me got up to get out. In passing she said to me: "Never ever ever give up!".
I was surprised and could not say anything. I smiled and never forgot.
Listen to me, I am the woman on that train for you. Keep going. We do things because they are hard, not because they are easy! You will go far in life with that attitude! 👍
Damn bro, that camera quality at start
ha ha... power of sony A6400 with extra sharp lense
Sir please make complete tutorial series on blockchain and bitcoin
yes that is coming up.
You deserve a like & follow man, you've got good didactics. Thank you!
I appreciate that!
Sir I am your big fan. I learnt a lot in your python and pandas tutorial. Will u put a video tutorial on neural cryptography or something that merges the field of both deep learning and cryptography? . It will help us a lot.
The best way to secure a future is to invest, saving up money in a bank account can never make you rich. I recommend a professional broker ms Maria Martinez for those who wish to make profits in trading.
I have been having losses on my trading, please someone should put me to this Ms Maria's investment.
When i started my first trade with Ms Maria, i was scared of scam, but i am glad today that i made that decision of trading with her. Her profit is so unimaginable.
I lost my job due to the Pandemic and life became very difficult for my family, until i saw a post made about Ms Maria's investment. I doubted because of scam but i reluctantly invested with her, and i do not regret investing with her. Thank you ms Maria for bringing joy to my family once again. Please invest with her.
Ms Maria have been the person handling my husband's trade for years now, she is sincere and trustworthy.
Please how do i reach ms Maria?