1

I have deployed a private Stardust network and I want to be able to store data from IoT machines on it, which is the most suitable transaction type to do this?

I am currently using Tagged Payload transaction type but my questions is how can I access to it from a different client - without knowing the Block ID of the transaction the data is encapsulated in?

And even more, how can I query within Tagged Payloads for specific data Tags or content? Having a look at the INX Indexer: https://editor.swagger.io/?url=https://raw.githubusercontent.com/iotaledger/tips/main/tips/TIP-0026/indexer-rest-api.yaml, this solution only allows to sort within different transactions, but it is not implemeted for Tagged Payloads.

I then tried to look in the IOTA Client library: https://wiki.iota.org/shimmer/iota.rs/libraries/nodejs/references/classes/Client/#getblock, but again there are only implemented queries for Outputs, NFTs and Native Tokens value transactions.

I know there is an INX Collector project that works as an INX plugin for Hornet nodes that allows to store all blocks with a specific Tag, working as a selective permanode: https://github.com/teleconsys/inx-collector However, this option implies to store all blocks locally which is not an optimal solution.

In this particular case, as working with a private Tangle there is no intention of implementing any type of prunning.

1 Answer 1

1

You could also store data on the outputs by using the metadata feature described here: https://github.com/iotaledger/tips/blob/main/tips/TIP-0018/tip-0018.md#metadata-feature One can index the output by adding also a tag feature described here: https://github.com/iotaledger/tips/blob/main/tips/TIP-0018/tip-0018.md#tag-feature Then the other client can ask the inx indexer from outputs by tag https://editor.swagger.io/?url=https://raw.githubusercontent.com/iotaledger/tips/main/tips/TIP-0026/indexer-rest-api.yaml

Now i see you also can use mqtt, I think previously this was not possible. You could use blocks/tagged-data/{tag} from https://studio.asyncapi.com/?url=https://raw.githubusercontent.com/iotaledger/tips/main/tips/TIP-0028/event-api.yml#operation-subscribe-blocks/tagged-data/{tag}

Credit goes to linaWhiteSen and Mesrine on the IOTA&Shimmer Discord

2
  • Do you recommend using Outputs to store data in the Metadata field? As the main feature of my application is to share pure data I haven't thought before on this option. I guess I should then indicate that there is no actual token transfer and just request funds to the faceut for the storage deposit, right? When it comes to MQTT subscription, this is a great option but not suitable if someone wants to retrieve the whole historic bunch of data a specific client has stored on the Tangle. Credit goes to linaWhiteSen on the IOTA&Shimmer Discord Commented May 24, 2023 at 8:16
  • I will prefer to use the metadata feature of the outputs. Yes you just have to pay for the storage deposit. Credit goes to Mesrine on the IOTA&Shimmer Discord Commented May 24, 2023 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.