8000 Change snapshot's EffectiveParams argument number by ian0371 · Pull Request #1791 · 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.

Change snapshot's EffectiveParams argument number #1791

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

ian0371
Copy link
Contributor
@ian0371 ian0371 commented Feb 24, 2023

Proposed changes

Change number to number + 1 because snapshot(N) is used to generate N+1 block.
Also, governance parameters can change every block, so effectiveParams need to be called every block.
These fix istanbul.committeesize activation timing to k*epoch after 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 added this to the v1.10.2 milestone Feb 24, 2023
@ian0371 ian0371 requested a review from blukat29 February 24, 2023 08:22
@ian0371 ian0371 self-assigned this Feb 24, 2023
@ian0371 ian0371 added the need to merge Need to merge for the next time label Feb 24, 2023
@ian0371 ian0371 merged commit e03b594 into klaytn:dev Feb 24, 2023
@@ -156,7 +156,7 @@ func (s *Snapshot) apply(headers []*types.Header, gov governance.Engine, addr co
snap := s.copy()

// Copy values which might be changed by governance vote
snap.Epoch, snap.Policy, snap.CommitteeSize = getGovernanceValue(gov, snap.Number)
snap.Epoch, snap.Policy, snap.CommitteeSize = effectiveParams(gov, snap.Number+1)
Copy link
Contributor
@hyunsooda hyunsooda Feb 24, 2023

Choose a reason for hiding this comment

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

This line appears to be unnecessary. As it has already been merged, please take it into consideration at a later time.

@aidan-kwon aidan-kwon mentioned this pull request Feb 27, 2023
@blukat29 blukat29 mentioned this pull request Mar 3, 2023
9 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need to merge Need to merge for the next time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0