casper icon indicating copy to clipboard operation
casper copied to clipboard

Mismatched comparison when assessing finality

Open djrtwo opened this issue 7 years ago • 2 comments

@yzhang90 noticed that comparing current_dynasty_votes and total_curdyn_deposits happens after proc_reward(https://github.com/ethereum/casper/blob/d5aed932634e28ab90d31facc6d9944be1a5d426/casper/contracts/simple_casper.v.py#L447), which means current_dynasty_votes is the value before the proc_reward but total_curdyn_deposits is the value after proc_reward. This seems unintentional. Both should comparison should likely happen between the two values prior to the reward inclusion or after the reward inclusion. Not with one of the values before and one after.

@karlfloersch I wanted to make sure this is a bug and not an intentional feature before I move forward with changing it.

djrtwo avatar Apr 30 '18 02:04 djrtwo

This is a bug. I'll spec it more closely and get it fixed soon.

djrtwo avatar May 09 '18 14:05 djrtwo

We plan to bulk update the total deposit variables from the vote rewards in initialize_epoch in this issue #158

Ensure that when a PR is submit for #158 that this is no longer an issue

djrtwo avatar Jun 06 '18 20:06 djrtwo