Bitcoin Blocks on S3 via ZeroFS

Running a full Bitcoin node these days means ~700GB of block data. If you're running on a small home machine with a 500GB drive, that's a non-starter. You either prune (and lose the ability to serve historical blocks) or you don't run a full node.

Or you get creative.

ZeroFS presents an S3 bucket as a local filesystem via 9P. It encrypts with XChaCha20-Poly1305 and compresses with LZ4. Stick a disk cache in front and you get tolerable performance for cold data.

bitcoind
    ├── ~/.bitcoin/chainstate/     (local SSD)
    └── blocksdir=/mnt/zerofs-bitcoin/  (S3 via ZeroFS)

Chainstate stays local because it actually needs IOPS. Block files get banished to S3 One Zone-IA.

ZeroFS uses object_store from the Arrow ecosystem, which has no way to set storage class—everything goes to S3 Standard by default. So I forked arrow-rs-object-store to add with_default_storage_class(), then patched ZeroFS to use it. One Zone-IA is ~60% cheaper.

Cost works out to ~$10/month. A 1TB external USB SSD costs ~$80, so break-even is 8 months.

SlateDB applies backpressure when you write faster than it can flush—the initial rsync took ~17 hours. 9P mount options are finicky: trans=unix,version=9p2000.L,cache=mmap,access=user

Worth it? Nope. But an interesting learning exercise around ZeroFS.