mempoolco / spruned

A Bitcoin-without-Blockchain client w/ RPC that can fetch any block or transaction
MIT License
170 stars 35 forks source link

txindex: reduce its size down to 20% 🎉 #116

Open gdassori opened 3 years ago

gdassori commented 3 years ago

The txindex is huge. I estimate that some sort of firstbits implementation would reduce the txindex size down to 20-25%, even less! And this is awesome.

The downside is having a bit more iterations while lurking, maybe, but.. who cares? 20%!

gdassori commented 3 years ago

It is very intensive to index the Firstbits, because an iterator must be run at every write operation. To avoid bottlenecks, the FB compression must be run into a separate task. Transactions must be indexed on a normal DB and moved to the Firstbits index later. It sounds good to run the whole Transactions Index process as separated.

It may take up to a while to sync a full node on a low-end VPS and compress the transactions index.