Bitcoin Forum
May 04, 2024, 08:07:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Generate coinbase from to send to miner (ckpool source code question) on: February 03, 2018, 04:04:19 AM
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)


2  Bitcoin / Development & Technical Discussion / Raw original work request of solved block on: January 12, 2018, 07:53:13 PM
Does anybody has the actual raw work request of solved block ? I'm just creating mining application and need to very it actually working after that all endiness conversion mombo jumbo. The only missing part from blockchain explorer is params used to create markel root. Appreciate if anybody has it handy or pull from their log or something.

Just to add more below params I'm after of any solved block to test

Coinbase1
ExtraNonce
ExtraNonce2
Coinbase2
Transaction Ids[]
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!