cyclux / tanglemonitor

Visualisation and detailed live metrics of the IOTA confirmation process.
https://tanglemonitor.com
MIT License
29 stars 7 forks source link

Feature: Color inconsistent transactions red #3

Open yet-another-account opened 6 years ago

yet-another-account commented 6 years ago

It would give a better feel as to which transactions were pending and which ones will never confirm.

cyclux commented 6 years ago

@eukaryote31 Sounds good, how do you check for inconsistent transactions? Check signature and input + output !== 0 ?

yet-another-account commented 6 years ago

You can use iota.lib.js isPromotable, which calls checkConsistency behind the scenes.

cyclux commented 6 years ago

Ok, seems like I would have to consult a node for each tail transaction as there is no bulk call with a list of transactions. Have to check if this is managable for high TPS times. But maybe there is also a more performant local option without consulting a node, like checking for signature and input + output !== 0.

yet-another-account commented 6 years ago

checkConsistency tells you if the transactions indirectly referenced by said transaction are consistent with the confirmed subtangle, not if the transaction is invalid. A more performant local option would be to first search transactions for ones that conflict with the confirmed transactions (i.e reattaches or doublespends) first.

sloganking commented 6 years ago

If this is achieve-able, I recommend not considering invalid transactions when calculating "Avg. eff. conf.ratio" as well.