1 2017-04-12 16:45:03 <arubi> 5C283DA58904E1E9EDF77849750191B2B74288AC00000000 . if anyone can push that into a testnet block (I lack the specialized software :) ), that should be interesting
2 2017-04-12 16:45:03 <arubi> comboy, this transaction for example should be valid in a block: 0200000001185CFA49ECEF94EA5B5D8060EE54F8B712E3BC70C796104283AB608E4035A4AE01000000823F303902153B78CE563F89A0ED9414F5AA28AD0D96D6795F9C63022007A8587BDBF2403AE8A906097C698D3EEE8E2CA060E874F2ABF8BD7D74A4EF7A010000004106C820A097E351082D630171B6BB4A88CDCDD65861574134A0C1115AC36C5947E8B02684723E4CAF3390EA8B6E8D7B589EDBBB0A33B73154E7CBE6D18F59CAA46AFDFFFFFF01005A6202000000001976A9141677
3 2017-04-12 16:46:26 <arubi> using 0x01000000 as sighash, and a short 'r' value to keep the signature under 72 bytes just in case
4 2017-04-12 17:39:22 <comboy> arubi: sa are you saying it's not last byte but instead parse DER and last 4 bytes of what remains? wouldn't that make that check https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp#L142 fail?
5 2017-04-12 17:41:19 <comboy> wait, it's "- 7" so I guesss 1 byte total length 1 byte R length and 1 byte S length and that would leave 4 for sighash type, but the comment at the top says that sighash is 1-byte value
6 2017-04-12 17:42:24 <arubi> 0x30, <compound length>, 0x02, <r length>, 0x02, <s length>
7 2017-04-12 17:42:29 <comboy> I meant +7
8 2017-04-12 17:42:34 <arubi> that's 6, one more for sighash byte
9 2017-04-12 17:42:36 <arubi> you're right
10 2017-04-12 17:43:20 <arubi> but.. hmm..
11 2017-04-12 17:43:35 <comboy> ah there are those separators too I missed that
12 2017-04-12 17:43:42 <arubi> does it /have/ to run? what if strictder isn't enforced
13 2017-04-12 17:44:07 <arubi> comboy, this transaction will either be on testnet or my node will be banned from every peer. you will see :)
14 2017-04-12 17:44:33 <comboy> arubi: I haven't yet found place in code where this sighash byte(s) is extracted
15 2017-04-12 17:44:34 <arubi> function is consensus critical since bip66..
16 2017-04-12 17:44:44 <arubi> maybe that's why it worked on regtest and fails on testnet
17 2017-04-12 17:44:55 <Chris_Stewart_5> comboy: IIRC there is a 'TransactionSignatureChecker' that it is done in
18 2017-04-12 17:45:10 <comboy> arubi: lol, but If the rest would match, I think 0x00 as the type is allowed too
19 2017-04-12 17:46:09 <arubi> Chris_Stewart_5, I think 4 bytes are just consumed and checked against known rules
20 2017-04-12 17:46:33 <arubi> 4, or 1 byte, shouldn't matter. the sighash type function doesn't check for length at all
21 2017-04-12 17:46:47 <arubi> comboy, 0x00 isn't allowed
22 2017-04-12 17:47:17 <arubi> well, maybe it is
23 2017-04-12 17:47:24 <JackH> can wallet dir be separate from datadir in core?
24 2017-04-12 17:47:25 <arubi> in sighashv2 it means NONE
25 2017-04-12 17:47:32 <JackH> are those settings possible?
26 2017-04-12 17:47:40 <arubi> dunno :(
27 2017-04-12 17:47:43 <arubi> /brb
28 2017-04-12 17:49:12 <comboy> Chris_Stewart_5: thanks, I guess it is one byte https://github.com/bitcoin/bitcoin/blob/8152d3fe57a991e9088d0b9d261d2b10936f45a9/src/script/interpreter.cpp#L1257
29 2017-04-12 17:59:59 <arubi> I still maintain that the block that I mined on regtest with bip66 being inactive and a 4 byte sighash was valid, but seems that not anymore