Long transactions performance

0 votes

We have the Multichain configured to support native currency. Some transfer transaction takes a long time to execute. We think that the reason is the fragmented wallet for the account because of the mining rewards. In fact I need to increase transaction and block limits to avoid 'transaction too long' error.

CTransaction(hash=ef32615102, ver=1, vin.size=978, vout.size=2, nLockTime=0)
    CTxIn(COutPoint(0001800122, 0), scriptSig=3045022100a9c6bb6f7aa9f9)
    CTxIn(COutPoint(005774ffe0, 0), scriptSig=3045022100cdad08e9253d40)
....
    CTxIn(COutPoint(ffc8ca487c, 0), scriptSig=3045022100d3d003a63c5a5d)
    CTxIn(COutPoint(fff759534e, 0), scriptSig=304402207532997f738e1735)
    CTxOut(nValue=1.00000000, scriptPubKey=OP_DUP OP_HASH160 f8732cf97b91)
    CTxOut(nValue=0.00008618, scriptPubKey=OP_DUP OP_HASH160 62525c7cfc25)

But my question is, does not autocombine feature works in background to avoid this? Is it enabled by default? What is not working in my configuration?

Anyway I try to execute by hand: combineunspet in multchain-cli, and I get this error:

mincoins: combineunspent
{"method":"combineunspent","params":[],"id":1,"chain_name":"mincoins"}

error code: -4
error message:
Not enough inputs

Thanks a lot,

   Fernando

asked Jun 13, 2016 by Fernando

2 Answers

0 votes

Might be this trace message related with fact that multichain is not combining transactions?

mchn: Coin selection: Combine transaction requires extra native currency amountRunning MultiChainMiner with 1 transactions in block (301 bytes)

 

answered Jun 14, 2016 by Fernando
+1 vote

Thank you for reporting this. It looks like a bug. Transaction outputs without native assets are not combined. We will fix this in the next version.

The error "Combine transaction requires extra native currency amount" appears when you combine outputs with assets, but they don't have enough "native currency" to cover transaction fee, for example. We will look whether we can improve it, but the fee doesn't have much sense in private chains - blocks are mined freely by permitted miners, which don't expect to get any reward for this.

 

answered Jun 14, 2016 by Michael
Our chain is not completely private, so we have decided to have native currency.
It's strange, because our addresses must have enough native currency, but it might be an error from our part. I'll check it.
It is fine to have native currency. The question is - do you really need a fee?

If you have minimum-relay-fee>0 and native assets, this may happen for combine transactions even if you have enough native currency. We will look into this.
We have connect, send and receive grant for all. We want to avoid spam transactions, as you have suggested.

I don't understand very well this: "If you have minimum-relay-fee>0 and native assets, this may happen for combine transactions even if you have enough native currency"

Do you mean that this may be a bug?
It is not exactly a bug - it is more like "unsupported feature". Under some circumstances unspent outputs cannot be combined. It is not a disaster, you just have more outputs in the wallet.
Combining transaction takes several inputs and converts them into fewer outputs. If you have minimum-relay-fee>0, the fee is required. If combined inputs carry enough native currency to cover this fee, transacrion is send without problems. But if not - it cannot be sent. We can try to improve this behaviour by adding extra inputs to the transaction.
But the question is - are you sure you want to pay for combining transactions? If minimum-relay-fee>0 each transaction you create reduces your wallet native currency balance because of the fee.
The purpose of the fee in the public network is to improve chances of the transaction to be confirmed in block. It doesn't make sense in private chains, where all transactions are confirmed sooner or later. minimum-relay-fee=0 should resolve the problem.
...