waves
waves copied to clipboard
There is a fee error somewhere
Random error recorded:
- Borrower took a loan
- Signing worked
- Sent to Bobtimus
- Bobtimus failed
2021-07-30T00:12:20.032501Z INFO Server::run{addr=127.0.0.1:3030}: warp::server: listening on http://127.0.0.1:3030
2021-07-30T05:10:36.390841Z ERROR bobtimus::problem: unhandled error: JSON-RPC request failed with code -26: insufficient fee, rejecting replacement 2e3a4d00a38e57612d0ab06124ad5a04666110264b669780f6a0c1812976d7f6; new feerate 0.00001004 BTC/kB <= old feerate 0.00001004 BTC/kB (code 66): JSON-RPC request failed with code -26: insufficient fee, rejecting replacement 2e3a4d00a38e57612d0ab06124ad5a04666110264b669780f6a0c1812976d7f6; new feerate 0.00001004 BTC/kB <= old feerate 0.00001004 BTC/kB (code 66)
- Borrower thinks the loan is active.
Loan values.
This issue stems from bobtimus trying to double spend himself:
How to reproduce:
- take 1 loan (don't repay)
- take another loan
the second loan creation might fail. If not, keep taking loans :D Eventually bobtimus runs out of utxo's and will double spend a transaction. This fails with the error:
new feerate 0.00001004 BTC/kB <= old feerate 0.00001004 BTC/kB
Meaning, it assumes a replace by fee but since we use the same fee again the second transaction fails.
Issue on Bobtimus side is that we do not lock selected utxos:
https://github.com/comit-network/waves/blob/f366dd9a8dd782d064aca2bcbc32f7b4fbcfa162/bobtimus/src/lib.rs#L132-L135
So this might be an easy fix. Besides that, we should nevertheless report an error to the caller if publishing failed.