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

fix(evm): correct context block height when trace transaction #3

Merged
merged 2 commits into from
Dec 30, 2023

Conversation

VictorTrustyDev
Copy link
Member

@VictorTrustyDev VictorTrustyDev commented Dec 30, 2023

Refer #2

Reference discussion 1

block height already minus by one in rpc

https:/evmos/ethermint/blob/57ed355c985d9f3116aba6aabfa2ee0f3f38e966/rpc/backend/tracing.go#L110-L114

Oh no, so currently it keep minus by one in grpc so actually minus by 2? If calling via API debug_traceTransaction?

Fixing BlockNumber from request, no need minus 1

Originally posted by mmsqe in evmos/ethermint#1591 (comment)

Reference discussion 2

The contextHeight is minus one to get to the state of block beginning, but the block number pass to evm context should not minus one.

Originally posted by yihuang in evmos/ethermint#1591 (comment)

@VictorTrustyDev VictorTrustyDev added the enhancement Enhancement / bug-fixes or re-work on old feature label Dec 30, 2023
@VictorTrustyDev VictorTrustyDev self-assigned this Dec 30, 2023
@VictorTrustyDev VictorTrustyDev linked an issue Dec 30, 2023 that may be closed by this pull request
@VictorTrustyDev VictorTrustyDev merged commit 34bc972 into main Dec 30, 2023
@VictorTrustyDev VictorTrustyDev deleted the fix-rpc/correct-context-block-number-when-trace branch December 30, 2023 16:44
@VictorTrustyDev VictorTrustyDev restored the fix-rpc/correct-context-block-number-when-trace branch December 30, 2023 16:44
@VictorTrustyDev VictorTrustyDev deleted the fix-rpc/correct-context-block-number-when-trace branch December 30, 2023 16:44
@VictorTrustyDev VictorTrustyDev changed the title fix(evm): Correct context block height when trace transaction fix(evm): correct context block height when trace transaction Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement / bug-fixes or re-work on old feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem: patch known issue in v12
2 participants