Closed JoeGruffins closed 2 years ago
There appears to be multiple Core instances (a STACKER and a SNIPER) using the same dogecoind instance for their wallet. Since they are not the same baseWallet
instances, they don't share the same btc.fundingMtx
, which for a single instance makes the listunspents
-> lockunspent
call effectively atomic.
I don't think there's a problem with the client
code that's causing this double lock attempt (or with loadbot). It looks like there's an issue with DOGE's ./start-wallet
that fails to make a separate wallet, or at least one with separate address keys.
cat > "./start-wallet" <<EOF
#!/usr/bin/env bash
mkdir ${NODES_ROOT}/\$1
printf "rpcuser=user\nrpcpassword=pass\ndatadir=${DELTA_DIR}\ntxindex=1\nregtest=1\nrpcport=\$2\n" > ${NODES_ROOT}/\$1/\$1.conf
${DAEMON} -rpcuser=user -rpcpassword=pass \
-rpcport=\$2 -datadir=${NODES_ROOT}/\$1 -txindex=1 -regtest=1 \
-debug=rpc -debug=net -debug=mempool -debug=walletdb -debug=addrman -debug=mempoolrej \
-whitelist=127.0.0.0/8 -whitelist=::1 \
-port=\$3 -fallbackfee=0.00001 -printtoconsole
EOF
chmod +x "./start-wallet"
The datadir
written to the config file doesn't match the datadir
used on the command line. I would expect the command line to take precedence, but that still looks off. Maybe ${DELTA_DIR}
there needs to be changed to ${NODES_ROOT}/\$1
Oh, all the loadbot DOGE wallets are just the same, not the ones that are started with start-wallet
. I can reproduce the errors and the UTXO is always one from alpha. The rpc port chosen in (*Mantle).createWallet
needs to be given to newBotWallet
, not just the name.
Fixing...
With https://github.com/decred/dcrdex/pull/1677, it ran for almost 8hrs with compound
and dcr_doge
and didn't hit the error in this issue or https://github.com/decred/dcrdex/issues/1674. Without #1677 it would hit it quickly.
[INF] LOADBOT: LoadBot ran for 7h49m25.041109931s, during which time 12602 orders were placed, resulting in 20997 separate matches, a rate of 44.7 matches / minute
It dies because of DCR alpha failing to do a sendtoaddress [ERR] LOADBOT: exec error (dcr) "./alpha": exit status 1: -6: wallet.SendOutputs: insufficient balance:: txauthor.NewUnsignedTransaction
. So that's NBD. Although maybe these sends via the scripts should be a little less than full balance in case the trader programs spend some it first.
Running loadbot at https://github.com/decred/dcrdex/pull/1656/commits/a2ad03d399015fc35e80a9ccc7fb66cc1de6292b on the dcr_doge market.
doge placed an order with coins that the server considered locked. Also, the error sent to the client is not specific enough to know the problem without looking at server logs.
The loadbot error:
The server error:
Indeed the client is using the same coin twice. Appears to be a race:
The server's log could be encoded better.
Client logs: doge1.txt