Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: remove computationcost limit at call/estimate apis #2086

Merged
merged 5 commits into from Jan 19, 2024

Conversation

yoomee1313
Copy link
Contributor

@yoomee1313 yoomee1313 commented Jan 5, 2024

Proposed changes

  • Lift computation cost limit at klay_call, klay_estimateGas, klay_estimateComputationCost, eth_call, eth_estimateGas.

  • No need to use experimental computation cost flag (--opcode-computation-cost-limit) as an attempt to bypass the cost limit. The limit is always infinite in such APIs.

  • Computation cost limit after this PR:

    • block syncing & other APIs: Use hard-coded limit (params.OpcodeComputationCostLimit).
    • block syncing & other APIs, with --opcode-computation-cost-limit: Use the specified number
    • call/estimate APIs: always infinite
> eth.estimateGas({"to":"0xE46888D56CfE7804d045aDcdaFEc548E0329c965", "data": "0x53ae5a540000000000000000000000000000000000000000000000000000000000013e00"})
27873306
> klay.estimateComputationCost({"to":"0xE46888D56CfE7804d045aDcdaFEc548E0329c965", "data": "0x53ae5a540000000000000000000000000000000000000000000000000000000000013e00"})
"0x37574e27"

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

Further comments

blukat29
blukat29 previously approved these changes Jan 11, 2024
hyunsooda
hyunsooda previously approved these changes Jan 11, 2024
sjnam
sjnam previously approved these changes Jan 12, 2024
@yoomee1313 yoomee1313 dismissed stale reviews from sjnam, hyunsooda, and blukat29 via d8c0f6d January 15, 2024 07:17
@yoomee1313 yoomee1313 force-pushed the revert-cc-limit branch 2 times, most recently from 5be2892 to c666389 Compare January 15, 2024 07:49
hyunsooda
hyunsooda previously approved these changes Jan 16, 2024
hyeonLewis
hyeonLewis previously approved these changes Jan 17, 2024
blukat29
blukat29 previously approved these changes Jan 17, 2024
cmd/utils/flags.go Show resolved Hide resolved
@yoomee1313 yoomee1313 merged commit 8ab9fc0 into klaytn:dev Jan 19, 2024
11 checks passed
@yoomee1313 yoomee1313 deleted the revert-cc-limit branch January 19, 2024 01:04
@pilab-gwon pilab-gwon mentioned this pull request Jan 19, 2024
@blukat29 blukat29 mentioned this pull request Jan 22, 2024
13 tasks
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.

None yet

5 participants