# btcpool-BlockMaker
##
* blkmakerbitcoind
* blkmaker4RAWGBTSTRATUM_JOBSOLVED_SHARENMC_SOLVED_SHARE
* RAWGBTgbtHash/BlockgbtHashvtxsrawGbtMap_
* rawGbtMap_100gbtHash/vtxs
* STRATUM_JOBjobId_/gbtHashjobId_gbtHashjobId2GbtHash_
* jobId2GbtHash_120jobId_/gbtHash
* SOLVED_SHAREBlockHeadercoinbaseTx
* BlockHeader+coinbaseTx+vtxsBlock
* Blockbitcoind
* Block
* puidworker_idworker_full_namejob_idheighthash
* rewardscoinbaseValuesizeblksizeprev_hashbitsversioncreated_at
* created_at
## BlockMaker
BlockMakerkafkakafkaGbtJob
```shell
blkmaker -c blkmaker.cfg -l log_dir
#-cblkmaker
#-l
```
## blkmaker.cfg
```shell
//
bitcoinds = (
{
rpc_addr = ""; //rpc
rpc_userpwd = ""; //rpcusername:password
}
);
//kafka
kafka = {
brokers = "1.1.1.1:9092,2.2.2.2:9092,3.3.3.3:9092";
};
//mysql
pooldb = {
host = "";
port = 3306;
username = "dbusername";
password = "dbpassword";
dbname = "";
};
```
## found_blocks
[bpool_local_db.txt](bpool_local_db.txt)
```
CREATE TABLE `found_blocks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`puid` int(11) NOT NULL,
`worker_id` bigint(20) NOT NULL,
`worker_full_name` varchar(50) NOT NULL,
`job_id` bigint(20) unsigned NOT NULL,
`height` int(11) NOT NULL,
`is_orphaned` tinyint(4) NOT NULL DEFAULT '0',
`hash` char(64) NOT NULL,
`rewards` bigint(20) NOT NULL,
`size` int(11) NOT NULL,
`prev_hash` char(64) NOT NULL,
`bits` int(10) unsigned NOT NULL,
`version` int(11) NOT NULL,
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `hash` (`hash`),
KEY `height` (`height`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
```
## BlockMaker

###