EthereumCommonwealth / go-callisto

Official Go implementation of the Callisto protocol (CLO main client)
https://callisto.network
GNU Lesser General Public License v3.0
48 stars 29 forks source link

Calculating block & uncle rewards #4

Closed oliverw closed 6 years ago

oliverw commented 6 years ago

I'm currently integrating CLO into Miningcore and I'm not sure if the implementation for calculating block & uncle rewards is correct.

Constants: https://github.com/coinfoundry/miningcore/blob/dev/src/MiningCore/Blockchain/Ethereum/EthereumConstants.cs#L52

Block reward calculation: https://github.com/coinfoundry/miningcore/blob/dev/src/MiningCore/Blockchain/Ethereum/EthereumPayoutHandler.cs#L358

Uncle reward calculation (switch/case fall-through from Ethereum default implementation): https://github.com/coinfoundry/miningcore/blob/dev/src/MiningCore/Blockchain/Ethereum/EthereumPayoutHandler.cs#L396

Methw commented 6 years ago

@oliverw Thank You very much. Much appreciated to help make opensource mining pool for Callisto Network. As I know, in Whitepaper at Roadmap , there are 3 constant. Coin for miner, Treasury and stake reward. Reward/value for each block is : Miner Reward : 420 CLO Treasury Fund : 120 CLO (Cold) Staking Reward : 60 CLO You can check it here: https://github.com/EthereumCommonwealth/rust-callisto/blob/6a61ca356822a271120da4c29fca72cc56625b01/ethcore/res/ethereum/callisto_galilei.json#L21

It can change after the Hardfork 1 scheduled in 11 Nov 2018. The change as per Whitepaper is : Miner Reward : 420 CLO Treasury Fund : 60 CLO (Cold) Staking Reward : 120 CLO

For calculation, its same as that. 70% Of block reward is for miner. If you add one constant, need to change it slightly, the overall value is the same. About uncle, I'm not so sure atm. Need to ask the dev @yograterol .