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

From address for some transactions is 0x0 address (0x0000000000000000000000000000000000000000) #23681

Closed
kurushdubash opened this issue Oct 4, 2021 · 1 comment · Fixed by #23683
Labels

Comments

@kurushdubash
Copy link

System information

Geth version: geth-v1.10.8
OS & Version: Linux - 32GiB Mem (~11 GiB used), Disk: 10TB (8.4TB used)

Expected behaviour

When fetching a block with full transaction payloads, we are noticing transactions with from address coming from the Eth burn address (0x0000000000000000000000000000000000000000) which should never be possible.

As an example, for block 0x24e19 (151065)

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x24e19", true],"id":0}'

We'd expect the response:

{
   "jsonrpc": "2.0",
   "id": 0,
   "result": {
      "difficulty": "0x5686a15b4b6",
      "extraData": "0xd783010100844765746887676f312e342e32856c696e7578",
      "gasLimit": "0x2fefd8",
      "gasUsed": "0x5208",
      "hash": "0x8f87aa9f058871b41c869b4d34cdab7bcf55c9f9460aee29ac06cb9b375b14a0",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1dcb8d1f0fcc8cbc8c2d76528e877f915e299fbe",
      "mixHash": "0x0da6d0912a0197563eb988aeb8a50167cda45cf6a82330827f6bbd0024599c96",
      "nonce": "0xae581272f072055f",
      "number": "0x24e19",
      "parentHash": "0x38db622002b4fa6da639cb65434a1b38cc2490ff1dac23e3c01bea6769884f52",
      "receiptsRoot": "0xcdbded79fb91c04ed5a202acc7ebc7631c3b268f1c334165943054f8c3cca8f4",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x28f",
      "stateRoot": "0xcf5d4bdc0e4c7fb1df45f16555fe170eb7e72b8c1b6720353217d7cd630e14ef",
      "timestamp": "0x55df0ff5",
      "totalDifficulty": "0x5c82ab7dc297110",
      "transactions": [
         {
            "blockHash": "0x8f87aa9f058871b41c869b4d34cdab7bcf55c9f9460aee29ac06cb9b375b14a0",
            "blockNumber": "0x24e19",
            "from": "0x6d6d02e83c4ced98204e20126acf27e9d87b8af2",
            "gas": "0x5267",
            "gasPrice": "0xba43b7400",
            "hash": "0x7c98efa6641aae7b19e321edf55d183400628597140ecae41c8e2e111d130769",
            "input": "0x",
            "nonce": "0x1",
            "to": "0xca77ccf23a2d4ddf77121a4f66859f744cfe0257",
            "transactionIndex": "0x0",
            "value": "0x56bc75e2d63100000",
            "type": "0x0",
            "v": "0x1c",
            "r": "0xe8dc8200b64abfbec22aeb61215ac9cbe9533bc1daeb7cdea6ac0db27e55919b",
            "s": "0xd20b9383ab859d9d6ef5dbd9a39ed7c95ecaff17649c5bb6fbb6414b06716d93"
         }
      ],
      "transactionsRoot": "0xedb1babda89376288300c98ad70035a60853e66d307d253ce1a6a9155e789c28",
      "uncles": []
   }
}

but

Actual response

{
   "jsonrpc": "2.0",
   "id": 0,
   "result": {
      "difficulty": "0x5686a15b4b6",
      "extraData": "0xd783010100844765746887676f312e342e32856c696e7578",
      "gasLimit": "0x2fefd8",
      "gasUsed": "0x5208",
      "hash": "0x8f87aa9f058871b41c869b4d34cdab7bcf55c9f9460aee29ac06cb9b375b14a0",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "miner": "0x1dcb8d1f0fcc8cbc8c2d76528e877f915e299fbe",
      "mixHash": "0x0da6d0912a0197563eb988aeb8a50167cda45cf6a82330827f6bbd0024599c96",
      "nonce": "0xae581272f072055f",
      "number": "0x24e19",
      "parentHash": "0x38db622002b4fa6da639cb65434a1b38cc2490ff1dac23e3c01bea6769884f52",
      "receiptsRoot": "0xcdbded79fb91c04ed5a202acc7ebc7631c3b268f1c334165943054f8c3cca8f4",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "size": "0x28f",
      "stateRoot": "0xcf5d4bdc0e4c7fb1df45f16555fe170eb7e72b8c1b6720353217d7cd630e14ef",
      "timestamp": "0x55df0ff5",
      "totalDifficulty": "0x5c82ab7dc297110",
      "transactions": [
         {
            "blockHash": "0x8f87aa9f058871b41c869b4d34cdab7bcf55c9f9460aee29ac06cb9b375b14a0",
            "blockNumber": "0x24e19",
            "from": "0x0000000000000000000000000000000000000000",
            "gas": "0x5267",
            "gasPrice": "0xba43b7400",
            "hash": "0x7c98efa6641aae7b19e321edf55d183400628597140ecae41c8e2e111d130769",
            "input": "0x",
            "nonce": "0x1",
            "to": "0xca77ccf23a2d4ddf77121a4f66859f744cfe0257",
            "transactionIndex": "0x0",
            "value": "0x56bc75e2d63100000",
            "type": "0x0",
            "v": "0x1c",
            "r": "0xe8dc8200b64abfbec22aeb61215ac9cbe9533bc1daeb7cdea6ac0db27e55919b",
            "s": "0xd20b9383ab859d9d6ef5dbd9a39ed7c95ecaff17649c5bb6fbb6414b06716d93"
         }
      ],
      "transactionsRoot": "0xedb1babda89376288300c98ad70035a60853e66d307d253ce1a6a9155e789c28",
      "uncles": []
   }
}

Noticeable, the from address of the only transaction is invalid.

Steps to reproduce the behaviour

Call getBlockByNumber with concerning blocks with full transactions. Likewise, calling getTransactionByHash with the appropriate transaction hash will also output same issue with the transaction where the from field is 0x0000000000000000000000000000000000000000.

We've noticed this on multiple blocks ranging from 81914 to 207680 and potentially more. Our hunch is that there is some issue with the RLP decoder that is defaulting the from field to the 0x0 address after a Geth upgrade.

All transactions of issue that we've noticed are contained in blocks prior to the Homestead fork so far.

@kurushdubash kurushdubash changed the title From address for some transactions is 0x address (Transactions are returning with from address as burn address (0x0000000000000000000000000000000000000000) From address for some transactions is 0x address (0x0000000000000000000000000000000000000000) Oct 4, 2021
@kurushdubash kurushdubash changed the title From address for some transactions is 0x address (0x0000000000000000000000000000000000000000) From address for some transactions is 0x0 address (0x0000000000000000000000000000000000000000) Oct 4, 2021
@s1na
Copy link
Contributor

s1na commented Oct 5, 2021

The issue is we default to the HomesteadSigner instead of FrontierSigner here:

signer = types.HomesteadSigner{}
. Will work on a fix

@fjl fjl closed this as completed in #23683 Oct 7, 2021
fjl pushed a commit that referenced this issue Oct 7, 2021
Fixes #23681

After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
sidhujag pushed a commit to syscoin/go-ethereum that referenced this issue Oct 7, 2021
…#23683)

Fixes ethereum#23681

After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this issue Dec 3, 2022
…#23683)

Fixes ethereum#23681

After the fix I get the address 0x6d6d02e83c4ced98204e20126acf27e9d87b8af2 for the
tx mentioned in the ticket, which agrees with etherscan.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants