Archive

Weekly engineering notes

Short explanations, useful mental models and lessons worth keeping.

16 min read

From Merkle proofs to Ethereum's state trie

Building a Merkle tree, verifying inclusion and absence, and understanding how Ethereum's modified Merkle Patricia Trie commits to accounts, storage, transactions and receipts.

Blockchain · Ethereum · Cryptography · Data structures

→

24 min read

How database drivers work in Go

Following a query through database/sql, connection pools and wire protocols, then comparing pgx with MySQL, SQLite and SQL Server drivers.

Go · Databases · PostgreSQL · MySQL · SQLite · SQL Server

→

11 min read

Building a simple Ethereum indexer in Go

Notes from building a focused Ethereum mainnet indexer with bounded concurrency, PostgreSQL storage, reorg recovery and a simple read API.

Go · Blockchain · Ethereum · PostgreSQL

→

9 min read

Why gRPC fits internal service-to-service calls

A simple guide to gRPC contracts, generated code, HTTP/2, deadlines, errors, streaming and the production details that matter.

Distributed systems · gRPC · Go · Networking · Protobuf

→

11 min read

Under the hood of an Ethereum transaction

Following one 1 ETH transfer from the Send button to signing, sender recovery, EVM execution, receipts and block roots.

Ethereum · Cryptography · Blockchain

→

17 min read

Executing blockchain transactions in parallel

A distributed-systems view of transaction conflicts, deterministic execution, and how Ethereum, Solana, Aptos, Sui and Monad expose or discover parallelism.

Distributed systems · Blockchain · Ethereum · Solana · Parallel execution

→

13 min read

Learning rate limiter algorithms in Go

Implementing fixed window, sliding window log, sliding window counter, token bucket and leaky bucket to understand their behavior and trade-offs.

Go · Algorithms · Rate limiting · Concurrency

→

16 min read

How the Go scheduler works

Following goroutines through the G–M–P model, run queues, work stealing, netpolling, syscalls, preemption and runtime diagnostics.

Go · Concurrency · Runtime

→

19 min read

Designing a distributed rate limiter

Designing a global rate limiter from policy and atomic state to Redis sharding, regional quotas, failure behavior and production observability.

System design · Redis · Distributed systems

→

2 min read

What PostgreSQL indexes actually cost

A concise explanation of faster reads, slower writes, storage overhead and why the query planner may ignore an index.

PostgreSQL · Databases · Performance

→

11 min read

Why Rust futures need Pin

A step-by-step mental model for moves, async state machines, Pin, Unpin, stack and heap pinning, and static versus dynamic futures.

Rust · Async · Futures · Memory safety

→

3 min read

A mental model for Go synchronization

A compact guide to choosing between mutexes, atomics, wait groups, condition variables, Once and sync.Map.

Go · Concurrency · Synchronization

→

14 min read

Building a DEX trading engine to understand execution

How a parental-leave learning project grew from AMM arithmetic into a production trading engine with Go, Solidity, simulation and risk controls.

Go · Solidity · Ethereum · DeFi · Trading systems · AMM

→

11 min read

Mapping the MEV landscape

A research map of MEV opportunities, from arbitrage and liquidations to JIT liquidity, cross-domain execution and intent auctions.

MEV · Ethereum · Flashbots · DeFi · Block building

→

7 min read

Turing completeness and gas

Why unrestricted computation creates the halting problem and how Ethereum uses gas to bound every transaction.

Computer science · Ethereum · EVM · Gas

→

7 min read

Building a DEX backrunner in Go

How I built a small Ethereum mempool watcher that decoded Uniswap swaps and assembled cross-DEX backruns as Flashbots bundles.

Go · Ethereum · MEV · Flashbots · DeFi

→

4 min read

How sync.Once works under the hood

A look inside Go's sync.Once, including its fast path, mutex-protected slow path and important edge cases.

Go · Concurrency · Standard library

→

15 min read

How Go's HTTP server works

Following a request through net/http, from the TCP accept loop and runtime netpoller to ServeHTTP, keep-alive and graceful shutdown.

Go · HTTP · Networking · Concurrency

→

7 min read

A role-aware state machine in Go

How I represented vehicle states, transition rules and role permissions in a small concurrency-safe Go package.

Go · State machines · Concurrency · Authorization

→

2 min read

Static and dynamic typing

The difference between when types are checked and how source code is translated for execution.

Programming languages · Type systems · Compilers

→

6 min read

Reading Cassandra: Dynamo meets Bigtable

My notes on Cassandra's partitioning, replication, tunable consistency, gossip membership and LSM-style storage engine.

Distributed systems · Cassandra · Databases · Replication

→

5 min read

Reading ZooKeeper: a kernel for coordination

How znodes, sessions, watches and ordered updates provide a small foundation for leader election, membership and configuration.

Distributed systems · ZooKeeper · Coordination · Consensus

→

5 min read

Reading SWIM: gossip and failure detection

How SWIM separates probing from dissemination, uses indirect checks and suspicion, and scales membership traffic with cluster size.

Distributed systems · Gossip · SWIM · Failure detection

→

3 min read

A quick overview of JWTs

How a signed JSON Web Token is structured, created and verified without confusing integrity with encryption.

Security · Authentication · Authorization · Web

→

5 min read

Reading Kafka: the log as the system

My notes on the original Kafka paper: partitioned logs, consumer-owned offsets, batching, sequential I/O and the boundary with modern Kafka.

Distributed systems · Kafka · Messaging · Storage

→

5 min read

Reading HDFS: large files, simple metadata

My notes on HDFS block storage, the NameNode, DataNode pipelines, replication, recovery and the trade-offs behind high-throughput access.

Distributed systems · HDFS · Storage · Hadoop

→

5 min read

Reading consistent hashing: moving less data

Why ordinary modulo hashing breaks during scaling, how the hash ring limits movement and where virtual nodes and replicas fit.

Distributed systems · Consistent hashing · Partitioning · Caching

→

6 min read

Reading Dynamo: designing for availability

My notes on Amazon Dynamo: consistent hashing, replication, vector clocks, sloppy quorums, hinted handoff and anti-entropy repair.

Distributed systems · Dynamo · Databases · Availability · Replication

→