TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Which database would you choose for a blockchain?

2 点作者 tcsenpai12 个月前
OK, OK, I said the cursed &quot;B&quot; word. Feel free to mock me for being in the crypto space.<p>That said, I am in the process of building a blockchain (funded and all, not a hobby project) and I am exploring the various database options.<p>The only requirements (just lol) are: - Must be completely local - Must be very performant especially in concurrent reads and writes<p>I am using sqlite3 as a dummy but of course it is not suitable and not scalable enough.<p>I was wondering if PostgreSQL might be an idea but I am very basic in my knowledge of databases.<p>In your opinion, given the high throughput and concurrency, where should I start looking?<p>Bonus points if it is open source of course

5 条评论

dtagames12 个月前
The method of storage isn&#x27;t a factor in something becoming a blockchain, only the fact that new records contain a hash of previous records, which themselves contain a hash of previous records, and so on. This is the &quot;chain.&quot; How you store or retrieve it is up you. Any data storage method you like can be equally &quot;blockchain-y.&quot;
评论 #40549465 未加载
MatthiasPortzel12 个月前
Use sqlite3 until you actually cannot. It sounds like you&#x27;re assuming it&#x27;s bad, but it sounds ideal for your use-case since it is designed to be a fully-local database.
评论 #40549443 未加载
tromp12 个月前
One option is LMDB [1], which is used succesfully in several blockchains.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Lightning_Memory-Mapped_Data" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Lightning_Memory-Mapped_Data</a>
评论 #40549466 未加载
meiraleal12 个月前
It is amusing that you got funded while being clueless about what to do. The B word works, after all.<p>Why are you using a SQL-based database? Blockchain data is so simple you could use Redis.
评论 #40549457 未加载
sfmz12 个月前
What blockchain attributes are you looking for? ... your local requirement has removed decentralization, distributed-ledger, and transparency.<p>What&#x27;s left? immutability?
评论 #40549449 未加载