Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You always preserve information.

Using two positive numbers preserves some information, but still destroys plenty. Just less than a single signed number would. Consider two accounts:

    1. An account A with a debit balance of $1m and a credit balance of $0, and
    2. An account B with a debit balance of $1m and a credit balance of $0.
One of those was opened by a lottery winner last week who did a single transaction dropping in their winnings. The other was opened by a retiree 60 years ago who has been dripping small deposits in for their entire working history. Which is which?

That distinction is still lost by summing debits and summit credits.

To really preserve information, you'd need the full list of all transactions. But, obviously, that comes at a significant performance cost. So the way to look at storing sums for debits and credits is that it's a trade-off which gives you a little more information than just a single balance but is still a relatively small fixed-size amount of data.




> You always preserve information.

This is the principle.

Not to suggest that the sum of debits and credits alone is sufficient to that end, but rather to explain why it's at least necessary.

> To really preserve information, you'd need the full list of all transactions.

Exactly. And so this is, of course, what TigerBeetle also does (with full durability).

And, at the same time, TigerBeetle doesn't decompose account balances to a single integer, for the reasons given.

Both of these are important.

To be clear, the context for this thread is the latter: Why not decompose account balances to a single positive/negative integer?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: