Multichain API calls are slow

+1 vote

Whenever I make an API call with the issuemore or the sendassetfrom API the response time seems to get slower overtime the more transactions I make. When there are no transactions in my multichain, response time is around 0.004 seconds however after around 25000 transactions the response times goes up to 0.4 seconds. We are using Multichain in a centralized way which means each node needs to keep track of all addresses in the chain.

I am currently running version 1.0.3 of Multichain as a single node on a single machine. The machine has 4GB of ram and has 2 cores of a 3.1 GHz Intel Xeon® Platinum 8175 CPU. I have tried running multiple nodes on the machine but this made no difference and I have also tried upgrading to version 2.0.3 but it also made no difference. I have also tried using the combineunspent which took around 2 hours to run but only made a minor difference in response time. I have also tried increasing the rpcthreads count but that made no difference either.

Is there a way to resolve this issue?

asked Oct 22 by anonymous

1 Answer

0 votes

The explanation for this is generally that you have inflated the unspent transaction output count of your node, presumably by sending a lot of transactions from the node back to itself. This slows down the process of new transaction creation. You can verify this by checking the utxocount field of the response to getwalletinfo.

answered Oct 23 by MultiChain
Hi, yes, it looks like utxocount is quite high, it's over 1000 even after doing combineunspent. Is there any way to lower this?
Unless you have thousands of assets issued, you should be able to keep calling combineunspent to reduce the number of UTXOs further.
...