Bitcoin Forum
November 10, 2024, 03:56:03 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »  All
  Print  
Author Topic: [coinb.in] Open Source, Multi Signature, HD Wallet, SegWit/Bech32 and more!  (Read 74835 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
btcmsia
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 22, 2014, 06:24:29 AM
 #21

could you make it to support compressed keys?

i'm using bitcoin-qt v0.8.6 now, all new addresses generated in my wallets only use compressed keys.
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 22, 2014, 10:06:02 AM
Last edit: January 22, 2014, 10:16:24 AM by OutCast3k
 #22

could you make it to support compressed keys?

i'm using bitcoin-qt v0.8.6 now, all new addresses generated in my wallets only use compressed keys.


Unfortunately, you can't use an address in replace of a pubkey.

An address is a one way hash of a pubkey. Its not possible to use an address because it cant be used to generate a pubkey, and its the pubkeys (which is included in the redeem scripts) that are needed to validate the signatures in a transaction when you release/send the coins from your mutlsig address.

If you want to find a pubkey, of an address in bitcoin-qt then, click help, then click the "Debug window", then choose the console tab, and finally enter the following command:

Code:
verifyaddress <youraddress>

The console will then output some data, including a pubkey. You will only be provided pubkeys for addresses in your wallet.

I will add these instructions to the page very very shortly.

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ktorn
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
January 22, 2014, 01:23:49 PM
 #23

could you make it to support compressed keys?
Unfortunately, you can't use an address in replace of a pubkey.

I think btcmsia is talking about compressed public keys, not addresses.
When you 'validateaddress' a Bitcoin-qt v0.8.x address, what you get are compressed public keys ("iscompressed":"true") whereas coinb.in expects uncompressed ones.


In my case I'm trying to use coinb.in to create and use a 2-of-2 address, but I'm stuck. I've done all the operations below from coinb.in:

1 ) generated 2 sets of Bitcoin keys (so 2 addresses, 2 public uncompressed keys, and 2 private keys)
2 ) generated a 2-of-2 p2sh address using the public keys from step #1
3 ) sent 0.0022 BTC to that p2sh address

So far so good. The funds are in the p2sh address, with 12 confirmations as I type this.

This is where the problems begin.

When creating a transaction, it looks like it doesn't support sending to p2sh addresses  Shocked, so I can't send change back to the address that I just created, nor to any other p2sh address (I have tried a couple of them). It only generates the transaction hex when I use non p2sh addresses. That is a significant issue for me. I really need to send the change back to the same address.

Anyway, I decided to retrieve the BTC back to one of my non p2sh addresses, and I'm still stuck. Here's the steps I've taken:

4 ) generate new transaction using redeem script from step #2, sending 0.0021 to a normal bitcoin address and with 0.0001 fee. Transaction hex is generated successfully.
5 ) verify the transaction hex from step #4. the verification is successful, and the input and outputs look OK.
6 ) sign transaction hex from step #4 with first private key from step #1
7 ) sign transaction hex from step #6 with second private key from step #1
8 ) broadcast the transaction hex from step 7
"TX rejected" Sad

I noticed that the signed transaction hex from steps #6 and #7 cannot be verified like the original transaction hex in step #5, with "Unable to decode" error. However when pasting those same hex strings to https://coinb.in/decode-raw-transaction.html it decodes them successfully.

Any idea what could be going wrong with this?
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 22, 2014, 04:46:16 PM
Last edit: January 22, 2014, 05:01:49 PM by OutCast3k
 #24

In my case I'm trying to use coinb.in to create and use a 2-of-2 address, but I'm stuck. I've done all the operations below from coinb.in:

1 ) generated 2 sets of Bitcoin keys (so 2 addresses, 2 public uncompressed keys, and 2 private keys)
2 ) generated a 2-of-2 p2sh address using the public keys from step #1
3 ) sent 0.0022 BTC to that p2sh address

So far so good. The funds are in the p2sh address, with 12 confirmations as I type this.

This is where the problems begin.

When creating a transaction, it looks like it doesn't support sending to p2sh addresses  Shocked, so I can't send change back to the address that I just created, nor to any other p2sh address (I have tried a couple of them). It only generates the transaction hex when I use non p2sh addresses. That is a significant issue for me. I really need to send the change back to the same address.

Anyway, I decided to retrieve the BTC back to one of my non p2sh addresses, and I'm still stuck. Here's the steps I've taken:

4 ) generate new transaction using redeem script from step #2, sending 0.0021 to a normal bitcoin address and with 0.0001 fee. Transaction hex is generated successfully.
5 ) verify the transaction hex from step #4. the verification is successful, and the input and outputs look OK.
6 ) sign transaction hex from step #4 with first private key from step #1
7 ) sign transaction hex from step #6 with second private key from step #1
8 ) broadcast the transaction hex from step 7
"TX rejected" Sad

I noticed that the signed transaction hex from steps #6 and #7 cannot be verified like the original transaction hex in step #5, with "Unable to decode" error. However when pasting those same hex strings to https://coinb.in/decode-raw-transaction.html it decodes them successfully.

Any idea what could be going wrong with this?

Hey ktorn,

I'll get the issue sorted with not being able to send back to multi sig addresses, but first lets find out what went wrong when building a serialized/hex transaction and recover your funds.

If you cant pop back on IRC (I missed you by 15 minutes), and you're still having problems, can you PM me the following;

1, the public keys you used.
2, the minimum number of signatures required you set.
3, the address and redeemScript it generated for you.

Thanks.

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ABISprotocol
Sr. Member
****
Offline Offline

Activity: 278
Merit: 252

ABISprotocol on Gist


View Profile WWW
January 22, 2014, 06:59:13 PM
 #25

Thanks!

ABISprotocol (Github/Gist)
http://abis.io
ADcoin.me
Hero Member
*****
Offline Offline

Activity: 795
Merit: 500


Name change soon (hopefully)


View Profile WWW
January 22, 2014, 07:16:00 PM
 #26

Great! Well done, keep up the good work! opensource marketplace would be so nice! Go for it, please. Cheesy

Palcoin.co
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 22, 2014, 07:25:19 PM
Last edit: January 22, 2014, 08:31:09 PM by OutCast3k
 #27

In my case I'm trying to use coinb.in to create and use a 2-of-2 address, but I'm stuck. I've done all the operations below from coinb.in:

1 ) generated 2 sets of Bitcoin keys (so 2 addresses, 2 public uncompressed keys, and 2 private keys)
2 ) generated a 2-of-2 p2sh address using the public keys from step #1
3 ) sent 0.0022 BTC to that p2sh address

So far so good. The funds are in the p2sh address, with 12 confirmations as I type this.

This is where the problems begin.

When creating a transaction, it looks like it doesn't support sending to p2sh addresses  Shocked, so I can't send change back to the address that I just created, nor to any other p2sh address (I have tried a couple of them). It only generates the transaction hex when I use non p2sh addresses. That is a significant issue for me. I really need to send the change back to the same address.

Anyway, I decided to retrieve the BTC back to one of my non p2sh addresses, and I'm still stuck. Here's the steps I've taken:

4 ) generate new transaction using redeem script from step #2, sending 0.0021 to a normal bitcoin address and with 0.0001 fee. Transaction hex is generated successfully.
5 ) verify the transaction hex from step #4. the verification is successful, and the input and outputs look OK.
6 ) sign transaction hex from step #4 with first private key from step #1
7 ) sign transaction hex from step #6 with second private key from step #1
8 ) broadcast the transaction hex from step 7
"TX rejected" Sad

I noticed that the signed transaction hex from steps #6 and #7 cannot be verified like the original transaction hex in step #5, with "Unable to decode" error. However when pasting those same hex strings to https://coinb.in/decode-raw-transaction.html it decodes them successfully.

Any idea what could be going wrong with this?

Thanks for providing the information via pm/irc, the bug found should be fixed. If you could re-test and get back to me that would be great, thanks.

Start from step 4.

Cheers Smiley

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 22, 2014, 07:26:35 PM
 #28

Great! Well done, keep up the good work! opensource marketplace would be so nice! Go for it, please. Cheesy

Got a fair chunk of the code in place Wink its just finding the time to finish it off.

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ktorn
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
January 23, 2014, 01:09:53 AM
 #29

Thanks for providing the information via pm/irc, the bug found should be fixed. If you could re-test and get back to me that would be great, thanks.

Start from step 4.

Definitely progress, the transaction now validates after signing, but still TX rejected when broadcasting. I've PM'd you the signed tx hex.
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 23, 2014, 10:21:27 AM
Last edit: January 23, 2014, 11:41:10 AM by OutCast3k
 #30

Thanks for providing the information via pm/irc, the bug found should be fixed. If you could re-test and get back to me that would be great, thanks.

Start from step 4.

Definitely progress, the transaction now validates after signing, but still TX rejected when broadcasting. I've PM'd you the signed tx hex.

You've not mistakenly signed the transaction twice, but with the same key have you??

I've run 3-4 tests this morning, everything is working fine from my perspective, could you get in touch again via IRC so we can go through it step by step in an attempt to reproduce this bug.

Thanks

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ktorn
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
January 23, 2014, 04:04:58 PM
 #31

OK, after going over a few tests with OutCast3k we think we nailed the issue.

In a nutshell: Currently the order of the signatures matters.

Our tests involved a 2-of-2 multisig address, which I created with 2 pubkeys (lets call them pub1 and pub2).

When spending from the multisig address, signing the transaction with priv1 first and priv2 second always failed when broadcasting (with TX rejected).
But when signing the same transaction in the opposite order, using priv2 first and priv1 secondly the broadcast worked OK.  Cool

Thanks OutCast3k for spending a considerable amount of time in troubleshooting this! Smiley
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 23, 2014, 10:06:44 PM
 #32

OK, after going over a few tests with OutCast3k we think we nailed the issue.

In a nutshell: Currently the order of the signatures matters.

Our tests involved a 2-of-2 multisig address, which I created with 2 pubkeys (lets call them pub1 and pub2).

When spending from the multisig address, signing the transaction with priv1 first and priv2 second always failed when broadcasting (with TX rejected).
But when signing the same transaction in the opposite order, using priv2 first and priv1 secondly the broadcast worked OK.  Cool

Thanks OutCast3k for spending a considerable amount of time in troubleshooting this! Smiley

Yup, the order of the signatures seems to matter, I'll currently trying to work out a solution.

Thanks ktorn, for beta testing and finding the issue.

Will post back when fixed.

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 24, 2014, 12:41:16 AM
Last edit: January 24, 2014, 12:56:32 AM by OutCast3k
 #33

OK, after going over a few tests with OutCast3k we think we nailed the issue.

In a nutshell: Currently the order of the signatures matters.

Our tests involved a 2-of-2 multisig address, which I created with 2 pubkeys (lets call them pub1 and pub2).

When spending from the multisig address, signing the transaction with priv1 first and priv2 second always failed when broadcasting (with TX rejected).
But when signing the same transaction in the opposite order, using priv2 first and priv1 secondly the broadcast worked OK.  Cool

Thanks OutCast3k for spending a considerable amount of time in troubleshooting this! Smiley

Yup, the order of the signatures seems to matter, I'll currently trying to work out a solution.

Thanks ktorn, for beta testing and finding the issue.

Will post back when fixed.

This issue has now been fixed Smiley the order that signatures are added no longer matters.

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ktorn
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
January 24, 2014, 06:58:53 AM
 #34

This issue has now been fixed Smiley the order that signatures are added no longer matters.

I've just tested it twice, switching the order of the signing keys between tests, and both transactions were successful.
Your fix works! Smiley

Now that P2SH output support that we talked about earlier would be the icing on the cake Wink
Should I nudge the bitcoinjs folks about the issue or do you want to have a go at it?
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 24, 2014, 08:37:48 AM
 #35

This issue has now been fixed Smiley the order that signatures are added no longer matters.

I've just tested it twice, switching the order of the signing keys between tests, and both transactions were successful.
Your fix works! Smiley

Now that P2SH output support that we talked about earlier would be the icing on the cake Wink
Should I nudge the bitcoinjs folks about the issue or do you want to have a go at it?

I'll look into supporting the ability to send back to a multisig address later today, it shouldn't be that big of a deal. I don't think you'll get a response from the bitcoinjs guys.

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ktorn
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
January 24, 2014, 09:31:41 AM
 #36

I'll look into supporting the ability to send back to a multisig address later today, it shouldn't be that big of a deal. I don't think you'll get a response from the bitcoinjs guys.

Yeah, I've noticed that their github repo hasn't be touched in a while. Ping me when you patch the code and I'll give it a test on this side.
btcmsia
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 24, 2014, 05:07:04 PM
 #37

Unfortunately, you can't use an address in replace of a pubkey.

An address is a one way hash of a pubkey. Its not possible to use an address because it cant be used to generate a pubkey, and its the pubkeys (which is included in the redeem scripts) that are needed to validate the signatures in a transaction when you release/send the coins from your mutlsig address.

I'm talking about compressed public key, not address.

latest bitcoin-qt client seems only generate address from compressed public key.
so all my addresses are associated with compressed publickey (prefix with 02/03, not 04).
and when compressed publickeys are used, their private keys also in different format, (prfix with K/L instead of 5)

there will be a compatible issue if your apps only support uncompressed pkey.
OutCast3k (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 601


View Profile WWW
January 26, 2014, 11:30:21 AM
 #38

Just a small update.

If anyone is running my script offline, I've fixed a lot of bugs so i'd suggest getting an update from github.

latest bitcoin-qt client seems only generate address from compressed public key.
so all my addresses are associated with compressed publickey (prefix with 02/03, not 04).
and when compressed publickeys are used, their private keys also in different format, (prfix with K/L instead of 5)

@btcmsia I will look into this, but will have to get back to you before I promise anything. You can always generate a pubkey from the new keys tab, https://coinb.in/multisig/#newKeys You could also use bitaddress.org or brainwallet.org to generate keys pretty quickly.

Now that P2SH output support that we talked about earlier would be the icing on the cake Wink
Should I nudge the bitcoinjs folks about the issue or do you want to have a go at it?

@ktorn I've been looking into it, its a little trickier than I first thought but should have it resolved over the next couple of days.

Many thanks to everyone who has been testing Cheesy

coinb.in - Open Source, Multi Signature, HD Wallet and more! | Donate: 33tht1bKDgZVxb39MnZsWa8oxHXHvUYE4G
ABISprotocol
Sr. Member
****
Offline Offline

Activity: 278
Merit: 252

ABISprotocol on Gist


View Profile WWW
January 26, 2014, 09:55:24 PM
 #39

OutCast3k:

thank you, you are a good entity

much thanks

very excellent

etc

ABISprotocol (Github/Gist)
http://abis.io
ktorn
Newbie
*
Offline Offline

Activity: 32
Merit: 0


View Profile
January 27, 2014, 06:34:46 AM
 #40

@ktorn I've been looking into it, its a little trickier than I first thought but should have it resolved over the next couple of days.
No worries, take your time.
Pages: « 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »  All
  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!