How do transactions work in a data stream ?

+2 votes
According to the data streams page,

" each item in a stream is represented by a blockchain transaction"

 

so basically, every item that is ever published on a certain data stream, has it's own Unique transaction.

(a) Are those transactions ever mined ? (b) who validates those transactions ? (c) as a developer, can we see those transactions using the Multichain API ? (d) if that transaction is somehow invalid, will the corresponding item still be published onto the data stream ?

Again, my project hinges on these blockchain principles of rhe Multichain platform, which is why i must request an urgent answer.

Regards and many thanks.

P.S : i saw stream filters and they do not quite fit my usecase, which is why i request this information.
asked Nov 14, 2018 by Yasir

1 Answer

+2 votes
 
Best answer

To answer your questions:

(a) yes, they are mined like any other transaction

(b) they are validated by every node

(c) yes, you can use APIs like getrawtransaction/decoderawtransaction/getblock to see these transactions

(d) if the transaction is invalid then the item will not appear in a data stream

answered Nov 15, 2018 by MultiChain
selected Nov 15, 2018 by Yasir
thank you for the answer. i have one final query

is there any trivial method we can use to observe the mining of a data stream transaction, in real time ?

i currently host the multichain on a localhost network and use 2 Ubuntu VMs as nodes. before deploying the application for testing purposes, i must know how exactly are the data stream transactions being mined.

Any help in this regard is very appreciated !
Whenever you list stream items, there is a field "confirmations" in the response that tells you. If the value is 0, it has not yet been mined. If 1 or more, it has been mined, and the number tells you its depth from the latest block in the chain.
...