Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Lionel on August 18, 2020, 10:56:06 PM



Title: Bitcoin Core: can it show OP_RETURN data on the GUI ?
Post by: Lionel on August 18, 2020, 10:56:06 PM
If i put a text message in a transaction as OP_RETURN data, will Bitcoin Core show it to my recipient in the transaction history?

What are the wallets that do that ?


Title: Re: Bitcoin Core: can it show OP_RETURN data on the GUI ?
Post by: pooya87 on August 19, 2020, 03:46:10 AM
- no
- i haven't seen any wallet that has such a feature, most of them don't even have the option to create any other custom pubkey scripts. there are only some block explorers that show OP_RETURNs as text or other information (omni stuff) like smartbit.


Title: Re: Bitcoin Core: can it show OP_RETURN data on the GUI ?
Post by: gmaxwell on August 19, 2020, 04:38:40 AM
No and I'd avoid any wallet that displayed it.  That data comes from an third party and can be malicious.  If not malicious, it can be and often is spam.

E.g. if FooWallet had a behaviour to display it what would happen if someone started spamming FooWallet users with "Emergency FooWallet Upgrade required: Load www.emergencyfoowalletupgrade.com for more info!"?

The best defence against malicious messages and spam is both to just to avoid displaying human readable information sourced from untrusted sources.


Title: Re: Bitcoin Core: can it show OP_RETURN data on the GUI ?
Post by: nc50lc on August 19, 2020, 11:05:30 AM
What are the wallets that do that ?
Rather than a wallet, use blockexplorers that display human-readable format from OP_return data
Like: live.blockcypher.com/btc/ (http://live.blockcypher.com/btc/) (displayed above) or blockstream.info (http://blockstream.info) when you expand "details".

There are wallets that will let you choose a blockexplorer when 'hotlinking' your TXID online,
Example: Bitcoin Core in "Settings->Option->Display tab" or Electrum though "Tools->Preferences->Transactions tab"


Title: Re: Bitcoin Core: can it show OP_RETURN data on the GUI ?
Post by: odolvlobo on August 22, 2020, 07:49:54 PM
No and I'd avoid any wallet that displayed it.  That data comes from an third party and can be malicious.  If not malicious, it can be and often is spam.
The best defence against malicious messages and spam is both to just to avoid displaying human readable information sourced from untrusted sources.

Perhaps giving the user the ability to add simple regex plugins that could parse certain OP_RETURN transactions in their wallet and display relevant info would be a safe and useful feature.


Title: Re: Bitcoin Core: can it show OP_RETURN data on the GUI ?
Post by: pooya87 on August 23, 2020, 03:59:55 AM
Perhaps giving the user the ability to add simple regex plugins that could parse certain OP_RETURN transactions in their wallet and display relevant info would be a safe and useful feature.

there are only two types of OP_Return that i can think of that contain relevant information that can be displayed.
- human readable strings, which should never be shown by the wallet due to the attack surface it introduces and is explained above. even with modifications it still isn't a good idea. besides the user can do the UTF8 decode of the hex themselves in a website online or in their terminal.
- Omni layer transactions which can be very simple to show but that would mean bringing an altcoin feature to a bitcoin client which won't happen.