Bitcoin Forum
October 14, 2025, 02:47:27 PM *
News: Latest Bitcoin Core release: 30.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Are Arbitrary data useful on the Blockchain  (Read 41 times)
Sally9256 (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
Today at 05:33:02 AM
 #1

know a few things about Bitcoin but not technically so as I went on with reading, I came across this topic about script and transactions so I learn and understand a few things about script and output but somethings are still not clear.
I read that script is a set of instructions that determine how to spend a transaction output. That it's like a lock that secure outputs and set rules for spending the output. While output is an amount being sent to an address. Also learnt about two types of output;
Spendable output: Outputs that can be spent and used as input for new transactions.
Unspendable output: outputs that cannot be spent or used as input for new transactions. Which led me to OP RETURN which confused me even more.
- I thought the Blockchain only deals with transactions alone.
- what use do arbitrary data have on the Blockchain and why are they allowed to be stored there? Won't they affect transactions?
- understanding OP RETURN is a bit challenging on my own so I'd like a more simpler explanation.

Any further explanation and corrections on this topic will be appreciated I think I got myself confused.Thank you.

Had this posted on our LB and unfortunately I have not received any answers yet so I decided to ask here.
Zaguru12
Legendary
*
Offline Offline

Activity: 1204
Merit: 1138



View Profile WWW
Today at 06:08:44 AM
 #2

Script is a programming language it’s used as rightly said for locking and unlocking outputs in bitcoin transactions, there is the scriptPubKey meant to lock the output and then there is the ScriptSig or witness (the script native address format unlock) meant to unlock that same output and used as an input, both of this must be valid before that output can be spendable.

Just as you have said the OP_RETURN locking script doesn’t have a ScriptSig or Witness that can actually unlock it which makes it unspendable because they can never be used as input for a transaction and are just for storing arbitrary data has you have also rightly said

Transactions or say outputs are bytes of data too and it’s the reason why blockchain can store this arbitrary bytes of data too not restricted to only transactions alone as you can use this script to store data into a transaction.

Use this for further reading
https://learnmeabitcoin.com/technical/script/return/

.
▄███████████████████████▄
█████████████████████████
███████████████▀▀▄▄██████
█████████████▀░▀█████████
███████████▀▄░█░░░▀██████
██████████░███░█▄▄▄██████
███████▀▀░▀▀█▀▀░▀▀███████
█████▀░░░░░░░▀▄░░░░▀█████
█████░░░░░░░░░█░░░░░█████
█████▄░░░░░░░▄▀░░░▄██████
███████▄▄▄▄▄█████████████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
████████████▀████████████
█████████▀▀░░░▀▀█████████
████████░░░░░░░░░████████
██████░░░░░░░░░░░░░██████
█████░░░░░░░░░░░░░░░█████
█████░░░░░░░░░░░░░░░█████
██████▄░░░░▄▄▄░░░░▄██████
█████████▀▀░░░▀▀█████████
████████▄▄▄▄▄▄▄▄▄████████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀▀▀▀▀██████████
███████▀░▀█▄░░░░▄████████
██████░░░░░█▄░▄█▀░░▀█████
█████░░▄▄▄▄▄██▀░░░░░█████
█████▀▀▀░░░░▄█▄▄▄▄▄▄█████
█████░░░▄▄█▀▀░█░░░░░█████
██████▄█▀▀░░░░▀█░░░██████
███████▄▄░░░░░░█░▄███████
██████████▄▄▄▄▄██████████
█████████████████████████
▀███████████████████████▀
▄████████████████████████▄
██████████████████████████
█████████████░████████████
████████████▀▄████████████
█████▀▀░░░░░░░░░░░░▀▀█████
████▀░░░░░░░░░░░░░░░░▀████
████░░░██░██░░░░█░░░░░████
████░░░▄▄▀▄▄░░▀▀▄▀▀░░░████
████▄░░▀▀░▀▀░░░░▀░░░░▄████
█████▄▄░░░░░░░░░░░░▄▄█████
██████████████████████████
██████████████████████████
▀████████████████████████▀
.
Ambatman
Hero Member
*****
Offline Offline

Activity: 784
Merit: 937


Don't tell anyone


View Profile WWW
Today at 06:14:19 AM
 #3

Quote
Are Arbitrary data useful on the Blockchain
I would say this is subjective and depends on perspective. They help in relying on Bitcoin immutability to save data
Hence making the data permanent as long as Bitcoin exist.

Quote
I thought the Blockchain only deals with transactions alone.
The blockchain allows any transaction not limited to financial that follows the consensus rule.
Datas are not really separate entities but are embedded within transactions output.

OP Return was created in the early versions of the Bitcoin core in making a specific outputs uspendable in a clean and standard way.
Prior, data were embedded in ways that made them look spendable hence bloating the UTXO set.

Quote
understanding OP RETURN is a bit challenging on my own so I'd like a more simpler explanation.
They are unxpendable because their script is designed to intentionally fail the script evaluation
This means no unlocking script (scriptSig) can ever satisfy the conditions to spend it.

So it's like an open identifier to tell the blockchain that an output is unpendable but I would like it to be stored in the network.
Or a lock with no keys.

Cookdata
Legendary
*
Offline Offline

Activity: 1456
Merit: 1094


Not Your Keys, Not Your Bitcoin


View Profile
Today at 06:46:19 AM
 #4

Spendable output: Outputs that can be spent and used as input for new transactions.
Unspendable output: outputs that cannot be spent or used as input for new transactions. Which led me to OP RETURN which confused me even more

- I thought the Blockchain only deals with transactions alone.



You don't have to be confused, you are almost there but there is more to OP codes.

Basically, OP_RETURN is one of the Bitcoin OP codes that makes an output unspendable but there are more Bitcoin OP code operations, you can check more of them here ; https://en.bitcoin.it/wiki/Script, some of them are now disabled but for knowledge sake they are worth checking to understand how Bitcoin scripts works with other forms of OP codes.

Quote
- what use do arbitrary data have on the Blockchain and why are they allowed to be stored there? Won't they affect transactions?

Arbitrary data doesn't affect transactions, but there are some that bloat the UTXOs set. See this as spamming of nodes where outputs are been kept for future spending, the spammers take advantage of witness field in taproots and embed arbitrary data in there. This is making the utxo set(future outputs to be spent) becoming bigger, it's affecting the nodes storage because this utxo spent on fake pubkeys can't be spent in the future as they don't have private keys.

With size increase of OP_RETURN from 80byte to 100k bytes, every blocks might get filled up, this can make nodes storage to exponential grow bigger.

However, if OP_RETURN becomes a trend, it's going to make common transactions difficult to mine quickly because miners prioritizes transactions with much fee, transaction with OP_RETURN may comes with high fees to get mine quickly especially if it's something everyone want to get immediately. During peak ordinals, it was difficult to spend Bitcoin without using half of your Bitcoin on fees.

Quote
- understanding OP RETURN is a bit challenging on my own so I'd like a more simpler explanation.

Any further explanation and corrections on this topic will be appreciated I think I got myself confused.Thank you.

Had this posted on our LB and unfortunately I have not received any answers yet so I decided to ask here.

Here is a practical thread you can use understand how OP_RETURN and it's scripts:

[EDU] Hands on OP_RETURN





███████▄▄███▄███▄
███▄▄████████▌██
▄█████████████▐██▌
██▄███████████▌█▌
███████▀██████▐▌█
██████████████▌▌▐
████████▄███████▐▐
█████████████████
███████████████▄██▄
██████████████▀▀▀
█████▀███▀▀▀

▄▄▄██████▄▄▄███████▄▄▄
███████████████████████████
███▌█████▀███▌█████▀▀███████████▄▄▄▄▄▄▄▄
███▌█████▄███▌█████▄███▐███████████████████▄
▐████████████▀███████▄██████████▀▀▀▀▀▀▀▀████▀
▐████████████▄██▄███████████▌█████████▄████▀
▐█████████▀█████████▌█████████████▄▄████▀
██████████▄███████████▐███▌██▄██████▀
██████████████▀███▐███▌██████████████████████
████▀██████▀▀█████████▌███▀▀▀▀███▀▀▀▀▀▀▀████▌
 
      P R E M I E R   B I T C O I N   C A S I N O   &   S P O R T S B O O K      

█▀▀









▀▀▀

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

  98%  
RTP

 
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▀▀█









▀▀▀

█▀▀









▀▀▀

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

 HIGH 
ODDS

 
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▀▀█









▀▀▀
 
..PLAY NOW..
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!