1 2016-03-25 09:42:11 <wumpus> well yes, they have to be in the authorized-peers db. It makes no sense otherwise, why authenticate someone you don't know?
 2 2016-03-25 16:13:04 <Chris_Stewart_5> I have a question about this test case in bitcoin core's script_valid.json file
 3 2016-03-25 16:13:06 <Chris_Stewart_5> [
 4 2016-03-25 16:13:08 <Chris_Stewart_5> "0 0x47 0x30440220b119d67d389315308d1745f734a51ff3ec72e06081e84e236fdf9dc2f5d2a64802204b04e3bc38674c4422ea317231d642b56dc09d214a1ecbbf16ecca01ed996e2201 0",
 5 2016-03-25 16:13:10 <Chris_Stewart_5> "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
 6 2016-03-25 16:13:12 <Chris_Stewart_5> "DERSIG",
 7 2016-03-25 16:13:14 <Chris_Stewart_5> "BIP66 example 12, with DERSIG"
 8 2016-03-25 16:13:16 <Chris_Stewart_5> ]
 9 2016-03-25 16:13:39 <Chris_Stewart_5> How can this succeed when the "DERSIG" flag is set but the signature is not correctly encoded strict dersig
10 2016-03-25 16:14:04 <Chris_Stewart_5> specifically I think the r value is a negative number
11 2016-03-25 16:21:47 <wumpus> Chris_Stewart_5: should be case 12 under https://github.com/bitcoin/bips/blob/master/bip-0066.mediawiki#examples
12 2016-03-25 16:44:00 <Chris_Stewart_5> wumpus: From the text "S1' and S2' are non-DER but otherwise valid signatures using those same keys."
13 2016-03-25 16:44:23 <Chris_Stewart_5> and "For each such verification, if the signature does not pass the IsValidSignatureEncoding check below, the entire script evaluates to false immediately"
14 2016-03-25 16:44:34 <Chris_Stewart_5> so since the DERSIG flag is set in the test case wouldn't this fail?
15 2016-03-25 16:47:11 <wumpus> well the evaluation of DERSIG is lazy
16 2016-03-25 16:47:22 <wumpus> if it never gets to a signature, it will not check it either
17 2016-03-25 16:49:42 <Chris_Stewart_5> wumpus: Why would the signatures not get evaluated in the script? Does it check for vailidity of the signature first, then check for strict der encoding?
18 2016-03-25 16:50:41 <wumpus> in this case the top signature on the stack is F, which will always fail CHECKMULTISIG. It will get to the first and thus prematurely exit the CHECKMULTISIG which requires two signatures
19 2016-03-25 16:51:04 <wumpus> the NOT, after that, makes the result positive and makes the script pass
20 2016-03-25 16:51:32 <wumpus> no, it first checks struct DER encoding, before even looking at the contents
21 2016-03-25 16:51:41 <wumpus> but it just doesn't get to that parameter
22 2016-03-25 16:51:54 <Chris_Stewart_5> so it does a size check for the required amount of signatures first?
23 2016-03-25 16:52:00 <Chris_Stewart_5> is basically what you are saying right?
24 2016-03-25 16:52:27 <wumpus> it iterates over the signatures one by one, decoding them, then checking them
25 2016-03-25 16:53:04 <wumpus> it gets to F first, then exits, and never gets to the non-DER encoded signature. I'm sure you can look up this loop in the script evaluation code.
26 2016-03-25 16:53:52 <wumpus> it's like bypass in c++, if you have a conditional statement if (1 || x) it will never even look at x
27 2016-03-25 16:54:10 <wumpus> as it already knows the outcome and its independent of whatever x could be
28 2016-03-25 16:55:09 <wumpus> "These operators all perform ECDSA verifications on pubkey/signature pairs, iterating from the top of the stack backwards. For each such verification, if the signature does not pass the IsValidSignatureEncoding check below, the entire script evaluates to false immediately. If the signature is valid DER, but does not pass ECDSA verification, opcode execution continues as it used to, causing opcode execution to stop and push false on
29 2016-03-25 16:55:09 <wumpus> the stack (but not immediately fail the script) in some cases, which potentially skips further signatures (and thus does not subject them to IsValidSignatureEncoding)."
30 2016-03-25 16:55:18 <wumpus> that's all there is to it
31 2016-03-25 16:55:24 <Chris_Stewart_5> Ok I think I get what you are saying. I was getting confused since 0 is a valid strict der encoded sig but that does not mean it is valid for that pubkey
32 2016-03-25 16:55:49 <Chris_Stewart_5> since the "0" encoded signature fails, the next sig doesn't get checked since it is impossible for the script to meet the threshold of signatures required
33 2016-03-25 16:55:54 <wumpus> right, 0 is seen as valid DER encoded signature
34 2016-03-25 16:56:14 <Chris_Stewart_5> That makes sense. Thanks wumpus :-)
35 2016-03-25 22:33:56 <johnwhitton> Hey all where can I see a list of all the CLI options for bitcoin (e.g a list of commands like ../bitcoin-cli -testnet -rpcuser=user -rpcpassword=pass getnewaddress )
36 2016-03-25 22:34:11 <johnwhitton> Specifically I’m trying to look up a transaction
37 2016-03-25 22:34:36 <instagibbs> johnwhitton, I like https://bitcoin.org/en/developer-reference#bitcoin-core-apis
38 2016-03-25 22:35:19 <johnwhitton> instagibbs: Thanks, let me look :)
39 2016-03-25 22:40:38 <moa> johnwhitton: ../bitcoin-cli help
40 2016-03-25 22:41:41 <johnwhitton> 
41 2016-03-25 22:41:47 <johnwhitton> moa: Thanks
42 2016-03-25 22:57:20 <sturles> bitcoin-cli help gives a list.