8000 Verify with the block number config by kjeom · Pull Request #1530 · 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.

Verify with the block number config #1530

Merged
merged 10 commits into from
Jul 20, 2022

Conversation

kjeom
Copy link
@kjeom kjeom commented Jul 18, 2022

Proposed changes

  • Issue

    • Debug API (TraceBlock, StandardTraceBlock) calls VerifyHeader of consensus engine with latest chainConfig.
    • After the KIP-71 config has been updated, if you call the API with previous block number then it verify the header with latest config, not the config at the block number.
    • It cause the incorrect validation for the header.
  • Propose

    • Getting the config at the block number by governance in verifyHeader of the consensus engine.
    • Copying the latest ChainConfig and update the KIP-71 config.
  • Notes

    • The ChainConfig cannot be directly updated because the ChainConfig.governance.KIP71Config is a pointer.
    • The side effect will be affect other operations as well.

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.

@kjeom kjeom added the need to merge Need to merge for the next time label Jul 18, 2022
@kjeom kjeom added this to the v1.9.0 (Magma) milestone Jul 18, 2022
@kjeom kjeom requested review from blukat29, kjhman21, jimni1222 and a user July 18, 2022 11:05
@kjeom kjeom requested a review from aidan-kwon as a code owner July 18, 2022 11:05
@kjeom kjeom self-assigned this Jul 18, 2022
blukat29
blukat29 previously approved these changes Jul 19, 2022
Copy link
Contributor
@blukat29 blukat29 left a comment

Choose a reason for hiding this comment

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

The performance impact (compared to directly using chain.Config()) should be minimal because ReadGovernance() is cached.

Co-authored-by: Jamie <32922423+jimni1222@users.noreply.github.com>
jimni1222
jimni1222 previously approved these changes Jul 20, 2022
Copy link
Member
@aidan-kwon aidan-kwon left a comment

Choose a reason for hiding this comment

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

Thank you!

@kjeom kjeom merged commit 30dc9f8 into klaytn:dev Jul 20, 2022
@kjeom kjeom mentioned this pull request Jul 21, 2022
@blukat29 blukat29 removed the need to merge Need to merge for the next time label Feb 17, 2023
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.

4 participants
0