Creating Blockchain with Python #6 - Mining смотреть онлайн
Creating Blockchain with Python #6
Mining
today we will learn about the mining process in blockchain ;)
steps:
1. watch previous video
Creating Blockchain with Python #1 - Create a Chain with List
https://youtu.be/3QRwQ4VLdvw
Creating Blockchain with Python #2 - Adding New Transaction
https://youtu.be/cwPaN2N6nYo
Creating Blockchain with Python #3 - Genesis Block
https://youtu.be/IbnO2QLouY8
Creating Blockchain with Python #4 - Hash Function
https://youtu.be/78M86NFy-2s
Creating Blockchain with Python #5 - Validating Proof
https://pin.it/6DNctUu
2. download the code here
https://github.com/cryptocodecg/blockchain-cg/commit/e436abe506bcfc7ec0ceff8a9ab84a88d7e4f30c
how Proof Of Work Protocol works:
* the miners solve cryptographic puzzles to “mine” a block in order to add to the blockchain
* this process requires immense amount of energy and computational usage. the puzzles have been designed in a way which makes it hard and taxing on the system (the puzzle in this case is to find a hash with “00” in the beginning)
* when a miner solves the puzzle, they present their block to the network for verification
* verifying whether the block belongs to the chain or not is an extremely simple process
the mining process:
* extract the last block of the blockchain and put it in last_block
* hash the last block
* use the pow() function to extract the nonce
* create a reward_transaction which awards the miner, i.e., us with the reward amount which we have set earlier (10.0 coins)
* the reward_transaction gets appended to the open_transaction list
* finally, with the new approved nonce, we finally have a new block, which helps us get the metadata of the new block,
* the new block is added to the blockchain
3. now let’s see the code
4. run the code! :)
5. notice that there is a new transaction has been added and the miner has got his reward :)
6. let’s try again
ok now you have your own blockchain system ;) you can modify it to be more complex and realistic :)
next tutorial will be about verifying chain, don’t miss it :)
please click subscribe, like and share and leave some comments :)
thanks for watching :)
references:
https://blockgeeks.com/guides/python-blockchain-2/
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Creating Blockchain with Python #6 - Mining» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.