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 result of debug_traceBlockByNumber #3060

Merged
merged 12 commits into from
Nov 29, 2024
Merged

Fix result of debug_traceBlockByNumber #3060

merged 12 commits into from
Nov 29, 2024

Conversation

RomarQ
Copy link
Contributor

@RomarQ RomarQ commented Nov 28, 2024

What does it do?

Things missing @gonzamontiel:

  • Add/fix tests

Example request:

curl https://trace.api.moonriver.moonbeam.network \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "method": "debug_traceBlockByNumber", "params": ["0x6d6583", {"tracer": "callTracer"}], "id": 1}'

Actual result:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
                "from": "0xc6392ad8a14794ea57d237d12017e7295bea2363",
                "gas": "0x4ce78",
                "gasUsed": "0x5208",
                "to": "0x8a0078ae40784f7920051f1c74718ea07c278e5d",
                "input": "0x",
                "value": "0x470de4df820000",
                "type": "CALL"
        },
       {
                "from": "0xc6392ad8a14794ea57d237d12017e7295bea2363",
                "gas": "0x4ce78",
                "gasUsed": "0x5208",
                "to": "0xd3ba12e13a662d296b50c68d94b54c86825bc643",
                "input": "0x",
                "value": "0x470de4df820000",
                "type": "CALL"
       }
    ]
}

Expected result example:

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
            "txHash": "0xd7fe78028fec35856f30bd447b4bbab658375e3ba1c2892d1ad0a4b5fd51de17",
            "result": {
                "from": "0xc6392ad8a14794ea57d237d12017e7295bea2363",
                "gas": "0x4ce78",
                "gasUsed": "0x5208",
                "to": "0x8a0078ae40784f7920051f1c74718ea07c278e5d",
                "input": "0x",
                "value": "0x470de4df820000",
                "type": "CALL"
            }
        },
        {
            "txHash": "0xaded92b859bf2d92e99608cf809925a82365e19cb2d64ddd958f85439e9be6d5",
            "result": {
                "from": "0xc6392ad8a14794ea57d237d12017e7295bea2363",
                "gas": "0x4ce78",
                "gasUsed": "0x5208",
                "to": "0xd3ba12e13a662d296b50c68d94b54c86825bc643",
                "input": "0x",
                "value": "0x470de4df820000",
                "type": "CALL"
            }
        }
    ]
}

@RomarQ RomarQ added B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes breaking Needs to be mentioned in breaking changes labels Nov 28, 2024
@RomarQ RomarQ added the D2-notlive PR doesn't change runtime code (so can't be audited) label Nov 28, 2024
Copy link
Contributor

github-actions bot commented Nov 28, 2024

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2248 KB (no changes) ✅

Moonbeam runtime: 2228 KB (no changes) ✅

Moonriver runtime: 2224 KB (no changes) ✅

Compared to latest release (runtime-3300)

Moonbase runtime: 2248 KB (+220 KB compared to latest release) ⚠️

Moonbeam runtime: 2228 KB (+232 KB compared to latest release) ⚠️

Moonriver runtime: 2224 KB (+232 KB compared to latest release) ⚠️

Copy link
Contributor

github-actions bot commented Nov 28, 2024

Coverage Report

@@                Coverage Diff                 @@
##           master   rq/add-tx-hash      +/-   ##
==================================================
- Coverage   74.74%           74.72%   -0.02%     
  Files         369              369              
+ Lines       94269            94295      +26     
==================================================
  Hits        70453            70453              
+ Misses      23816            23842      +26     
Files Changed Coverage

Coverage generated Thu Nov 28 18:31:48 UTC 2024

@RomarQ RomarQ marked this pull request as ready for review November 28, 2024 13:43
@gonzamontiel
Copy link
Contributor

I made some changes! but it's roughly what we spoke, looks good :)

@RomarQ RomarQ added the A8-mergeoncegreen Pull request is reviewed well. label Nov 28, 2024
@gonzamontiel gonzamontiel requested review from a team as code owners November 28, 2024 16:26
Copy link
Contributor

@ahmadkaouk ahmadkaouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RomarQ RomarQ merged commit 35536b7 into master Nov 29, 2024
39 checks passed
@RomarQ RomarQ deleted the rq/add-tx-hash branch November 29, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A8-mergeoncegreen Pull request is reviewed well. B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes breaking Needs to be mentioned in breaking changes D2-notlive PR doesn't change runtime code (so can't be audited)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants