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

Problem: no trace detail on insufficient balance #554

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Nov 6, 2024

this change shouldn't have been included in 213ddbc, when trace 2nd tx of multi txs from same sender include in same block with code 0 but get insufficient balance for transfer

{
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": [
        "0xdac08f8ad7cd69c64bf215a56297bceb51684dc42b4403cd77d53f1e6ca187c3",
        {
            "tracer": "callTracer"
        }
    ],
    "id": 1
}

or

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "debug_traceCall",
    "params": [
        {
            "from": "0x8e153f233d64930063b3515fb07ab6eca5f366e4",
            "to": "0x8c76cfc1934d5120cc673b6e5ddf7b88feb1c18c",
            "gas": "0x5968",
            "gasPrice": "0xde58eda21",
            "value": "0x423370f3a3e999",
            "data": "0xa0712d6800000000000000000000000000000000000000000000000000423370f3a3e999"
        },
        "0x4",
        {
            "tracer": "callTracer",
            "stateOverrides": {
                "0x8e153f233d64930063b3515fb07ab6eca5f366e4": {
                    "balance": "0x470DE4DF81FFFF" // balance after deducting costs from prior txs
                }
            }
        }
    ]
}

should get

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "from": "0x0000000000000000000000000000000000000000",
        "gas": "0x0",
        "gasUsed": "0x531c",
        "input": "0x",
        "type": "STOP"
    }
}

noted: there's failed fix in ethereum/go-ethereum@064f37d available in v1.14.x

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@yihuang yihuang self-requested a review November 7, 2024 09:04
def test_trace_tx_reverse_transfer(ethermint):
print("reproduce only")
return
method = "debug_traceTransaction"

Check warning

Code scanning / CodeQL

Unreachable code Warning test

This statement is unreachable.
@mmsqe mmsqe enabled auto-merge (squash) November 8, 2024 01:31
@mmsqe mmsqe merged commit 836617d into develop Nov 8, 2024
37 of 39 checks passed
@yihuang yihuang deleted the fix_balance branch November 8, 2024 02:40
mmsqe added a commit to mmsqe/cronos that referenced this pull request Nov 8, 2024
github-merge-queue bot pushed a commit to crypto-org-chain/cronos that referenced this pull request Nov 8, 2024
…1679)

* Problem: no trace detail on insufficient balance fix is not included

for more info, crypto-org-chain/ethermint#554

* fix
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