Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Jane Street Tech Blog 12 min read Article hardMaster

Results from the ASIC puzzle

Jane Street's puzzle chip, shipped as a bare GDS layout, turns out to be a hardware checker for an 11x11 Star Battle ("Two Not Touch") puzzle. It uses per-row, per-column and per-region 2-bit counters, a region ROM, a delay line for adjacency, and an LFSR-obfuscated output ROM, all built on SKY130 with LibreLane. Solvers extracted netlists with LVS in KLayout or Magic, or with custom tools, then simulated, traced logic back from the success signal, probed with impulse inputs, or used SAT solvers. One lesson stands out: a model that reproduces a sample waveform can still be wrong, so cross-checking independent implementations and building inputs that should fail is what catches the bugs.

Assumes: digital logic designgate-level netlistsASIC layout basics

Related posts

  • Can you reverse engineer our neural network?

    Jane Street Tech Blog hardMaster

    A Jane Street ML puzzle shipped a fully specified, hand-built PyTorch network with integer weights that outputs 0 for almost every input, and the writeup follows one solver's path to cracking it. The last two layers implement a 16-byte equality check using ReLU(v-x-1) - 2ReLU(v-x) + ReLU(v-x+1). The thousands of layers before them turned out to compute MD5, spotted from 32 repeating blocks of 48 layers. Along the way the solver tried integer linear programming, graph reductions that shrank 2M nodes to 75K, bound propagation and a SAT solver, all defeated by the hash's irreversibility. He also found an unintended length-encoding bug for inputs over 32 characters, but the actual answer came from brute-forcing the target hash with a large English word list once the function was identified.

  • Fuzzer Blind Spots (Meet Jepsen!)

    TigerBeetle hardMaster

    Jepsen found a missing-results bug in TigerBeetle's query engine despite four fuzzers covering it, because the VOPR and LSM query fuzzer pre-registered disjoint queries whose matching objects were always consecutive in every secondary index, so zig-zag merge join probing was never exercised. The bug was in ScanTreeLevel: after a probe shrank the scan's key range, the key_exclusive_next check could misfire from the wrong end and mark the level finished, returning truncated results. Rewriting the fuzzer to generate random objects and random queries against a full model reproduced the bug trivially, and the fix splits the termination condition. The broader lesson is that biased fuzzer workloads can silently project away reachable states, so targeted fuzzers should be complemented with broader, less-structured sampling and precise output checking.

  • Magic-trace: Diagnosing tricky performance issues easily with Intel Processor Trace

    Jane Street Tech Blog hardMaster

    Magic-trace is an open-source tool that uses Intel Processor Trace in circular-buffer mode to capture roughly the last 10ms of execution before a chosen function call, then renders every function call on a nanosecond-resolution timeline in a forked Perfetto UI. Processor Trace records full control flow with about 30ns timing at 2-20% overhead and needs no instrumentation, which suits latency problems far shorter than a sampling profiler's 250µs interval. The build went from wrapping `perf` to using perf_event_open with libipt directly, and hardware breakpoints let it trigger snapshots on any function without the target's cooperation. Along the way it hit a kernel null-pointer bug and a suspected Skylake erratum, and it has already diagnosed 100ns inlining regressions and long Async cycles.

  • Advent of Hardcaml

    Jane Street Tech Blog hardMaster

    Several Advent of Code 2024 puzzles were solved entirely on a small Lattice ECP5 FPGA (84K LUTs, 4 Mbits RAM) using Hardcaml, Jane Street's OCaml-embedded HDL, with the open-source Yosys + NextPNR toolchain. Day 4's word search becomes a convolution over a shift register holding the last four grid rows, with a higher-order function generating sliding windows of any dimensions. Day 7's operator search becomes a deep pipeline that evaluates one operator combination per clock cycle, testing hundreds of millions of combinations in seconds. OCaml's type system, functors and metaprogramming make unrolled, parametrized hardware concise and reusable, and the post closes by challenging other HDL communities to solve Advent of Code puzzles too.

  • This Week at Zed Industries: #1

    Zed mediumAdept

    Zed grew out of Xray, the experimental editor Nathan Sobo and Antonio worked on at GitHub in 2018, and this weekly update recaps the path from there to a company and a private alpha. It also describes the team's first "quality week" of bug fixing, which they plan to repeat every six weeks. Multibuffer performance in project-wide search got much faster after two fixes. Rope fingerprints, computed with the monoid-homomorphic bromberg_sl2 hash and aggregated through a B-tree, are now stored as HashMatrix values instead of allocated Strings. Excerpts are also built on a background thread and streamed into the multibuffer so the main thread no longer blocks.

The quest for software engineering knowledge.

Look:
Layout: