Bitcoin Forum
May 24, 2024, 09:11:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain's RPC gives out uncompressed addresses :(  (Read 1471 times)
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 11, 2013, 08:21:24 PM
Last edit: November 14, 2013, 12:31:34 AM by Cyberdyne
 #1

I've been doing some development using Blockchain.info's JSON-RPC API and am getting some really weird behavior:

I have 2 windows open side-by-side: A website I'm developing, and my blockchain.info wallet, with it's list of receiving addresses showing.

Every time I invoke a new address from my website, the address that's given to me via the blockchain API is different from the one that appears in the list in the blockchain.info window.

I've clicked about 10 times, and got a list of 10 addresses that are totally different from the 10 addresses that are now in my blockchain.info account's receiving page.

I'm sure this must have something to do with compressed/non-compressed or some other such thing that I don't know enough about.

I first noticed something was up, when I sent 0.1 BTC to one of the deposit addresses given, and it has confirmations, but doesn't appear in the blockchain login anywhere!   I'm betting it's got the exact same private key, but different address - Now how do I recover that 0.1 BTC??!

Thanks for any help. I'll send that 0.1 to whoever can explain all this and help recover it.
scribe
Sr. Member
****
Offline Offline

Activity: 295
Merit: 250



View Profile WWW
November 11, 2013, 08:28:58 PM
 #2

Definitely using the same login/wallet?  Any way to confirm that?

And more paranoidly, definitely hitting blockchain.info in both cases?  I've seen the odd scam site set up to catch domain typos.

Have you got email notifications for incoming payments set up?  Might also help debugging.

blocknois.es Bitcoin music label. ~ New release: This Is Art

Read: Bitcoin Life | Wear: FUTUREECONOMY
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 11, 2013, 08:39:38 PM
 #3

Definitely using the same login/wallet?  Any way to confirm that?

Absolutely, the timing of the addresses appearing in the blockchain.info list totally corresponds to the timing of me clicking "Generate New address" on my website... Only they're different addresses.

And more paranoidly, definitely hitting blockchain.info in both cases?  I've seen the odd scam site set up to catch domain typos.

Have you got email notifications for incoming payments set up?  Might also help debugging.

It's definitely going to blockchain.info, can't be a typo otherwise it wouldn't have that timing and number of addresses synchronicity.

I don't have email notification set up, but I will do that and maybe risk a bit of dust to one of the spooky deposit addresses.
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 11, 2013, 09:10:25 PM
 #4

Okay I was able to find out more info via the handy "Wallet Details" tab of bitaddress.org.

I used blockchain.info's wallet export and selected "Bitcoin-QT" as the private key format.

This unfortunately didn't show the 0.1 BTC when I imported it into my Bitcoin-QT.

However after pasting the private key into bitaddress.org, it confirms that the address I was given by blockchain.info's RPC and the address that I sent money to, was a non-compressed address. The compressed address is what appears in Blockchain.info when I log in via their site.

So they're giving out non-compressed addresses via RPC, but showing compressed addresses (and alarmingly, calculating your wallet balance from them) in your My Wallet login.

So, now that I know all this...

a) Where can I import this private key that will allow me to access the funds sitting in the non-compressed address?

and b) Is there any way to change this RPC behavior on their API? (Or change My Wallet to use non-compressed addresses so I can access funds sent to them)
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 11, 2013, 09:26:00 PM
 #5

a) Where can I import this private key that will allow me to access the funds sitting in the non-compressed address?

Success, I have recovered the funds, by pasting the compressed private key into bitaddress.org, then copying from there the Private Key WIF (uncompressed) and importing that version of the key into Bitcoin-QT.

Scribe, let me know your address anyway and I'll send you a tip for helping.

Anyway, now onto part b)  How can RPC be made useful? How can one get both RPC and the regular My Wallet account using the same address type?
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
November 11, 2013, 09:31:16 PM
 #6

Every time I invoke a new address from my website, the address that's given to me via the blockchain API is different from the one that appears in the list in the blockchain.info window.

That's interesting. I recall I created a new BlockChain wallet and saw TWO addresses. BlockChain usually creates only ONE address. Could be a hard-to-replicate bug.
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 11, 2013, 09:34:51 PM
 #7

Every time I invoke a new address from my website, the address that's given to me via the blockchain API is different from the one that appears in the list in the blockchain.info window.

That's interesting. I recall I created a new BlockChain wallet and saw TWO addresses. BlockChain usually creates only ONE address. Could be a hard-to-replicate bug.

Do you mean you simply went to their website and made a wallet, and saw TWO addresses upon logging in? Or are you speaking of experience with the RPC API?

You'll see in my other posts above I have confirmed it's giving out non-compressed via the API, and only handling compressed ones when you log in to the web site.

By the way, even the RPC command 'getbalance' is calculating the balance of compressed addresses (Hence me finding out about this issue, because I was shocked to find $bitcoin->getbalance() returning 0 even after I'd sent money and it was confirmed by the network)
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
November 11, 2013, 09:44:51 PM
 #8

Do you mean you simply went to their website and made a wallet, and saw TWO addresses upon logging in? Or are you speaking of experience with the RPC API?

The former. In my case that could be the same issue coz compressed and non-compressed addresses would look like 2 different ones, wouldn't they?
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 11, 2013, 09:50:05 PM
 #9

Do you mean you simply went to their website and made a wallet, and saw TWO addresses upon logging in? Or are you speaking of experience with the RPC API?

The former. In my case that could be the same issue coz compressed and non-compressed addresses would look like 2 different ones, wouldn't they?

They sure do, and for all intents and purposes they ARE different ones. (e.g. as we've seen, sending to one type does not increase the balance on the other one - They are essentially two completely separate addresses).
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 12, 2013, 02:15:36 AM
 #10

Update:

Today I was poking around the My Wallet login area and noticed a section called "Check Compressed" which is under the "Debugging" menu.

I hit [Run] and it automatically found and added the non-compressed address that I had sent 0.1 to, to my wallet.

Obviously this is not a long term solution, as the RPC will continue to send me uncompressed deposit addresses. It won't be practical to continually log in to My Wallet and click this [Run] button manually.

But for anyone else who may have some feeling that blockchain.info funds are lost somewhere, I suggest going and doing this "Check Compressed" thing. You might get a nice surprise.
scribe
Sr. Member
****
Offline Offline

Activity: 295
Merit: 250



View Profile WWW
November 12, 2013, 08:20:05 AM
 #11

Good to hear you sorted it out - one for me to remember too Smiley

Cheers for the tip offer as well - too kind. Here's an address: 13d69kuzM2dRSv4erfBhNXCT1LB5yXDcDo

blocknois.es Bitcoin music label. ~ New release: This Is Art

Read: Bitcoin Life | Wear: FUTUREECONOMY
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 14, 2013, 12:29:06 AM
 #12

That's interesting.

And highly inconvenient, at the moment.
Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 16, 2013, 06:56:17 AM
 #13

Bump. I hope the owner of Blockchain.info can comment on this issue.

Good to hear you sorted it out

It's not exactly sorted out. I've merely diagnosed the problem, but I'm yet to find a satisfactory solution.
piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
November 17, 2013, 02:52:01 AM
 #14

Apologies for this issue, it should be resolved now.

The "Check Compressed" tool mentioned by Cyberdyne will recover any incorrectly displayed un-compressed/compressed addresses.

Cyberdyne (OP)
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
November 17, 2013, 03:39:40 AM
 #15

Apologies for this issue, it should be resolved now.

Wow thank you!

I will do some of my own testing soon, but I should ask here:

Was it resolved by making the RPC give out compressed addresses, or was it resolved by making the non-compressed addresses automatically appear in My Wallet (and be included in getbalance calculations)?
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!