explaingit

prof-faustus/triple-entry-bsv-sql

20GoAudience · developerComplexity · 5/5Setup · hard

TLDR

A research project that modifies PostgreSQL so every database change is also recorded on the Bitcoin SV blockchain, creating a tamper-proof triple-entry accounting trail without changing how you write SQL.

Mindmap

mindmap
  root((triple-entry-bsv-sql))
    What it does
      Records SQL commits on blockchain
      Cryptographic chaining of entries
      Invisible to SQL user
    Modules
      Triple-entry ledger
      Commercial document tokens
      Digital cash support
      Logistics tracking
    Tech Stack
      Go
      PostgreSQL
      Bitcoin SV
      Docker
    Status
      Early research phase
      Seven-stage build plan
      Not production ready
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a blockchain-backed audit trail to a PostgreSQL database without rewriting application SQL

USE CASE 2

Build a tamper-evident ledger for financial transactions that any third party can verify independently

USE CASE 3

Track physical goods through a supply chain with immutable on-chain records

USE CASE 4

Tokenize commercial documents like invoices and purchase orders on a public blockchain

Tech stack

GoPostgreSQLBitcoin SVDockerC

Getting it running

Difficulty · hard Time to first run · 1day+

Requires Docker, a C compiler toolchain, and a separate specification document that is still missing, no phase can start until the previous one passes verification.

No license information is provided in the explanation.

In plain English

Traditional accounting records each financial transaction twice: once as a debit and once as a credit. Triple-entry accounting adds a third record that lives outside either party's control, making it harder to tamper with. This project builds a system where that third record is written onto the Bitcoin SV blockchain, creating a permanent, independently verifiable trail for every change made to the database. The core idea is a modified version of PostgreSQL, the popular open-source database. When you run ordinary SQL commands against this modified version, everything that gets committed to the database is also automatically mirrored onto Bitcoin SV as a blockchain transaction. The connection between the database record and the blockchain entry is secured with cryptographic signatures, and each entry chains to the previous one, so you cannot quietly alter history. From the user's perspective, you just write SQL, the blockchain mechanics happen invisibly in the background. Built on top of this foundation are four modules. One handles a general triple-entry ledger for accounting. A second manages tokenized versions of commercial documents such as purchase orders, invoices, and shipping notices. A third handles tokenized cash, including support for digital currency formats. A fourth tracks physical goods through their logistics lifecycle. All four share the same PostgreSQL-blockchain substrate. The project is described as research and is currently in its earliest phase. As of the README, the build environment prerequisites, including Docker and a C compiler toolchain, are not yet in place, and the project depends on a separate specification document that is still missing. The phased build plan covers seven stages, from cryptographic core setup through hardening and testnet deployment, and no phase is permitted to begin until the previous one passes its verification checks. This is a technical research project with a detailed specification. It is not a finished product and is not ready for general use.

Copy-paste prompts

Prompt 1
I have cloned triple-entry-bsv-sql. Walk me through the seven build phases in its spec and tell me what I need to complete Phase 1 (cryptographic core setup).
Prompt 2
Using triple-entry-bsv-sql as context, write a Go function that takes a PostgreSQL WAL event and formats it as a Bitcoin SV OP_RETURN transaction payload with a cryptographic signature.
Prompt 3
I want to run the triple-entry-bsv-sql modified PostgreSQL locally in Docker. What Dockerfile and docker-compose setup do I need based on the project structure?
Prompt 4
Explain how the chain-linking between consecutive blockchain entries works in triple-entry-bsv-sql so that altering a past record is detectable.
Prompt 5
Show me how to use the commercial document module in triple-entry-bsv-sql to tokenize a purchase order and verify it on Bitcoin SV testnet.
Open on GitHub → Explain another repo

← prof-faustus on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.