8000 fix(rpc): wrong block number in debug trace related api (cherry-pick) by VictorTrustyDev · Pull Request #1663 · evmos/evmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(rpc): wrong block number in debug trace related api (cherry-pick) #1663

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

Merged

Conversation

VictorTrustyDev
Copy link
Contributor
@VictorTrustyDev VictorTrustyDev commented Jul 24, 2023

Description

Cherry-pick bug fixed in ethermint but missing on evmos evmos/ethermint#1591
Look here in evmos and here in ethermint, both referenced from their main branch

Reference discussion 1

block height already minus by one in rpc

https://github.com/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)

PR review checkboxes:

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • included the correct
    type prefix
    in the PR title
  • targeted the correct branch
    (see PR Targeting)
  • provided a link in the PR description to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all required CI checks have passed

Code maintenance:

I have...

  • written unit and integration tests
  • added relevant godoc and code comments.
  • updated relevant documentation (docs/) or specification (x/<module>/spec/)

Reviewers Checklist

All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.

I have...

  • confirmed the correct
    type prefix
    in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code

-->

@VictorTrustyDev VictorTrustyDev marked this pull request as ready for review July 24, 2023 08:37
@VictorTrustyDev VictorTrustyDev requested a review from a team as a code owner July 24, 2023 08:37
@VictorTrustyDev VictorTrustyDev requested review from facs95 and MalteHerrmann and removed request for a team July 24, 2023 08:37
@codecov
Copy link
codecov bot commented Jul 24, 2023

Codecov Report

Merging #1663 (acbff7c) into main (8a221e8) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1663   +/-   ##
=======================================
  Coverage   70.22%   70.22%           
=======================================
  Files         296      296           
  Lines       22059    22059           
=======================================
  Hits        15491    15491           
  Misses       5818     5818           
  Partials      750      750           
Impacted Files Coverage Δ
x/evm/keeper/grpc_query.go 85.90% <100.00%> (ø)

@facs95
Copy link
Contributor
facs95 commented Jul 24, 2023

Thanks @VictorTrustyDev !

@facs95 facs95 merged commit 7820542 into evmos:main Jul 24, 2023
@VictorTrustyDev VictorTrustyDev deleted the cherry-pick-fix/fix_blk_number_in_trace branch July 24, 2023 14:04
@VictorTrustyDev VictorTrustyDev restored the cherry-pick-fix/fix_blk_number_in_trace branch July 25, 2023 15:38
@VictorTrustyDev VictorTrustyDev deleted the cherry-pick-fix/fix_blk_number_in_trace branch July 25, 2023 15:39
mtsitrin pushed a commit to dymensionxyz/evmos that referenced this pull request Feb 4, 2024
…evmos#1663)

* fix wrong block number in debug_traceTransaction

* fix wrong block number in debug_debug_traceBlockByNumber and debug_traceBlockByHash

* add change doc
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.

2 participants
0