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

feat: Support injecting EVM-version specific GasCalculators in smart contract service #12991

Open
david-bakin-sl opened this issue Apr 24, 2024 · 0 comments

Comments

@david-bakin-sl
Copy link
Member

david-bakin-sl commented Apr 24, 2024

BESU's GasCalculator interface gets a new implementation with every EVM version. (Usually just small changes.). We subclass one of those implementations in CustomGasCalculator. But that's currently a singleton with only one version allowed. It should be a thing that can have per-EVM-version implementations, akin to the EVM modules we currently have (e.g., V046Module, V050Module, etc.)

At the same time ... the Cancun version added an overload to GasCalculator.callOperationGasCost which has an additional argument accountIsWarm (a boolean). The previously existing method without that argument is deprecated. We need to support that. It also surfaces in the same way at Besu's AbstractCallOperation.cost() which we override at HederaDelegateCallOperation.

(See // FUTURE: comments in both CustomGasCalculator.java and HederaDelegateCallOperation.java.)

@david-bakin-sl david-bakin-sl changed the title feat: Support injecting EVM-version specific GasCalculators in smart contract service feat: Support injecting EVM-version specific GasCalculatorss in smart contract service Apr 24, 2024
@david-bakin-sl david-bakin-sl changed the title feat: Support injecting EVM-version specific GasCalculatorss in smart contract service feat: Support injecting EVM-version specific GasCalculators in smart contract service Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant