wallet icon indicating copy to clipboard operation
wallet copied to clipboard

Show empty addresses from other copayers

Open yemel opened this issue 12 years ago • 7 comments

Tony's comment: deposit addresses (into the wallet) should be uniform. everyone should be able to see them no matter who creates them. meaning, any user pressing the "create" button would be considered an equivalent action no matter which user pressed it.

Clarification: All copayers should see all created addresses. At the moment we are hiding emtpy addresses created by other copayers, by pressing "create" that new address should be visible to all copayers.

yemel avatar Jul 21 '14 13:07 yemel

do we still have the option to create an address in the shared branch? I thought we removed that with the implementation of BIP-NNNN

maraoz avatar Jul 21 '14 13:07 maraoz

No, that's not an option any more. I'll update the issue with a clarification.

yemel avatar Jul 21 '14 13:07 yemel

The idea of not showing other copayer's personal branches is to prevent payment race conditions. See: https://github.com/maraoz/bips/blob/master/bip-NNNN.mediawiki#Rationale

What's the reasoning behind showing the addresses everywhere?

maraoz avatar Jul 21 '14 15:07 maraoz

There are potential use cases based on a separation of duties. One copayer may have responsibility to update a withdrawal whitelist at the exchange, while another has responsibility to initiate the withdrawal to the P2SH address. In this case both copayers would like to see the branch, however it is acceptable to show it as 'watch-only' for the other copayers until the address is funded.

salis avatar Jul 22 '14 00:07 salis

Other argument it's using the a 2-of-2 by the same person in two different devices (eg. phone + pc). If I create an address from my phone I would like to see it from my PC.

We still are avoiding change-address race conditions and with a "creator" label should be enough to avoid unintended reuse.

yemel avatar Jul 22 '14 18:07 yemel

If we're showing all addresses to everyone there's no use in separating the branches, I think. Can you explain the change-address case again please?

maraoz avatar Jul 22 '14 18:07 maraoz

Sure, before the separation of branches we had 2 shared indexes, one for "receive" addresses and other for "change" addresses.

Based on the asynchronous nature of Copay, we had 2 race conditions:

  1. A copayer generates a new address to receive founds and share it with a third party. If other copayer does the same without syncing the shared index, he will generate the same address. After separating branches, every time a copayer generates an address, he can be 100% no body else will generate it.

  2. A copayer creates a transaction proposal, generating a change address for it. If other copayer creates other transaction proposal without syncing the share index, he will use the same change address. After separating branches, there is no way 2 copayers generates a transaction proposal with the same change address.

yemel avatar Jul 23 '14 13:07 yemel