Build a Blockchain with Python & FastAPI
Vložit
- čas přidán 6. 09. 2024
- In this video we're going to look at how to build a blockchain using Python and then access it using an API built with FastAPI.
👨💻 Looking for a web developer job, visit: www.webdevjobs...
👽 Discord - / discord
The finished code can be found here:
👾 - github.com/six...
👽 Join the Discord Server (link in the description)
learned a lot of new stuff, fastapi and blockchain concepts were really well coded, awesome tutorial. 😃
Great to hear! Thanks for the comment :)
Thanks for the FastAPI content, subscribed. Don't stop posting new video's related to FastAPI.
Thanks for the comment :). I will be uploading another FastAPI one today and also have some more planned
What a great idea for a series. Keep up the efforts!
Just curious, how many blockchain projects do you have?!
Thank you so much :). As of right now ive just started jumping into solidity so nothing just yet, maybe at some point in the future. May do tutorials on that
@@iamrithmic cool! I’ll look out for them
@@iamrithmic Hey man, take a look in the Cardano Blockchain... It's a blockchain of 3rd generation and very promising;
It's the only blockchain with solid technological and scientifical staff;
Block chain architecture seems surprisingly simple from watching this.
wait till you develop your own virtual machine and make it capable of executing code
Bro what is that u are typing at 0:26?
Your code looks really clean and neat👍
Thank you 😃
Thank you so much 🙂❤
I want ask you
How bitcoin miners and users connect each other to share transactions data ?
using nodes
@@Nobody-eg4bi how this nodes find each other 🤔
@@freepythoncode by using dns seeder, these nodes can find each other
@@freepythoncode dns-seeder
hi Rithmic, thanks for a wonderful sharing with code. I have 2 questions: Q1. Why you do not include the Block hash in the the Block structure?
Q2. When you do Blockchain validation by checking the previous_hash etc, why do you need to do the Proof-of-work again?
The Nounce should be solved once and then the Block hash is generated. We should not need to run POW again - which is a lengthy operation - during verification.
Appreciate your reply. thanks.
I was also wondering, had he not run PoS instead with the hash check function? or am I confused?
I'd love to see someone actually launch a python blockchain, for real, and document it
I think it would make for a really interesting series. I've mostly been curious to see more python-based dapps
I'd love to launch a few daps but have had trouble finding anything beyond hello world (even among paid content)
been working on an open source python blockchain. i have a feeling it would be greeat cause python is so much easier to understand than other languages
Need help
Import "fastapi" could not be resolved Pylance reportMissingImports
what my vscode says in main.py.
very nice video ! which completion tool are you using and theme/fonts as well?
hey Rithmic, very nice video! I hope your chanel grows fast! Wish you the best!
Thank you for such a nice comment!
can you help me, how to implement blockchain p2p network on considering 5 computers using python program
Hey, @rithmic is it an Ethereum blockchain? Can I add a smart contract with it?
This was a really great tutorial on a proof of work blockchain, do you think you could do one on a proof of stake blockchain as well?
I've seen quite a few tutorials on proof of work blockchains (this was the best so far), I've yet to find one on proof of stake.
Your comment brought a smile to my face. I haven’t planned one in the near future, but will note it down to look into. Thank you 😊
@@iamrithmic Your welcome, I know sometimes it's hard to come up with ideas for videos, so I thought to ask hoping you'll make it 🤞🏻
Amazing. Bro.
Really Helped me a lot.
Thanks for the comment man! Glad it was of help
Just curious, what would happen if this blockchain is being mined from different nodes almost at the same time... How reliable would this system be un ensuring that no 2 blocks have the same indexes or it doesnt crash
then this will be a centralized server?
I guess ethereum doesnt have a server like this?
+
WHy do you need previous_proof as an argument for _proof_of_work() function?
In order to create the next proof we also need to previous proof. If in the case that valus of proof-1 changes, then we know that the blockchain is incorrect
@@iamrithmic correct.thank you for the explanation
You don't need the previous NONCE. The previous nonce is part of the previous hash, meaning if it changes the previous hash changes and invalidates the chain.
bro thanks for video. but repsonally I'm confused. there are a lot of information for me :D pls make video about web3 !!!
Great video. I am getting AttributeError: module 'blockchain' has no attribute 'Blockchain' when running the bc = blockchain.Blockchain() do you have something else imported which is not visible in the script?
Cheers
And blockchain actually is being stored on the server?
Good work and Thank You...
More than welcome 😀
Hi can you make more such videos using fast api and block-chain
Will be thinking on more ideas :)
@@iamrithmic thanks, I was thinking something including fastapi, web3.py and solidity would be great
Why are there no advanced professional real world blockchain tutorials out there? No wonder qualified blockchain developers are hard to find, the ones who can really do this without costing their bosses - clients billions of dollars are now getting a million dollars a year plus a boatload of tokens! 🤣😂
Can you please, elaborate on the use and functioning of proof variable?
Is this in regards to the previous_proof or proof?
@@iamrithmic proof variable, I think you are just bypassing the consensus for putting it simple.
♥
How can we store those blocks..?
Can you be my mentor please!!
It will be an honor if someone like you hold me through programming world
Haha thanks for comment, hopefully i can help further through these videos :)