
Build your own blockchain from scratch using Python and Flask, and develop a peer to peer network to run multiple nodes, broadcast blocks and transactions, and handle mining.
This overview covers setting up Visual Studio and a Python environment, building blocks, private/public keys, transactions, memory pool, mining, and a frontend explorer with peer-to-peer networking.
https://github.com/anni1236012/Advanced-Blockchain-Course---Python
Explore how blockchain connects blocks through block hashes, from the genesis block to immutable distributed ledgers, enabling peer-to-peer validation without banks.
Explore how a memory pool holds validated transactions waiting to be included in a block, as miners validate inputs, check unspent status, and verify signatures.
Miners select transactions from the memory pool by fees, prioritizing higher-fee entries, while a one megabyte block holds about 1500 transactions, varying by size, and then chase the proof-of-work puzzle.
Explain how proof of work, a consensus algorithm used by Bitcoin, enables peer-to-peer transactions as miners solve a cryptographic puzzle by changing the nonce to produce a valid block hash.
Explore what a UTXO is by tracing a bitcoin transaction from mining reward to spend, showing how outputs become unspent transactions and form a balance used for future payments.
Explore how double spending threatens digital currencies and how the blockchain verifies transactions to prevent it, including the role of unconfirmed transactions and the 51% attack risk.
A 51% attack happens when a malicious actor controls 51% of mining power to reverse transactions and double spend by building the longest chain.
Use requirements.txt to install all the dependencies for this Project as shown in the video
Understand hash basics and why bitcoin uses sj-256, turning any input into a fixed 32-byte output, where even a tiny change yields a different hash and it remains one-way.
Create a quick blockchain in Python by building block, block header, and blockchain classes, including the genesis block; mine blocks with nonce until four leading zeros, linking via previous hashes.
Implement a disk-based blockchain store with a database module and Blockchain DB class, handling reading, writing, and updating blocks on disk with JSON separation and last-block height/hash.
Unzip the Elleptic Curve Library and copy it as shown in the video.
Create private and public keys, compare compressed and uncompressed keys, and distinguish public key from public address; mainnet public address is user readable, transactions log on public key.
Create a Coinbase transaction by encoding the block height in little endian, deriving hash160 from the miner address, and constructing a pay-to-pubkey-hash script to reward miners with 50.
learn to generate a unique transaction id by serializing coinbase and other transaction inputs and outputs, encoding their counts, and hashing with hash256 to produce the id.
Refactor the blockchain python code to fetch the last block, handle genesis when the chain is empty, and ensure mining resumes from the last mined block instead of zero.
Learn how to create and sign transactions in bitcoin by managing account keys, computing signature hash, signing inputs with a private key, and producing script signatures verified by miners.
Verify a transaction by calculating the signature hash, verifying the input with the script public key, and evaluating a stack-based opcode script for pay-to-public-key-hash verification.
Create a memory pool by sharing a dictionary across processes, where verified transactions wait to be included in a block by miners, and the blockchain reads mempool to assemble blocks.
Learn to move transactions from memory pool into a new block, including the Coinbase transaction first, convert transactions to JSON dictionaries, and prepare the Merkle root for mining.
Learn to build a merkle root from transaction hashes, duplicating the last hash for odd counts, and compute the final root in code.
Remove spent transactions from the UTXO list and memory pool; implement logic to delete spent outputs, preserve remaining ones, handle coinbase versus normal transactions, and test by mining blocks.
Define and implement a function to remove transactions from the memory pool once they are added to a block, by reading and deleting their ids from the mempool.
The lecture defines calculate_fee to compute the fee as input minus outputs from prior transactions, then applies it to the coinbase transaction and updates its id.
Explore how mining difficulty sets a target that changes every two weeks to keep blocks at ten minutes in the Bitcoin blockchain. Learn target, bits, and hash comparison.
Launch a functional blockchain front end by building a home page, blocks, transactions, and mempool views, with a reusable base template, navigation, and search, all in Python.
Build a Flask in Python frontend that reads blockchain data from a file, displays blocks in reverse order, and links to a dynamic block detail page via block hashes.
Create a dynamic block detail page that shows the block header, hash, merkle timestamp, and all transactions, with base58-encoded addresses, inputs, and outputs.
Design a transaction page that lists UTXOs, spends an unspent transaction to send coins, and updates the UTXO set; build a transaction detail view with dynamic routing.
Design and render the memory pool page to display unconfirmed transactions with details and eta, updating as blocks mine and remove confirmed transactions.
Design a bitcoin address page showing the public address, a QR code, the total transaction count, and the unspent balance, reusing the block detail page code.
Implement a search box that auto-detects blocks, transactions, or addresses from user input by length and leading zeros, routes to the right page, and handles invalid identifiers.
Refactor a blockchain app to handle multiple transactions and enable automatic page refresh by adding a refresh parameter and a ten-second refresh interval, focusing on blockchain.
Develop a blockchain explorer by implementing the homepage, block pages, and block detail view, including the memory pool, account page, and a search box for transactions, accounts, or blocks.
Explore building a decentralized, peer-to-peer blockchain where miners join and verify blocks, balance data load, perform proof of work, and run a server to listen for requests.
Configure a multi-miner Bitcoin node with a config file to manage localhost and port numbers, and implement a sync manager that requests blocks via a serialized network envelope.
Implement a connect class to establish socket-based peer connections and manage read and close operations. Handle threading, envelopes, and serialization to request and transfer blockchain blocks and headers between miners.
Serialize blocks, headers, and transactions into network-ready objects, fetch the requested blocks from the blockchain, and transmit the serialized blocks to the requester via a network envelope, signaling completion.
Receive and parse blockchain blocks by implementing parsing functions for blocks, block headers, and transactions in Python, handling read variant and block size, and enabling peer-to-peer data exchange with miners.
Validate each block independently by verifying previous block reference and proof of work, serialize the block, compute and compare the block hash against the target, then add to the chain.
Learn how a local mining node differentiates miners by fixed port numbers, binds ports, and downloads blocks while syncing and updating the node list.
Share the miners list with a newly connected miner to enable a peer-to-peer network where all port numbers are known, using serialized data transmitted alongside blockchain data.
Create a peer-to-peer blockchain network by running a persistent server and a Sync Manager to exchange serialized blocks with new miners, validate them, and update the node list.
As a developer, learning Blockchain is the best investment you can make. I switched careers from Mainframe to Blockchain developer. Learning a new technology can be intimidating, but trust me, if you join me on this journey, you will not be disappointed. Blockchain is currently a popular skill set. According to Glassdoor, the demand for blockchain-based jobs increased by 600 percent between 2020 and 2021. There is a shortage of Blockchain Developers, and companies are willing to pay high salaries.
This is an excellent time to learn blockchain technology. Blockchain will transform every industry, not just finance, over the next ten years. It is a common misconception that blockchain is only used in banking and finance. Although banking and finance are the most talked about industries, Blockchain is also being used in retail, supply chain, healthcare, and other areas. Blockchain applications are limitless.
In this course, you will learn all of the fundamental Blockchain concepts as well as how to create digital currency similar to Bitcoin. There is no prior Blockchain knowledge required. This course was created with Beginner to Advanced Level learners in mind. Learn Blockchain by creating your own coin from scratch, and you will be able to use that knowledge in your company or to start your own Blockchain start-up after completing this course.
This is a comprehensive Blockchain course in which you will spend 99 percent of your time coding the Blockchain. This course emphasizes Project-based learning over theory. After completing this course, you will be capable of creating your own Blockchain with new rules and applying this knowledge in your professional career. This project can also be added to your portfolio and resume.