JoinMarket-Org / joinmarket-clientserver

Bitcoin CoinJoin implementation with incentive structure to convince people to take part
GNU General Public License v3.0
734 stars 179 forks source link

bug: jmwalletd dies when creating relative offer with zero fees #1740

Open theborakompanioni opened 1 month ago

theborakompanioni commented 1 month ago

Starting a maker with a zero relative fee value on regtest via the rpc api crashes the jmwalletd deamon.

POST /wallet/Satoshi.jmdat/maker/start
{
  "ordertype": "sw0reloffer",
  "minsize":"100000",
  "cjfee_a":"0",
  "cjfee_r":"0",
  "txfee":"0"
}
202 Accepted
{}

Logs after

2024-10-28 03:55:56,503 [INFO]  Failed to start after 10 minutes, giving up.
2024-10-28 03:55:56,505 [INFO]  Lost IRC connection to: ergo.test . Should reconnect automatically soon.
2024-10-28 03:55:56,505 [DEBUG]  IRC connection lost: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion: Connection lost.
]
2024-10-28 03:55:56,506 [DEBUG]  We got a disconnect event: z5d2ht2jp5w7lbh5hwaygd2ne6l2hsmvepqxrzkavtf53upsg4z4tyid.onion:5222
2024-10-28 03:55:56,506 [INFO]  Going to reattempt connection to z5d2ht2jp5w7lbh5hwaygd2ne6l2hsmvepqxrzkavtf53upsg4z4tyid.onion:5222 in 10.0 seconds.

Note: Trying to stop the maker service with GET /wallet/Satoshi.jmdat/maker/stop (202 Accepted) does not help. Backend dies nonetheless.

theborakompanioni commented 1 month ago

Potentially related: https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1692