I'm trying to understand how coinbase is generated in ckpool and some part of it I'm not able to figure out
1. In second part of coinbase ckpool has extradata ckpool and signature /solo.ckpool.org/
hex : 0a 636b706f6f6c (this converts to ckpool) 11 2f736f6c6f2e636b706f6f6c2e6f72672f (this converts to /solo.ckpool.org/)
Q: ckpool is 6 bytes, why its length is set to 0a ?
2. If I want to generate all reward into single wallet address (cScriptPubKey), below pseudo code serialized as per protocol for coinbase 2 is correct ?
I think its should be either 0xffffffff or cCoinbaseValue (coinbasevalue is serialized value returned in getblocktemplate response)
var txOut = cExtraData + cSignature + "ffffffff" + cCoinbaseValue + cScriptPubKey + 0.ToString("x8") + cCommitment + cLockout;
3. Below is captured coinbase2 value recieved from solo.ckpool. Can anybody explain parts of it. For some reason I'm not able to understand how 00000000 are in 3 locations
0a636b706f6f6c112f736f6c6f2e636b706f6f6c2e6f72672fffffffff0337a3954a0000000017a 9144ab4b2aa35879fe47e6a16ea783494f9dcf615b78772ddc000000000001976a914f4cbe6c6bb 3a8535c963169c22963d3a20e7686988ac0000000000000000266a24aa21a9ed99acb686178a340 4d59c5f4521ccebf9cb523a337b0c05abc8d3ec375e39af7f00000000
0a636b706f6f6c112f736f6c6f2e636b706f6f6c2e6f72672fffffffff (this part I understand provided with one question above)
0337a3954a (<= what value is this?)
00000000 (<= if above part is reward value, what is this ?)
17a9144ab4b2aa35879fe47e6a16ea783494f9dcf615b78772ddc0 (I assume this is where the reward goes)
0000000000
1976a914f4cbe6c6bb3a8535c963169c22963d3a20e7686988ac0 (and 0.5% fee goes here ?)
00000000000000
0266a24aa21a9ed99acb686178a3404d59c5f4521ccebf9cb523a337b0c05abc8d3ec375e39af7f 00000000 (this is witness provided in getbloctemplate with lock)