<?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 Abdullahi Yunus on Medium]]></title>
        <description><![CDATA[Stories by Abdullahi Yunus on Medium]]></description>
        <link>https://medium.com/@abdoollahikbk?source=rss-75f1b736bf14------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RjVd1XqvJ9EznwwroHf-yw.jpeg</url>
            <title>Stories by Abdullahi Yunus on Medium</title>
            <link>https://medium.com/@abdoollahikbk?source=rss-75f1b736bf14------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:03:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abdoollahikbk/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[Guide to Multisig in Bitcoin]]></title>
            <link>https://medium.com/@abdoollahikbk/guide-to-multisig-in-bitcoin-c6167e121c64?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6167e121c64</guid>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Fri, 26 Apr 2024 09:39:22 GMT</pubDate>
            <atom:updated>2024-04-26T09:39:22.583Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bQZv3OYmei98f301n1LAUQ.jpeg" /><figcaption>Not your key not your bitcoin</figcaption></figure><p>Multisig, which is short for multi-signature is a digital signature scheme that requires more than one key to authorize a Bitcoin transaction. Unlike in a standard bitcoin transaction which is secured and authorized by a single private key, a multisig transaction requires multiple signatures before bticoin can be transfered.</p><p>Multisig has a wide range of use cases. It opens up bitcoin to support a variety of innovative products which were not possible before.</p><h4>Multisig Address</h4><p>A multisig address is a type of Bitcoin address that require multiple private keys to sign and authorize a transaction before bitcoin linked to the address can be spent. The address is created using a special script that sets conditions that has to be fulfilled before a transaction can be authorized.</p><p>Example of such condition is a 2-of-3 multisig address which will require a minimum of 2 signatures from the total of 3 signers or keys the address is linked to.</p><h4>Creating a Multisig address</h4><p>The process of creating a Multisig address can be broken down into the following steps:</p><ol><li><strong>Signature requirement</strong>: You first need to decide how many signatures will be required to authorize a transaction and how many potential signers are there in total. This is often refered to as “m-of-n”, where “m” is the number of required signatures to authorize a transaction and “n” is the total number of signers. For example, as mentioned earlier, a 2-of-3 multisig address will require at least 2 signatures out of the 3 signers or keys the address is linked to.</li><li><strong>Public keys</strong>: Each participant will generate a public key. The public keys are derived from the private keys the signers would use to spend bitcoin linked to the multisig address once it’s created. The public keys will be combined to create the multisig address.</li><li><strong>Generating the address: </strong>Using a Bitcoin wallet or any tool with multisig functionality, you input the required number of signatures “m” and the public keys of all participants “n” to create the multisig address. The wallet or tool will use this information to generate a Pay-to-Script-Hash `p2sh` address that implements the conditions set by your m-of-n choice.</li></ol><p>One the address is created, it can be shared with the participants or anyone who wants to send bitcoin to it. Any bitcoin sent to this address will be secured by the multisig conditions you set and can only be spent if those conditions are satisfied.</p><h4>Conducting Transactions</h4><p>To spend bitcoin from the multisig address, a template transaction that spends one of the utxos associated with the multisig address is created. Now this template transaction needs to be signed in a multi-step process since you need the signatures from at least “m” private keys that make up the total “n” signers. The template transaction can be passed around to each participant to verify it and sign until the required signatures are secured, and finally you can broadcast the transaction.</p><h4>Benefits of Multisig</h4><p>There are many benefits of using multisig. For one, it enhances security against private key compromise. In a situation where adversaries want to steal your bitcoin, they’ll need to compromise m-of-n private keys that control the multisig address.</p><p>Additionally, multisig removes single point of failure especially in situations where you loose a private key. If you can provide the required “n” signatures then you still retain access to your bitcoin.</p><p>Furthermore, multisig gives you flexibility over your bitcoin by enabling shared control, cold storage support, reduced risk, and a several ways to build innovation solutions.</p><h4>Limitations of Multisig</h4><p>Multisig has its challenges and limitations. The first challenge is the complexity that comes with using multisig. It is more complex to setup than traditional bitcoin addresses. Managing keys too can be difficult, and coordinating signers can lead to unnecessary delays.</p><h4>Multisig use cases</h4><p>Here are some popular use cases of this multisig:</p><ul><li><strong>Lightning Network</strong>: One of the popular application of multisig is in the lightning network. Lightning network is a layer-2 protocol for the bitcoin network. The lightning network is fundamentally based on multisig, specifically 2-of-2. When two parties wish to open a channel, they create a 2-of-2 multisig address together. This means that for any transaction to be valid, both parties need to sign it.</li><li><strong>Secure Wallets</strong>: One of the primary application of multisig is in making more secured wallets. An adversary would need to compromise not just a single key for the adversary to be able to steal bitcoin stored in a multisig address.</li><li><strong>Escrow services</strong>: Multisig are used to facilitate trustless escrow services. For example, a buyer and a seller can setup a 2-of-3 multisig address and add a 3rd party. In such setup, bitcoin can only be transfered when 2 out of the 3 participants.</li><li><strong>Fedimint</strong>: In Fedimint, guardians are a set of trusted parties that set up a federation and hold the keys to the bitcoin multisig address of the federation.</li></ul><h4>Conclusion</h4><p>Multisig is very useful in bitcoin. It made it possible to build amazing solutions such as the lightning network on top of bitcoin. It gives us a more secured way to control our bitcoin using multiple keys which removes single point of failure. Multisig has some downsides, it’s often more complex to setup than the usual bitcoin addresses.</p><h4>More Reading</h4><ul><li>https://www.bitcoin.com/get-started/how-to-set-up-and-use-shared-multisig-bitcoin-wallet/</li><li>https://bitcoinmagazine.com/guides/what-is-a-multisignature-wallet</li><li>https://en.bitcoin.it/wiki/Multi-signature</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6167e121c64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why do we pay fees for Bitcoin transactions]]></title>
            <link>https://medium.com/@abdoollahikbk/why-do-we-pay-fees-for-bitcoin-transactions-983ebd0afd17?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/983ebd0afd17</guid>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Sun, 21 Apr 2024 11:54:42 GMT</pubDate>
            <atom:updated>2024-04-21T11:54:42.595Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why do we pay transaction fees and who decides how much</h3><p>Bitcoin is an open-source technology and it’s publicly accessible to everyone. Making a transaction is essentially free in bitcoin however getting your transaction included in a block and confirmed is where you pay a little amount of bitcoin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*xy3BubEscdbhTx0MijkAeQ.png" /></figure><p>Transaction fees are a small amount of bitcoin you pay miners to include your transaction in their candidate block. This fee serves a number of purposes: to compensate miners for using their resources to secure the network and to prioritize your transaction, especially during periods of high demand.</p><p>Transaction fees are not fixed, they’re flexible. You can set them low or high. These fees are essentially the difference between the sum of inputs and outputs of your transaction — the remainder is what you pay as a transaction fee. Some wallet software gives you the flexibility to set your transaction fee. The catch here is setting a low fee means your transaction will take a longer time to get confirmed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*poox0nip4dhULTwExbO6oA.png" /><figcaption>Transaction fees are the difference between the sum of inputs and outputs.</figcaption></figure><p>It is important to note, that although it makes sense to be able to set how much you pay miners in form of transaction fees, especially if you’re an advanced user of Bitcoin, but any mistake in doing so could result in having your transaction stuck in the mempool. You could also end up paying a ridiculously high fee like <a href="https://learnmeabitcoin.com/explorer/tx/cc455ae816e6cdafdb58d54e35d4f46d860047458eacf1c7405dc634631c570d">this</a> user, who paid a ridiculous 291.240900 BTC as transaction fee.</p><h4>Transaction selection</h4><p>Since miners aim is to maximize the amount they receive as transaction fees, they look at several factors when selecting transactions to include in their candidate block. These factors include the size of the transaction in bytes, and if the network is congested. Transactions with larger sizes require more space in a block, and since blocks have limited space capacity, larger transactions pay more to cover for space they occupied in a block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*yrFURp--G_cJBrWW1Mp02w.png" /><figcaption>How miners prioritize transactions with better fee</figcaption></figure><p>Miners select transactions by comparing their fee rates. To get the fee rate of a transaction, take its fee (usually an amount in Satoshi) and divide it by the size of the transaction (space it takes up in a block). The unit for fee rate is usually satoshi/vB s/vB. There are other units for expressing fee rates but they’re not as common as s/vB. The fee rate allows miners to compare transactions and select the ones that are more valuable to them.</p><h4>Fee estimation</h4><p>A full node records three pieces of information about a transaction that are essential to estimate a fee. These information include the block height when a transaction is received, the block height when the transaction gets its first confirmation, and the fee rate paid by the transaction. By grouping transactions with similar information, a node can estimate how much fee rate a transaction will pay for it to be confirmed in the next n-blocks.</p><h4>Coinbase transaction</h4><p>The coinbase transaction is the first transaction in a block and is created by miners. It’s a special kind of transaction that collects the block reward for a miner, having successfully found a block, along with the fees paid by transactions that are included in that block. Coinbase transactions are special in the sense that they don’t reference any utxo. When a transaction is processed and included in a block, the fee associated with the transaction is not sent to any specific address, instead, all fees associated with transactions in that block are summed up and added to the block reward. The result becomes the output of the coinbase transaction.</p><h4>Stuck Transactions</h4><p>If you set a low fee on a transaction and there is high demand or the network is congested, chances are miners will ignore your transaction and you will end up waiting for a very long time.</p><p>If this happens, you may want to increase the fee on your transaction while it’s still in the mempool to make it a bit more attractive for miners to include it in their block. This process is called <strong>fee bumping</strong> and can be achieved in two ways:</p><ol><li><strong>Replace By Fee (RBF):</strong> You send another transaction spending the same inputs as the stuck transaction but this time paying a higher transaction fee. Miners will drop the old transaction and replace it with the new one that pays them more. However, you have to enable this in the initial transaction by setting sequence value to <em>0xFFFFFFFD</em> or below. This will signal your intention to the network that you’ll potentially replace the transaction with a more attractive one.</li><li><strong>Child Pay for Parent (CPFP):</strong> You can also create a new transaction that spends at least one of the outputs of your transaction that’s still in the mempool, and set a handsomely large fee which will incentivize miners to include both initial and current transactions in their block.</li></ol><h4>Summary</h4><p>Transaction fees are a significant part of the Bitcoin network and miners are essential pillars that make Bitcoin work. They use specialized hardware and expend their resources to make sure the network stays secure and reliable, and that transactions are confirmed in the Bitcoin network. They need fund to sustain the network and paying transaction fees is a good way to encourage more people to engage in the mining process.</p><h4>More reading</h4><ul><li>https://river.com/learn/how-bitcoin-fees-work/</li><li>https://learnmeabitcoin.com/technical/transaction/fee/</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=983ebd0afd17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unveiling Chain Reorganization in Bitcoin]]></title>
            <link>https://medium.com/@abdoollahikbk/unveiling-chain-reorganization-in-bitcoin-0043dfbf86de?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/0043dfbf86de</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Sun, 24 Mar 2024 16:07:26 GMT</pubDate>
            <atom:updated>2024-03-24T16:07:26.277Z</atom:updated>
            <content:encoded><![CDATA[<h4>Deactivation and reactivation of chain to accommodate a new one with longest chain.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/0*Leh5zIJQScL7XJtl.png" /><figcaption>Credit: <a href="https://learnmeabitcoin.com/diagrams/png/blockchain-chain-reorganisation.png">https://learnmeabitcoin.com/diagrams/png/blockchain-chain-reorganisation.png</a></figcaption></figure><h4>Introduction</h4><p>Bitcoin runs on the blockchain, which is composed of connected blocks that form a chain. A block in bitcoin is a collection of data for transactions that occur within bitcoin over a period of time. Once a block is constructed and validated by nodes, the data it contains is permanently recorded on the blockchain, and therefore cannot be tempered with.</p><p>Chain reorganization, popularly refered to as <strong>chain reorg</strong>, occurs when a node in the bitcoin network comes across a new chain longer than the one it’s active on. A node follows a simple rule, which implies that the longest chain is always the correct one since it took more effort to construct and hence all nodes should adopt it.</p><h4>How does a Chain Reorg Happen?</h4><p>The Bitcoin network is a complex system with rules that define how things should work. One of those rules is how nodes should agree on a chain and the state of the bitcoin network. If there are two or more competing chains, the one that has more blocks, the longest one, is always considered as the true state of the network. This is because more work was done to construct the extra blocks in this chain, and as a result, nodes that are on other chains will deactivate them and adopt the longest one as the true state of the network.</p><h4>Chain Reorg simulation on regtest using Polar.</h4><p>Now let’s see chain reorg in action. We’ll use a local bitcoin node setup to stimulate chain reorg. To do that, we’ll use <strong>Lightning Polar</strong> as it is extremely easy to setup bitcoin nodes.</p><p>We’ll start by creating a network in Polar with three bitcoin nodes. Notice that we set <strong>LND</strong> and other nodes to <strong>zero</strong> since we don’t need them for this stimulation. We named our network <strong>Chain Reorg</strong> just to reflect on what we’re doing — but you can name yours anything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7WqFKwc4ugTORxuj3eTEg.png" /><figcaption>Creating a network in Polar</figcaption></figure><p>After creating a network, a screen with basic information about the network appears in the <em>screenshot </em>below<em>. </em>Let’s leave everything as they’re and click on the Start button and wait for the nodes to start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*V_oaDk3J_gKRbtlBdyNtiw.png" /><figcaption>Created network with 3 bitcoin nodes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*AYjAaBYdb14IhlO4VqabwA.png" /><figcaption>Started network.</figcaption></figure><p>As of this writing, Polar doesn’t let you name nodes, maybe in the future. The nodes are named <strong>backend1</strong>, <strong>backend2</strong>, and <strong>backend3 </strong>(weird right?). Hover over your first node, <strong>backend1</strong> and right click, and then click on Launch Terminal.</p><p>Polar will open a new window with an interactive terminal you can use to run bitcoin commands.</p><p>Generate six blocks (or any number) by running bitcoin-cli -generate 6 in the terminal. It gives an output similar to the one in the picture below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*VtZ06roLto56-vfuNAGIdQ.png" /><figcaption>Generating 6 blocks</figcaption></figure><p>Open the second node’s terminal by following the same steps we followed for the first node and run bitcoin-cli getchaintips. This gives information about the current chain your node is active on. Here we have <strong>height</strong> of our chain (number of blocks mined), the <strong>hash</strong> of the block tip, <strong>branchlen</strong>, and <strong>status</strong> which tells whether or not we’re on this chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*FCUWDdtFxmxqOLHueRGMUA.png" /><figcaption>Showing network chain information</figcaption></figure><p>Now we need to find a way to create competing blocks so we can successfully stimulate chain reorganization in the network. There are several ways to achieve this. One way is to stop some nodes and introduces a competing chain before restarting them. For this exercise, this is what we’ll do.</p><p>We’ll start by stopping <strong>backend1</strong> and <strong>backend3</strong>. You can do this if you click on <strong>backend1</strong> in Polar’s interface, a sidebar appears by the right, go to Actions tab and click on Stop. Do the same for <strong>backend3</strong>.</p><p>Now open the terminal of <strong>backend2</strong> and mine some blocks (I mined seven).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*fJY4funXX92JoeTesvJumw.png" /><figcaption>Generating 7 new blocks</figcaption></figure><p>Now that you’ve mined seven new blocks in <strong>backend2</strong>, restart <strong>backend3</strong> by following the same process you followed to stop the nodes but this time you click one Start.</p><p>After <strong>backend3</strong> is back, run bitcoin-cli getchaintips. This time the <strong>height</strong> will be fourteen. That’s the seven we mined earlier plus the new ones we mined just now after stopping the two nodes. This means that <strong>backend3</strong> automatically re-synced with <strong>backend2</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*AxK42ZIb42B8uAfudrribg.png" /><figcaption>Showing network chain information</figcaption></figure><p>Now that we know <strong>backend2</strong> and <strong>backend3</strong> are in sync, the next step is to stop them both by following the same process we used to stop nodes earlier.</p><p>We then restart <strong>backend1</strong>. It’s is important to make sure that the other two nodes are stopped before <strong>backend1</strong> is restarted. This ensures that <strong>backend1</strong> does not re-sync with the chain the other two nodes are active on.</p><p>Recall that <strong>backend1</strong> was stopped when the chain was at <strong>height</strong> <strong>seven</strong> and since we just brought it back, <strong>backend1</strong> doesn’t know about the new chain with fourteen blocks.</p><p>Now let’s mine new blocks in <strong>backend1</strong> by running bitcoin-cli -generate 24. This will add twenty four new blocks. You can verify the new height by running bitcoin-cli getchaintips.</p><p>Now the fun part — making chain reorg happen!</p><p>Our first node, <strong>backend1</strong> now is on a chain having <strong>31 </strong>blocks. However, <strong>backend2</strong> and <strong>backend3</strong> are on a different chain with <strong>14</strong>. It means, the chain backend1 is active on with height 31 has far more work done on it than the chain (with height 14) that backend2 and backend3 are active on.</p><p>Restarting backend2 and backend3, they’ll discover a competing chain longer than the one they’re active on, and by the bitcoin protocol’s rule, backend2 and backend3 will deactivate their chain which has 14 blocks in favor of the new longest chain with 31 blocks.</p><p>Running bitcoin-cli getchaintips in backend2 will show that the node had deactivated the previous chain and activated the new longest one.</p><p>One interesting thing to note is the oldest (deactivated chain) was mined by backend2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*Auko4t9fDYRZtAT7xF1maA.png" /><figcaption>Showing network chain information</figcaption></figure><p>You can also run bitcoin-cli getchaintips in backend3 to confirm that the node now is active on the new longest chain.</p><h4>Summary</h4><p>Chain reorganizations are part of Bitcoin node’s functions and are normal to the network. They enable nodes across the network to agree on the same version of blockchain as we’ve seen.</p><p>Ideally, the nodes don’t necessary have to go offline before chain reorg can occur. It can happen when the nodes are online if presented with a chain longer than the one, they’re active on.</p><h4>More reading</h4><ul><li><a href="https://learnmeabitcoin.com/technical/blockchain/chain-reorganisation/">https://learnmeabitcoin.com/technical/blockchain/chain-reorganisation/</a></li><li><a href="https://river.com/learn/terms/r/reorganization/">https://river.com/learn/terms/r/reorganization/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0043dfbf86de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking Flexibility: Understanding Output Descriptors in Bitcoin]]></title>
            <link>https://medium.com/@abdoollahikbk/unlocking-flexibility-understanding-output-descriptors-in-bitcoin-f852a7d90a29?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/f852a7d90a29</guid>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 15:03:38 GMT</pubDate>
            <atom:updated>2024-03-01T15:04:53.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMovVUMmjE8_NeRE8lZt0A.jpeg" /><figcaption>Generated with Google Gemini</figcaption></figure><h3>Introduction</h3><p>You may have come across the desc: field in the object returned when you run listunspent or getaddressinfo commands using the bitcoin-cli. The method listunspent basically returns the list of all unspent transactions, the utxos, controlled by your wallet while getaddressinfo returns all the necessary information you need about an address. The desc field tells you about a transaction — giving you information on address used, address type, and more.</p><p>In this article, I’ll walk you through what Descriptors are all about and how it finds its applications in different places.</p><h4>So, what are Descriptors?</h4><p>Output Descriptors are human-readable strings that contain the necessary information needed to spend an output in bitcoin. Basically, output descriptors represent the scriptPubkey and scriptSig in a human-readable format and all the conditions necessary to solve the script. They’re a more flexible as well as expressive way to describe all the complex things going on in a script.</p><p>Descriptors are of various type and each type represent a script type such as pay-to-public-key-hash p2pkh, pay-to-script-hash p2sh, multi-signature multi-sig, and so on.</p><h4>How were things before Descriptors?</h4><p>Before Descriptors, Bitcoin programs traditionally uses a model called Bag of Keys model. In this model, the program — usually a Bitcoin wallet, stores a bunch of keys. These keys are then used to produce different types of output scripts and addresses. These are the usual addresses given to users.</p><p>There are some challenges associated with this approach. For example, the process of tracking transactions and signing them is more manual — especially since there are a variety of scripts. Bitcoin programs or wallets will have to implement individual code to handle the different types of scripts. This makes the process more complex and prone to errors and makes it difficult to handle more advanced scripts like multi-signature multi-sig or pay-to-script-hash p2sh.</p><p>Also, during recovery of a wallet — especially a Hierarchical Deterministic wallet, if the user had only their seed without an output descriptor, they may face challenges that could potentially result in loosing funds because of missing information about derivation paths and other scripts’ details.</p><p>Let’s just say output descriptors have made things extremely simple for bitcoin programs, from tracking transactions and signing them, creating complex transactions, and also makes wallet and fund recovery safer.</p><h4>Now, what are Descriptors made up?</h4><p>Descriptors are composed of several parts; their structure is as follows:</p><p><strong>function([derivation-path]key)#checksum</strong></p><ul><li><strong>Function</strong>: the function that was used to generate the address. It’s descriptive, for example, pkh() means the key is a p2pkh, wsh() for segwit’s p2wsh, and wkh for p2wpkh addresses.</li><li><strong>Derivation</strong>-<strong>path</strong>: this describes the generation of the exported key in a HD wallet.</li><li><strong>Key</strong>: this represents the key that’s being exported. This is usually a public key for an address or a traditional key such as xpub and xpriv keys which are used to create a generation of keys.</li><li><strong>Checksum</strong>: since the Descriptors are designed to be human readable, there’s a need to minimize error copying them. The checksum makes sure of it.</li></ul><h4>Advantages of Descriptors</h4><p>I believe now you have an idea of what output Descriptors are and how they simply several aspects of bitcoin operations, and if asked to mention some of their advantages you’ll be able to do so. Regardless, let’s discuss some advantages.</p><ol><li>Descriptors abstract away the complexity of working with various key types without having to manually doing so yourself.</li><li>Descriptors have checksum attached to them which makes enables error detection. This prevents fund loss due to transcription.</li><li>Descriptors make it easy to backup and recovery wallets.</li></ol><p>Descriptors offer more than the points mentioned above; however, we can limit ourselves to these for this article.</p><p>With all we’ve seen in this article, we can conclude that output descriptors are essential to the bitcoin network. There impacts can be seen in various parts — especially in wallet implementation, transactions, addresses and keys transfer, and more.</p><h4>Shortcomings of the Output Descriptors</h4><p>Although output descriptors offer several benefits for managing output, they also have some limitations. One example is that the main focus of output descriptors is to describe the spending conditions of an output of a transaction. They don’t directly tackle other aspects such as sequence locks or witness data often found in transactions. Additionally, although mentioned earlier that the descriptors are human-readable, they still require some knowledge of bitcoin to fully grasp.</p><p>To conclude this article, Output descriptors make using the bitcoin protocol easy for users by abstracting several technicalities and reducing the likelihood of a user making costly errors and could lead to fund loss.</p><h4>Read more here.</h4><ul><li><a href="https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_5_Understanding_the_Descriptor.md">https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/03_5_Understanding_the_Descriptor.md</a></li><li><a href="https://www.youtube.com/watch?v=xC25NzIjzog">https://www.youtube.com/watch?v=xC25NzIjzog</a></li><li><a href="https://bitcoinops.org/en/topics/output-script-descriptors/">https://bitcoinops.org/en/topics/output-script-descriptors/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f852a7d90a29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How bitcoin  solves the Byzantine Generals Problem]]></title>
            <link>https://medium.com/@abdoollahikbk/how-does-bitcoin-really-solve-the-byzantine-generals-problem-3ce31bf3345b?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ce31bf3345b</guid>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Tue, 30 Jan 2024 14:18:08 GMT</pubDate>
            <atom:updated>2024-02-22T07:05:06.578Z</atom:updated>
            <content:encoded><![CDATA[<h3>How bitcoin solves the Byzantine Generals Problem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OigR8wwZFtpeXAeJICQo8A.jpeg" /><figcaption>Photo by Alesia Kozik: https://www.pexels.com/photo/close-up-photo-of-a-gold-coin-6765363/</figcaption></figure><p>The Byzantine Generals Problem is a popular concept in game theory describing the difficulties of reaching consensus in a distributed computing system.</p><p>Imagine an enemy city with four entries and in an attempt to attack the city, you divide your army into four regiments — each stationed at one side of the city. If the regiments attack collaboratively — at-the-same-time, you will win. But if the regiments attack individually — some charge, some snooze, then you will lose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*HWyCUEmuKkRXhLez.png" /><figcaption>Credit: <a href="https://miro.medium.com/v2/resize:fit:1100/format:webp/1*xJGKNqJVrkFVtZ6NggwHbw.png">https://miro.medium.com/v2/resize:fit:1100/format:webp/1*xJGKNqJVrkFVtZ6NggwHbw.png</a></figcaption></figure><p>If the Generals of each regiment want to reach a consensus on when to attack through a messenger, how can they verify that the messages exchanged are genuine and not the enemy attempting to lure them into attacking individually?. This is what the Byzantine Generals Problem is all about.</p><p>In digital currency, the Byzantine Generals Problem is the challenge of reaching consensus on the state of the blockchain. Blockchain is a public and digital ledger that is stored within a distributed network of nodes. Blockchain is decentralized — meaning it has no central authority.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*z-CbL-TAXmUmtDjHsh97Ag.jpeg" /><figcaption>A pictorial representation of the blockchain network. Photo credit: <a href="https://online.stanford.edu/sites/default/files/inline-images/1600X900-How-does-blockchain-work.jpg">https://online.stanford.edu/sites/default/files/inline-images/1600X900-How-does-blockchain-work.jpg</a></figcaption></figure><p>Bitcoin works as peer-to-peer, distributed, and decentralized network of nodes, which collaborate to make sure the system remains reliable and secured. Imagine Bitcoin as a large spreadsheet visible and accessible to all participants in the network. Every time someone spends some Bitcoin, it gets written down for all to witness.</p><p>For Bitcoin to function effectively, it must address the Byzantine Generals Problem. This means consensus needs to be reached among all participating nodes before transactions are considered valid or not, all without relying on trust. Bitcoin’s solution to this problem is the by leveraging a consensus mechanism known as <strong>Proof of Work (PoW)</strong>.</p><p>Proof of Work operates on the basis of computational puzzle which requires the network participants, popularly known as “miners”, to use their resources to validate transactions and add new blocks to the blockchain network. Miners in this case, compete to solve some complex mathematical puzzles. The first miner to find a valid solution earns the right to add a new block to the network and receive incentives in form of newly created bitcoins for carrying out the work.</p><p>Miners validate transactions by utilizing historical information on the network to check that the necessary account balances that made up a transaction are available. If they encounter a transaction that appears contradictory to the existing data, they have the power to reject it.</p><p>The Proof of Work requires a significant amount of computing effort from miners. Its primary goal is to stop malicious actors from compromising the network, while making it a fair and decentralized process for adding new blocks to the blockchain. By leveraging Proof of Work, Bitcoin ensures that all miners agree on the transactions’ validity before they’re added to the blockchain.</p><p>By combining the public ledger nature — the blockchain with clever puzzles and a bit of competition to verify and add a transaction — called mining, Bitcoin creates a system where everyone, even under suspicion, can agree on the truth of a transaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ce31bf3345b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Ingestion: Bringing the Data  to Life]]></title>
            <link>https://medium.com/@abdoollahikbk/data-ingestion-bringing-the-data-to-life-cdea5e2c346b?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdea5e2c346b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Sat, 17 Jun 2023 14:13:37 GMT</pubDate>
            <atom:updated>2023-06-17T14:14:59.148Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Engineering 101: Data Ingestion</h3><p>Hey, data enthusiasts! Welcome back to our exciting data engineering series. In my last article, we laid the foundation by introducing you to the captivating world of data engineering. Today, we’re going to dive into the first step of the data journey: <strong>data ingestion</strong>. So let’s begin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h-sjq8DsN-vZjcXr5-HC9Q.jpeg" /><figcaption><a href="https://www.freepik.com/free-vector/data-center_5039056.htm#query=database&amp;position=11&amp;from_view=search&amp;track=sph">https://www.freepik.com/free-vector/data-center_5039056.htm#query=database&amp;position=11&amp;from_view=search&amp;track=sph</a></figcaption></figure><p>So, what exactly is <strong>data ingestion</strong>?</p><p>Imagine it as the process of inviting your data into your workstation. It’s all about gathering and capturing data from various sources and bringing it into our data systems, where the real magic happens.</p><p>Data ingestion can be a batch or real-time affair. Batch ingestion involves collecting data in chunks or batches at specific intervals. On the other hand, real-time ingestion involves collecting data at the instance they are generated.</p><p>Now, let’s talk about some common data ingestion techniques and tools.</p><p>Conventionally, data is sourced and processed through a series of steps. This typically involves extracting data from various file formats such as CSV, JSON, or XML, and subsequently importing it into your data systems.</p><p>In addition, there are innovative and cutting-edge methods available today, such as message queues and streaming platforms. Imagine message queues as virtual post offices that enable you to receive data messages in real-time, ensuring timely and efficient data flow. On the other hand, streaming platforms provide the capability to ingest data as it occurs, allowing you to capture and process information in a continuous and seamless manner. These modern approaches empower businesses with enhanced real-time data processing capabilities.</p><p>When it comes to tools, you have a river of options to choose from. Apache Kafka, for example, is a popular choice for real-time data ingestion and messaging. It ensures that your data arrives in an orderly fashion. For batch ingestion, tools like Apache Nifi or AWS Glue can help you effortlessly gather and transform your data.</p><p>In conclusion, data ingestion is a crucial component of the overall data ecosystem. It is how you get data to where it is processed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdea5e2c346b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Engineering  101: A Gentle Introduction]]></title>
            <link>https://medium.com/@abdoollahikbk/data-engineering-101-a-gentle-intro-8a501e194bb1?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a501e194bb1</guid>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Mon, 05 Jun 2023 15:45:12 GMT</pubDate>
            <atom:updated>2023-06-05T19:56:40.728Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Engineering 101: A Gentle Introduction</h3><p>Howdy, data enthusiasts! Welcome to the introduction to data engineering. This post is here to help you grasp the fundamentals of data engineering. So, let’s go all in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XUnOXFRpL7MT3fTriS3Vjw.jpeg" /><figcaption>Source: Freepik<a href="http://&lt;a href=&quot;https://www.freepik.com/free-vector/illustration-social-media-concept_2807765.htm#query=Data%20Engineering&amp;position=2&amp;from_view=search&amp;track=ais&quot;&gt;Image by rawpixel.com&lt;/a&gt; on Freepik"> https://www.freepik.com/free-vector/illustration-social-media-concept_2807765.htm#query=Data%20Engineering&amp;position=2&amp;from_view=search</a></figcaption></figure><h3>What is data engineering, you ask?</h3><p>Let’s digress a bit to know what data is. Data is any collection of facts or information that can be used to make decisions or solve problems. Data is a valuable resource that can be used to improve your business, make better decisions, and solve problems. By understanding what data is and how to use it, you can gain a competitive advantage.</p><p>Now let’s answer the question. Well, think of data engineering as the backbone of the data ecosystem. It’s the art and science of designing, building, and maintaining the infrastructure and systems that enable organizations to collect, store, process, and analyze vast amounts of data.</p><p>In simpler terms, data engineering empowers businesses to transform raw data into valuable insights that drive informed decision-making.</p><h3>But why is data engineering so important?</h3><p>In today’s data-driven world, where information is often referred to as the new oil, having a robust data engineering setup is crucial. It lays the foundation for successful data-driven initiatives, such as business intelligence, data analytics, and machine learning.</p><p>Now, let&#39;s talk about your role as a data engineer. Picture yourself as the mastermind behind the scenes, architecting and building the data pipelines, databases, and frameworks that handle the data flow. You&#39;re the unsung hero who ensures that data is ingested, transformed, and made accessible to those who need it, all while maintaining its quality and security.</p><h3>What are some tools a data engineer use?</h3><p>There are probably a million of tools a data engineer can choose from. The choice depends on several factors such as business needs, technical capabilities, ease of use, cost and many more. However, here are a few of the most popular data engineering tools:</p><ol><li>Apache Hadoop</li><li>Apache Spark</li><li>Apache Hive</li><li>Big Query</li><li>Amazon Redshift.</li></ol><p>These are a few of the many data engineering tools available. We will dive into them in a later post.</p><p>In summary, Data Engineering is a growing field that is critical to data-driven businesses to ensure efficient operation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a501e194bb1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dealing with an imbalanced data]]></title>
            <link>https://medium.com/@abdoollahikbk/dealing-with-an-unbalanced-data-9c44e41dab55?source=rss-75f1b736bf14------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c44e41dab55</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[scikit-learn]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <dc:creator><![CDATA[Abdullahi Yunus]]></dc:creator>
            <pubDate>Thu, 06 May 2021 09:46:14 GMT</pubDate>
            <atom:updated>2021-05-06T15:46:47.986Z</atom:updated>
            <content:encoded><![CDATA[<p>At some point you may find yourself working with an imbalanced data for a classification machine learning task.</p><p>In this situation, splitting the data into train_set and test_set can be tricky because your model can overfit or underfit, and that affects the performance of your model or even worse; make it a dangerous one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uoi6pdyBDaTySZM3kcm5WQ.png" /></figure><blockquote>scikit-learn train_test_split method</blockquote><p>Thankfully, scikit-learn provides the &quot;stratify&quot; parameter that you can pass into your &quot;train_test_split&quot; method. This parameter will make sure that the train_test_split method returns training and testing subsets that have the same proportion of class labels as the input set dataset. This way, the same proportion of zeros and ones will be the same in both the training and testing subsets.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c44e41dab55" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>