5

I am listening for new transactions on the ZMQ stream published by the iri. Is there a way to identify transactions that were created by the coordinator?

2

If you query a node with the getNodeInfo command, it will return a JSON object similar to the following:

{
    "appName": "IRI",
    "appVersion": "1.4.1.2",
    "duration": 0,
    "jreAvailableProcessors": 8,
    "jreFreeMemory": 1824745296,
    "jreMaxMemory": 3987734528,
    "jreTotalMemory": 3987734528,
    "jreVersion": "1.8.0_112",
    "latestMilestone": "FRAYIUUSUGMTASGCPQJUZHVCZGAPESWFMZBWWSNSHJZXFCFBV9X9CVQZHVTQSLXJBDUGVWRDFUVO99999",
    "latestMilestoneIndex": 292862,
    "latestSolidSubtangleMilestone": "QGCJGNDLGERQRHRDGYJJYIYBDZVGTLNIGGFKLSPQMCPMRUEJQDFKDLAJKLWYEODLKYXCBVJCKDY9A9999",
    "latestSolidSubtangleMilestoneIndex": 292053,
    "neighbors": 21,
    "packetsQueueSize": 0,
    "time": 1512056790045,
    "tips": 5005,
    "transactionsToRequest": 0
}

The latestMilestone value is the latest co-ordinator transaction hash as seen by the node. Continuously monitoring this on your own node would be a way to record all the co-ordinator txs.

  • There is no guarantee that your node will see all milestones before the next milestone arrives, but to get the latest milestone (or if you do not care if you miss some), this is fine. – mihi Dec 1 '17 at 21:45
2

All transactions from the coordinator (on mainnet) will send 0 IOTA to/from address KPWCHICGJZXKE9GSUDXZYUAPLHAKAHYHDXNPHENTERYMMBQOPSQIDENXKLKCEYCPVTZQLEEJVYJZV9BWU, and their tag will be the milestone number.

Note, however, that anyone can send such transactions, so there might be more transactions like this that are not coming from the coordinator. To be sure, you'd have to verify the signature of the transaction, or check whether a node trusted by you picks the transaction up as latestMilestone

  • @Zauz: Why did you edit my post? The "message" contains the signature, while the tag (or obsoleteTag depending on how you call it) contains the milestone number. – mihi Nov 30 '17 at 21:59
  • tbh I just assumed... now I know better. sorry. Thanks for being observant and point it out – Zauz Nov 30 '17 at 22:04
  • 1
    no problem. It confused me first, too. On the other hand, tangle can be quickly searched for address/tag combo, so if you want the hash of a previous milestone, querying it is fast (and you have to verify the signature afterwards anyway if there is more than one result). – mihi Nov 30 '17 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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