Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: belcher on March 20, 2018, 01:03:42 PM



Title: gettxoutproof with pruning
Post by: belcher on March 20, 2018, 01:03:42 PM
By my reading of Bitcoin Core's source code, the RPC call gettxoutproof won't work if pruning is enabled and if the relevant block has been deleted from disk.

I'm interested in this for Electrum Personal Server (https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-February/015707.html). Electrum wallet requests a merkle proof for each transaction otherwise it will display it as "Not Verified". For a non-pruned node this can be easily found with gettxoutproof and sent to Electrum, but if the node is pruned this often won't work.

What might be the best solution for my situation? The only idea I can come up with is to write code for Bitcoin Core that stores transaction merkle proofs in wallet.dat along with the rest of the transactions. Those proofs could then be accessed via the gettransaction RPC call.


Title: Re: gettxoutproof with pruning
Post by: Luke-Jr on February 18, 2019, 09:39:00 PM
The built-in wallet keeps a copy of the merkle proof IIRC, but I'm not sure it's accessible from RPC at this time.