bitpay / wallet

Bitpay Wallet (formerly Copay) is a secure Bitcoin and other crypto currencies wallet platform for both desktop and mobile devices.
http://bitpay.com/wallet
MIT License
3.81k stars 1.74k forks source link

Seeing every address of wallet #3119

Closed xanatas closed 9 years ago

xanatas commented 9 years ago

Is this possible without going through the history? Also unused addresses??

isocolsky commented 9 years ago

There are several reasons why we decided to hide the list of addresses:

Do you have an use case in mind that would require this feature?

dan-da commented 9 years ago

This is pretty much the same as https://github.com/bitpay/copay/issues/3109.

There are many use cases (needs) for this:

1) User wishes to independently validate balance/transactions. 2) User wishes to import addresses into a watch-only wallet, such as bitcoin-core. 3) Importing addresses into libratax. 4) Importing addresses into my own auditing tool ( bitprices ) or future auditing tools. 5) User wishes to lookup addresses on a blockchain explorer. 6) User is writing a script or using another utility/api/service that requires wallet addresses. 7) I'm probably not thinking of 1000 other cases.

Fundamentally though it comes down to this: These are my addresses, representing my wealth. Hiding them from me, the owner, is not acceptable. It also requires that I, the user put 100% trust in the CoPay software, which I do not.

In short, in your efforts to "simplify" and "protect" the user, you have effectively said "Don't worry your pretty little head about your keys or addresses, we'll just manage them for you. You want to see them? too bad!". This disempowers the user/owner, and to my mind, is only one step away from a hosted service like coinbase that actually holds the keys.

Presently extracting addresses out of CoPay is amongst the most laborious of any wallet I have seen.

One must go to history, then click on individual transaction, then click "See it on the blockchain" then manually determine which of the inputs/outputs correspond to our own address(es), then store those somewhere, then repeat all this for the next transaction, and so on.

I know this because I've done it, because I've had a NEED. It is a serious pain point.

I am fine with it being buried under "Advanced" somewhere, or even as a separate utility or manually documented procedure. But the capability needs to exist.

This could be easily solved with a new CSV export.

xanatas commented 9 years ago

Actually my use case now: I gave someone an address from my co-pay wallet two months ago. he used this address now to pay me and the funds are not showing up on my wallet but in the blockcain transactions they go to the address i gave him. I also checked It IS the address i gave to him. I actually want to reconstruct if something went wrong and what actually did happen. Somehow the ability to prevent me from checking on all addresses keeps me from doing so.

I also agree with the poster above. does not need to be part of the main UI. If you have an option to see just a list and their holdings in some advanced settings tab would be an improvement and not to much for the user to handle.

I give unused addresses to people in case of donations. i dont know if people would donate and this is a way to check who donated how much.

KeyJockey commented 9 years ago

I agree this is needed in an "Advanced" function... similar to my complaint about not being able to manually over-ride the new "dynamic fee" feature (report https://github.com/bitpay/copay/issues/3111 here) and I also agree with the post elsewhere (can't find it now) about needed a way to export or at least SEE the actual private keys!

Of course it's all fine and good to have a nice simple clean UI... everyone wants software that looks nice and is "easy to use" -- but doing so at the expense of necessary functionality and features that users really need to have, in order to get the software to actually DO what they WANT, is totally bass-ackwards putting the cart before the horse wrong-headed thinking.

It's a fine line to tread, keeping the UI clean and simple but still enabling NEEDED functionality and I'm beginning to worry that Copay's design principles are heading a bit too far towards that "hamstring the users for the sake of simple UI" thinking.

This ISN'T what you guys want to be doing... believe me. Copay has a great start for a 1.0 version and is currently my favorite wallet but you guys can easily lose that if you focus too much on holding back functionality for this "simple UI" false justification.

Just my 2 satoshi's opinion as a former software UI designer in a past career... FWIW

dabura667 commented 9 years ago

expense of necessary functionality

Disagreement. Ability to input custom fees and view all addresses is not necessary. I understand the thought process, I used to run QT when it was the only viable wallet and making periodic backups and managing addresses for tax purposes etc.. times have changed.

You seem technically apt. Fork Copay. It's just a UI interface to angular-bitcore-wallet-client. Heck, make your own UI for bwc and you can even support multiple outputs too (available in bwc) :-)

dan-da commented 9 years ago

As stated in issue #3109, I would be satisfied with a documented process (even if only here in this issue) for how a user may manually retrieve the addresses ( and yes, private keys also ).

Right now, this thing feels like a car with the hood welded shut.

ok, so it's just a frontend to BWS. Can someone PLEASE point me to documentation how to get my addresses and private keys out of BWS for wallet(s) I have created using CoPay?

re the forking talk: that's always a possibility. My hope though would be that the CoPay developers realize that: a) users of CoPay, a wallet aimed at multisig, are already going to be fairly knowledgeable about bitcoin at this stage in bitcoin's life, not necessarily complete novices. b) we who created and are commenting on this issue are actual users of CoPay, expressing a real need that we have, presently.

dan-da commented 9 years ago

Oh, I was going to suggest also. Perhaps a general way to accomodate these types of "advanced" requests would be to add a "debug console" that allows one to enter BWS queries, ala bitcoin-qt.

I notice that the BWS API has this: /v1/addresses/: Get Wallet's main addresses (does not include change addresses)

from: https://github.com/bitpay/bitcore-wallet-service

But I do not see any API or flag that DOES return change addresses. Which is disappointing. Is there really no way?

matiu commented 9 years ago

On Wed, Aug 26, 2015 at 3:59 PM, dan-da notifications@github.com wrote:

As stated in issue #3109 https://github.com/bitpay/copay/issues/3109, I would be satisfied with a documented process (even if only here in this issue) for how a user may manually retrieve the addresses ( and yes, private keys also ).

Right now, this thing feels like a car with the hood welded shut.

ok, so it's just a frontend to BWS. Can someone PLEASE point me to documentation how to get my addresses and private keys out of BWS for wallet(s) I have created using CoPay?

Copay is not a frontend for BWS. BWS does not hold private keys of the wallet, nor private keys to join wallet nor private keys to create transaction proposals. All that happens client-side. BWS facilitates the async communication and interaction between Copayers.

You can extract your private key from your backup, see: https://github.com/bitpay/copay/issues/3096#issuecomment-131468470

I agree that should be better documented. I just added to the Readme.md of Copay: https://github.com/bitpay/copay/blob/master/README.md#backup-format, what you think?

Also, at the readme I added a manual (quite tedious) procedure to generate all Copay's wallet address from the backup only.

matiu commented 9 years ago

On Tue, Aug 25, 2015 at 1:45 PM, Philip notifications@github.com wrote:

Actually my use case now: I gave someone an address from my co-pay wallet two months ago. he used this address now to pay me and the funds are not showing up on my wallet but in the blockcain transactions they go to the address i gave him. I also checked It IS the address i gave to him. I actually want to reconstruct if something went wrong and what actually did happen. Somehow the ability to prevent me from checking on all addresses keeps me from doing so.

Thanks for the explanation. We just added the ticket: https://github.com/bitpay/copay/issues/3122

Until it is solved, please use the manual procedure described at https://github.com/bitpay/copay#backup-format or contact us at https://gitter.im/bitpay/copay or support@bitpay.com so we can help you with this issue in private.

dan-da commented 9 years ago

@matiu thanks for the readme writeup. It is indeed tedious to extract the addresses, but at least it is a process. I will comment again once I've actually tried it.

Anyway, I see issue #3122 was added, so I'm happy about that. Thanks guys!

aside: I am on the lookout for an online tool that will accept an xPubKey and auto-generate all used addresses. Would be an awesome addition to the bitcore playground, and would make this process bearable.

dabura667 commented 9 years ago

In case that one site ever goes down, I made this site (open source of course)

https://bip32jp.github.io/english/copay_decrypt.html

matiu commented 9 years ago

https://bip32jp.github.io/english/copay_decrypt.html

Awesome!

@dan-da Creating a tool generate copay addresses from the backup shouldn't be difficult. Maybe we can add that to @dabura667's tool soon.

dabura667 commented 9 years ago

I could add it with a coke or a milkshake or two.

However, we would need to decide how to make the UI for the tool, as my UI skills are near non-existent.

KeyJockey commented 9 years ago

@dabura667

You seem technically apt. Fork Copay

I am "apt" but don't know how to code unfortunately. I'm a (former) user interface designer in a prior career which IMHO is a different skill set than a programmer.

Good software is made by a combo of thinking from keyboard to microchip (developer) and opposite direction from keyboard to brain (design) and -- usually -- good coders make lousy designers, and good designers make lousy coders.

I'm just a USER of Copay, a FAN of what appears to be possibly the first really decent bitcoin wallet.

Frankly, up to now ALL wallets have SUCKED HARD and it's high time that someone is finally making a good one. Kudos to BitPay for making it possible...

Seriously, I just want to see Copay succeed, not fork into a million versions, so that I'll have ONE good wallet to finally recommend to friends, family, customers, colleagues and EVERYONE.

But developers telling users "Oh, you don't like it? So go code it yourself" rather than LISTENING to what we -- the users -- are reporting Copay needs to be really GOOD ain't the way to get there.

It's still early however... most software really isn't any good until version 3.0 or so LOL

So I'm still hopeful that Copay is on the right track. (Just as long as my damn https://github.com/bitpay/copay/issues/3111 Manual Override Dynamic Fee issue gets FIXED!!!)

dabura667 commented 9 years ago

@dan-da Creating a tool generate copay addresses from the backup shouldn't be difficult. Maybe we can add that to @dabura667's tool soon.

https://bip32jp.github.io/english/copay_decrypt.html Done. I could also make the arrays that are displayed give the redeemscripts, and private keys (related to the backup inserted) which would then make it possible to create / sign transactions with https://coinb.in/

dan-da commented 9 years ago

@dabura667 I tried it and it works. thx!

Couple notes: 1) On my ancient slow laptop, firefox popped up the "unresponsive script" dialog twice before it finished processing. I requested 20 addresses. maybe there's a way to sleep() or otherwise give the cpu a rest?

2) It's not really possible for the user to know how many addresses to request up front. The holy grail here is to return exactly the wallet addresses that have actually been used. I realize that is more involved because it requires checking the blockchain, but I'm thinking maybe it could be done with help of insight API? ( this part should of course be simpler for CoPay, which already has tx history. )

So those are suggestions for improvement, but already it is very useful. thanks again!

dabura667 commented 9 years ago

I just added so that it will give you the index, address, redeemscript, and private key for the related public key.

Using this, you can now recover funds using https://coinb.in/ , the tool I made, and at least the number of backups needed to approve a transaction.


for 2, it would be difficult, as the definition of "used" would be different from some users.

i.e. BWS manages addresses and can give out infinite if it wants. (If you sit and hit "new address" for 5,000,000 times, bws will generate the 5,000,000th address on your chain for you.

Unless I could query BWS, which would involve letting the user input their bws address (users can set up their own) and I would have to jQuery a request to their BWS server using their encrypting keys (in the backup) just to figure out how many addresses they have generated.

Then I would need to batch check the addresses via some API, and eliminate ones with no transaction history from the list.

Way too much work for a crappy little tool, so I'll leave it at this.


For 1, this is about as good as it gets. That error message is just saying that you're doing a lot of stuff with javascript, are you sure it's not just running and endless loop?

EC math in JS is very slow, so while I could try to break it up so that the error message won't show up, doing so would most likely involve adding in downtime for the browser to rest (which would make it take longer) so I would recommend just clicking "continue anyways" and just wait still the window stops saying "not responding"

It's a linear loop, no recursion... so if 10 keys took you 10 seconds, 20 should take 20 etc.

advice: start with small numbers just to test your browser/PC speed.