Skip to content

Conversation

@theoreticalbts
Copy link
Contributor

@theoreticalbts theoreticalbts commented May 18, 2018

This code implements the "Discount missing witnesses" solution for issue #2471.

PR #2472 is a dependency of this PR and should be merged before this PR.

@theoreticalbts
Copy link
Contributor Author

I rebased out PR #2472, see discussion in #2469 for reasons why. This PR now stands ready to review/merge on its own.

Copy link
Contributor

@mvandeberg mvandeberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does not change tests yet still passes them. Due to the nature of the changes, this means that irreversibility tests either a) do not exist, or b) are not sufficient to detect significant changes in our irreversibility algorithm. From my reading of the code, these changes look good, but I would feel much better if they were accompanied by tests. A hard requirement is the scenario described in the EOS issue to show that these changes solve that problem.


w.total_missed++;
if( has_hardfork( STEEM_HARDFORK_0_14__278 ) )
if( (_dgp.head_block_number - w.last_confirmed_block_num > STEEM_BLOCKS_PER_DAY)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace

// Also, this prevents initminer from having a large total_missed.
//

w.total_missed++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be wrapped in the if( witness_missed.owner != b.witness ) conditional to preserve existing behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants