Bitcoin Forum
April 20, 2024, 03:00:50 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Not seeing balance of segwit address in Bitcoin Core  (Read 399 times)
b1946ac (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
December 06, 2017, 08:28:22 PM
Last edit: December 06, 2017, 08:49:17 PM by b1946ac
 #1

Quote
Bitcoin Client Software and Version Number: /Satoshi:0.15.1/
Operating System: Fedora 27, but N/A
System Hardware Specs: N/A
Description of Problem: Not seeing the balance of a segwit address.
Any Related Addresses: 37BCeqyLbB4GPRajwoWQUAGMz19GYmVC7z
Any Related Transaction IDs: 8f49cf0eb248ca19eb438ecf90e3adeaaf336141407cd5b4109330f0a38bb3be
Screenshot of the problem: https://i.imgur.com/xguhLcK.png
Log Files from the Bitcoin Client: I will supply these latter if necessary but think not atm.

I recently withdrew from an exchange and decided to do so into a segwit address. I generated an address as normal, used that address with the addwitnessaddress command. I then withdrew to the segwit address successfully, and the balance updated on my laptop. I have HD key generation enabled.

With HD generation I share the same wallet between two computers (desktop and laptop) and this works fine as the both generate the same addresses and do so 100 address ahead so they both scan the addresses I usually send to and both update their balance and spendable outputs.

However in this instance my desktop was not scanning the segwit version of the next address and failed to see the transaction, leading to the same wallet have 2 different balances across my 2 computers. I have since used the addwitnessaddress command to force my desktop to use the segwit address, and it has generated the correct one which has a balance if checking a block explorer. However it has not rescaned the address and the balance it see remains the same. Both of my computers run as pruned nodes, so they cannot easily rescan the blockchain.

I have been trying to use the importprunedfunds command. It requires the rawtransaction and txoutproof. I can obtain the rawtransaction from my laptop but whenever I try to get the txoutproof I get the error shown in the screenshot. Am I inputting the command incorrectly?

Another thought, what about my backups. The addresses are HD, which Is why I feel safe having made backups ages ago and not thinking about them much. I also know that a legacy HD generated address will map to a segwit address. However in a backup with so many address, how will I know which to generate segwit address for. I would probably make a script that did it for all of them just to check, but if I die and leave the backups to a family member they are unlikely to know about the different address formats and will lose whatever money is in the segwit address. (as it is they are encrypted and nobody can access any of it, but this is something to think about.) I hope that further versions of core will automatically scan segwit address as well as legacy ones, but before then anyone using them may have to leave a note with their backups.

Anyway, any thoughts or suggestions?
1713582050
Hero Member
*
Offline Offline

Posts: 1713582050

View Profile Personal Message (Offline)

Ignore
1713582050
Reply with quote  #2

1713582050
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713582050
Hero Member
*
Offline Offline

Posts: 1713582050

View Profile Personal Message (Offline)

Ignore
1713582050
Reply with quote  #2

1713582050
Report to moderator
1713582050
Hero Member
*
Offline Offline

Posts: 1713582050

View Profile Personal Message (Offline)

Ignore
1713582050
Reply with quote  #2

1713582050
Report to moderator
1713582050
Hero Member
*
Offline Offline

Posts: 1713582050

View Profile Personal Message (Offline)

Ignore
1713582050
Reply with quote  #2

1713582050
Report to moderator
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
December 06, 2017, 11:17:59 PM
 #2

As for your last point, I wouldn't worry about it. I think it's likely that in the future, the wallet will be able to support segwit and will scan those addresses automatically, however once Bitcoin Core gains full segwit support they might use a different derivation path for segwit addresses. In that case, it would be best to make a new wallet and transfer all your coins over.

As for ImportPrunedFunds, here's a note that's on the command
Quote
The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.
So after you spend it, the coins leaving the wallet might not be displayed, and if so you'll have to use ImportPrunedFunds on the outgoing tx also. ImportPrunedFunds takes two strings as arguments, the first being the raw tx and the second being the proof.
GetTxOutProof takes an array of txid strings as it's first argument and has an option second argument of the block to look in. What I would try using is the second command you typed in your image, but get rid of the block part, using just gettxoutproof ["yourtxhere"].
b1946ac (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
December 07, 2017, 12:07:15 AM
 #3

Quote
GetTxOutProof takes an array of txid strings as it's first argument and has an option second argument of the block to look in. What I would try using is the second command you typed in your image, but get rid of the block part, using just gettxoutproof ["yourtxhere"].

That doesn't seem to work either, same output.

Could it be that Core doesn't have the proof, as part of its pruning. It could check the proof exists, make a note of that for its spendable outputs, then delete the proof? Its only pruned down to 5GB, and the transaction occurred last night so it shouldn't have deleted that part of the blockchain yet, right?

Quote
The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

Sounds like you have to baby sit it through everything. If this is true than it's not really worth using and better to redownload and scan the blockchain. It's not like I need to spend it now, so I might wait until I get faster internet and can be bothered doing this. If I need to spend it I can do so from my laptop.

All I really need to know is that it's safe, and not seeing it on my balance is discouraging but I can just remind myself I still have the private key.
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
December 07, 2017, 01:08:40 AM
 #4

Yeah, Bitcoin Core is definitely not the ideal Segwit wallet right now. Electrum has segwit support, but uses Bech32 addresses which aren't really supported anywhere. I've had my best segwit support from Samoura (Android wallet) and my Nano S.
b1946ac (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
December 07, 2017, 02:00:30 AM
 #5

Yea, I mainly just use the GUI interface but thought I may as well try segwit. Looking forward to the next update.

I don't trust any lightweight/thin wallets after a bad experience with the now defunct Multibit. It lost track of all bitcoins and had to rescan every time I used it, then started saying my wallet was corrupted and not even rescaning properly. Luckily I managed to extract to Core and have been using that ever since. The few times I've used Electrum I've found it really slow at connected to Electrum servers and finding my balance.

I probably should invest in a hardware wallet but don't like the idea of paper backup and would far rather seed words on my computer, which defeats the purpose of a hardware wallet. I tend to throw out all paper, so I don't trust myself with wallet words. It's safer for that to be spread through my computers and backup drives.
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
December 07, 2017, 02:45:04 AM
 #6

Yea, I mainly just use the GUI interface but thought I may as well try segwit. Looking forward to the next update.

I don't trust any lightweight/thin wallets after a bad experience with the now defunct Multibit. It lost track of all bitcoins and had to rescan every time I used it, then started saying my wallet was corrupted and not even rescaning properly. Luckily I managed to extract to Core and have been using that ever since. The few times I've used Electrum I've found it really slow at connected to Electrum servers and finding my balance.

I probably should invest in a hardware wallet but don't like the idea of paper backup and would far rather seed words on my computer, which defeats the purpose of a hardware wallet. I tend to throw out all paper, so I don't trust myself with wallet words. It's safer for that to be spread through my computers and backup drives.

I have a Nano S and I love it. If you don't want to use a paper backup, you could do what I do, create an encrypted container using VeraCrypt, use a strong password with it and inside store a text file with your seed. You can back that up however you want.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!