← All projects

PRJ-08 · Wallet Service (Core Team)

Privy Wallet

Go wallet ID generator that cut generation time from 2 hours to 5 minutes.

2024 · 9 months
wallet ID generation
2h → 5m

02 / Decisions

  1. DEC-01 Workers that never wait on each other

    One Go process took 2 hours to generate wallet IDs. Adding workers only helps if they don't all queue for the next ID.

    Turned down

    A shared counter that every worker asks for the next ID

    Chose

    Each worker generates time-ordered UUIDs (v6/v7) in code. No worker waits for another, and new IDs still arrive in index order, unlike random UUIDv4.

    Cost
    IDs are 128-bit UUIDs instead of short sequential numbers.
    Proof
    Generation time fell from 2 hours to 5 minutes with goroutines and distributed workers.

03 / What I did

  1. Designed and deployed a high-throughput wallet ID generator in Go, cutting generation time from 2 hours to 5 minutes with goroutines and distributed workers.

  2. Maintained the wallet service under heavy production load, keeping it reliable and fault tolerant.

04 / Stack