Bitcoin Forum
May 04, 2024, 02:22:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 »
221  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 20, 2015, 01:05:02 PM
Thanks for your patience in letting me check this through with you, I really appreciate it guys.

Now talking only about Multisig:

The Multisig script in a transaction output contains a series of values which must be satisfied, one per signatory. Are these just the public keys of the signatories?

If so is there a way for a malicious signatory to change the order or value of these private keys if say there were two inputs to this transaction which two spate parties needed to sign?

Edit for clarification: that is to say could one party sign to release the first input, modify the transaction and then pass it to the second party to sign and release the second input.
222  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 20, 2015, 10:21:03 AM
I've had a look around but can't find a definitive answer to my previous question.

Talking only about P2SH:

I understand that this is a hash of the script which needs to evaluate to True when run and is provided in the input of the transaction that spends it.

Is this input script stored in full in the input of the transaction which spends it when the transaction is mined to the blockchain?

In the case where OP_CHECKMULTISIG is used in the script are all the public keys and Scriptsigs stored in the input of the new transaction?

I also take it a transaction with one or more P2SH inputs that has one or more P2SH outputs is standard? Assuming each script is below 1,650 bytes and the total transaction is below 100,000 bytes.
223  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 19, 2015, 04:55:30 PM
...
The Scriptsig and public key are not stored on the blockchain.

This is not correct.  When you reference an unspent output from a previous transaction as an input into a new transaction, the Scriptsig and public key are included in that new transaction's input and that input is stored on the blokchain as part of the new transaction.

Ah, I didn't realise that. Is the public key stored 'as is' or is it a shortened or hashed version of it the public key?

If it's not shortened is it provided in full for all to see that the new transaction spending that output is valid?
224  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 19, 2015, 03:08:20 PM
Thanks, can I also check I've got this right:

When the transaction is stored on the blockchain, the Scriptpubkey script which contains the address is stored as the conditions to satisfy to use the output.

The Scriptsig and public key are not stored on the blockchain.

Scriptpubkey is an actual script, stored on the blockchain that is the condition required (to evaluate as 'True') to be able to spend that output to another transaction's output(s), with one script per output.
225  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 19, 2015, 11:12:38 AM
So to confirm I've got the logic of this and the dependencies correct:

Scriptsig is the signature which unlocks Scriptpubkey where Scriptpubkey is the output of a given transaction which must be satisfied to be spendable to a new output.

Am I right in thinking that Scriptsig is the private key signing over the (entire?) transaction which can then be verified by the public key?

And the public key can be verified as it matches a hash of the previous transaction's output (the Bitcoin address)?

Both the public key and Scriptsig are sent with the new transaction.

Therefore the above dependencies prove the person who broadcast the new transaction has possession of the private key for the output of the previous transaction.
226  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 18, 2015, 07:07:19 PM
So talking specifically about P2SH if I have the public keys for all the signatories I need (say 3 public keys) this is all the information I need to generate the P2SH address, where I can specify m <= 3 and n as >= 1 but <=3?

Yes.  Also m <= n which isn't clear from the way you worded it.  The other gotcha is many users think of their address as their key but the address decodes to the pubkeyhash not the pubkey.     

It is possible to make a redeemScript which validates signatures form multiple pubkeyhashes instead of pubkeys.  The bad news is no standard client would understand how to sign that transaction.  The good news is that this could be changed by just client updates it wouldn't require a fork of the protocol.

Thanks for all the help here.

I'm going to have a think and re-word an attempt at getting this correct so I can confirm I understand it. It may be tomorrow though.

227  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 18, 2015, 07:05:06 PM
Yes.  I already explained this:

- snip -
Example:

I create a transaction funding a P2SH.
In creating the transaction, I define 4 authorized signatories.
In creating the transaction, I define a requirement that 3 of those signatures be present.
I then sign my transaction and broadcast it. (see, I'm the ONLY one that needs to sign this, since I'm sending funds that I personally have control over)

The transaction is eventually mined and added to the blockchain.
- snip -

My example works the same if there are 2 people funding an address that will eventually require 5 of 6 signatures.
...

Ah, I did not quiet understand. So in the above example you are already assuming I have the public keys. If so I now get this.

Each of the two people funding the P2SH provide the unspent outputs that they will be using to fund the transaction

By 'provide' here do you mean that they provide separate signatures to 'spend' each of the two outputs to this new transaction?

Each of the two people that are funding the P2SH each review and sign the transaction. (See, only those FUNDING the transaction need to sign it. Not those that are receiving it).

Ok, so they would both need to see the script and verify the P2SH address which is the output of the new transaction is from that script and those public keys. I assume they would do this before signing their respective inputs? Where one would have to sign, then pass the transaction on to the other to then sign the second input and broadcast? Hope I have this correct now?
228  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 18, 2015, 06:23:32 PM
Thanks for taking the time to explain this.

So talking specifically about P2SH if I have the public keys for all the signatories I need (say 3 public keys) this is all the information I need to generate the P2SH address, where I can specify m <= 3 and n as >= 1 but <=3?
229  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 18, 2015, 05:38:30 PM
Thanks,

So to rectify the last example I gave the first and second person would get the 4 escrow to sign the output P2SH script first. Then the first person would sign the first input and P2SH output, then then second person would sign the second input and P2SH output and broadcast the TX.

That way there is no risk of the escrow broadcasting the TX early. (Edit: and rendering the funds un-spendable)

Have I understood this correctly now?
230  Bitcoin / Development & Technical Discussion / Re: Does the P2SH script enforce the value 'n' of m-of-n? on: March 18, 2015, 05:10:21 PM
Thanks for this.

I'm talking more specifically in a scenario where a number of parties are collating funds to a single P2SH address.

To give another example two people are trusting 4 separate escrow to look after their funds, so the first person creates a Transaction with 2 inputs (one for each person depositing the money) and one P2SH output. The first person then signs the first input and the P2SH output script and passes it to the second person who does the same. The second person then passes it to the first escrow.

In this scenario we must assume that we cannot fully trust any of the escrow who need  to sign in sequence. Therefore what is to stop the any of these escrow from signing the transaction's output P2SH and then broadcasting it early excluding the other escrow from signing? E.g. if the first escrow broadcasts then could they create an 3-of-3 instead of the intended 6-of-6?

I'm currently under the impression this would not be possible because it is enforced by the script which was created by the first person as 6-of-6?

I'm not sure if this is a suitable use-case however as I understand P2SH requires proof to spend the output, but I'm not sure about enforcing that the output validates as true before it is mined to a block.
231  Bitcoin / Development & Technical Discussion / Enforcing 'n' signatories & signing order for m-of-n P2SH Vs. Multisig on: March 18, 2015, 04:08:55 PM
For a P2SH transaction does the script specify how many signatures are required for the 'n' of m-of-n?

For example, if 6 people agree to set up a 6-of-6 P2SH transaction and sign it in sequence, where Person A is the first to sign and Person F is the last to sign. Does Person A who creates the P2SH script specify in the script that 6 People have to sign?

I.e. could Person E sign and broadcast the P2SH transaction, missing out Person F and making the transaction 5-of-5?
232  Bitcoin / Development & Technical Discussion / Re: Delayed transactions (using nTimeLock) on: March 17, 2015, 04:15:28 PM
nlocktime is supported.   It is not standard until after the locktime.  That means if you create a nlocktime txn with a future locktime most (virtually all) nodes will not relay the txn but nlocktime is supported by the network.  There are multiple examples of nlocktime txns in the blockchain and many concepts like payment channels are not possible without nlocktime.

Great. That's what I thought but was getting worried something I could not see may have changed.

Thanks again DeathAndTaxes.
233  Bitcoin / Development & Technical Discussion / Re: Delayed transactions (using nTimeLock) on: March 17, 2015, 11:43:41 AM
...
Note that nLockTime'd transactions are only non-standard until the locktime expires, at which point they can be broadcast and mined normally.
...

I've just found a few posts saying nLockTime is not supported dated for around 2013 (here is one example), but according to this thread the above is true. Can I confirm that this is still the case?
234  Bitcoin / Development & Technical Discussion / Re: Transacton ID formation on: March 13, 2015, 10:57:39 AM
...
There's a small caveat, though:  Due to a process called "transaction malleability", it is possible that someone (who need not be related to the tx in any way) can alter the tx in such a way that it is still valid, "means" the same thing but has a different ID.  In that sense, you only know the (final) ID for sure once the tx is confirmed.

Thanks.

There was a lot of news about how transaction malleability had been fixed in Bitcoin Core 0.8/0.9 did this not resolve transaction malleability? Or are you saying one cannot assume that all nodes on the network are conforming to not causing transaction malleability when relaying transactions?
235  Other / Archival / Re: closed on: March 12, 2015, 04:01:30 PM
Just moved some coins I had on the site for a short period to try and trade them over. When I went to withdraw the site went down (502). Not sure if it was something I did Smiley.

Update: to Vircurex's credit the site was back up within a few minutes and I withdrew with no issues.
236  Bitcoin / Development & Technical Discussion / Re: Enforcing the Recipient with P2SH on: March 09, 2015, 07:11:44 PM
Thanks.
237  Bitcoin / Development & Technical Discussion / Enforcing the Recipient with P2SH on: March 09, 2015, 03:02:14 PM
Using P2SH multisig is there a way to create a script which enforces who the recipient will be?

I.e. if you had two parties who had locked funds up under a 4-of-6 escrow, where the two parties are not the signatories required to release the funds and any four of the six escrow could sign to release to either party. Could the script be set up such that it can only be released to party 1 or 2. Because under this scheme four of the escrow could conspire to send the funds to an address other than one of the party address?
238  Economy / Games and rounds / Re: crowex.com free bet promotion - win bitcoin on: March 06, 2015, 12:17:57 PM
Ok, registered as 'No_2' and have placed a bet.
239  Economy / Games and rounds / Re: crowex.com free bet promotion - win bitcoin on: March 06, 2015, 11:27:43 AM
Am registered, will place a bet and give this a try.
240  Bitcoin / Development & Technical Discussion / Re: Pushing Partially Signed Transactions to other Bitcoin Clients on: March 04, 2015, 06:17:58 PM
...
Yup - that's the one.

Thanks a lot for all the help today. Got my MSDs done for now.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 [12] 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!