Data Streams with Native Currency as fee?

+1 vote
Hello!

I was reading the documents and as far I can tell Data Streams aren't transactions in the blockchain in the sense that they don't use a UTXO to build upon itself. They function similarly to a broadcasted message throughout the nodes, right?

My main issue here is that I'd like to attach an asset with the stream itself that would work as an incentive for miners to run the network. Meaning that everytime someone publishes using streams they would have to attach an unspent coin to be picked up by miners.

Do you think of anything else that looks like this? I thought about using Inline Metadata, but (1) it doesn't have off-chain/on-chain data management as Data Streams 2.0 and (2) the "publishing act" might not have a properly "receiver" neither an amount to send to the "receiver".
asked Feb 4, 2019 by tloriato

1 Answer

+1 vote
 
Best answer

First, every stream item is certainly embedded in a transaction. So there's no reason at all not to use regular transaction fees to charge for writing to streams. By default fees will be related linearly to transaction size, but you can use a transaction filter to apply another fee policy if you like.

If you are going to publish off-chain stream items, there's also a blockchain parameter minimum-offchain-fee that allows fees to consider the size of the off-chain data published (since that size is not reflected directly in transaction size).

answered Feb 5, 2019 by MultiChain
selected Feb 5, 2019 by tloriato
Follow-up: How is ```maximum-chunk-count``` enforced? If I don't want a single off-chain item any larger than X megabytes, how would this get enforced by the network? The own sender node won't publish to the network? What if he bypasses it?

I realize ```mine-empty-rounds``` is enforced locally, but if set to 0 the node will only try to find a new block if there's >=1 transaction in its own mempool, is that right?
For offchain items, chunk counts and sizes are stored inside transactions, even if the data itself is not, so it's easy for the network to enforce this. (If a node decides to try to beat the system by embedding fake chunk sizes in transactions, and delivering data of an unexpected size for particular chunk hashes, no other node will accept its data, so that would be a waste of time.)

Your comment about mine-empty-rounds is correct.
...