txindex=0 vs txindex=1

+1 vote
Hi Team,

We have created a chain with -txindex=0 parameter where we connected 3 nodes with txindex=0

Now we have issued one asset from admin node & transferred the asset from admin node to node1. As per the defination of txindex this transaction should not be retreived from node 2 & node 3 using "getrawtransaction" API. But we are able to fetch the same from rest of nodes.

Please let us know if we are missing anything.
asked Jan 15, 2019 by adgupta

2 Answers

0 votes
The asset issuance transaction is available to all nodes, since all nodes pay attention to the asset issuance. Please try creating a subsequent transaction after the issuance and try that one out on a node that was not involved in the transaction.
answered Jan 15, 2019 by MultiChain
After issuance, We have transfereed asset from node1 to another..This transaction is also viewed from all the nodes.
OK, thanks for the update. I'll circle with the team and revert.
0 votes

So it turns out the other answer is incorrect. If txindex=0, getrawtransaction will find the transaction if it is in the memory pool or if there is an unspent output remaining from this transaction. The latter reason is why you're seeing the transaction in your case.

answered Jan 16, 2019 by MultiChain
If txindex is 0 then the node involving the transaction also does not keep the copy.Then how in future it will be backtracked who has spend the transaction?

I have one more query. Is the spend transaction details is permanently deleted from node local disk storage?
Why keeping txindex=0 impacts Multichain performance? Is it because chain size shrinks?
Nodes that involve a transaction do keep a copy of that transaction, independent of the txindex setting.

The performance impact of txindex is not large, but it just means there's an extra index that needs to be kept updated for every transaction in the blockchain.
...