Author

Topic: Embedding metadata on-chain (Read 140 times)

jr. member
Activity: 34
Merit: 13
February 08, 2023, 07:31:25 PM
#7
I was asking if the P2WPKH method would result in my OP_RETURN data eventually being pruned, since pooya mentioned that nodes would not be required to retain the output in their database.

He was talking about UTXO database, not blockchain database. All data on Bitcoin blockchain is immutable. FYI, full node software have UTXO database in order to verify validity of input of any transaction quickly.

Okay, cool. Thank you everyone
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
February 08, 2023, 04:36:04 AM
#6
I was asking if the P2WPKH method would result in my OP_RETURN data eventually being pruned, since pooya mentioned that nodes would not be required to retain the output in their database.

He was talking about UTXO database, not blockchain database. All data on Bitcoin blockchain is immutable. FYI, full node software have UTXO database in order to verify validity of input of any transaction quickly.
jr. member
Activity: 34
Merit: 13
February 07, 2023, 06:24:41 PM
#5
Yes, my apologies for being unclear. 80bytes would be more than enough. I was asking if the P2WPKH method would result in my OP_RETURN data eventually being pruned, since pooya mentioned that nodes would not be required to retain the output in their database. Just sayin' I would pay the extra sats and use P2PKH, if that were in fact an issue. Sorry again I'm a bit dense
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
February 07, 2023, 07:12:09 AM
#4
I want to make sure my full node has this arbitrary transaction data in storage permanently.

Both Taproot and P2PKH ensure your data is stored permanently on all Bitcoin full node.

Accepting that I may pay more per kB, I assume I must use P2PKH?

Could you rephrase your question? I have hard time trying to understand your question. If you wanted to ask about storing more than 80 bytes (soft limitation of OP_RETURN) of arbitrary data, Taproot (through Ordinal wallet) probably is better option.
jr. member
Activity: 34
Merit: 13
February 07, 2023, 12:37:28 AM
#3
The best way and the most correct way of inserting an arbitrary data into bitcoin blockchain is using an OP_RETURN output. The transaction size depends mainly on the number of inputs you are going to have and their type. For example if you are spending a simple single P2WPKH output and creating a new P2WPKH output with a single OP_RETURN output you would need to pay less than 200 satoshi fee which is about $0.04 with today's price.

The benefit of this is that it doesn't put a burden on full nodes for having to keep the output in their UTXO database but if you use Taproot, they will have to keep it in there and load it in memory when verifying blocks.

I see, thank you for the response and consideration. I want to make sure my full node has this arbitrary transaction data in storage permanently. Accepting that I may pay more per kB, I assume I must use P2PKH?
legendary
Activity: 3472
Merit: 10611
February 07, 2023, 12:10:15 AM
#2
The best way and the most correct way of inserting an arbitrary data into bitcoin blockchain is using an OP_RETURN output. The transaction size depends mainly on the number of inputs you are going to have and their type. For example if you are spending a simple single P2WPKH output and creating a new P2WPKH output with a single OP_RETURN output you would need to pay less than 200 satoshi fee which is about $0.04 with today's price.

The benefit of this is that it doesn't put a burden on full nodes for having to keep the output in their UTXO database but if you use Taproot, they will have to keep it in there and load it in memory when verifying blocks.
jr. member
Activity: 34
Merit: 13
February 07, 2023, 12:00:52 AM
#1
Hi there.

I want to put a bit of extra data (a file’s hash) in a Bitcoin transaction so it can be included in a time stamped block and potentially used as reference later. I hear theres been a lot of talk about taproot lately.
I was wondering What (if any) would be the benefits of using taproot scripts for this purpose vs OP_RETURN? Would it be cheaper per byte? Would my data be stored on chain directly with taproot or?

Also lastly I’d just like to say obviously I don’t understand taproot very much, other than it having something to do with segregated witness.

Thanks Everyone
Jump to: