Database Architecture

2024-04-15 · Ryan X. Charles

I am using MySQL for the database. I want to be able to access the database not just in Rust, but also in node.js. Unfortunately, the tool I am using for MySQL databases in node.js, Drizzle, does not support blob columns. I have therefore decided to change the schema to use hex-encoded strings instead of binary blobs. This increases the storage space, but it is a small price to pay for the ability to access the database in node.js.

Considering blocks are likely to be less than 1 MB on average for quite some time (Bitcoin didn’t reach that limit until 8 years after launch), the extra storage space is not a big deal. The other thing is that this data can be pruned eventually. We can use an object store like AWS S3 for archival data at some point in the future.


Earlier Blog Posts

Building the Full Node
2024-04-13 · Ryan X. Charles
Merkle Proofs and Blocks
2024-04-09 · Ryan X. Charles
Thoughts on Fees
2024-04-05 · Ryan X. Charles

Back to Blog

Home · About · Blog · Privacy · Terms
X · Telegram · Discord · reddit · GitHub
Copyright © 2024 Ryan X. Charles LLC