Blog

Field notes from the technical writing.

One short, practical take per week — the idea behind a system, the decision that mattered, the trade-off worth remembering. Each note links to the full technical deep dive. Browse the full library →

View

Week 29 · · Cryptography & Security

KES (Key Evolving Signatures) for Forward Security

A stolen block-producing key shouldn't let an attacker rewrite the past. Key-Evolving Signatures make that guarantee real by throwing the old key away.

  • Key evolution and the forward-security property it buys
  • Signature generation as keys advance through time
  • A practical implementation for Cardano block production

Forward security means a future compromise can't forge the past — KES is how.

#Cryptography #KES #Cardano #Kotlin

Week 28 · · Cryptography & Security

VRF (Verifiable Random Functions) in Blockchain Consensus

How do you run a fair lottery when everyone is adversarial and nobody trusts the dealer? Verifiable Random Functions — the quiet engine inside Ouroboros.

  • ECVRF construction and what makes the output verifiable
  • Proof generation and verification, in Kotlin
  • Why VRF is the right tool for leader election

VRF gives you randomness you can prove was fair — a rare and powerful thing.

#Cryptography #VRF #Cardano #Kotlin

Week 27 · · Cryptography & Security

Ed25519 Signatures: Theory and Implementation

Ed25519 is everywhere in modern blockchains — and "just call the library" hides a beautiful, testable piece of engineering behind RFC 8032.

  • Keys, signing, and verification, structured for clarity
  • A pure implementation that follows the RFC step by step
  • Where the constant-time discipline has to live

Signatures are trust made mechanical — worth understanding at the byte level.

#Cryptography #Ed25519 #Signatures #Kotlin

Week 26 · · Cryptography & Security

Implementing BLAKE2b in Kotlin: A Cryptographic Hash Function

You can use BLAKE2b for years and never see inside it. Implementing it once, aligned with Cardano's BLAKE2b-224/256, changes how you read every hash.

  • State layout and the compression function that does the real work
  • An architecture-first walkthrough on Kotlin/JVM
  • Testing against reference vectors until it's provably correct

Hash functions stop being magic the moment you build one that passes the vectors.

#Cryptography #BLAKE2b #Kotlin #Cardano

Week 25 · · Blockchain Fundamentals

Real-Time Blockchain Event Streaming with Kafka

Polling for new blocks works until it doesn't. Event streaming turns your chain data into a river your whole system can drink from.

  • Kafka integration for blockchain events at volume
  • Stream processing that stays correct under bursts
  • Reactive applications built on Spring WebFlux

Streaming isn't just faster polling — it changes what your architecture can do.

#Kafka #Streaming #Spring #Kotlin

Week 24 · · Blockchain Fundamentals

Blockchain Data Modeling: Designing Queryable Indexes

The schema you design on day one decides which queries are instant and which time out at scale. Blockchain data punishes lazy modeling.

  • Normalization strategies for chain data that doesn't fit neatly
  • Indexing patterns tuned to the queries you'll actually run
  • Query optimization across Bitcoin, Cardano, and Cosmos shapes

A blockchain explorer is a schema-design problem wearing a UI.

#Database #Indexing #PostgreSQL #Architecture

Week 23 · · Blockchain Fundamentals

Cross-Chain Bridge Architecture: Security and Design Patterns

Most of crypto's biggest hacks have been bridges. If you're going to build one, you'd better start from the attack vectors, not the happy path.

  • Lock-and-mint, liquidity pools, and validator-set designs compared
  • Where trust concentrates and how it gets exploited
  • Security considerations that separate a bridge from a honeypot

Design a bridge threat-model-first — the whole point is where the trust sits.

#Bridges #CrossChain #Security #Architecture

Week 22 · · Blockchain Fundamentals

Building Multi-Chain Wallet Infrastructure

One wallet, three chains, one mistake in key derivation and you've got a support ticket that never ends. Multi-chain wallets live or die on the crypto details.

  • BIP32/BIP44 key derivation across Bitcoin, Cardano, and Cosmos
  • Address generation per chain without leaking assumptions
  • Transaction signing that stays safe across ledgers

Multi-chain isn't three wallets in a trench coat — it's one careful key hierarchy.

#Wallets #MultiChain #Cryptography #Kotlin

Week 21 · · Blockchain Fundamentals

Blockchain Indexing Patterns: From Bitcoin to Multi-Chain

Indexing one chain teaches you the mechanics. Indexing several teaches you which of your assumptions were really just Bitcoin's.

  • Real-time streaming vs batch processing, and when each earns its keep
  • Queryable data structures that survive different chain models
  • Patterns that generalize from Bitcoin to multi-chain

A good indexing design names its assumptions instead of hard-coding one chain's.

#Indexing #Bitcoin #Cardano #Kotlin

Week 20 · · Blockchain Fundamentals

UTXO vs Account Model: A Practical Developer's Perspective

Theory aside — what actually changes in your code when you move from UTXO to an account model? A lot, and most of it in the boring parts.

  • Transaction construction: selecting outputs vs updating a balance
  • State management and where concurrency bugs like to hide
  • Indexing strategies that differ more than you'd expect

The model you choose quietly rewrites your data layer — plan for it.

#UTXO #AccountModel #Blockchain #Kotlin

Week 19 · · Blockchain Fundamentals

Comparing Blockchain Consensus Mechanisms: PoW, PoS, and BFT

PoW, Ouroboros, Tendermint — three consensus mechanisms, three completely different definitions of "finished." That difference decides your product.

  • Security assumptions behind Bitcoin's PoW, Cardano's PoS, and Cosmos's BFT
  • Probabilistic vs instant finality and what each costs
  • Performance characteristics that matter under real load

There's no best consensus — only the right trade-off for your failure model.

#Consensus #Bitcoin #Cardano #Cosmos

Week 18 · · Blockchain Fundamentals

Cosmos Account Model vs UTXO: Trade-offs and Design Decisions

Account model or UTXO? It's not religion — it's a set of concrete trade-offs in scalability, privacy, and how hard smart contracts are to reason about.

  • Where account balances simplify and where they hide concurrency bugs
  • Where UTXO wins on parallelism and auditability
  • Drawn from building on both Bitcoin/Cardano and Cosmos

Pick the model for the property you need most — not the one you learned first.

#Cosmos #UTXO #Architecture #Blockchain

Week 17 · · Blockchain Fundamentals

IBC Protocol: Inter-Blockchain Communication Explained

Bridges get hacked; IBC keeps working. The difference is that IBC doesn't trust a multisig — it verifies the other chain with a light client.

  • Light clients and how one chain cryptographically follows another
  • Connection and channel handshakes that establish trust
  • Packet relaying for real cross-chain token transfers

IBC is what interoperability looks like when you refuse to trust an intermediary.

#Cosmos #IBC #CrossChain #Go

Week 16 · · Blockchain Fundamentals

Building Custom Cosmos Modules in Go

The whole point of Cosmos is writing your own module. Here's what that actually takes, end to end, in Go.

  • State management and the keeper pattern
  • Message handlers and query services that wire your logic to the chain
  • Building a complete module from an empty file

A custom module is where an app-chain becomes genuinely yours.

#Cosmos #Modules #Go #Blockchain

Week 15 · · Blockchain Fundamentals

Tendermint/CometBFT Consensus: Implementation and Optimization

CometBFT gives you instant finality — no waiting for confirmations. The price is a voting protocol that has to be exactly right under adversarial conditions.

  • Voting rounds, validator sets, and how a block gets committed
  • Safety and liveness, and the tension between them
  • Evidence-based tuning to squeeze out real performance

Instant finality is wonderful — and it makes the consensus code very unforgiving.

#Cosmos #Tendermint #Consensus #Go

Week 14 · · Blockchain Fundamentals

Understanding Cosmos SDK: Architecture and Design Patterns

Cosmos made a bold bet: instead of one chain for every app, give every app its own chain. The SDK is how that bet becomes buildable.

  • Modules, keepers, and the ABCI boundary between app and consensus
  • How application-specific blockchains change the design space
  • Where the SDK's opinions help and where they constrain

App-specific chains are a different mental model — and Cosmos SDK is the on-ramp.

#Cosmos #SDK #Architecture #Go

Week 13 · · Blockchain Fundamentals

Cardano Transaction Building: A Comprehensive Guide

Building a valid Cardano transaction by hand is a puzzle: pick inputs, compute change, estimate fees, attach metadata — and every step depends on the last.

  • Input selection strategies and their trade-offs
  • Change calculation and fee estimation that actually balance
  • A reusable Kotlin transaction builder

Transaction building is where UTXO stops being theory and starts being arithmetic.

#Cardano #Transactions #Kotlin #Blockchain

Week 12 · · Blockchain Fundamentals

Integrating Cardano Wallets: CIP-30 Implementation Guide

A dApp is only as usable as its wallet connection, and on Cardano that means one spec: CIP-30. Get it right once and every wallet just works.

  • The CIP-30 connector API that Nami, Eternl, and Flint all implement
  • Requesting access, reading UTXOs, and signing without touching private keys
  • TypeScript and React patterns for a clean integration

Wallet integration is a contract, not a hack — follow the spec and it stays stable.

#Cardano #Wallets #CIP30 #TypeScript

Week 11 · · Blockchain Fundamentals

Cardano Smart Contracts: Plutus Core Deep Dive

Plutus scripts don't run on a friendly VM — they compile down to Plutus Core, a tiny lambda calculus with a strict budget. That budget shapes everything.

  • UPLC and how a Cardano script is actually evaluated
  • Execution budgets and why they discipline contract design
  • Validating Plutus scripts from Kotlin

Understand the evaluator and you stop writing scripts that mysteriously run out of budget.

#Cardano #Plutus #SmartContracts #Kotlin

Week 10 · · Blockchain Fundamentals

Building a Cardano Node from Scratch: Part 3 - Cryptographic Primitives

Consensus is only as trustworthy as the cryptography underneath it. Part 3: building the primitives Cardano leans on.

  • VRF and KES from the specifications, not from a black-box dependency
  • BLAKE2b hashing, Ed25519 signatures, and BLS in context
  • How these pieces combine to make block production verifiable

Implement the primitives once and the consensus paper reads completely differently.

#Cardano #Cryptography #VRF #Kotlin

Week 09 · · Blockchain Fundamentals

Building a Cardano Node from Scratch: Part 2 - Ledger Validation

A node that talks to peers but can't validate the ledger is just a very expensive chat client. Part 2: making it agree on truth.

  • Cardano's ledger rules and how transactions actually change state
  • Stake distribution and reward calculation, implemented not hand-waved
  • Complete ledger state transitions you can step through

The ledger layer is where a node stops relaying and starts deciding.

#Cardano #Node #Ledger #Kotlin

Week 08 · · Blockchain Fundamentals

Building a Cardano Node from Scratch: Part 1 - Network Layer

The fastest way to truly understand a blockchain is to build a node for it. Part 1: the network layer, in pure Kotlin.

  • P2P networking and peer discovery from the ground up
  • The Ouroboros mini-protocols: chain-sync, block-fetch, tx-submission
  • Why the protocol splits concerns into small, composable conversations

Before ledgers and crypto, a node is a very careful networking program.

#Cardano #Node #Networking #Kotlin

Week 07 · · Blockchain Fundamentals

Implementing Ouroboros Praos Consensus in Kotlin

Proof-of-stake isn't "proof-of-work but greener" — Ouroboros Praos is a careful cryptographic lottery, and the details are the whole point.

  • VRF-based slot leadership: winning the right to make a block without announcing it early
  • KES signatures and forward security for block producers
  • Implementing the core consensus components in Kotlin

Praos earns its security from cryptography, not electricity — and the design is elegant once it clicks.

#Cardano #Ouroboros #Consensus #Kotlin

Week 06 · · Blockchain Fundamentals

Cardano's Extended UTXO Model: Beyond Bitcoin

Cardano kept Bitcoin's UTXO model and taught it to run smart contracts. The trick is three little words: datum, redeemer, context.

  • How the extended UTXO model attaches state to outputs without an account balance
  • Datums and redeemers — where a contract's data and its unlocking logic live
  • Keeping UTXO's determinism and parallelism while gaining programmability

eUTXO is a genuinely different answer to smart contracts — not Ethereum with different syntax.

#Cardano #eUTXO #SmartContracts #Kotlin

Week 05 · · Blockchain Fundamentals

Bitcoin Block Validation: Implementing Consensus Rules

"Is this block valid?" is the single question every Bitcoin node must answer identically, forever. Get one rule wrong and you fork yourself off the network.

  • Header validation and verifying proof-of-work the way consensus actually requires
  • Transaction-level checks that reject the subtly invalid, not just the obviously broken
  • Building a complete block validator in Kotlin, rule by rule

Consensus is unforgiving by design — validation is where that discipline shows.

#Bitcoin #Consensus #Validation #Kotlin

Week 04 · · Blockchain Fundamentals

Optimizing Bitcoin Transaction Broadcasting

Signing a transaction is easy. Getting it to actually confirm, at the right fee, without wedging in the mempool — that's the part nobody demos.

  • Mempool management and why your transaction can sit there for hours
  • Fee estimation that adapts to network conditions instead of guessing
  • Propagation strategies that get a transaction to miners quickly and reliably

Broadcasting is a systems problem, not a one-line RPC call.

#Bitcoin #Mempool #Optimization #Kotlin

Week 03 · · Blockchain Fundamentals

Bitcoin Script: From Basics to Advanced Patterns

Bitcoin quietly runs a stack-based programming language, and most "Bitcoin can't do X" claims are really "I haven't read Script yet."

  • From P2PKH and P2SH to SegWit and Taproot — what each pattern actually locks and unlocks
  • Parsing and validating scripts instead of trusting a library to do it silently
  • Writing custom scripts in Kotlin to see the opcodes execute

Script is small, weird, and worth learning — it's where Bitcoin's real flexibility lives.

#Bitcoin #Script #Cryptography #Kotlin

Week 02 · · Blockchain Fundamentals

Building a Bitcoin Indexer from Scratch

A full node stores every block — but try asking it for one address's history and you'll learn fast why every serious product runs an indexer.

  • Designing an ingestion pipeline that follows the node and processes blocks in order
  • Modeling blocks, transactions, and UTXOs in PostgreSQL with reorgs built in from day one
  • Tiered storage so recent data stays fast while history grows into the hundreds of gigabytes

An indexer isn't a database dump — it's the layer that turns raw chain data into product.

#Bitcoin #Indexer #PostgreSQL #Infrastructure

Week 01 · · Blockchain Fundamentals

Understanding Bitcoin's UTXO Model

Every blockchain question eventually comes back to one model choice: does a coin have a balance, or is it just an unspent output waiting to be consumed?

  • Why Bitcoin has no accounts — only inputs, outputs, and the scripts that guard them
  • How UTXO gives you parallelism and auditability that account balances make harder
  • Building a small UTXO tracker in Kotlin to make the model concrete

Understand UTXO first and half of Bitcoin, Cardano, and Lightning stops being mysterious.

#Bitcoin #UTXO #Blockchain #Kotlin