1 2017-12-16 04:02:00 <LowKey> Hi, I did some tx test and getting  Output data mismatch for txcreate1.hex, how todo proper for create txcreate1.hex ?
 2 2017-12-16 11:18:09 <DSidH> can I use the same code to parse non-segwit and segwit coinbase transaction? (assuming I am not interested in the outputs)
 3 2017-12-16 11:18:46 <DSidH> Its not very clear from the specs how a segwit coinbase tx differs from non-segwit ones
 4 2017-12-16 11:31:52 <arubi> no you can't because again the transaction will have a witness
 5 2017-12-16 11:32:02 <arubi> what are you actually trying to do?
 6 2017-12-16 11:52:27 <DSidH> arubi: I need to parse a raw block
 7 2017-12-16 11:53:25 <DSidH> so I am getting tx one by one. When I reach a normal coinbase tx, I know how to parse it and ignore it (whether segwit or non-segwit)
 8 2017-12-16 11:54:06 <DSidH> correct that to: "When I reach a coinbase tx, I want to skip that many bytes and ignore it (whether segwit or non-segwit)"
 9 2017-12-16 11:56:56 <DSidH> will the witness be part of some older unused data or does it have new fields that older parser will not understand?
10 2017-12-16 11:58:33 <DSidH> actually, another way to state the question is, if I write code to parse non-coinbase segwit tx, will that same code work for coinbase segwit tx?
11 2017-12-16 11:59:19 <DSidH> (I am ignoring the actual inputs, not parsing the scripts, just need to get to end markers of each transaction for now)
12 2017-12-16 12:01:02 <arubi> it will not work because of different encoding
13 2017-12-16 12:01:24 <arubi> unless you have some magical way of skipping stuff without parsing its size
14 2017-12-16 12:19:10 <DSidH> arubi: Lol no. finding the size is what I'm stuck at
15 2017-12-16 12:20:00 <DSidH> I was reading this: https://bitcoin.stackexchange.com/a/20725/2075 --> "A coinbase transaction follows the same format as a normal transaction"
16 2017-12-16 12:20:11 <DSidH> so I assumed the same would hold for segwit case
17 2017-12-16 12:20:50 <DSidH> Is this true? ---> "A coinbase SEGWIT transaction follows the same format as a normal SEGWIT transaction"
18 2017-12-16 12:21:11 <arubi> it has a marker, version, witness.. just like a normal segwit transaction
19 2017-12-16 12:21:11 <arubi> it is, the same as a segwit transaction
20 2017-12-16 12:21:12 <arubi> yep
21 2017-12-16 12:21:33 <DSidH> great! thanks
22 2017-12-16 12:21:37 <arubi> yw
23 2017-12-16 12:25:49 <DSidH> out of curosity, why does coinbase have to be segwit? It is not spending any segwit outputs? Is it to encode other data for remaining segwit tx in the block?
24 2017-12-16 12:30:45 <DSidH> nvm: I think I got my answer .. I think if the block has any (ordinary) segwit tx then it must have a segwit coinbase tx.. Hope I got this right
25 2017-12-16 13:07:46 <Sentineo> all blocks must have sw coinbase ... afaik, that is the new rule byt the softfork
26 2017-12-16 13:09:23 <Sentineo> is there a way to know core is doing block validation at some mkment?
27 2017-12-16 13:09:27 <Sentineo> moment?
28 2017-12-16 13:09:39 <Sentineo> e.g. an rpc or something?
29 2017-12-16 13:09:55 <Sentineo> other than checking cpu utilisation
30 2017-12-16 13:18:06 <DSidH> Sentineo: only if the block has other segwit tx. If the block has only non-segwit tx then the coinbase CAN be non-segwit too
31 2017-12-16 13:18:22 <DSidH> "Segwit-incapable miners can however contribute blocks that only include non-segwit transactions that build on top of the chain that includes segwit-blocks." from https://bitcoin.stackexchange.com/a/60369/2075
32 2017-12-16 13:19:06 <Sentineo> DSidH: good to know, ty. Thought it is a strict rule. But yeah what would be the use of it without segwit tx.
33 2017-12-16 14:49:37 <DSidH> I am looking at references on how to decode the witness stack items
34 2017-12-16 14:49:48 <DSidH> looking for*
35 2017-12-16 14:50:48 <DSidH> any recommendations?
36 2017-12-16 14:54:46 <Sentineo> Imthinkmthe bip had it nicely documented
37 2017-12-16 15:41:17 <waxwing> DSidH, BIP141, 143, 144 iirc
38 2017-12-16 15:42:15 <waxwing> 144 tells you what the transaction serialization on-the-wire looks like
39 2017-12-16 18:01:40 <jb55> thinking about writing a cli calc that understands btc denominations... something like bcalc '50 mBTC + 200 sat'
40 2017-12-16 18:01:43 <jb55> if that doesn't exist...