<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Itoro Ukpong on Medium]]></title>
        <description><![CDATA[Stories by Itoro Ukpong on Medium]]></description>
        <link>https://medium.com/@itoroukpong1?source=rss-5f5dffee94c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MsIJGc7-QnXBs_gE</url>
            <title>Stories by Itoro Ukpong on Medium</title>
            <link>https://medium.com/@itoroukpong1?source=rss-5f5dffee94c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:52:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@itoroukpong1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Compact Block Relay (BIP152)]]></title>
            <link>https://medium.com/@itoroukpong1/compact-block-relay-694db8ac2c07?source=rss-5f5dffee94c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/694db8ac2c07</guid>
            <dc:creator><![CDATA[Itoro Ukpong]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 07:47:24 GMT</pubDate>
            <atom:updated>2024-04-23T07:47:58.242Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*BdA5W5nA7VeZR0mx.png" /><figcaption>Block relay</figcaption></figure><p>In bitcoin, one of the most important things is information propagation across the network. As various nodes power the network and a collection of these nodes serves as a source of truth for people to verify transactions, create blocks, know the next blocks to create, and know if transactions should be added to the next block, it is important that nodes on the network get updated about the current happenings, to avoid performing redundant tasks. Nodes need to be up to date as quickly as possible, for the network to run seamlessly and efficiently.</p><p>Imagine your goal is to create dinner for a family of 10. These 10 people have all gone to work and will be coming back in an hour’s time. To help you not to waste your effort and time, you might want to know which of the 10 family members have already eaten so you can skip making dinner for them. The result of making dinner for all 10 if you do not get an update quick enough of who has eaten and who has not means you will spend time cooking for someone who has already eaten, you might have to dispose the food later when you eventually realize that family member has eaten, you might not complete making food for other family members who have not eaten. One way to find out who has eaten and who has not is to drive down to the various locations of your family members and ask them the question. This might be costly; in terms of effort and time it will take you to reach all 10 locations! A much more efficient way is to make a phone call to each family member and find out who I need to make dinner for. This will improve my timing and make work much more efficient.</p><p>In the same way, as a node who has just mined a block on the network, I want to propagate this block across the network so that every other node can start building on top of this block. Miners who are not aware of this new block will continue building on the previous block, until they eventually get the new block. If the miner completes his block before he gets the new block, there will be competition between his block and the new block, since only one of these can be added to the block chain. This can lead to a block finding race, i.e which ever block has a second block built on it first wins the race. One of the ways to minimize this from happening is to reduce the amount of time it takes to propagate the block across different nodes on the network. This is where compact block relay comes in. It allows us to transfer blocks faster and with less bandwidth.</p><p>Full nodes store unconfirmed transactions in their mempool, these transactions are also relayed to other nodes as well. When these transactions are confirmed in a new block, sending them to a whole block will mean you are sending them transactions of which they already had in their mempool. Instead of doing this, a compact block can be sent. A compact block contains short 6 bytes identifiers for each transaction of which your node can check against to see if it has those transactions in its mempool. If it does, your node can create the same block the peer node had created, instead of peer node sending the entire block. If a transaction from the compact block does not exist in the mempool of your node, it can simply be requested from the peer.</p><p>This is how BIP152 improves the relay of blocks accross the network. Bandwidth of getting a whole block is greatly reduced and the latency of a block being created by the nodes is greatly increased.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=694db8ac2c07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin Transactions vs Bank transactions]]></title>
            <link>https://medium.com/@itoroukpong1/bitcoin-transactions-vs-bank-transactions-b315fa4260b0?source=rss-5f5dffee94c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b315fa4260b0</guid>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Itoro Ukpong]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 07:31:00 GMT</pubDate>
            <atom:updated>2024-04-23T07:31:00.254Z</atom:updated>
            <content:encoded><![CDATA[<p>Bitcoin is a technology that is still new to the world, even more so in some parts of the world. One shared idea that is strongly linked to bitcoin amongst different people, in different parts of the world, different social standing, and professional background is that bitcoin equals money. They are not entirely wrong as money is a big part of what bitcoin is. My favorite definition is found in the Mastering bitcoin book by Andreas M. Antonopoulos and David A. Harding</p><blockquote>“Bitcoin is a collection of concepts and technologies that form the basis of a digital money ecosystem.”</blockquote><p>In this article I would like to talk about what I like to call the backbone of bitcoin: transactions. I will explain what transactions in bitcoin are, how they work and the different types of transactions. Now away from bitcoin, the most common form of transactions we do today are bank transactions. We can send money from one person to another using bank transactions probably from a bank application or going to the bank. Bitcoin transactions also allow us receive money in BTC but in a very different way from what we know from bank transactions.</p><h4>Bitcoin transaction vs bank transaction</h4><p>In a typical banking system, what allows us to know that Alice now owns $20 while bob now owns $80 is that we can see that a deduction was made from bobs account to Alice account. This detail is stored in a database which is controlled by the bank. The bank also allows users to see how much they have in the bank. In bitcoin, you know how much you own by looking at your unspent transaction outputs (UTXOs) these are a set bitcoin your address owns, that can be spent to another bitcoin address. Just like in the banking system, the bank account number is used to receive and send money. Transactions in bitcoin are not stored in traditional databases like in the banks, transactions in bitcoin stored and are visible on the bitcoin block chain network, hence every participant on the network knows whether you own those UTXOs by providing your digital signature when you create a transaction. The blockchain is a collection of blocks linked together each containing all transactions that have ever occurred on the blockchain. In bitcoin, you should think about spending UTXOs as transfer of ownership of the bitcoin you hold to the address you are sending to. i.e. if mr A’s transaction is successfully adds to a block in the blockchain, which was sending 2 btc to mr B, we can say mr B now owns control over the 2 btc.</p><p>Before we go into what an actual bitcoin transaction looks like, below is a simplification of what to expect in a bitcoin transaction. This is a transaction which aims to transfer ownership of 1 btc from his address &lt;123&gt; to another mrs anonymous address &lt;987&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*TsN_Xd-_gVncsammXiPXCg.png" /><figcaption>Simple bitcoin transaction</figcaption></figure><p>1. This shows that he has unspent transaction outputs of 2 btc. This output will be an input to this transaction.</p><p>2. Bob needs to show proof that he owns this UTXOs and he can spend it. The proof here is his digital signature.</p><p>3. An output of 1 btc to send to mrs anonymous is created from Bobs 2 btc making 1btc left.</p><p>4. An output of 0.2 btc is created from bobs 1btc making 0.8 btc left.</p><p>5. A change output is created from the rest as Bob must reclaim his change of 0.8 btc.</p><p>This simplified transaction is broadcasted to the bitcoin network, the transaction is validated by nodes on the bitcoin network to see if the transaction is valid. If it is valid, it is added to a block and eventually added to the blockchain.</p><h4>What a bitcoin transaction looks like</h4><p>Now that we have looked at a simplified version of what a transaction looks like, let’s look at what a real bitcoin transaction looks like. Below is an example of a legacy bitcoin transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*svIp9I1VCYL--nzn4vfKzw.png" /><figcaption>Legacy bitcoin transaction</figcaption></figure><p>Note that most of the values in the transaction are represented in hexadecimal. I will describe what each field in the transaction means.</p><h4>Version</h4><p>This represents the transaction type using a transaction version number. This is used to enable new features based on the transaction version number we assign.</p><h4>InputCount</h4><p>This indicates the number of inputs. In our simplified bitcoin transaction (figure 1) the 2 btc is our only input hence the input count is 1</p><h4>Inputs</h4><p>The input contains the actual information of the utxo you are trying to spend. The information entails the following.</p><p>- <strong>Txid </strong>— This is the transaction ID which has the outputs you want to spend.</p><p>- <strong>Vout </strong>— this is the index number of an output you want to spend. There might be various outputs in the transaction you are spending from, vout helps you select the exact output you want from that transaction.</p><p>- <strong>ScriptSigsize </strong>— this represents the byte size of the scriptsig</p><p>- <strong>Scriptsig </strong>— this is what allows a user to be able to access the outputs from a previous transaction. Every output has a lock on it and to access it, you must provide the appropriate data to unlock it.</p><p>- Sequence — this tells us if a transaction can be replaced or mined.</p><h4>Outputcount</h4><p>The output count is the number of outputs to expect in the upcoming field.</p><h4>Output</h4><p>This contains the details of the amount you are spending, and to whom you are sending that amount to. The information under this field is as follows.</p><p>- <strong>Amount </strong>— this is the value you are sending in satoshis</p><p>- <strong>ScriptPubKeySize </strong>— this is the size in bytes of the scriptpubkey</p><p>- <strong>ScriptPubKey </strong>— this is the locking code for the output of this transaction. This simply means whoever wants to spend the output of this transaction, must provide the right data. This will typically be the one whose address has been used to lock this script. The locking scripts could range from one of the following P2PKH, P2SH, P2WPKH, and P2WSH.</p><h4>Locktime</h4><p>This allows setting of a time or height for when a transaction can be mined. With this field, we can control when a transaction can be picked up and added to a block.</p><p>For a bank, when we want to verify how much you own, we look at the database to view the credit to your name. But in bitcoin, when we want to look at what you own, we look on the blockchain and the transactions that have to do with your address.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b315fa4260b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I know bitcoin, but what the thunder is lightning?]]></title>
            <link>https://medium.com/@itoroukpong1/i-know-bitcoin-but-what-the-thunder-is-lightning-729716d181e6?source=rss-5f5dffee94c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/729716d181e6</guid>
            <category><![CDATA[payments]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Itoro Ukpong]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 21:03:00 GMT</pubDate>
            <atom:updated>2024-02-07T11:13:39.780Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*9WaPAx5uxhV8wuaUeVVlKQ.jpeg" /></figure><p>So, you have a bitcoin node but you have been asked to set up a lightning node as well. In fact you have already set it up. You, like many others, have been wondering why do you need lightning. Fear no more I am here to help.</p><p>You know what a bitcoin node is and what it does for you from verifying transactions, to mining, holding your wallet. First lets focus on the wallet. A bitcoin wallet helps you store, send and receive payments. Then what does lightning do? It also helps you send and receive payments. So, they simply do the same thing, and you can choose to use lightning or bitcoin right? Wrong!</p><p>The lightning network is built as a second layer on the bitcoin network. The bitcoin network as it is now, cannot handle transactions fast enough if billions of people decided to use it for their everyday transactions. Lightning is a scaling solution for the bitcoin network that helps to facilitate smaller transactions almost instantly between users at a lower cost. Imagine if 90% of the population used bitcoin as their payment platform for public transportation systems amongst other everyday payment activities, you might have to wait for hours or even weeks before you can get on a train or access a service. The average transaction time for bitcoin is 10 minutes, so imagine if a lot more people want to use the network. Well, good luck catching that train buddy.</p><p>With lightning, you can make the payment for your train ticket and the transaction will reflect almost instantaneously. How does lightning do this? By using channels.</p><h4>Channels</h4><p>It’s a connection that can be established between two parties which allows the two users to pay one another back and forth as many times as they like, almost instantly with no blockchain fees. To use a channel, it must be opened by one or two users, locking up an amount of sats into an on-chain ‘funding transaction’ that creates a 2 of 2 multi-signature wallet on the Bitcoin network, with each user receiving one of the keys. The channel state will show the amount that a user has contributed, and both parties will sign off accepting that this is correct. The sign off is not broadcasted through the bitcoin network and it has the signature of both users which is passed from person A to B across the lightning network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*JkopLFT56KbC_IhWpYg68w.png" /><figcaption>figure 1: Opening a channel on the lightning network</figcaption></figure><p>A brief description of the figure above</p><ol><li>Peter opens a channel through his lightning wallet with Paul. Then, Peter contributes an amount of 2m Sats into an on-chain funding transaction that creates a 2 of 2 multi-signature wallet on the bitcoin network.</li></ol><p>2. Each user receives one of the keys.</p><blockquote>Developers working with their own nodes.</blockquote><blockquote>If you have built LND from source and bitcoin core and followed a tutorial (of which you may or may not have understood what you were doing 😂) that shows you how to create two LND nodes, create wallets for both nodes, connect the nodes, send funds to one of the nodes and then open a channel, you have just done similar to what is shown figure 1. Congratulations you are both Peter and Paul.</blockquote><blockquote>If you have not seen this tutorial article it’s a good place to practice and get your hands dirty on some lightning stuff. Click <a href="https://medium.com/@bitstein/setting-up-a-bitcoin-lightning-network-test-environment-ab967167594a">Here</a></blockquote><h4>Payments</h4><p>When a payment is made from Peter to Paul, Sats are pushed from one side of the channel to the other. Then, the two parties can sign a bitcoin transaction to reflect the updated channel balance of each. They both get an updated channel balance, so everyone is in sync. The process can be repeated as many times as possible. The transactions will be broadcasted to the bitcoin network when the channel closes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*kzm46_7nWH2UIxm1RGEFRQ.png" /><figcaption>figure 2: Direct payment</figcaption></figure><p>A brief description of the figure above</p><ol><li>Paul creates an invoice and sends it to Peter for his train ticket. The invoice contains the amount Peter has to pay Paul 1m sats.</li><li>Peter inspects the invoice and then initiates a payment. Paul recieves the payment and now has 1m sats. The channel balance is also updated with Peter now having 1m sats and Paul having 1m sats.</li></ol><blockquote>Developers working with their own nodes.</blockquote><blockquote>If you have managed to create an invoice and make a payment, figure 2 is a simplified explanation of what you have done.</blockquote><p>I hope you can see why lightning transactions happen fast. The overhead of going through the regular bitcoin base layer network of mempool, to validation of transactions, to block creation, proof of work, has been moved to a later part of the payment process which is when the channel closes. There are many other concepts to discuss concerning payments on the lightning network: the kind of closures (when channel is closed), and when to use the lightning network are all relevant discussion points that are worth looking into.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=729716d181e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>