5 ms·
If we are posting data to the Bitcoin blockchain, does this data live alongside transaction data? And if so, are there fees to host this data (as we need to pay
by Solvitieg 7y ago
If we are posting data to the Bitcoin blockchain, does this data live alongside transaction data? And if so, are there fees to host this data (as we need to pay miners to include data in a block)?
- cocktailpeanuts 7y agoi think all these things we're looking at in the browser are stored as transactions using some clever protocol scheme. Fell down the rabbit hole and found these: https://b.bitdb.network https://b.bitdb.network https://c.bitdb.network https://c.bitdb.network https://bit.planaria.network https://bit.planaria.network
- onion-soup 7y agoYes. It lives as a transaction output under op code 'OP_RETURN'. See example of weather data stored on chain https://whatsonchain.com/tx/6dac238576e9778458bb62a2f7d936fde1f258a31bbeb2c20084232589d8d915 https://whatsonchain.com/tx/6dac238576e9778458bb62a2f7d936fd... >are there fees to host this data (as we need to pay miners to include data in a block)? Yes, current fees are about 1 sat/byte. This is really a write once, read many type of system.
- looeee 7y ago> 1 sat/byte What's a sat?
- solotronics 7y ago1 satoshi = smallest current unit of a bitcoin = 0.00000001฿
- onion-soup 7y ago1 satoshi per byte. 1 satoshi = 0.00000001 BSV
- Roujo 7y agoPresumably a Satoshi, the nickname given to the current smallest fraction of a bitcoin that is recorded on the block chain - 0.00000001 BTC. https://en.bitcoin.it/wiki/Satoshi_(unit) https://en.bitcoin.it/wiki/Satoshi_(unit)
- PowerfulWizard 7y agoSo it will be roughly $115 USD per megabyte? (1% of a BTC). High, but at least you get a 10000x replication factor.
- onion-soup 7y agoNo, it will be around 20 cents to store 1MB
- ghostpepper 7y agoI can see use cases where this would be worthwhile. Not so much for backing up your photo collection, but more along the lines of publishing some textual information that someone powerful does not want published. It could even potentially function as a sort of notary service.
- musicious 7y agoYes.. the data is included in the OP RETURN field. You pay 1 Satoshi per byte. For now that's the minimum relay fee.
- segfaultbuserr 7y ago> does this data live alongside transaction data? Yes. A Bitcoin "transaction" is actually a short Forth-like program running on a stack-based, non-Turing complete virtual machine. When Bitcoin has been sent to an address, the output script of a transaction is something like this: let HASH = "xxxxxxxxxxxxxxxxxxxxxx"; if (check(HASH, pubkey, signature) == True) return 1; return 0; And recall a Bitcoin address is a RIPEMD-160 hash, which means any 20 bytes binary data is a legitimate Bitcoin address. So earliest and simplest method of storing data is simply submitting a payment that sends pennies to a bunch of garbage Bitcoin addresses corresponding to your binary data. This method was controversial in the early days, as it created a lot of not-actual-transaction garbage in the blockchain. Bitcoin developers later introduced opcode "OP_RETURN", which is seen as a standard and less-evil way to post data. In this case, the script is something like: let DATA = "xxxxxxxxxxxxxxxxxxxxxx"; return 0; Also, from the perspective of the system, it's just a transaction. Although for a OP_RETURN transaction, it won't be added to the UTXO (unspent transactions) list, because the script always returns false, it's not spendable. The limitation of using Bitcoin blockchain as a data storage medium is the astronomical transaction fee. The larger the transaction (i.e. the script), the higher the fee. Typically, nobody can afford to store more than a few hundred bytes.
- shilch 7y agoGood summary. > Bitcoin developers later introduced opcode "OP_RETURN", which is seen as a standard and less-evil way to post data. This is not true and an error in the Mastering Bitcoin book. OP_RETURN was introduced by Satoshi in the very first version of bitcoin. > Typically, nobody can afford to store more than a few hundred bytes. This depends on the artificial constraints put on the network. Bottle operates on top of BSV which comes without a cap on supply and offers cheaper fees when compared to BTC.