Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: jimoc on September 17, 2013, 10:54:16 PM



Title: How to put specific text in the Coinbase?
Post by: jimoc on September 17, 2013, 10:54:16 PM
Hi all,
I'm just messing about with the miner code and I was wondering, how would I put a specific message into the coinbase if i manage to mine a block?


Title: Re: How to put specific text in the Coinbase?
Post by: DannyHamilton on September 18, 2013, 02:34:35 AM
Hi all,
I'm just messing about with the miner code and I was wondering, how would I put a specific message into the coinbase if i manage to mine a block?

You'd have to put the specific message into the coinbase BEFORE you mine the block.


Title: Re: How to put specific text in the Coinbase?
Post by: kjj on September 18, 2013, 02:37:44 AM
In init.cpp, search for pszP2SH.  That will show you exactly what you need to do to put custom tags in your coinbase.


Title: Re: How to put specific text in the Coinbase?
Post by: os2sam on November 12, 2013, 01:50:03 AM
In init.cpp, search for pszP2SH.  That will show you exactly what you need to do to put custom tags in your coinbase.

Is this the same as what pools do with their coinbase signature?


Title: Re: How to put specific text in the Coinbase?
Post by: kjj on November 12, 2013, 12:30:12 PM
In init.cpp, search for pszP2SH.  That will show you exactly what you need to do to put custom tags in your coinbase.

Is this the same as what pools do with their coinbase signature?

Depends.  If the pool uses bitcoind for block assembly, they probably use a similar method.  If the pool has custom software that builds the block, that software probably handles the coinbase too.