Closed NicolasDorier closed 5 years ago
Seems this was related to that whole situation related to BTCPay running with pruned mode although it isn't supported combined with the forced rescan? Is the user still running with a pruned node? If BTCPay still doesn't give users their seed on start up, then I'm not sure what we can do.
We can ask them to resync the whole chain and redo a rescan. They still have all their files. Though the logs don't show that it is a problem. The logs don't appear to complains about missing blocks though
How can you force rescan?
If they don't have the seed, then they can't force one normally. Instead, they may need to use this tool on their database: https://github.com/btcsuite/btcwallet/tree/master/cmd/dropwtxmgr
Ping @hakonamatata you need to:
opt-save-storage-s
from BTCPAYGEN_ADDITIONAL_FRAGMENTS
.. btcpay-setup.sh -i
Alternatively, give your BTC to the #reckd fund.
@Roasbeef or is there a way he can recover the BIP32 tpriv so he can use another tool to rescan?
6. Install go and run this tool https://github.com/btcsuite/btcwallet/tree/master/cmd/dropwtxmgr
May be it will help too.
I used the same commands for a rescanning (a compiling the dropwtxmgr
and a running).
To stop lnd
before
To run this (i didn't it run from Docker so i don't know other paths)
go get -u github.com/btcsuite/btcwallet/cmd/dropwtxmgr
cp $HOME/.lnd/data/chain/bitcoin/mainnet/wallet.db $HOME/wallet.db
dropwtxmgr --db=$HOME/.lnd/data/chain/bitcoin/mainnet/wallet.db
To run the lnd
again.
Hi, thanks for taking the time to look into this issue.
Ping @hakonamatata you need to:
1. If you use luna node, resize your bitcoin volume to have like 500GB 2. btcpay-down.sh 3. Remove `opt-save-storage-s` from `BTCPAYGEN_ADDITIONAL_FRAGMENTS`. 4. `. btcpay-setup.sh -i` 5. Wait it fully sync 6. Install go and run this tool https://github.com/btcsuite/btcwallet/tree/master/cmd/dropwtxmgr
Alternatively, give your BTC to the #reckd fund.
Here is the config I use on my BTCPay VM in Azure. I don't use opt-save-storage-s.
root@BTCPayServerVM:/etc/profile.d# cat btcpay-env.sh
export BTCPAYGEN_OLD_PREGEN="false"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_CRYPTO2=""
export BTCPAYGEN_CRYPTO3=""
export BTCPAYGEN_CRYPTO4=""
export BTCPAYGEN_CRYPTO5=""
export BTCPAYGEN_CRYPTO6=""
export BTCPAYGEN_CRYPTO7=""
export BTCPAYGEN_CRYPTO8=""
export BTCPAYGEN_CRYPTO9=""
export BTCPAYGEN_LIGHTNING="lnd"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-lnd-autopilot"
export BTCPAY_DOCKER_COMPOSE="/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Generated/docker-compose.generated.yml"
export BTCPAY_BASE_DIRECTORY="/var/lib/waagent/custom-script/download/0"
export BTCPAY_ENV_FILE="/var/lib/waagent/custom-script/download/0/.env"
export BTCPAY_HOST_SSHKEYFILE=""
if cat $BTCPAY_ENV_FILE &> /dev/null; then
export BTCPAY_HOST="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')"
export LETSENCRYPT_EMAIL="$(cat $BTCPAY_ENV_FILE | sed -n 's/^LETSENCRYPT_EMAIL=\(.*\)$/\1/p')"
export NBITCOIN_NETWORK="$(cat $BTCPAY_ENV_FILE | sed -n 's/^NBITCOIN_NETWORK=\(.*\)$/\1/p')"
export LIGHTNING_ALIAS="$(cat $BTCPAY_ENV_FILE | sed -n 's/^LIGHTNING_ALIAS=\(.*\)$/\1/p')"
export ACME_CA_URI="$(cat $BTCPAY_ENV_FILE | sed -n 's/^ACME_CA_URI=\(.*\)$/\1/p')"
export BTCPAY_SSHKEYFILE="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHKEYFILE=\(.*\)$/\1/p')"
export BTCPAY_SSHTRUSTEDFINGERPRINTS="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHTRUSTEDFINGERPRINTS=\(.*\)$/\1/p')"
fi
export COMPOSE_HTTP_TIMEOUT="180"
@hakonamatata if your node was not pruned then the issue is something else.
You can try to do what @Perlover tells you.
The wallet.db is at /var/lib/docker/volumes/generated_lnd_bitcoin_datadir/_data/data/chain/bitcoin/mainnet/wallet.db
.
That said, I am wondering if the problem is not elsewhere, if your node was not pruned, then the rescan should have worked, and from your logs, it seems to have worked.
Summoning @Roasbeef here, as it seems the user did not run a pruned node.
Is there a way to expose the xpub? As I can give the user a way to scan it to see whether there is indeed money or not in his wallet.
@hakonamatata have you confirmed whether you should have a non-zero balance? The wallet had some bugs where it'd cause your balance to be falsely inflated, so it's possible you were just seeing that.
My balance is no longer 0, it was for several days. Not sure exactly what happened.
From the logs I saw you had some timed out HTLCs that you swept on-chain, so that's probably it. What concerns me is that the rescan succeeded, but you still had a 0 balance. Either two things happened: there's a bug in the rescan logic (which seems unlikely given how many people have used it, but still possible) or you actually had a 0 balance.
Initially opened on https://github.com/btcpayserver/btcpayserver-docker/issues/120
This user updated from a version before 0.5.2 to 0.5.2 and lost its balance.
His logs are here.
Please advice on the procedure on LND side so he can recover/rescan.
quoting @hakonamatata