8000 vm: modify computation cost and its limit after cancun by yoomee1313 · Pull Request #2037 · 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.

vm: modify computation cost and its limit after cancun #2037

Merged
merged 5 commits into from
Nov 20, 2023

Conversation

yoomee1313
Copy link
Contributor
@yoomee1313 yoomee1313 commented Nov 16, 2023

Proposed changes

  • As the cpu performance has been improved a lot, this PR apply the recalculated computation cost of several opcodes. Please refer to the PDF file below to see why and what has changed.
  • Also, in this PR, the computation cost limit has been increased: 50% increased (100,000,000 -> 150,000,000)

Types of changes

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

  • 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

Further comments

  • Adjusting individual computation costs based on kcn --vm.opdebug on blocks 129,000,000 to 139,000,000
    ComputationCost adjustment Cancun.pdf
  • Adjusting computation cost limit
    • The goal was to make the following transaction succeed, which previously failed with ErrOpcodeComputationCostLimitReached(0xa). Transaction consumed 135,695,448 computation cost before PR, and will consume 135,062,316 after PR.
    • Increasing the limit with some margin to 150,000,000.
      debug.traceCall({ "from":"0x80b2b44FC3F390E1CB0a53b4b0b4a01F17F7aDf8", "to":"0x542a3903c7F2dD47a7F31b08Bd1C6791e3C43784", "input":"0x528be0a9000000000000000000000000000000000000000000000000000001d1a94a2260"},107853657,{tracer: "unigramTracer"})
      

@yoomee1313 yoomee1313 self-assigned this Nov 16, 2023
@yoomee1313 yoomee1313 force-pushed the modify-computationcost-cancun branch from 0cd05f2 to 4154cb7 Compare November 16, 2023 12:44
@yoomee1313 yoomee1313 marked this pull request as ready for review November 16, 2023 13:24
@yoomee1313 yoomee1313 closed this Nov 16, 2023
@yoomee1313 yoomee1313 reopened this Nov 16, 2023
@yoomee1313 yoomee1313 marked this pull request as draft November 17, 2023 14:51
@yoomee1313 yoomee1313 force-pushed the modify-computationcost-cancun branch 3 times, most recently from db2376c to cb6d35b Compare November 20, 2023 07:13
@yoomee1313 yoomee1313 force-pushed the modify-computationcost-cancun branch from c048139 to 172564d Compare November 20, 2023 07:42
yoomee1313 and others added 2 commits November 20, 2023 15:42
Co-authored-by: Yunjong Jeong (ollie) <jeongyoonjong@gmail.com>
@yoomee1313 yoomee1313 marked this pull request as ready for review November 20, 2023 07:48
@yoomee1313 yoomee1313 force-pushed the modify-computationcost-cancun branch from e6ab99f to 0fdd7ec Compare November 20, 2023 07:57
@yoomee1313
Copy link
Contributor Author

@hyunsooda @blukat29 Please take another look. This PR is now complete.

blukat29
blukat29 previously approved these changes Nov 20, 2023
@yoomee1313 yoomee1313 force-pushed the modify-computationcost-cancun branch from 7732778 to 8d9deb0 Compare November 20, 2023 08:10
@blukat29
Copy link
Contributor

@sjnam @ian0371 PTAL

@yoomee1313
Copy link
Contributor Author

I'll merge this. If you have any opinion, please leave it on comment.

@yoomee1313 yoomee1313 merged commit 1662ee0 into klaytn:dev Nov 20, 2023
@yoomee1313 yoomee1313 deleted the modify-computationcost-cancun branch November 20, 2023 08:50
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