citp / BlockSci

A high-performance tool for blockchain science and exploration

Home Page:https://citp.github.io/BlockSci/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to modify BlockSci to capture Taproot PTTR addresses/transactions? Volunteers please!

alex-btc opened this issue · comments

I understand BlockSci is not being maintained anymore, but it would be nice if we can updated it so it can read the new address format that was activated in the bitcoin blockchain in late 2021: taproot, and a new transaction, PTTR, pay to taproot.

For now there is little volume of that type of transaction in bitcoin, but it will grow over time.

How difficult is it to adapt BlockSci to "understand" this new type of transaction/address?

Do we have a group of users who can technically do this?

I volunteer to help, but I don't know C well enough, just python.

BlockSci is such a fantastic project, we can't let it die.

I agree! Have you found a way to implement taproot into blockscipy?

Hi @levushakov,

In my testing, all transaction details, including inputs, outputs, and values, are accurate for taproot inputs and outputs. The only issue is with the address_string, which cannot be obtained for taproot addresses (beginning with bc1p). However, taproot addresses do have a valid unique address_num and are categorized as address_type.witness_unknown, WitnessUnknownScript(), with a raw_type equals to 9.

So, BlockSci, as it stands today, is somewhat capable of dealing with the taproot upgrade, albeit not fully. I am sure there are some drawbacks that I am not yet aware of.

I don't have the expertise to modify the C code for the parser or for the internals of BlockSci, but I volunteer to help with python code whenever it is needed.

It would be great if we could update BlockSci for this purpose.

C/C @maltemoeser, @jiagengliu and @hkalodner.