8000 Fix reward miscalculation under RoundRobin policy by ian0371 · Pull Request #1709 · klaytn/klaytn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Fix reward miscalculation under RoundRobin policy #1709

Merged
merged 3 commits into from
Nov 21, 2022

Conversation

ian0371
Copy link
Contributor
@ian0371 ian0371 commented Nov 17, 2022

Proposed changes

This PR

Before Kore, there was a bug that distributed txFee at the end of block proecessing regardless of deferredTxFee flag.
See #1692.
To maintain backward compatibility, we only fix the buggy logic after Kore and leave the buggy logic before Kore.

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

  • Please leave the issue numbers or links related to this PR here.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@ian0371 ian0371 changed the title Bugfix reward Fix reward miscalculation under RoundRobin policy Nov 17, 2022
@ian0371 ian0371 added this to the v1.10 (Kore) milestone Nov 18, 2022
@ian0371 ian0371 self-assigned this Nov 18, 2022
@ian0371 ian0371 marked this pull request as ready for review November 21, 2022 01:38
@ian0371 ian0371 requested a review from mckim19 as a code owner November 21, 2022 05:39
// config.Istanbul must have been set
func IsRewardSimple(config *params.ChainConfig) bool {
policy := config.Istanbul.ProposerPolicy
return policy != uint64(istanbul.WeightedRandom)
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this code was meant to check the mainnet. Maybe we can refactor this some day...

@ian0371 ian0371 merged commit febce7b into klaytn:dev Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reward miscalculation under RoundRobin policy
3 participants
0