<?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 Justice Amadi on Medium]]></title>
        <description><![CDATA[Stories by Justice Amadi on Medium]]></description>
        <link>https://medium.com/@jackhoudini?source=rss-772a106ade21------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UN2fZCe0a4zn-RFVtYnntw.jpeg</url>
            <title>Stories by Justice Amadi on Medium</title>
            <link>https://medium.com/@jackhoudini?source=rss-772a106ade21------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:44:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jackhoudini/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[The Problem with Split-Brain: A Two-Headed Monster]]></title>
            <link>https://medium.com/@jackhoudini/the-problem-with-split-brain-a-two-headed-monster-6ef485758b7c?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ef485758b7c</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Thu, 17 Sep 2026 17:28:10 GMT</pubDate>
            <atom:updated>2026-09-17T17:28:10.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArwVNSJAaffVKvMy9lwzsw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@whisperingshiba?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Shawn Day</a> on <a href="https://unsplash.com/photos/a-computer-generated-image-of-a-human-brain-ZnkHPagIOlM?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Recently, I worked on a GPU fleet management system that utilizes an ‘all-or-nothing’ scheduling strategy. However, I noticed an issue with the scheduling component. At first, they looked visibly healthy.</p><p>They could communicate with the machines they were responsible for. They could see the resources available to them. They could accept work. But there was a nasty failure hiding in plain sight: <strong>both scheduling components believed that they were allowed to act at the same time</strong>.</p><p>This was an interesting concept because when machines crash, you know something is wrong. If a network goes down, you know something is wrong. If a process starts throwing errors, you know where to look.</p><p>But what do you do when everything is working exactly as designed, except that two parts of the system have different ideas about who is allowed to make decisions?</p><p>That specific phenomenon is what is called A <strong>Split-Brain</strong>.</p><p>I like to think of it as a two-headed monster.</p><p>There is one body and two heads. Both heads are alive. Both can see what is in front of them. Both can move the body.</p><p>Having two heads isn’t necessarily the problem. In fact, that’s the whole point of having redundant systems in the first place.</p><p>The problem arises when <strong>both heads believe they have authority over the same body at the same time.</strong></p><p>To see why this matters, consider a GPU cluster with 64 H100s.</p><p>A distributed training job arrives that needs eight GPUs. The scheduler can’t simply pick any eight machines and call it a day. Depending on the workload, it may need to consider GPU topology, available memory, network connectivity, resource reservations, and where the other workers will run.</p><p>More importantly, the workers need to be scheduled as a group.</p><p>This is where <strong>gang scheduling</strong> becomes useful.</p><p>Without gang scheduling, the scheduler could place the workers independently. You might end up with three workers running while the fourth waits for a GPU.</p><p>For a distributed training job, that may accomplish very little. The workers need to be able to start together and communicate with each other.</p><p>So instead of treating the workers as independent tasks, the scheduler treats them as a <strong>gang</strong>: a group that is admitted together or not at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*sFCHBEepWhkEPqlFwDz99Q.png" /><figcaption>GPU Gang Scheduling of a Training Job</figcaption></figure><p>To make it highly available, we might run multiple scheduler instances. The important invariant is that <strong>only one scheduler should have the authority to make scheduling decisions at a time</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*7FQJWXa-abZBHL8mDBgu2A.png" /><figcaption>High Availability Scheduler</figcaption></figure><p>Now imagine that a network partition separates the two scheduler instances.</p><p>Scheduler A can no longer communicate with the control plane that determines whether it remains the active scheduler.</p><p>Scheduler B sees the same failure and takes over.</p><p>But A hasn’t stopped.</p><p>Both schedulers are alive.</p><p>Both can see GPUs.</p><p>Both can accept work.</p><p>And now both believe they are allowed to schedule</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*HSXOGyJweZrdI41XRIsjrA.png" /><figcaption>Network Partition Causes A Split-Brain</figcaption></figure><p>From the diagram above, this is no longer simply a scheduling bug. You have <strong>two authorities making decisions about the same scarce resources.</strong></p><p>There was no failure in the GPUs or training code. Neither the scheduler nor its control plane crashed or stopped working. The system lost agreement about ownership.</p><blockquote><strong>So how do you stop two schedulers from believing they in charge at the same time?</strong></blockquote><h3>You Can’t Fix This With Better Health Checks</h3><p>My first instinct, and probably yours too, was to make the health checks smarter. Add more retries. Shorten the timeout. Add a second communication channel so a partition must knock out multiple paths before a scheduler decides it is alone.</p><p>The truth is, none of them worked. Healthcheck answers the wrong question. A health check answers the question, “Can I still see my dependencies?” It does not indicate whether all scheduler nodes agree. Scheduler A can pass every health check it runs against itself and still be wrong about its authority, because the very thing that makes it “the active scheduler” was never something scheduler A could observe on its own.</p><p>A node can’t just look at its own state and promote itself to leader. Authority requires a global agreement, and you can’t piece that agreement together just by stacking up local observations. It is a property of agreement across the whole system known as a <strong>quorum.</strong></p><h3>Fencing Stops the Wrong Head from Controlling the Body</h3><p>If you can’t stop the old leader from believing it’s in charge, the next best thing is stopping the rest of the system from listening to it. This is called <strong>fencing</strong>.</p><p>When a scheduler is elected as the leader or becomes the active scheduler, it is issued a fencing token. A fencing token is a number that strictly increases with each new leader. When Scheduler B takes over from an unresponsive Scheduler A, B’s token will always be higher than A’s.</p><p>Scheduling decisions are now tagged with tokens to enforce ordering. The GPU allocation layer, as the resource under contention, decisively rejects any request with a token lower than the maximum it has already seen. If a partitioned Scheduler A tries to claim GPUs already taken by Scheduler B, the allocation layer ignores the politics. It just checks the token. A’s token is stale, so the request is rejected. A can be perfectly healthy and entirely wrong; the body no longer listens to a severed head.</p><blockquote>Fencing Tokens Reject Stale Scheduler Requests</blockquote><h3>Where the Token Actually Comes From</h3><p>The scheduler can’t just mint its own token. That would push the split-brain problem down a layer, allowing two partitioned schedulers to both generate “higher” numbers.</p><p>It has to come from something that requires a majority to agree before it hands one out, like a coordinating cluster, separate from the main application. This is the real value of systems like etcd, Consul, and ZooKeeper. They do more than store configuration; they use consensus protocols such as Raft to ensure that leadership exists only when a quorum of the cluster agrees on it.</p><p>In our 64-H100 cluster, the scheduler doesn’t get to declare itself the leader. It has to win an election through etcd. Once it wins, it holds a lease — a time-bound grant of leadership that it must actively renew through the majority. If it can’t renew it, the lease expires.</p><p>When the network partition hits, Scheduler A loses contact with the majority. It can’t renew its lease. Once the TTL expires, A is no longer the leader, not because anyone sent it a demotion notice, but because it could no longer prove it was still the same. Meanwhile, Scheduler B, sitting in the majority partition, wins a new election and gets a fresh, higher token.</p><p>A might not even know it’s been demoted yet. It doesn’t matter. Its token is dead on arrival the moment the allocation layer sees B’s new one.</p><h3>Quorum-Based Leader Election Resolves the Partition</h3><p>This isn’t just a theoretical pattern. It’s exactly how Kubernetes protects its own control plane. kube-scheduler and kube-controller-manager Both run with leader election turned on by default, using a Lease object stored in etcd. Only one replica holds the lease at a time, renewed on a timer via the same Raft-backed majority. If the holder goes silent, the lease expires, and a standby takes over. It&#39;s the identical mechanism, just protecting a different set of schedulers.</p><h3>Quorum vs Fencing: Prevention vs. Containment</h3><p>If quorum and fencing sound like the same thing, it’s because they’re often deployed together. But they protect against different stages of a split-brain, and you need both.</p><p>Quorum-based leader election is <strong>prevention</strong>. It happens <em>before</em> a scheduler acts. By requiring a majority to hold the lease, the system makes it difficult for two active leaders to exist at the same time. When the network partitions, the minority side loses its lease.</p><p>But prevention isn’t perfect. A scheduler on the minority side may be trapped in a delayed network partition, completely unaware that it has lost leadership. As far as it knows, it is still the leader.</p><p>Fencing, on the other hand, is <strong>containment</strong>. It happens <em>at the resource layer</em>, acting as the final guard when that stale leader tries to execute a command. Quorum decides who <em>should</em> be in charge. Fencing enforces that decision at the point of action by rejecting requests from anyone holding an outdated token.</p><p>Quorum prevents the wrong leader from taking control. Fencing prevents that leader from acting even when it still believes it is in control.</p><h3>The Nuclear Option: STONITH</h3><p>Some systems don’t stop at fencing tokens. They make sure the old leader physically can’t act at all. That’s STONITH: Shoot The Other Node In The Head.</p><p>Instead of just ignoring stale requests at the resource layer, the new leader powers off, reboots, or network-isolates the old node through IPMI, a cloud API, or whatever hardware controls are available. It’s a bigger hammer, and if your resource layer can reliably reject stale tokens on its own, it’s overkill. But when a stale scheduler doing anything is unacceptable — like issuing conflicting NCCL topology assignments mid-training run — killing the node outright removes all ambiguity.</p><h3>A System That Solves This Differently</h3><p>Every example so far assumes you need a leader: elect one, fence the rest out, enforce it at the resource layer. That’s the right answer for a GPU scheduler or Kubernetes control plane.</p><p>Bitcoin faces the same problem: thousands of global nodes, no guaranteed shared view of events, and zero tolerance for two nodes disagreeing about the ledger. But it doesn’t use leader election. There’s no lease, fencing token, or quorum. Instead, every node follows one rule: whichever valid chain has the most accumulated proof-of-work is the real one.</p><p>This isn’t just theory. In March 2013, a database locking limit triggered a fork. Nodes running v0.7 rejected a block that v0.8 nodes accepted. For a few hours, two valid chains existed on the same network — a genuine, real-world split-brain. It didn’t resolve through an election. It resolved because major mining pools downgraded back to v0.7, shifting most of the hash power back to that chain. That chain grew heavier, forcing every v0.8 node to automatically reorganize onto it, exactly as the protocol dictated.</p><p>Same problem, two valid-looking realities that can’t both be true, solved by two philosophies. One chooses a single authority and builds enforcement around it. The other refuses to name an authority, making “the most costly-to-fake option” the tiebreaker.</p><h3>Back to the Two-Headed Monster</h3><p>The first time you see split-brain, the instinct is to rip out the redundancy. One scheduler. One point of failure. No more confusion. But that throws away the entire reason you built a highly available system in the first place.</p><p>The fix isn’t fewer heads. It’s making sure the body only listens to the one holding the highest token, a token issued by something neither head controls alone. Both heads get to stay alive. Only one gets to move the body, and the body itself enforces that rule, not the heads.</p><p>What eventually clicked for me is that the scheduler isn’t the thing keeping you safe. The resource is. Build the GPU allocator to check the token before it does anything, and it will handle whatever confused the scheduler throws at it. If the token is stale, the request is ignored. The allocator won’t budge.</p><p>You don’t try to make split-brain impossible. You make it a non-event. Let the schedulers argue, stall, or lose contact. As long as the resource accepts commands only from the latest token holder and you are prepared to STONITH the loser if necessary, you get the one guarantee that truly matters: <strong>only one leader acts.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ef485758b7c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building LNAudit: A Configuration Scanner for Lightning Infrastructure]]></title>
            <link>https://medium.com/@jackhoudini/building-lnaudit-a-configuration-scanner-for-lightning-infrastructure-32d181ffc42d?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/32d181ffc42d</guid>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Sun, 24 May 2026 08:52:34 GMT</pubDate>
            <atom:updated>2026-05-25T13:03:14.385Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Lightning nodes are a hot financial infrastructure. Most operators secure them with checklists. I built a scanner to make security repeatable</em></p><p>Software as we know it has evolved. Since the rise of AI and large language models, writing code has become cheaper and faster than ever. A single prompt can generate a functional application, wire up APIs, produce tests, and move from idea to prototype in minutes. But this shift cuts both ways. The same capabilities that accelerate development are also empowering attackers. Malicious actors now use automated tooling to scan for exposed services, fuzz APIs, and exploit misconfigurations at scale. The barrier to launching sophisticated attacks has never been lower.</p><p>When analysing failures in financial infrastructure, the primary cause is rarely an AI zero-day exploit or a cryptographic breach. More often, it results from a common problem: operational drift.</p><p>A debug flag was inadvertently left enabled after testing. An RPC API was bound to 0.0.0.0address. A private key, which can be read publicly, was exposed. An unencrypted backup remained on disk following a server rebuild. Attackers don’t need to compromise cryptography if access is already available; they just need to locate the vulnerability.</p><p>In normal software, these oversights cause downtime or data leaks. In financial infrastructure such as the Lightning Network, they result in irreversible loss of funds.</p><p>That is exactly why I built LNAudit, an open-source security scanner for the Lightning Network Daemon (LND) nodes.</p><h3>The Post-Mortem Pattern</h3><p>To understand what we are actually defending against, I studied ten of the worst incidents in Bitcoin history, totalling over $3.6 billion in losses. The pattern was unmistakable: most catastrophic losses did not require breaking Bitcoin’s cryptography. They came from an operational weakness.</p><ul><li>Mt. Gox lost 850,000 BTC because they ran a hot wallet with no cold storage separation and never reconciled balances for years.</li><li>Bitfloor lost 24,000 BTC because an operator rebuilt a server and forgot to delete unencrypted backup keys left on disk.</li><li>Bitstamp lost 19,000 BTC after a phishing email installed a RAT that captured SSH credentials to their hot wallet server.</li><li>NiceHash lost $64 million because a single VPN credential, obtained through social engineering, lacked MFA, granting direct access to the wallet infrastructure.</li></ul><p>Every single one of these breaches would have been caught by a basic configuration audit. Yet no tool existed to perform one on a Lightning Network node.</p><h3>Why Lightning Nodes Are Different</h3><p>The Lightning Network is Bitcoin’s scaling layer. It enables instant, low-fee payments by moving transactions off-chain into bilateral payment channels. But running a Lightning node is fundamentally different from holding Bitcoin in cold storage.</p><p>A Lightning node is hot infrastructure by design. It must be online to route payments. It speaks to peers, manages channels, signs transactions, and exposes APIs. It relies on TLS certificates, macaroons, configuration flags, gossip settings, watchtowers, and network listeners.</p><p>LND, the most widely deployed implementation, ships with over 200 configuration flags. Many have security implications that are non-obvious even to experienced operators:</p><ul><li>--no-macaroons disables all authentication on the gRPC API. A single flag turns your node into an open wallet.</li><li>--noseedbackup skips seed phrase generation. If your disk fails, your funds are gone.</li><li>tor.skip-proxy-for-clearnet-targets routes non-onion traffic outside Tor, leaking your IP address to every clearnet peer.</li><li>debuglevel=trace writes payment preimages, channel states, and peer handshakes to plaintext log files.</li></ul><p>These are not theoretical risks. <em>CVE-2019–12999 </em>allowed attackers to desynchronize channel state. <em>CVE-2020–26895</em> enabled the extraction of payment preimages. <em>CVE-2021–41593</em> allowed premature spending of funding transactions. Each was a critical vulnerability in production software managing real funds.</p><p>Existing tools focus on monitoring and management. LNDg provides dashboards. Zeus is a mobile wallet interface. lncli is a raw API client. Watchtowers guard against specific protocol attacks. None of them answers the fundamental question: <strong>Is my node configured securely?</strong></p><p>That is the question LNAudit answers.</p><h3>What LNAudit Does</h3><p>lnaudit is an open-source security scanner purpose-built for LND nodes. It performs over 40 distinct security checks across seven modules, produces a quantified security score from 0 to 100, and outputs machine-readable results for CI/CD integration.</p><p>It operates in two complementary modes.</p><h4>Static Analysis (Pre-Deployment)</h4><p>Most security scanners require a running target, which creates a chicken-and-egg problem for infrastructure operators: you cannot scan a node that hasn’t been deployed, but deploying an insecure node is the exact scenario you want to prevent.</p><p>lnaudit solves this by making configuration-only scanning a first-class capability. An operator can scan their lnd.conf in a CI pipeline before the node ever starts. The static module parses the configuration and audits the local filesystem, catching dangerous flags, weak TLS certificates, overly permissive file permissions on wallet databases, Tor privacy leaks, and missing watchtower configurations.</p><h4>Live Scanning (Runtime State)</h4><p>When connected to a running node via gRPC (with TLS and macaroon authentication), lnaudit queries runtime state that configuration alone cannot reveal:</p><ul><li>What LND version is it running, and is it affected by known CVEs?</li><li>Is the blockchain and gossip graph synced?</li><li>Are there pending force-closes with funds in limbo?</li><li>Which Lightning and Bitcoin ports are actually exposed to the network?</li></ul><h3>The Scoring Engine</h3><p>The output is opinionated by design. Every check traces back to a real incident or a documented CVE. Findings carry severity levels with corresponding point deductions from a base score of 100:</p><ul><li>Critical: −15 points</li><li>High: −10 points</li><li>Medium: −5 points</li><li>Low: −2 points</li><li>Info: 0 points</li></ul><p>The final score maps to a clear rating: Hardened (90+), Acceptable (70–89), Needs Hardening (40–69), or Critical Risk (below 40).</p><p>Security scoring is imperfect, but it is useful. It turns scattered configuration details into a visible security posture and acts as a forcing function. Operators can finally see whether they are improving or drifting into danger.</p><h3>Hardening the Scanner Itself</h3><p>A security tool that can be exploited is worse than no tool at all. After building the core functionality, I performed a systematic threat analysis of lnaudit itself and found six real vulnerabilities in my own code. Fixing them was not embarrassing; it was the process working as intended.</p><ul><li>gRPC Timeouts: Calls initially had no deadline. A malicious or unreachable node could hang the scanner indefinitely. Fix: 10-second timeout on every RPC call.</li><li>Input Bounds: Untrusted gRPC response strings had no limits. A malicious node could return a massive payload to exhaust memory. Fix: Truncated at 4,096 bytes.</li><li>Config File Limits: Pointing --config at /dev/zero caused an out-of-memory condition. Fix: Capped at 1 MB before reading.</li><li>Symlink Safety: Leak detection followed symlinks, risking false positives or accidental deletion of system files. Fix: Uses Lstat to detect and skip symbolic links.</li><li>Safe Remediation: Output initially suggested shell commands like rm /path/to/admin.macaroon. Fix: Replaced with generic guidance to prevent blind copy-pasting.</li></ul><p>Finding and fixing vulnerabilities in your own security tool is the process of ensuring it works as intended. The same discipline that the tool applies to LND nodes must be applied to the tool itself.</p><h3>Why Go? A Supply Chain Decision</h3><p>LND is written in Go. Its gRPC service definitions, macaroon libraries, and protobuf types are all Go packages. Building the scanner in the same language means direct access to LND’s own type system rather than maintaining separate protocol definitions.</p><p>This decision is about the supply chain, not about language preferences. Every layer of indirection between the scanner and the node’s API is a layer where type mismatches, serialisation bugs, or version skew can hide. By using the same lnrpc and macaroon libraries as LND itself, Lnaudit ensures high fidelity in its checks.</p><h3>What LNAudit Is Not</h3><ul><li>It is not a monitoring system. It does not run continuously or send alerts. It is a point-in-time audit tool, analogous to running a linter on your code before committing.</li><li>It is not a penetration testing framework. It does not attempt to exploit vulnerabilities. It checks whether known vulnerability patterns are present.</li><li>It is not a replacement for operational security. It encodes best practices into automated checks so they are not forgotten during a 3 AM deployment or a hurried production fix.</li></ul><h3>The Roadmap</h3><p>The current version (v0.1.0) covers configuration auditing, filesystem checks, and live gRPC scanning. The roadmap aims to close the gap between a CLI scanner and an enterprise security workflow:</p><ul><li>v0.2.0: Confidence levels on findings, SARIF output for GitHub Code Scanning, severity threshold gating for CI pipelines (--fail-on high), and baseline diffing to report only new findings.</li><li>v0.3.0: Standalone HTML report generation, macaroon permission auditing, and TLS cipher suite probing.</li><li>v0.4.0: Scan profiles (quick, full, compliance) and custom check definitions via YAML policy files, enabling organisations to encode their own security requirements.</li></ul><h3>Closing Thought</h3><p>AI can help us build faster. But infrastructure security is not only about producing code. It is about knowing what can go wrong after the code runs in the real world.</p><p>Generated code can create a CLI, parse a config file, call an API, and print a report. But it will not automatically know the history of Bitcoin infrastructure failures. It will not automatically know that a copied admin macaroon is a fund-loss risk. It will not automatically know that a Tor misconfiguration can deanonymize a node.</p><p>That knowledge comes from post-mortems, threat modelling, protocol study, and operational experience. lnaudit is my attempt to encode that knowledge into a tool. Not as a blog checklist. Not as tribal knowledge. As repeatable, automated checks.</p><p>The ability to generate code is becoming common. The ability to build systems that can be trusted with money, identity, and infrastructure is still rare.</p><p>lnaudit is a small contribution to that standard. It is open source, MIT-licensed, and available at <a href="https://github.com/NonsoAmadi10/lnaudit"><strong>github.com/NonsoAmadi10/lnaudit</strong></a><strong>. Please leave a star on the repo (<em>pretty please</em>)</strong></p><p><em>Chinonso Amadi is a Senior Infrastructure Security Engineer with expertise in high-trust systems, AI infrastructure security, and blockchain protocol auditing. He developed and manages LNAudit, the pioneering open-source security scanner for Lightning Network nodes. His work covers confidential computing, secure architecture design, incident response, and operational hardening across financial infrastructure, AI pipelines, and decentralised networks.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32d181ffc42d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Cost Entropy in Production: Recovering $35,000/Year From an AWS Stack]]></title>
            <link>https://medium.com/@jackhoudini/cloud-cost-entropy-in-production-recovering-35-000-year-from-an-aws-stack-56cfba8aeea7?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/56cfba8aeea7</guid>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-finops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 20:44:32 GMT</pubDate>
            <atom:updated>2026-03-12T20:52:10.379Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>A one-afternoon audit that uncovered $66k/year in recoverable infrastructure waste.</blockquote><p>An alert arrived on a Wednesday afternoon, Our Wazuh security agent DaemonSet had been stuck for 15 minutes across the cluster. Pods were crash-looping, the dashboard was down. The wazuh indexer — an OpenSearch cluster running inside Kubernetes — had hit a JVM heap circuit breaker at 95% of its 1 GB allocation, rejecting writes and cascading failures to every dependent component. The root cause was a one-line misconfiguration: <em>OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g</em> was silently overriding <em>ES_JAVA_OPTS=-Xms2g -Xmx2g</em>. The indexer thought it had 2 GB of heap. It had 1 GB. It had been running that way for months — surviving on luck until the working set grew past the threshold.</p><p>One environment variable took fifteen minutes to diagnose and 60 seconds to patch.</p><p>However, this incident triggered a broader infrastructure audit. We discovered significant technical debt, including stale resource requests, orphaned storage volumes, unused load balancers, and obsolete database instances which were two generations behind on compute and one major version past community end-of-life.</p><p>The audit itself took an afternoon. The remediation work unfolded over the following week: pod right-sizing, storage migrations, load balancer consolidation, compute generation upgrades, and a critical database engine upgrade. Each change was verified before the next was introduced.</p><p>The result was $2,918 removed from monthly recurring infrastructure spend, along with the elimination of a looming database version event that would have increased costs by another $2,628 per month.</p><p>On an annual basis, the recurring savings exceed $35,000. That represents roughly 15–20% of the fully loaded cost of a mid-level engineer, around three additional months of runway for a startup burning $150K per month, or a direct improvement in operating margin. Nothing about this was extraordinary. It was simply the outcome of revisiting assumptions that had quietly accumulated over time.</p><p>Several of the original provisioning decisions described here were my own. This article serves both as a postmortem and as a practical playbook: what the audit uncovered, how we prioritised the fixes, and what we changed.</p><p>The platform itself is a fintech system built on AWS — two EKS clusters, RDS and DocumentDB databases, ElastiCache, cryptocurrency nodes, and the surrounding infrastructure. The details are specific to this stack, but the patterns behind the inefficiencies are widely applicable.</p><h3>Operational Summary</h3><p><strong>Audit duration</strong><br> 1 afternoon</p><p><strong>Remediation rollout</strong><br> 1 week, executed incrementally and validated between changes</p><p><strong>Recurring savings achieved</strong><br> $2,918 per month ($35,016 annually)</p><p><strong>Additional cost avoided</strong><br> $2,628 per month from PostgreSQL 13 extended support pricing</p><p><strong>Primary technical cause</strong><br> Overprovisioned resource requests from Node.js and Python workloads that expanded the EKS node fleet.</p><p><strong>Primary economic cause</strong><br> Savings Plans were committed before the infrastructure baseline was right-sized</p><h3>The Cloud Cost Entropy Model</h3><p>Cloud infrastructure drifts toward waste the same way a codebase drifts toward complexity. If left unchecked, costs climb monotonically. Cloud provisioning is intentionally easy; deprovisioning usually requires active investigation: identifying what the resource does, whether anything still depends on it, and whether removing it introduces risk. That friction alone is enough for unused or misconfigured infrastructure to accumulate over time.<br>I break cost waste down into three categories. They have different causes, different risks, and different fixes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z199amHURK0ttgJSH9gqbg.png" /><figcaption>Cloud Cost Entropy Model</figcaption></figure><h3>Category 1: Orphaned Resources</h3><p>These are resources that were created for a purpose that no longer exists.</p><p>Typical examples include unattached EBS volumes left behind after pods terminate, Elastic IPs allocated to instances that were later removed, NAT gateways in VPCs that no longer carry traffic, or stopped instances whose attached storage continues accruing hourly charges.</p><p>They are usually the easiest issues to resolve. They also tend to be individually small — but they accumulate quickly. In our audit we found 37 unattached EBS volumes (2,091 GB), a NAT gateway processing zero bytes of traffic, and a stopped analytics instance that had simply been forgotten.</p><p><strong>Cause</strong><br> Resources created imperatively with no lifecycle cleanup.</p><p><strong>Risk to fix</strong><br> Near zero.</p><p><strong>Detection</strong><br> Querying resource state (unattached volumes, stopped instances, zero-traffic gateways) via CLI or API.</p><p>These issues are simple to remove and rarely controversial. The more expensive problems usually sit one layer deeper.</p><h3>Category 2: Stale Configurations</h3><p>These are active resources that are functioning correctly but configured for conditions that no longer exist.</p><p>Examples include pod resource requests sized during an old load test, storage classes selected during initial provisioning and never revisited, instance types from several generations ago, or databases running versions that have already passed community end-of-life.</p><p>Most recoverable cloud spend lives here. Stale configurations are harder to detect than orphaned resources because nothing is broken. The services are healthy and serving traffic. The only signal is the gap between provisioned capacity and actual usage.</p><p><strong>Cause</strong><br> No feedback loop between observed consumption and provisioned capacity.</p><p><strong>Risk to fix</strong><br> Low to moderate. Changes require measurement and staged rollout.</p><p><strong>Detection</strong><br> Comparing CloudWatch metrics with resource specifications.</p><p>These problems are common, but still fixable. The final category is where cloud cost mistakes become structural.</p><h3>Category 3: Structural Commitments</h3><p>The third category is different. Here the waste is often locked in.</p><p>Structural commitments are financial decisions made against infrastructure assumptions that later changed.</p><p>Examples include Savings Plans purchased before right-sizing the fleet, RDS IOPS levels that cannot be reduced once provisioned, storage allocations that can only grow, or reserved capacity purchased in the wrong region.</p><p>These are the most painful discoveries because they are frequently irreversible. Once the commitment exists, the practical remediation is usually to wait for it to expire while preventing similar mistakes in the future.</p><p><strong>Cause</strong><br> Financial commitments made before infrastructure was right-sized, or without accounting for one-way-door constraints.</p><p><strong>Risk to fix</strong><br> The commitment itself cannot usually be undone.</p><p><strong>Detection</strong><br> Cost Explorer utilisation reports and APIs such as describe-valid-db-instance-modifications.</p><p>Every issue uncovered in our audit fit cleanly into one of these three categories. The remediation order follows directly from the risk profile: orphaned resources first (minimal risk), stale configurations second (requires measurement), and structural commitments last (where the primary outcome is prevention rather than immediate savings).</p><p>In short: <strong>delete the forgotten, right-size the stale, and avoid repeating structural commitments.</strong></p><h3>The Slow Drift Into Overprovisioning</h3><p>Every engineering team has some version of the same origin story. Capacity is provisioned for peak traffic projections, load tests are run once and never repeated, and resources are deliberately generous because production outages are career-defining moments. Overprovisioning feels safer than underprovisioning.</p><p>In this case, I made many of the initial sizing decisions myself during a period of rapid growth, based on peak traffic projections that never materialised and load tests that were never repeated.</p><p>Our platform ran across two Kubernetes clusters supporting a fintech workload. Most services were written in Node.js and Python — runtimes that do not consume resources the way a JVM service or a Go binary does. A single-threaded Node.js API does not need two CPU cores and 4 GB of memory. A Python Flask service handling webhook callbacks does not need 512 Mi of memory as a baseline request. Yet those were the defaults we had applied, multiplied across 53 microservices.</p><p>In Kubernetes, overprovisioned pod requests create a deeper problem than wasted memory. The scheduler treats requests as hard reservations. If a webhook service declares a request of 500m CPU and 512Mi RAM, that capacity is reserved on a node whether the process actually uses it or not.</p><p>Multiply that across dozens of services and the effect compounds. Nodes show 15–20 % real utilisation while the scheduler reports them as 70 % allocated. The cluster autoscaler reacts to the allocation pressure and adds more nodes. At that point you are paying for compute that exists purely to hold empty reservations.</p><p>When we finally measured real usage across all 53 workloads, the gap was stark.</p><h4>Measured CPU Utilisation Across Workloads</h4><p><strong>Node.js API services</strong></p><ul><li>Average CPU request: <strong>250–500m</strong></li><li>Actual usage: <strong>2–15m</strong></li><li>Request-to-usage ratio: <strong>16×–250×</strong></li></ul><p><strong>Python workers</strong></p><ul><li>Average CPU request: <strong>200–500m</strong></li><li>Actual usage: <strong>1–8m</strong></li><li>Request-to-usage ratio: <strong>25×–500×</strong></li></ul><p><strong>Monitoring stack (Prometheus, Loki)</strong></p><ul><li>Average CPU request: <strong>500m–2000m</strong></li><li>Actual usage: <strong>50–200m</strong></li><li>Request-to-usage ratio: <strong>2.5×–10×</strong></li></ul><p><strong>Stateful services (Redis, Kafka)</strong></p><ul><li>Average CPU request: <strong>500m–1000m</strong></li><li>Actual usage: <strong>100–400m</strong></li><li>Request-to-usage ratio: <strong>2.5×–5×</strong></li></ul><p>Our Node.js services were requesting between 16 and 250 times the CPU they actually consumed. The Python workers were worse. This pattern is not unusual — I have seen it at nearly every organisation that runs interpreted-language workloads on Kubernetes without revisiting resource specifications after the initial deployment.</p><h3>Why Interpreted Languages Make This Worse</h3><p>When engineers provision resources for a new service, they often think in terms of the runtime’s theoretical capacity rather than its steady-state consumption.</p><p>Java teams often overprovision because they account for heap size, metaspace, and garbage-collection overhead. That at least has a technical rationale. Node.js and Python services are often overprovisioned simply because the engineer does not yet know what the application will require, and the Kubernetes documentation examples use round numbers like 250m and 512Mi. Those numbers feel reasonable but can easily be fifty times what a lightweight API service actually consumes.</p><p>Node.js is single-threaded by design. Unless worker threads or cluster mode are used, a Node.js process cannot utilise more than one CPU core. Allocating 2000m CPU to a single-threaded process is not conservative provisioning — it reflects a misunderstanding of the runtime model.</p><p>Python has a similar constraint through the Global Interpreter Lock. A CPU-bound Python process is limited to one core regardless of what the scheduler allocates. An I/O-bound service — which describes most web workloads — spends most of its time waiting on network calls and uses very little CPU.</p><p>The practical fix is straightforward: measure actual consumption over a representative window, set requests to roughly <strong>2–5× the observed P95</strong>, and set limits to <strong>3–10× requests</strong> to allow burst capacity.</p><p>We applied this across all 53 services in four staged waves: the observability stack first, then non-critical services, followed by critical production workloads, and finally the second cluster. As the requests dropped, the cluster autoscaler naturally removed five nodes within hours.</p><h3>Cluster Impact After Right-Sizing</h3><p><strong>SaaS-b2b-cluster (production)</strong><br> Nodes: <strong>12 → 8</strong><br> Savings: <strong>~$350/month</strong></p><p><strong>data-cluster (production)</strong><br> Nodes: <strong>9 → 5</strong><br> Savings: <strong>~$200/month</strong></p><p>One lesson we learned the hard way: reducing node counts directly by adjusting the Auto Scaling Group desired capacity does not work. We tried that first. Within minutes the cluster autoscaler scaled the nodes back up because pod allocation pressure had not changed.</p><p>The correct lever is always pod resource requests. Fix the inputs and the autoscaler will converge on the correct fleet size on its own.</p><h3>The Savings Plan Trap (and My Mistake)</h3><p>I approved these Savings Plans. In hindsight, I locked in commitments before I had an optimised baseline.</p><p>We discovered six active Compute Savings Plans totalling <strong>$1,175/month in commitment</strong>, but only <strong>$749/month (63.8 %)</strong> was actually being utilised.</p><h4>Savings Plan Utilisation</h4><p><strong>t3 Savings Plan — eu-west-1</strong></p><ul><li>Monthly commitment: <strong>$118</strong></li><li>Utilisation: <strong>0 %</strong></li><li>Issue: there are no instances in this region</li></ul><p><strong>Primary Compute Savings Plan</strong></p><ul><li>Monthly commitment: <strong>$605</strong></li><li>Utilisation: <strong>49 %</strong></li><li>Issue: commitment sized for the pre-optimisation node fleet</li></ul><p><strong>m5 Savings Plan — eu-west-2</strong></p><ul><li>Monthly commitment: <strong>$28</strong></li><li>Utilisation: <strong>100 %</strong></li><li>Status: healthy but instance-family locked</li></ul><p><strong>t3 Savings Plan — us-east-2</strong></p><ul><li>Monthly commitment: <strong>$31</strong></li><li>Utilisation: <strong>100 %</strong></li><li>Covers crypto nodes running in Ohio</li></ul><p><strong>Two additional plans</strong></p><ul><li>Combined commitment: <strong>$393/month</strong></li><li>Utilisation: <strong>~85 %</strong></li></ul><p>That $118/month plan covering t3 instances in eu-west-1 is particularly painful. We usually ran instances in that region until we decided to have all our workloads in London. I approved a three-year commitment for a region we currently don’t use. That is <strong>$4,248 burned</strong> before it expires in July 2027.</p><p>The larger Compute Savings Plan dropped to 49 % utilisation the moment we right-sized pods and the autoscaler removed nodes. The commitment had been sized for the bloated fleet. Once the fleet shrank, the plan became partially idle capacity.</p><p>This is Category 3 waste: structural commitments against assumptions that no longer hold. The money is gone. The lesson is procedural.</p><h3>What Teams Get Wrong About Savings Plans</h3><p>The pitch is seductive: commit to a certain level of compute spend and receive a 30–40 % discount. But the commitment is based on current consumption, and current consumption is almost always inflated. In effect, you are locking in a discount on waste.</p><p>The correct order of operations is simple:</p><ol><li>Right-size the infrastructure first</li><li>Measure steady-state consumption for at least 60 days</li><li>Purchase Savings Plans covering only the stable baseline (roughly 70–80 %)</li><li>Let On-Demand and Spot handle the variable portion</li></ol><p>I did the opposite: purchased the Savings Plan first, optimised later, and discovered afterward that the commitment was oversized. At that point the cost becomes a sunk contract obligation rather than an operational decision.</p><p><strong>Practical advice:</strong> start with a <strong>one-year No-Upfront plan covering roughly 60 % of current spend</strong>, run a right-sizing exercise, and only then consider expanding coverage. A three-year All-Upfront plan on an unoptimised fleet is how you end up paying for compute in a region with no instances.</p><h3>Why Graviton Should Be Your Default Compute Choice</h3><p>The cost efficiency gained from our Graviton migrations is both immediate and structural, requiring no code changes. This advantage is amplified when applied across the broader ecosystem of managed services.</p><p><strong>No Intel margin.</strong> AWS designs Graviton in-house through Annapurna Labs, capturing the margin that otherwise flows to Intel. This accounts for roughly 10–15% of the price difference.</p><p><strong>Power efficiency at data center scale.</strong> ARM’s RISC architecture draws less power per operation than x86 CISC. Graviton3 delivers 60% more performance per watt than Graviton2. In hyperscale facilities where power and cooling dominate capital expenses, this flows directly into per-instance pricing.</p><p><strong>Dedicated physical cores.</strong> Each Graviton vCPU is a single-thread physical core — no hyperthreading. An Intel vCPU is a hyperthread; two vCPUs share one physical core and compete for execution units and cache. When both threads are active, each achieves roughly 60–70% of a dedicated core’s throughput. Graviton vCPUs get full core access with dedicated L1/L2 cache, translating to more consistent tail latencies and often fewer vCPUs needed for equivalent throughput.</p><p>Example pricing (us-east-1):<br> <strong>General compute (xlarge)</strong><br> Intel/AMD: m5 — $0.192/hr<br> Graviton: m7g — $0.163/hr<br> Savings: ~15%</p><p><strong>Memory optimised (4xlarge)</strong><br> Intel/AMD: r5 — $1.008/hr<br> Graviton: r7g — $0.857/hr<br> Savings: ~15%</p><p><strong>Burstable (medium)</strong><br> Intel/AMD: t3 — $0.042/hr<br> Graviton: t4g — $0.034/hr<br> Savings: ~19%</p><p><strong>RDS memory (4xlarge)</strong><br> Intel/AMD: db.r5 — $1.856/hr<br> Graviton: db.r7g — $1.196/hr<br> Savings: ~36%</p><p><strong>ElastiCache memory (large)</strong><br> Intel/AMD: cache.m4 — $0.156/hr<br> Graviton: cache.m7g — $0.109/hr<br> Savings: ~30%</p><p>Managed service savings are larger because the Graviton advantage compounds with service pricing markup.</p><p>For containerized workloads running Node.js, Python, or Ruby, adoption is frictionless — the runtime handles architecture abstraction. Images need multi-arch builds via docker buildx, a one-time CI/CD change. For compiled languages, add a cross-compilation flag.</p><p>For most modern workloads — containers, managed databases, caches, message brokers — Graviton should be the default. Edge cases remain: vendor-specific binaries, legacy AMIs, proprietary agents, GPU workloads. But the burden of proof should rest on choosing Intel, not on choosing ARM.</p><h3>The Complete Ledger</h3><p><strong>Cat 1: Orphaned Resources</strong></p><ul><li><strong>EBS volumes:</strong> 37 deleted (snapshotted first) — $167/mo</li><li><strong>gp2 → gp3:</strong> 16 volumes migrated — $20/mo</li><li><strong>NAT gateway:</strong> Deleted, zero traffic — $32/mo</li><li><strong>Stopped EC2:</strong> Terminated — $10/mo</li></ul><p><em>Subtotal: $229/mo</em></p><p><strong>Cat 2: Stale Configuration</strong></p><ul><li><strong>Pod right-sizing:</strong> 53 workloads, 5 nodes removed — $550/mo</li><li><strong>RDS storage:</strong> io1 → gp3 — $197/mo</li><li><strong>Ohio storage:</strong> 2× io2 → gp3 — $425/mo</li><li><strong>Load balancers:</strong> 7 NLBs → ClusterIP — $158/mo</li><li><strong>RDS Graviton:</strong> 2 instances upgraded — $740/mo</li><li><strong>ElastiCache Graviton:</strong> 9 nodes across 2 clusters — $154/mo</li><li><strong>DocDB reader:</strong> Replica removed — $465/mo</li><li><strong>PG 13 → 16:</strong> 3 instances, surcharge prevented — $2,628/mo avoided</li></ul><p><em>Subtotal: $2,689/mo + $2,628/mo avoided</em></p><p><strong>Cat 3: Structural Lock-in</strong></p><ul><li><strong>Savings Plans:</strong> $426/mo waste, documented — not recoverable</li><li><strong>RDS IOPS/storage:</strong> $896/mo locked in — not recoverable</li></ul><p><strong>Total recurring savings:</strong> $2,918/mo<br><strong>Annualized:</strong> $35,016/yr<br><strong>Including surcharge prevention:</strong> $66,552/yr</p><h3>What Engineering Teams Can Do Monday Morning</h3><p><strong>This week</strong> <em>(zero risk)</em>:</p><pre># Orphaned volumes<br>aws ec2 describe-volumes - filters &quot;Name=status,Values=available&quot;<br># gp2 still in use<br>aws ec2 describe-volumes - filters &quot;Name=volume-type,Values=gp2&quot;<br># EBS billing on stopped instances<br>aws ec2 describe-instances - filters &quot;Name=instance-state-name,Values=stopped&quot;<br># Unused Elastic IPs<br>aws ec2 describe-addresses</pre><p>Snapshot, delete, automate. No scenario justifies gp2 in 2026.</p><p><strong>This month</strong> <em>(requires measurement)</em>:</p><p>Collect pod CPU and memory usage for two weeks via kubectl top, Prometheus, or CloudWatch Container Insights. Set requests to 2–5× observed P95. Set limits to 3–10× requests. Watch the autoscaler remove nodes.</p><p>Audit every type: LoadBalancer service. Internal consumers should use ClusterIP. Each unnecessary NLB costs $22.50/month in fixed charges.</p><p>Check database engine versions against community EOL dates. AWS extended support surcharges arrive without warning email.</p><p><strong>This quarter</strong> <em>(requires planning)</em>:</p><p>Audit all instance families against current-generation Graviton equivalents. Running m5, r5, t3, m4, or r4 means paying a generation tax.</p><p>Review Savings Plan utilization in Cost Explorer. Below 80% signals over-commitment.</p><p>Evaluate every provisioned IOPS volume. Compare provisioned to actual via CloudWatch. The gap will be uncomfortable.</p><p>Build monthly cost review into your sprint cycle. Thirty minutes of aws ce get-cost-and-usage prevents thousands in waste.</p><p><strong>Permanently</strong> <em>(cultural)</em>:</p><ul><li>Tag every resource for cost attribution. Unmapped charges have no owner.</li><li>Flag deployment-time resource requests exceeding 10× historical usage.</li><li>Treat Savings Plans as financial instruments with commitment, utilization, and lock-in risk. Size conservatively. Revisit quarterly.</li><li>Never provision RDS IOPS or storage based on projections. Start at baseline, monitor, then scale. The reverse direction does not exist.</li></ul><h3>The Leadership Layer</h3><p>A one-off audit is useful. A recurring operating cadence is what sticks.</p><p><strong>Weekly</strong> — <em>Platform/SRE</em><br>Artifact: Orphaned resource report<br>Decision gate: Delete-or-justify within 7 days</p><p><strong>Monthly</strong> — <em>Platform + Finance</em><br>Artifact: Service-level cost delta (top 20 movers)<br>Decision gate: +10% drift requires root-cause note</p><p><strong>Quarterly</strong> — <em>Principal/Staff Eng + Finance</em><br>Artifact: Savings Plan coverage + utilization<br>Decision gate: No new commitment without post-right-sizing baseline</p><p><strong>Per release</strong> — <em>Service owner</em><br>Artifact: Resource request diff vs. observed P95<br>Decision gate: Block deploy if request &gt;10× historical usage</p><p>That is how cost stops being a finance fire drill and becomes a reliability-quality practice.</p><p>If you own platform engineering, this is leadership work: define the model, set the review cadence, make cost quality part of production quality.</p><h3>Closing Thoughts</h3><p>Cloud cost entropy is not a moral negligence. It’s what naturally happens when adding capacity is easy and removing it takes effort.</p><p>If your platform hasn’t had a serious infrastructure audit in six months, there is probably recoverable spend hiding in plain sight.</p><p><strong>Start here:</strong></p><pre>aws ce get-cost-and-usage \<br>  --time-period Start=$(date -d &#39;30 days ago&#39; +%Y-%m-%d),End=$(date +%Y-%m-%d) \<br>  --granularity MONTHLY \<br>  --metrics BlendedCost \<br>  --group-by Type=DIMENSION,Key=SERVICE</pre><p>See what you find.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56cfba8aeea7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Production Bitcoin Address Analyzer: Architecture, Cryptography, and Lessons Learned]]></title>
            <link>https://medium.com/@jackhoudini/building-a-production-bitcoin-address-analyzer-architecture-cryptography-and-lessons-learned-2cac008bf69f?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cac008bf69f</guid>
            <category><![CDATA[rust-programming-language]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[infrastructure]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 23:59:41 GMT</pubDate>
            <atom:updated>2026-01-28T23:59:41.968Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Um5v-ZG4Pr4hJw4GyP8COg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@enginakyurt?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">engin akyurt</a> on <a href="https://unsplash.com/photos/a-brown-notebook-with-a-bitcoin-on-it-btqsDhCD81o?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Bitcoin addresses look simple. They’re short strings you copy and paste into wallets, invoices, and QR codes. However, most tooling out there treats them the same way: they check the prefix, validate the checksum and return a boolean value.</p><p>That approach is flawed.</p><p>The Bitcoin network does not recognize the concept of “addresses”. This is because addresses are user-friendly labels layered on top of consensus objects. Under the hood, the blockchain only sees scripts, witness versions and cryptographic locks and commitments.</p><p>Over the last fifteen years, Bitcoin address formats have evolved in response to very specific threat models: <strong>Base58check</strong> to reduce transcript errors and added a 4-byte checksum at the end of the string, <strong>Bech32</strong> which made QR codes smaller and easier to scan while improving error detection, <strong>Bech32m </strong>to fix subtle checksum vulnerabilities introduced by Taproot. Each change altered not just how addresses <em>look</em>, but what they mean at the consensus layer.</p><p>I built a <a href="https://github.com/NonsoAmadi10/bitcoin-address-analyzer">bitcoin-address-analyzer</a>. It’s a Rust tool that treats addresses the way professional systems should. It doesn’t just validate a string; it decodes it into the actual on-chain data that secures the Bitcoin.</p><p>This post explains what addresses really represent and why basic validation isn’t enough for serious production tools.</p><h4>Case Study: Address Validation Failure in Production Custody Systems</h4><p>One of the most dangerous assumptions in bitcoin infrastructure is that address validation is a solved problem.</p><p>Consider this scenario:</p><p>A custody service accepts deposit addresses from upstream systems and performs basic validation: decode the address, verify the checksum, and classify it as SegWit if it starts with bc1 or tb1. If validation passes, the address is accepted and queued for sweeping.</p><p>A user submits this address:</p><p>tb1q9d4zj7mt4m2fks4mwww6vz89zvyxcqq5uxu3s0</p><p>The validator marks it as Testnet. The checksum is correct. The format is valid. Everything looks fine.</p><p>Weeks later, during a sweep operation, the system attempts to construct and sign a transaction using Testnet parameters. The signing flow fails. Broadcasting fails. Debugging begins.</p><p><strong>The root cause</strong>? tb1 is not uniquely Testnet.</p><p>Both Testnet and Signet use the same Bech32 human-readable prefix. Without blockchain context, the address is fundamentally ambiguous. The system made an assumption it had no right to make.</p><p>Another misleading case<strong> </strong>is Multi-sig P2SH addresses beginning with 2... are valid on Testnet, Signet, and Regtest (but not Mainnet, which uses 3...). A validator that auto-classifies 2MzQwSSnBHWHqSAqtTVQ6v47XtaisrJa1Vc as &quot;Testnet&quot; is guessing and potentially wrong.</p><p>This case doesn’t show up in unit tests. It doesn’t show up in basic validators. It only surfaces when the address is used downstream, during signing, fee estimation, or broadcast and where the cost of failure is operational disruption or delayed fund access.</p><p>Most tools handle this by picking the most likely option. That is a mistake. In production, a <strong>confident wrong answer</strong> is a liability.</p><p>My address analyzer doesn’t guess. If an address is ambiguous, the tool says so. It returns every possible valid interpretation:</p><pre>{<br>  &quot;address&quot;: &quot;tb1q9d4zj7mt4m2fks4mwww6vz89zvyxcqq5uxu3s0&quot;,<br>  &quot;networks&quot;: [&quot;testnet&quot;, &quot;signet&quot;],<br>  &quot;payload_meaning&quot;: &quot;ambiguous_prefix_requires_blockchain_context&quot;<br> }</pre><p>This design forces your system to handle the uncertainty immediately rather than breaking later. Proper tooling shouldn’t just validate strings; it should protect your infrastructure from bad assumptions.</p><h4><strong>What is inside a Bitcoin Address?</strong></h4><p>To understand why validation fails in production, you have to look at what an address actually encodes. Let’s dissect this address: tb1q6r74qyp6xcu24n8ttvxggnvn5crzy65tzm0dw2.</p><p><strong>Decoded structure:</strong></p><ul><li><strong>Human-readable part</strong>: tb tells the wallet it’s for Testnet or Signet</li><li><strong>Separator</strong>: 1 A fixed character that separates the network from the data.</li><li><strong>Witness Version: </strong><strong>q</strong>This represents 0. It tells the network this is a SegWit v0 address.</li><li><strong>Data Part</strong>: 6r74qyp6xcu24n8ttvxggnvn5crzy65tzm0dw2</li><li><strong>Checksum</strong>: Bech32 polynomial (error-correcting)</li></ul><p><strong>Extracted Witness Program (20 bytes):</strong> d0fd50103a3638aacceb5b0c844d93a606226a8b</p><p><strong>ScriptPubKey (hex) — what actually hits the blockchain:</strong> 0014d0fd50103a3638aacceb5b0c844d93a606226a8b</p><p><strong>ScriptPubKey (ASM):</strong> OP_0 OP_PUSHBYTES_20 d0fd50103a3638aacceb5b0c844d93a606226a8b</p><p>What this means is, the blockchain doesn’t store the string above. Instead, it sees a <strong>ScriptPubKey</strong> (the actual code that <strong>locks</strong> the Bitcoin). In plain English, this script tells the network: <em>“This is a Witness Version 0 output. To spend these funds, you must provide a signature from the public key that hashes to </em><em>d0fd5010...&quot;</em></p><p>This is important because most developers treat addresses like simple usernames. They aren’t. They are instructions. If your tools only check if a string looks right without extracting the underlying script, you aren’t actually validating the transaction, you’re just looking at the envelope.</p><p>My analyzer extracts this data instantly. It turns a human-friendly string back into the raw cryptographic payload the protocol requires. The analyzer treats validation as <strong>extraction</strong>, not verification. It either returns complete cryptographic context or a specific error detailing why the encoding is malformed.</p><h4>The Tool</h4><p><strong>Bitcoin Address Analyzer</strong> validates addresses across all network types and exposes their cryptographic internals:</p><ul><li><strong>Address Types</strong>: P2PKH, P2SH, P2WPKH, P2WSH, P2TR (Taproot)</li><li><strong>Networks</strong>: Returns all valid networks, marking ambiguity explicitly</li><li><strong>Script Details</strong>: Full scriptPubKey in hex and ASM</li><li><strong>Witness Data</strong>: Version and program for SegWit addresses</li><li><strong>Cryptographic Payloads</strong>: Distinguishes pubkey hashes, script hashes, and x-only public keys (P2TR)</li><li><strong>Checksum Verification</strong>: Base58Check vs. Bech32 vs. Bech32m with specific error detection</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtSeOYb6YT_jdeogg0CZmA.png" /><figcaption><strong>Terminal showing tool output analyzing a P2WPKH address with — format text, displaying network ambiguity warning, scriptPubKey hex/ASM, and witness program details</strong></figcaption></figure><h4>Why Rust for Bitcoin Infrastructure?</h4><p>Bitcoin tooling demands properties that Rust excels at:</p><p><strong>Zero-cost abstractions</strong>: Rust handles massive batches of addresses without breaking a sweat. It can validate 60,000+ addresses per second because it doesn’t have a garbage collector slowing things down. This is vital for custody systems that need to process thousands of deposits instantly.</p><p><strong>Memory safety</strong>: When handling untrusted input (addresses from external APIs, user forms, QR scans), we cannot afford segfaults or buffer overflows that could crash signing services or leak keys.</p><p><strong>Type-safe cryptography</strong>: The bitcoin crate (rust-bitcoin) provides consensus-accurate validation without reimplementing secp256k1, SHA256, RIPEMD160, or Bech32 checksums. Used in production by LDK, BDK, and major exchanges.</p><p><strong>Fearless concurrency</strong>: Future batch processing and threshold signature coordination require thread-safe validation without data races.</p><h4>Architecture: How the Tool is Built</h4><p>This codebase demonstrates production patterns for Bitcoin infrastructure.</p><p><strong>Library-First Design</strong><br>Business logic lives in src/lib.rs with src/main.rs as a thin CLI wrapper. The analyzer is a reusable crate, not a monolithic binary. Other developers can import the library for their own custody tools or signing services.</p><p><strong>Leveraging </strong><strong>rust-bitcoin</strong><br>We don&#39;t reimplement consensus rules. Using the official bitcoin crate means:</p><ul><li>Automatic handling of edge cases (prefix overlaps between Testnet/Signet)</li><li>Future-proofing for upcoming address standards</li><li>Cryptographic operations audited by the ecosystem</li></ul><p><strong>Explicit Ambiguity Handling</strong><br>Rather than forcing a guess when networks are ambiguous, the analyzer returns all valid interpretations. This forces downstream systems to handle uncertainty explicitly rather than failing silently later.</p><p><strong>Output Format Flexibility</strong></p><ul><li>--format text: Human-readable console output for debugging</li><li>--format json: Machine-readable for CI/CD pipelines and API integration</li><li>--format readme: Markdown reports for documentation and compliance</li></ul><h4>What I Learned Building This</h4><ol><li><strong>Address Formats Evolved to Solve Concrete Problem</strong></li></ol><p><strong>Base58Check (Legacy)</strong><br>Satoshi designed this in 2009 to prevent transcription errors. By excluding visually similar characters (0/O, I/l), he reduced the chance of lost funds due to typos. Clever UX thinking encoded in cryptography.</p><p><strong>Bech32 (SegWit v0)</strong><br>BIP173 introduced case-insensitive encoding with superior error detection. It can correct up to 4 character errors automatically which was designed specifically for QR code scanning resilience.</p><p><strong>Bech32m (Taproot)</strong><br>BIP350 fixed a subtle length-extension vulnerability in Bech32. The only difference is the final constant in the checksum polynomial. This shows how Bitcoin evolves: conservatively, with surgical precision, maintaining backward compatibility where possible.</p><p>2. <strong>Taproot (P2TR) Is Architecturally Different</strong></p><p>Previous address types follow a pattern:</p><pre>P2PKH:  HASH160(PublicKey) → 20 bytes<br>P2SH:   HASH160(RedeemScript) → 20 bytes  <br>P2WPKH: HASH160(PublicKey) → 20 bytes<br>P2WSH:  SHA256(WitnessScript) → 32 bytes</pre><p>But Taproot (P2TR) becomes different:</p><pre>P2TR: x-only Schnorr public key → 32 bytes (no hash)</pre><p>The address contains the <em>actual</em> public key (tweaked with the Merkle root), not a hash of it. This enables <strong>keypath spends</strong> (simple Schnorr signatures) and <strong>scriptpath spends</strong> (via Merkle proofs) from the same address. Understanding this distinction is critical for custody engineers building Taproot signing flows.</p><blockquote><strong>“P2TR changes everything. For the first time, a Bitcoin address contains the raw public key, not a hash. This shifts the security model from hash-preimage to discrete logarithm, enabling both elegant keypath spends and complex scriptpath conditions through Merkle inclusion proofs.”</strong></blockquote><h4>Performance</h4><p>Offline validation with zero network calls:</p><ul><li><strong>Parsing &amp; Checksum Verification</strong>: ~5μs per address</li><li><strong>Full Analysis (Script extraction, type detection)</strong>: ~15μs per address</li><li><strong>Batch Throughput</strong>: 60,000+ addresses/second (single-threaded)</li></ul><p>No RPC calls. No blockchain state. Pure cryptographic validation suitable for high-throughput deposit processing and address screening.</p><h4>Practical Use Cases</h4><p><strong>Custody Infrastructure</strong>: Offline validation of cold storage addresses before sweeping funds, with explicit handling of ambiguous network prefixes.</p><p><strong>PSBT Construction</strong>: Extracting scriptPubKey for transaction building without a node.</p><p><strong>Security Auditing</strong>: Verifying that generated addresses match expected types (preventing accidental P2SH-wrapped-P2WPKH when native SegWit was intended).</p><p><strong>Compliance</strong>: Batch screening address lists against formatting standards while extracting cryptographic commitments for record-keeping.</p><h4>Conclusion</h4><p>I built this tool because I was tired of validators that said “invalid” without explaining why.</p><p>What started as a simple parser taught me something bigger: in Bitcoin infrastructure, the mistakes that hurt aren’t dramatic. They’re subtle. An ambiguous prefix. A boolean where structured data should be. These mistakes don’t crash immediately. They wait until funds are moving.</p><p>Address handling isn’t UX logic. It’s consensus engineering. The difference between looking <strong>valid </strong>and <strong>working in production </strong>is everything.</p><p>This tool exists to make that gap explicit. Fast, offline, deterministic, and honest about what it knows and what it can’t infer.</p><p>It’s the first layer. Address parsing feeds PSBT construction, Miniscript policies, Taproot signing. Getting this right isn’t optional. It’s foundational.</p><p><strong>This is the standard I hold infrastructure to: tools that don’t just work, but reveal why they work.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cac008bf69f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking Bitcoin to Build It: An Adversary’s Lens on SegWit]]></title>
            <link>https://medium.com/@jackhoudini/breaking-bitcoin-to-build-it-an-adversarys-lens-on-segwit-e3ec024e92ec?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3ec024e92ec</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[game-theory]]></category>
            <category><![CDATA[cryptography]]></category>
            <category><![CDATA[security-engineering]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Sat, 17 Jan 2026 16:49:40 GMT</pubDate>
            <atom:updated>2026-01-17T16:49:40.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Nj-GrhCBkvJgI90WyyfAw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@adlan7000?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Adlan</a> on <a href="https://unsplash.com/photos/black-and-white-chess-piece-3oaAYmdVpYs?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>At the start of this year, I decided to revisit Bitcoin’s foundations not to relearn what I already knew, but to interrogate it from a position of hostility. I wanted to understand Bitcoin not as user, not as a developer but as an adversary.</p><p>Bitcoin has survived over a decade in an environment that is actively hostile, profit-motivated attackers, misaligned miner incentives, protocol ossification, and political pressure. Systems do not survive environments like this by accident. They survive because their failure modes are understood, anticipated, and constrained. That framing shaped my choice of topic. SegWit is often explained as a throughput optimization, a fee reduction mechanism, or a prerequisite for Lightning. Those explanations are correct but they miss the point. SegWit was not primarily a feature upgrade. It was a defensive refactor in response to concrete, already-exploited attack surfaces.</p><p>My article is not an explanation of what SegWit is. There are dozens of those. Rather, this is an explanation of why Bitcoin <em>had to change</em>, what could be exploited before SegWit, how those exploits worked at a mathematical and economic level, and why the specific design choices in SegWit look the way they do when viewed through an adversarial lens.</p><h3><strong>How Bitcoin Actually Breaks</strong></h3><p>Breaking Bitcoin does not require breaking SHA-256, elliptic curves, or consensus outright. That framing is naive.</p><p>Real systems fail at interfaces between cryptography and incentives, between protocol rules and policy, between assumptions and reality. Bitcoin’s cryptography was sound long before SegWit. Its problem was that cryptography was being used in places where <em>immutability</em> was assumed but never actually enforced.</p><p>Before SegWit, a Bitcoin transaction’s identity — its txid—was a hash of the entire serialized transaction, including signatures. This seemed natural. Signatures authenticate spending; therefore, they must be part of the transaction.</p><p>That assumption was wrong.</p><p>To see why, we have to stop thinking like a protocol designer and start thinking like someone trying to profit from ambiguity.</p><h3>The Transaction Malleability Vulnerability</h3><p>Bitcoin uses the <strong>Elliptic Curve Digital Signature Algorithm (ECDSA)</strong> specifically on the <strong>secp256k1</strong> curve.</p><p>This design choice imported a mathematical property of ECDSA into Bitcoin’s transaction layer called<strong> signature malleability</strong>.</p><p>Given a valid ECDSA signature <em>(r, s) </em>for a message <em>m</em> under public key <em>Q</em>, the signature <em>(r, n — s)</em> is <em>also valid</em>, where <em>n</em> is the order of the curve.</p><p>This follows directly from the verification equation. ECDSA verification checks:</p><p>r ≡ (g^u₁ · Q^u₂)ₓ mod n</p><p>where:</p><p>u₁ = m·s⁻¹ mod n<br>u₂ = r·s⁻¹ mod n</p><p>Replacing <em>s</em> with <em>n — s</em> flips the sign of both <em>u1</em> and <em>u2</em>, but elliptic curve group operations are symmetric under negation. The resulting point has the same x-coordinate. Verification succeeds.</p><p>This is not a flaw in ECDSA. It is a property of the math. Bitcoin inherited it by choosing ECDSA.</p><p>The mistake was assuming that a transaction’s hash — its identity — would remain stable in the presence of a mathematically valid mutation.</p><p>Before SegWit, an attacker could take a valid, signed transaction in the mempool, modify only the signature (for example, replacing <em>s </em>with <em>n — s</em>), and rebroadcast it. The transaction would remain valid. Consensus rules would accept it. But its txid would change.</p><p>That single detail turns out to be explosive.</p><h3>Why This Was Exploitable in Practice</h3><p>If all Bitcoin did was move coins from A to B, transaction malleability would be an annoyance, not a vulnerability. But Bitcoin transactions are <em>inputs</em> to future transactions(UTXOs). They are referenced by txid.</p><p>Consider a real life scenerio.</p><p>Alice opens a Lightning channel with Bob. The funding transaction has txid = abc123. Alice immediately creates and signs a commitment transaction spending abc123:0. This commitment transaction is not broadcast yet because they are offline transactions and only work if the parent transaction’s identity remains immutable.</p><p>Mallory(a node or miner) sees the funding transaction in the mempool. Mallory does not need Alice’s private key. Mallory simply flips the signature’s <em>s </em>value to <em>n−s</em> and rebroadcasts the mutated transaction.</p><p>Miners accept Mallory’s version. It is valid ECDSA. The funding transaction confirms with a <em>different</em> txid, say def456.</p><p>Alice’s commitment transaction now references abc123:0. That output does not exist. Her pre-signed transaction is invalid. The channel is broken before it even starts.</p><p>No cryptography was broken. No keys were stolen. The system behaved exactly as specified. And yet funds were at risk.</p><p>This is why Lightning could not be deployed safely before SegWit. This is also why transaction malleability was not theoretical. It was actively exploited in the wild as early as 2015.</p><h3>Segwit’s Core Insights: Signatures Are Not Identity</h3><p>SegWit does not “fix” ECDSA. That would require changing the signature scheme itself.</p><p>Instead, SegWit does something more subtle and far more effective in that <strong>it removes signatures from transaction identity.</strong></p><p>Look at this, before Segwit existed, the transaction ID committed to everything. Inputs, Outputs, Scripts and Signatures:</p><pre>txid = HASH(version || inputs || scriptSig || outputs || locktime)</pre><p>After SegWit, the transaction is split conceptually in two:</p><pre>txid  = HASH(version || inputs || outputs || locktime)<br>wtxid = HASH(txid || witness)</pre><ul><li>The <strong>transaction body</strong>, which defines <em>what is being spent and where value moves</em>.</li><li>The <strong>witness</strong>, which proves <em>authorization</em> to spend.</li></ul><p>The txid commits only to the transaction body. The witness is excluded. A separate identifier, the wtxid, commits to both.</p><p>Now replay the attack discussed previously.</p><p>Mallory flips the signature. The witness changes. The wtxid changes. But the txid which is the identifier future transactions depend on, remains stable.</p><p>The malleability surface has been contained, not eliminated. That distinction matters because the core feature of security engineering is — if you can’t eliminate a mathematical property, you build a cage around it.</p><h3>The Hidden Adversary: Covert ASICBoost</h3><p>SegWit’s most underestimated contribution is not at the transaction layer. It is also at the Proof-of-Work layer. In 2017, Gregory Maxwell described a covert optimization of Bitcoin’s SHA-256 mining process known as <strong>ASICBoost</strong>.</p><p>To understand this, we need examine how SHA-256 hashes bitcoin blocks.</p><p>Bitcoin’s proof-of-work hashes an 80-byte block header using double SHA-256. Internally, SHA-256 processes 64-byte chunks. That means:</p><ul><li>The first 64 bytes are hashed (expensive).</li><li>The remaining 16 bytes are hashed (cheap).</li></ul><p>So mining looks like this:</p><pre>┌─────────────────────┬──────────────┐<br>│  First 64 bytes     │  Last 16     │<br>│  (Version, Prev,    │  (Merkle,    │<br>│   Merkle[0:28],     │   Time, Bits,│<br>│   Time, Bits,       │   Nonce)     │<br>│   Nonce[0:4])       │              │<br>└─────────────────────┴──────────────┘<br>        ↓                    ↓<br>   Expensive Hash      Cheap Hash</pre><p>If a miner can create multiple block headers that differ in the first 64 bytes but share the same last 16 bytes, then the expensive part of SHA-256 can be reused.</p><p>That saves 20 to 30 percent energy.</p><p>Covert ASICBoost exploited this by carefully manipulating the Merkle root so that certain trailing bits remained constant across candidate blocks. This created <strong>invisible efficiency advantages</strong> for specific manufacturers/miners, <strong>centralization pressure</strong> against anyone not using the exploit, <strong>incentives to block upgrades</strong> (like SegWit) that might break the optimization.</p><p>SegWit’s commitment structure entangles witness data into the Merkle tree in a way that breaks the most efficient covert ASICBoost construction.</p><p>This was not accidental. It removed a silent advantage that distorted mining incentives.</p><h3>Soft Fork as Adversarial Design</h3><p>SegWit was deployed as a soft fork. This was a defensive choice, not a matter of convenience. With hard forks, every participant must upgrade, effectively giving any significant miner group a veto over the protocol. This creates a high risk of a network split and hands the adversary leverage.</p><p>Whereas soft forks only requires a majority of miners to upgrade, forcing the adversary to mount a 51% attack if they wish to block it and no network split occurs.</p><p>Additionally, with the soft fork design old nodes see SegWit outputs as “anyone-can-spend.” However, if an attacker tries to spend one without a valid witness, old nodes see it as valid, upgraded miners reject it as invalid and the transaction never confirms.</p><p>Rules are enforced by incentives. Legacy nodes were treated as an <strong>adversarial constraint</strong>, not a feature.</p><h3>What SegWit Intentionally Didn’t Fix</h3><p>SegWit did not eliminate fee pinning, policy-layer malleability, or mempool games. These are not consensus problems and they belong to the wallet and network layers. Consensus changes are expensive. SegWit fixed the structural flaws required to make Bitcoin a foundation for higher-layer protocols and stopped there.</p><h3>Conclusion: Defensive Refactoring</h3><p>SegWit was a <strong>defensive refactoring</strong>.</p><ul><li>Transaction malleability was not theoretical; it blocked Lightning.</li><li>Covert ASICBoost was not hypothetical; it distorted mining.</li></ul><p>SegWit did not make Bitcoin “better” in a subjective sense. It made Bitcoin <strong>survivable</strong> in an environment where adversaries had learned to profit from its architectural ambiguities. One builds features, the other reduces the attack surface. SegWit did the latter.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3ec024e92ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootcamp challenges and how I have adapted in the last few weeks]]></title>
            <link>https://medium.com/@jackhoudini/bootcamp-challenges-and-how-i-have-adapted-in-the-last-few-weeks-60b0c13bb033?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/60b0c13bb033</guid>
            <category><![CDATA[simplicity]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Tue, 19 Mar 2019 16:26:30 GMT</pubDate>
            <atom:updated>2019-03-19T16:26:30.097Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVlolkYt6gNcXhm9ZIIXag.jpeg" /><figcaption>photo from Pexels</figcaption></figure><blockquote>“Simple can be harder than complex. You have to work hard to get your thinking clean to make it simple. But it’s worth it in the end, because once you get there you can move mountains.”- Steve, jobs</blockquote><p>It is day 7 at the Bootcamp, and I am really excited to be sharing this experience with you all. So far, I made it into the second week and looking back at how I have been able to learn a lot in the space of a few days has been truly rewarding.</p><h3><strong>Challenges</strong></h3><p>During the first week, I literally had problems with TravisCI and Heroku. We were given the task to host our applications on Heroku and at the same time to ensure our builds are passing. It was an entire new turf for me owing to the fact that I am new to this turf of software development. But the One thing that kept me going was the fact that ‘Change is constant’, and since it keeps changing, I need to adapt to such change.</p><p>Another Challenge I faced was Lack of sleep, The path to being world-class is not easy but If I give up now then I was never made to be world-class. I need to push and push and fight to ensure I get things done throughout the night, at the same time Owning my own learning.</p><h3>Lesson so far</h3><p>Staying Motivated can be daunting especially when you are totally new in a setting but when you learn to see high levels of motivation and commitment to objectives as good and desirable and strive to maintain drive and determination in the face of challenges, You on your way to being <em>World Class. Do not also forget that your colleagues and peers are always there to help and always try to leverage on them, also hold feedback dear to heart because it is the food for champions. You know you want to be a champ!!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60b0c13bb033" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Experience At Andela’s BootCamp]]></title>
            <link>https://medium.com/@jackhoudini/my-experience-at-andelas-bootcamp-24413fbf6d46?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/24413fbf6d46</guid>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Thu, 14 Mar 2019 16:33:38 GMT</pubDate>
            <atom:updated>2019-03-14T16:34:00.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*splsg7U5DHtzepjBcfP6UA.jpeg" /><figcaption>Photo from Pexels</figcaption></figure><p>It has been Day 4 at the andela Boot camp for cycle 42 and I have a lot of experience I would like to share. First, the rush of adrenaline I have experienced is on a different level, andela has shown me there are a lot of things I can accomplish as long as I put in the effort. Let me share with you.</p><h3><strong>Technologies</strong></h3><p>Over the last few days, I have been exposed to different technologies used in software development. One of such is Travis CI, which is a continuous integration tool, used to <strong>integrate</strong> code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. This practice gave me a lot of headaches Trying Out, I messed my git workflow real bad but in the end, I pulled through.</p><p>Another Interesting Technology is Heroku(I dreaded this before the Boot camp). It is basically a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.</p><h3>Feedback</h3><p>There is a saying “ We rise by lifting others”, that is for us to improve we need someone experienced to help put us on the right track. At andela, I have received quality feedback that has helped me to Improve my skills and become a better developer. There are times When the feedback will be hard but implementing the feedback pushes you to be the best version of yourself.</p><h3>Collaboration and Code Unblocking</h3><p>Each day I am at the Bootcamp, I run into errors and code blockers but having fellow bootcampers who are supportive and patient with you has got to be One of my high lights here. I have Chima Ekeneme, who helped me understand Bcrypt, Victor Awotidebe helped me with my git workflow and when I had an issue with Travis, Frank Obi helped me with the unblocking.</p><p>It has been a fun experience so far, writing this blog post too is another experience(chuckles). I don’t know what a blog is not to even dream of sitting down to write one but here I am, and I am grateful. Thank You Andela!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24413fbf6d46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration- Continuous Learning]]></title>
            <link>https://medium.com/@jackhoudini/continuous-integration-continuous-learning-95510a7cb3c7?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/95510a7cb3c7</guid>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Wed, 13 Mar 2019 16:45:18 GMT</pubDate>
            <atom:updated>2019-03-13T16:45:18.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*Q7ksHuRde-0RICaPwoLmpQ.png" /><figcaption>Photo by Google</figcaption></figure><p>It has been Day 2 at andela’s Bootcamp for cycle 42 and so far it has been really challenging and at the same time and exciting experience. I have been opportune to work with different software development tools but the one I found quite challenging was continuous integration with Travis CI. But what is Travis CI and How do we set it up especially in a node project.</p><h3>What is Travis CI?</h3><p>Before defining what Travis is, It is important to know what continuous integration is. Continuous Integration is defined as development practice where developers integrate code into a shared repository frequently, preferably several times a day. Each integration can then be verified by an automated build and automated tests. While automated testing is not strictly part of CI, it is typically implied.</p><p>One of the key benefits of integrating regularly is that it can detect errors quickly and locate them more easily. As each of those changes is added to a project, Travis(being an example of a CI software) helps track those changes and ensures bugs are not introduced into the system that way the system works fine.</p><h3><strong>How Is Travis Setup In a node project?</strong></h3><p>To ensure Continuous Integration is effectively implemented, we need to practice test-driven development. For this example, We are going to write test for a simple sum function that adds two numbers together using mocha and chai. However, ensure npm is initialized and express is installed.</p><blockquote><em>npm i -D mocha chai chai-http</em></blockquote><p>Let&#39;s write a simple Test:</p><blockquote>const chai = require(‘chai’);</blockquote><blockquote>const app = require(‘index.js)</blockquote><blockquote>const expect = chai.expect;</blockquote><blockquote>describe(‘Add number function’ , function() {</blockquote><blockquote>it(‘should add a number’, function(done) {</blockquote><blockquote>chai.request(app)</blockquote><blockquote>.end((err, add){</blockquote><blockquote>expect(add(3,4)).to.equal(7);</blockquote><blockquote>done();</blockquote><blockquote>});</blockquote><blockquote>});</blockquote><p>Here we using chai to write our test, we are calling the describe block to initiate our test, it takes a string that describes our test and a call back function to execute the test. In the function, there is an ‘it block’ that executes the test, it takes two parameters, the test command and the done function that ends the test. Then let us implement the function:</p><blockquote>function add(a, b) {</blockquote><blockquote>return a + b</blockquote><blockquote>};</blockquote><p>Looking at the function Our codes should pass the test. Since we are focusing on Travis here, we would go straight to setting up our travis. Now to do that we need a <em>.travis.yml file. </em>In the travis file, we are going to specify some configurations:</p><blockquote>language: “node_js”</blockquote><blockquote>node_js:</blockquote><blockquote>— “stable”</blockquote><p><em>cache:<br>directories:<br>- “node_modules”</em></p><p><em>install</em> :</p><blockquote>— npm install</blockquote><blockquote>scripts:</blockquote><blockquote>— npm run test</blockquote><p>Here, we are telling Travis Our application is running on node and that Travis should install a version of node on its machine. Then we instruct it to install our project dependencies and then run our test script in our package.json. However, we need to configure our package.json:</p><blockquote>“scripts”: {</blockquote><blockquote>“test”: “mocha test/*.js”</blockquote><p>Now everything looks good it remains one final Icing on the cake, we need to have an account running on travis. Log on to travis website<a href="http://www.travis-ci.org/"> www.travis.ci.org</a>, signup with github and switch on the repo(you must have created a repo on github before this tutorial)you want to use. Then save all your changes on your local machine and push to github.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sf240o9wriET8Ws7-kWAsw.png" /></figure><p>You should have all test passing and building on Travis similar to this. Keep adding more features to your application and keep testing, Travis will continue to Integrate. This is One technology this Bootcamp as exposed me to, I am grateful to andela for this experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95510a7cb3c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Epic is not just another four-letter word. It is a Culture]]></title>
            <link>https://medium.com/@jackhoudini/epic-is-not-just-another-four-letter-word-it-is-a-culture-719c5f43d6a4?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/719c5f43d6a4</guid>
            <category><![CDATA[andela]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Tue, 12 Mar 2019 16:00:24 GMT</pubDate>
            <atom:updated>2019-03-12T16:00:24.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MVw-Kxy6twKlunzUrv520w.jpeg" /><figcaption>Photo from Wikipedia</figcaption></figure><p>Andelans are EPIC!! This is a thing you will always hear in the andelan community. But what does ‘EPIC’ mean? Is it just another four-letter word or Is it a culture that is imbibed in every member of its community? I have been part of that culture at least while at the Bootcamp. Let me share with you some of the EPIC experiences I have had.</p><h3><strong>What does the word EPIC mean?</strong></h3><p>The word EPIC stands for :</p><p>E — Excellence</p><p>P — Passion</p><p>I — Integrity</p><p>C — Collaboration</p><p>This simply means that with PASSION, andelans COLLABORATE with one another to deliver EXCELLENCE in their output while upholding INTEGRITY.</p><h3>How these values have Influenced Me?</h3><p>Participating in the andela learning community has a profound effect on me. With <strong>Excellence, I aspire to be the best version of myself. </strong>I know that my</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0xrrxX-8gVLM28jWwX5Vg.jpeg" /><figcaption>Photo from Pexels</figcaption></figure><p>work is a representation of who I am, and I hold everything I do and everyone I interact with to the highest standards. That is why before I begin any work, I prepare my mind and my tools so as to deliver the best work output. It also makes me believe that in the face of failure, I understand that to achieve success I need to put in maximum effort.</p><p>As an aspiring developer who is <strong>Passionate</strong> about what I do, I approach every goal with unwavering energy and conviction; I embody grit and persistence. I do not see failure as a setback but rather failure fuels and motivates me to Improve and get better.</p><blockquote>Passion is one great force that unleashes creativity, because if you’re passionate about something, then you’re more willing to take risks. Yo-Yo Ma<br>Read more at:<a href="https://www.brainyquote.com/topics/passion"> https://www.brainyquote.com/topics/passion</a></blockquote><p>Andela really holds <strong>Integrity </strong>to a high degree. Having Integrity enforces me to understand that I have a responsibility towards others and my actions and speech towards them are accountable, as a result, <strong>I do not take credit for work that is not mine and pass it as mine. So I give Credit when due to every resource I use in my work.</strong></p><h4><em>Integrity is telling myself the truth. And honesty is telling the truth to other people - Spencer Johnson <br></em><a href="https://www.wow4u.com/truthquotes/"><em>Truth</em></a></h4><p>Lastly, I have learned what it means to be a valuable team player through <strong>Collaboration.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BS0eMZkDJkPDsqqseosAOQ.jpeg" /><figcaption>Photo by Pexels.com</figcaption></figure><p>I recognise that I have skills that would benefit my team so I strive to always offer meaningful support when required. I admit to the fact that ‘No one is an island of knowledge’ that is why I respect every other member’s opinion believing and embodying the truth <strong><em>that our sum is greater than our parts.</em></strong></p><p>It has been an amazing experience within this community, I have evolved as a result of my association with them. Epic is not just another four-letter word, Its a Culture. I am Epic. You can be EPIC as well!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=719c5f43d6a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Are What You Think. Think Better!]]></title>
            <link>https://medium.com/@jackhoudini/you-are-what-you-think-think-better-3652d5ab8808?source=rss-772a106ade21------2</link>
            <guid isPermaLink="false">https://medium.com/p/3652d5ab8808</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[growth-mindset]]></category>
            <dc:creator><![CDATA[Justice Amadi]]></dc:creator>
            <pubDate>Mon, 11 Mar 2019 15:40:12 GMT</pubDate>
            <atom:updated>2019-03-12T13:05:16.884Z</atom:updated>
            <content:encoded><![CDATA[<h3>YOU ARE WHAT YOU THINK. THINK BETTER!!</h3><p>Learning how to code has got to be one of the most challenging tasks I have ever faced. I always feel encouraged and excited when I read a blog post about experienced programmers and the awesome software they build. But, I always get overwhelmed whenever I meet a challenging obstacle in programming. I always feel I will never be as good as they are that I am an impostor and such a goal is beyond my reach.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rsMQVckkVT8uwVXk7tFFYA.jpeg" /></figure><p>This was the mindset I always had about myself, that was why when I faced a challenge to create an API using node.js, integrate CI and write tests, I gave up on the initial attempt and felt this was too much for me to handle. I already embraced the fixed mindset I had about myself.</p><p>However, One experienced programmer saw my countenance and bothered to know What the problem I am facing is and offered to give me some advice.</p><p>He explained <em>“Genius is not born. It’s Trained and Having Talent is not enough. To be the best, it requires Effort.”</em> I learned from him that the best computer programmers are not the most talented, but they are the ones who recognize their skill gaps and will close that gap through effort. They <strong>develop the ability to learn, unlearn and relearn and when it gets tough for them, rather than give up, they are not shy to ask for help and are open to feedback whether hard or not.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVvCdrkbXAtD2y-ymy4uvA.jpeg" /><figcaption>If you are facing a new challenge or being asked to do something you have never done before don’t be afraid to step out. You have more capability than you think you do but you will never see it unless you place a demand on yourself for more. — Joyce Meyer</figcaption></figure><p>After my conversation with him, I developed this mindset, that I can grow as a developer and as an individual If I persist in putting the effort. With time, I could create an API from scratch (something I have never done before), I wrote the test for my software using a JavaScript library called Chai and Integrating Travis did not seem to be a problem for me.</p><blockquote>“Patience, persistence and perspiration make an unbeatable combination for success.” — Napoleon Hill</blockquote><p>The Improvement was not expeditious but with persistent effort, patience and being teachable; I could overcome that obstacle I thought was insurmountable. I believe that a fixed mindset stunts my progress and therefore; I impress a growth mindset. You too can!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3652d5ab8808" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>