Open bitschmidty opened 5 years ago
Additionally, it seems that whatever might be causing this issue has prevented me from transacting with the wallet further.
I have created a (send max) transaction to empty the wallet to a bech32 segwit v0 address and the transaction doesn’t seem to have been broadcast. Both transactions are pending in the wallet and neither txid shows up in blockstream.info.
The fact that this prevents you from spending indicates that this is a problem in the edge-currency-bitcoin plugin, which handles balance calculation.
Specifically, that plugin uses the UTXO set to calculate the balance, which is independent from the transactions in the history view. If your balance seems to reflect 2x the initial transaction, that would seem to indicate that the plugin has detected the incoming UTXO twice. This can happen with, for example, transaction malleability. Re-syncing the wallet can sometimes solve these issues. You can do this by tapping the three dots next to the wallet balance in the main wallet list view.
@swansontec do you recommend me closing this issue and creating a new one in the https://github.com/EdgeApp/edge-currency-bitcoin repo?
Try hitting the three dots next to the wallet name on the home screen and select "resync". If the balance appears correctly after that, then this is a known problem - we need to add logic to drop unconfirmed transactions after some period of time. If the balance doesn't appear correctly after a resync, then yes, please open a bug over there.
I tried the three dot workaround and it did not work for me. What worked seemed to be waiting 2 weeks for the "bad" (segwit v1) transaction to be removed from the mempool.
Interesting. So, even if our Bitcoin plugin were to drop unconfirmed transactions, the network will keep refreshing them until they age out. I'm not sure what we even could do to fix this problem, in that case. Maybe some tweaks to the balance calculation logic are the best we can do.
Yes, feel free to open a bug over there, especially if you have any ideas about better behavior.
@swansontec Not totally sure on a recommendation. Since I was sending a non standard, segwit v1 (instead of current standard segwit v0 transactions) it is likely none of the Bitcoin nodes relayed the transaction. If/When segwit v1 comes around it looks like youll be ready since you are accepting those already.
I received a transaction for .0003918 BTC.
I sent a transaction for .00017912 BTC.
Note: balance was 0 before these 2 transactions.
My balance went to .00060448 BTC.
I noticed .00060448 BTC is 2x .0003918 BTC - .00017912 BTC if that helps. So for some reason the initial incoming transaction amount is being counted twice.
Additionally, if it helps, the outgoing .00017912 BTC transaction was an attempt to spent to a segwit v1 address.
See screenshot below.