Insane fees error

+1 vote

Dear MC team,

I setup a test multichain using Bitcoin compatible parameter as specified here:

https://github.com/MultiChain/sample-BitcoinWallet/blob/master/multichain_bitcoin.params.dat

After that I tried to issue an asset using raw transaction:

createrawtransaction '[{"txid":"a1b2...","vout":#}]' '{"1...":{"issue":{"raw":2000}}}'

without specifying any native currency fee for the miner.

I am able to create and sign the transaction using my private key but when I try to broadcast the tx in the network I got the message 'INSANE FEE ERROR'.

What is the meaning of it ? How can I solve?

Thanks

 

asked Mar 31, 2020 by Fabio

1 Answer

0 votes

The issue seems to be that you are spending an input in this transaction which contains a significant amount of the native currency, but not specifying where that native currency should go in an output. As a result, the native currency would be collected as a transaction fee, and this fee would be absurdly high.

The solution is to either include the native currency in the output you are specifying, or else consider using the appendrawchange command to add an extra output with the change (minus the fee specified).

But can I ask why you are using bitcoin-compatible parameters and raw transactions for this?

answered Mar 31, 2020 by MultiChain
Thanks, your reply is clear. I'm setting up a bitcoin-compatible MC in order to make a connection test with a wallet.

I tried to add a native currency value to the transaction as reported in the following line:

createrawtransaction '[{"txid":"fd9049e79ed48513d54970d976785798019e30f7d37bafc394072930d4b86865","vout":0}]' '{"15LFvUqr1Xm6doZZpWVLw2wZN7jvUPB8Y5":{"issue":{"raw":1,"":20}}}' '[{"create":"asset","name":"asset_1", "multiple":1,"open":false}]'

but I got the following error

error code: -8
error message:
Invalid field for object issue:

Could you kindly suggest me how to add a native currency value?
Your second parameter should be in this form:

'{"15LFvUqr1Xm6doZZpWVLw2wZN7jvUPB8Y5":{"issue":{"raw":1}, "":20}}'
Thanks, pretty clear.
...