z-classic / z-nomp

z-nomp is mining pool software for Zcash and Zclassic so you can create internet money in your home!
MIT License
291 stars 437 forks source link

Error: Expected property "1" of type Satoshi, got Number 24950000000000000 #362

Closed rlinxy closed 5 years ago

rlinxy commented 5 years ago

Hi all,

I am trying to get Fabcoin supported by Z-nomp, after I did 'npm start', got this error

Error: Expected property "1" of type Satoshi, got Number 24950000000000000

Seems something wrong with 'blockReward' at line 26 of 'blockTemplate.js' in startum-pool.

After days research, still have no clue how to fix it. I set the blockReward to a smaller number, such as '25 * 100000000', no error reported at the pool side, but the block seems got rejected. Below is what in the coin daemon debug:

2018-07-15 15:47:28 CreateNewBlock(): nHeight=123174 total size: 664 block weight: 2548 txs: 1 fees: 3155 sigops 408 2018-07-15 15:47:39 ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 00000000c36e644ee0cdbf9e7c83aab078bed889c2283ff6e56036ec00d382a3, bad-height, incorrect block height (code 16) 2018-07-15 15:47:39 ERROR: ProcessNewBlock: AcceptBlock FAILED

Any idea how to set the blockReward? Thanks.

rlinxy commented 5 years ago

fixed

fsql commented 5 years ago

@rlinxy Did you solved the problem ? I met the same problem.

rlinxy commented 5 years ago

Yes, solved. Just need to know the way to calculate the BlockReward, your may check the coin's developer reference for it. Then, simply modify the line 26 of blocktemplate.js under stratum-pool folder. BTW what coin are you trying to set up?

fsql commented 5 years ago

@rlinxy Fabcoin. I set rpcData.miner to 25 , pool run success. But the log show : Share rejected:"error":"job not found". Do other files need to be modified? Cloud you give me your pool_configs files ?

rlinxy commented 5 years ago

25? I think it should be 2500000000, you may check the coin's white paper for more details.

fsql commented 5 years ago

@rlinxy var blockReward = (this.rpcData.miner) * 100000000; change to var blockReward = (this.rpcData.miner);

Pool can work but block rejected. Do you have QQ or WeChat ?