nrml
Backend developmentCoinbase

Transaction Feed: Cursors, Sorting, and Review

Repair transaction cursors, compare amount-pagination designs, diagnose a database timeout, and review a cache proposal.

The scenario

Repair transaction cursors, compare amount-pagination designs, analyze a database timeout, and review a proposed cache. The runnable in-memory optimization is an additional practice task. This original nrml exercise follows community reports about Coinbase; it is not an official interview question.

A failure to reason about

Transactions A and B share timestamp 10. With a page size of one, continuing after A must still return B. Ordering by amount can produce a different first page.

Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.

Questions to bring to your review

  • What must a continuation preserve when several transactions share a timestamp?
  • How can amount ordering coexist with existing timestamp cursors?
  • Why might amount-sorted requests time out despite an index supporting timestamp order?
  • Can a cached page remain valid when the requested page size or sort changes?

Skills you will practice

  • cursor pagination
  • backward compatibility
  • API design
  • code review
  • testing
  • performance diagnosis

Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.

Prepare with a worked example

See how nrml evaluates an attempt, including the limits of automated evidence.