free transaction rejected by rate limiter

+2 votes

Dear Team,

I'm doing a load test on MC 2.0.2. Using a script I wrote a raw transaction having about 100 inputs and 100 outputs. 

I signed it offline using a cold node and then I sent in the network with sendrawtransaction.

The transaction is accepted by the node and I got the txid back but I realized it is still in the mempool. I found that in the debug.log file of all the nodes in the network I have the following ERROR line:

2021-02-07 22:29:58 ERROR: AcceptToMemoryPool : free transaction rejected by rate limiter

Could you kindly explain the the meaning and the reason why the transaction is not mined by any miner?


asked Feb 7 by fabio

1 Answer

0 votes

It sounds like you have fees set on your blockchain, in which case it is normal that there's a limit on how many free transactions (which by definition have insufficient fees) can be sent. There are are a few options:

  1. Reduce the minrelaytxfee runtime parameter (possibly to 0).
  2. Increase the limitfreerelay runtime parameter to allow more free transactions to be sent.
  3. Add a sufficient fee to this transaction to match the minimum-relay-fee blockchain parameter.
Note that runtime parameters may need to be set on all nodes, via the multichain.conf files.
answered Feb 8 by MultiChain
Thank for your support.
I confirm that I set up a open-to-connect MC network with a tx fee in order to protect it from spamming.

I doublechecked the transaction size. Its size is 25691 byte after signing. According to the network setting I need 0.25691 currency to make it mined by one of the validators but the total amount of UTXO value is 0.2 so the error message is right.
It is interesting to notice that the node sending the transaction didn't raise any error. It kept it in the mempool but with no warning in the debug.log file.
All the other miners raised the error above but didn't mined the transaction. So after clearing the mempool I reduced the number of vout/vin and the tx size shrinked as well and the transaction got mined.

In order to share my knowledge with others devs, I found an interesting formula to estimate the tx size which is valid for bitcoin network but is right for a coarse estimation in MC assuming we are using compressed keys:

tx size (byte)=146*(Vin)+34*(Vout)+10