generating raw-transactions outside => improve performance and indexing

+1 vote

Hello smiley

In my use-case, I need a rather high transaction throughput. Now after spending quite some time with Multichain ( > 2 years cool), I start spending more time in building raw-transactions outside of the chain to increase performance.  This includes output & input selection outside (in-memory) and signing etc.. leaves just "send" on the chain. 

What I wonder about is, which processes are running in the multichain for validating a submitted transaction, I would assume output & input selection is not anymore required but they would need to be verified. As the transaction has for all inputs the destinctive "transaction-id" this should be fast (again assuming) you are indexing the transaction-ids?  Which other processes could be optimized? 

However, I had quite interesting boost performance laugh > 1000 tx/s 

 

 

asked Sep 14 by nemicko

1 Answer

0 votes

Yes, you can get optimized performance if you build the transactions outside of MultiChain. The main speed gain is from avoiding the node's coin selection process, when it decides which UTXOs to use for a new transaction. Apart from that you might find that you can achieve almost all your speed gain by using the createrawtransaction API with action=send, which includes signing the transaction, rather than signing it outside the node. On the fastest hardware you can push to around 2500 tps for simple transactions.

Another small thing you can do to improve performance is not to have any addresses / private keys in the node's wallet. That way the node won't need to track any transactions from its own perspective, and instead it just keeps an indexed database of UTXOs for the chain. But I don't know if the speedup is worth the cost in your application.

answered Sep 17 by MultiChain
...