-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
It looks like @sjmackenzie hasn'signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io Once you've signed, plesae reply to this thread with Many thanks, Parity Technologies CLA Bot |
Create a new parameter `ecip1017EraRounds`. When the block number passes one era rounds, the reward is reduced by 20%. See https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md
6719bf4
to
ff36274
Compare
[clabot:check] |
It looks like @sjmackenzie signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
not ready yet |
In the monetary policy, the rewards are changed from "up to 7/8 of the reward" to "1/32 of the reward".
6ea7018
to
89849e5
Compare
Okay it's good to go. |
ethcore/src/ethereum/ethash.rs
Outdated
let fields = block.fields_mut(); | ||
|
||
let eras = fields.header.number() / self.ethash_params.ecip1017_era_rounds; | ||
for _ in 0..eras { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make 4/5 * reward
also for "Era 0"?
Winner reward should be full (5 eth) for "Era 0", and 4 eth for Era 1; where "Era 0" == 0-5million[or configured], "Era 1" == 5-10million, etc.
My rust is rusty... maybe should be 1..eras
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's OK:
for _ in 0..0 {}
is == for i := 0; i < 0; i++ {}
, so it won't be called as long as eras
is zero-indexed (which #L294 confirms).
According to https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md, when in block number 5,000,000, it should still be in Era 1 (which in our code `era == 0`). So we need to check whether the `rem` equals to zero and act accordingly when calculating the era.
needs to be placed in build bot. |
please run build bot again. |
would prefer to have eras logic in a separate function CI is undergoing some changes right now, but it should trigger again if you push |
what Rob said :) Please push again and it'll run a CI pipeline for you |
oh it seems you've got a |
* Ethereum Classic Monetary Policy Create a new parameter `ecip1017EraRounds`. When the block number passes one era rounds, the reward is reduced by 20%. See https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md * Update rewards for uncle miners for ECIP1017 In the monetary policy, the rewards are changed from "up to 7/8 of the reward" to "1/32 of the reward". * Fix an off-by-one error in ECIP1017 era calculation According to https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md, when in block number 5,000,000, it should still be in Era 1 (which in our code `era == 0`). So we need to check whether the `rem` equals to zero and act accordingly when calculating the era. * `ecip1017_era_rounds` missing from EthashParams when run in build bot * strip out ecip1017_eras_block_reward function and add unit test
* Ethereum Classic Monetary Policy (#5741) * Ethereum Classic Monetary Policy Create a new parameter `ecip1017EraRounds`. When the block number passes one era rounds, the reward is reduced by 20%. See https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md * Update rewards for uncle miners for ECIP1017 In the monetary policy, the rewards are changed from "up to 7/8 of the reward" to "1/32 of the reward". * Fix an off-by-one error in ECIP1017 era calculation According to https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md, when in block number 5,000,000, it should still be in Era 1 (which in our code `era == 0`). So we need to check whether the `rem` equals to zero and act accordingly when calculating the era. * `ecip1017_era_rounds` missing from EthashParams when run in build bot * strip out ecip1017_eras_block_reward function and add unit test * JS precompiled set to stable
Create a new parameter
ecip1017EraRounds
. When the block numberpasses one era rounds, the reward is reduced by 20%.
See https://github.com/ethereumproject/ECIPs/blob/master/ECIPs/ECIP-1017.md