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

Missing tx type in eth_getTransactionByHash response #9194

Closed
2 tasks done
ARR552 opened this issue Oct 25, 2024 · 1 comment · Fixed by #9195
Closed
2 tasks done

Missing tx type in eth_getTransactionByHash response #9194

ARR552 opened this issue Oct 25, 2024 · 1 comment · Fixed by #9195
Assignees
Labels
C-anvil Command: anvil T-bug Type: bug

Comments

@ARR552
Copy link

ARR552 commented Oct 25, 2024

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (883bb1c 2024-09-25T00:21:35.504891493Z)

What command(s) is the bug in?

anvil --block-time 12 --port 8545 --fork-url https://sepolia.infura.io/v3/ --fork-block-number 6941368

Operating System

Linux

Describe the bug

When I create a shadow fork, If I call eth_getTransactionByHash using a txHash that is in the real sepolia network, I get the field "type" in the response but If I send a tx in the shadow fork network, and I get the tx, the field "type" is missing. This is causing crashes in different components such as the erigon node.

ShadowFork Tx missing the field type:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "0x3729fc0ce3f54e27a17097c87e6cba0db32ce5e0c49ac0f1b6b578630a0a5bec",
        "nonce": "0x2e8c",
        "blockHash": "0x6b5199836f8803d6035c9e41582f16161a2142891d7331777a61e4345dc5fd35",
        "blockNumber": "0x68898b",
        "transactionIndex": "0x0",
        "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
        "to": "0xa13ddb14437a8f34897131367ad3ca78416d6bca",
        "value": "0x0",
        "gasPrice": "0x3b9aca07",
        "gas": "0x498c9",
        "input": "0xdef57e5400000000000000000<<<DATAREDUCED>>>00000000b000000000000000000",
        "r": "0x58ffcaff6aadf17d1017050ae7e0ebff62e7bc1a23d189f34787f2e5672b1d2d",
        "s": "0x54efdfa9409601b9e9e006dafdde1676d9f6d1d9af778086e3eafaac5e2fab7d",
        "v": "0x1546d72",
        "chainId": "0xaa36a7"
    }
} 

Tx in sepolia with the field type:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "hash": "0x64d9f7286cb5c3da940cc2cd30764a275d3597f5dd5d0008ea17668df69df771",
        "nonce": "0xaf1",
        "blockHash": "0x1aba6709a29bc2ee26c6838dd3f6e54845104c0b1a48e384125bd5441a8439e3",
        "blockNumber": "0x69ea51",
        "transactionIndex": "0x65",
        "from": "0x00c1d01f4699c33a3978cd5e43eab97b921d425c",
        "to": "0x02c9776bd0d2449ddc7bf603cc037909d8e986a6",
        "value": "0x6651728988000",
        "gasPrice": "0xef23db1b",
        "gas": "0xb421",
        "maxFeePerGas": "0x12337b34a",
        "maxPriorityFeePerGas": "0x19737f4",
        "input": "0xa11fde3700000000000000000000000000000<<<DATAREDUCED>>>0000000000000000000000000000000000000000000000000060a24181e4000",
        "r": "0xa78633faecea3797df0d072c3d390692b687591ac7d54d9588ff8022085d75a9",
        "s": "0x7465ee830c017ae46a22b99222fe532f3807b84fa1b655e8116525dd3bd506e9",
        "v": "0x1",
        "yParity": "0x1",
        "chainId": "0xaa36a7",
        "accessList": [],
        "type": "0x2"
    }
}
@ARR552 ARR552 added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Oct 25, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Oct 25, 2024
@mattsse
Copy link
Member

mattsse commented Oct 25, 2024

@zerosnacks easy fix here:

@grandizzy grandizzy added C-anvil Command: anvil and removed T-needs-triage Type: this issue needs to be labelled labels Oct 25, 2024
@zerosnacks zerosnacks self-assigned this Oct 25, 2024
@zerosnacks zerosnacks moved this from Todo to In Progress in Foundry Oct 25, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Foundry Oct 25, 2024
@grandizzy grandizzy moved this from Done to Completed in Foundry Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-bug Type: bug
Projects
Status: Completed
4 participants