Parity-ethereum: Add `from` and `to` to `eth_getTransactionReceipt`

Created on 31 Oct 2017  Â·  15Comments  Â·  Source: openethereum/parity-ethereum

I'm running:

  • Parity version: 1.8.2
  • Operating system: Linux: Ubuntu 16.04
  • And installed: via binaries

I am switching from geth to parity, I wrote my APP following the docs, but for some reason getTransactionreceipt seems to be missing some fields, specifically from and to which is needed in my APP.

F3-annoyance 💩 M6-rpcapi 📣 P5-sometimesoon 🌲 Q2-easy 💃 Q3-medium

All 15 comments

The example on that page does not contain from and to, was this added recently?

from and to (and all other fields) can be retrieved from the transaction itself (by hash) adding only those two fields to receipt seems a bit weird.

There is a difference between the documented response to getTransactionReceipt and the actual response:

 --> POST http://localhost:8545/ http/1.1
Content-Type: application/json; charset=utf-8
Content-Length: 141 
{
    "jsonrpc": "2.0",
    "method": "eth_getTransactionReceipt",
    "params": ["0x60a37c38327d3f3b2cace6ad89546895bf49c1fb6c70a4b23c9027967232ecb8"],
    "id": 9
}
 --> END POST (141-byte body)

<-- 200 OK http://localhost:8545/ (3ms)
Content-Type: application/json
Transfer-Encoding: chunked
Date: Wed, 11 Apr 2018 08:28:11 GMT
{
    "jsonrpc": "2.0",
    "result": {
        "blockHash": "0xcf5f0a2a90bf99aaa29516ed2a35eae2c8f72fefb997402158a566c7d5a39f4f",
        "blockNumber": "0x9d05",
        "contractAddress": null,
        "cumulativeGasUsed": "0x90a9",
        "gasUsed": "0x90a9",
        "logs": [{
            "address": "0x0a35db94da8e787b1c10bc5d9a7761d151bedeaf",
            "blockHash": "0xcf5f0a2a90bf99aaa29516ed2a35eae2c8f72fefb997402158a566c7d5a39f4f",
            "blockNumber": "0x9d05",
            "data": "0x0000000000000000000000000000000000000000000000000000000000000001",
            "logIndex": "0x0",
            "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000e26b50ae30945efac2b1dd8897a29c3efc1d9780", "0x0000000000000000000000006b0c56d1ad5144b4d37fa6e27dc9afd5c2435c3b"],
            "transactionHash": "0x60a37c38327d3f3b2cace6ad89546895bf49c1fb6c70a4b23c9027967232ecb8",
            "transactionIndex": "0x0",
            "transactionLogIndex": "0x0",
            "type": "mined"
        }],
        "logsBloom": "0x00000000000000000000020000000000000000000000000000100000000000000000000000000000000008000000000000000000000000000000000008000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000080000000000000000008100000000000000000000000000000000000100000000000000000000000000000",
        "root": null,
        "status": null,
        "transactionHash": "0x60a37c38327d3f3b2cace6ad89546895bf49c1fb6c70a4b23c9027967232ecb8",
        "transactionIndex": "0x0"
    },
    "id": 9
}

The documentation: https://wiki.parity.io/JSONRPC-eth-module#eth_gettransactionreceipt

I'm using Parity//v1.9.5-stable-ff821da-20180321/x86_64-linux-gnu/rustc1.24.1
and https://github.com/web3j/web3j version 3.3.0

My problem is with the lack 'status' value. The expected value would be: "either 0x1 (success) or 0x0 (failure)"

@simon-temple thanks for the heads up, we will update the wiki shortly (https://github.com/paritytech/wiki/pull/75). Regarding "status": null. This field is only used if Byzantium EIP658 has been enabled.
Can you add "eip658Transition": "0x0" to the params of your chain spec like here

Note that you should set up a hard fork in your chain and set the eip658Transition to a block number in the future. Starting from this block, you will be able to have a non-null status field, not before.

The spec here

https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt

Does not match what is here

https://wiki.parity.io/JSONRPC-eth-module.html#eth_gettransactionreceipt

Specifically from and to are missing. They should be added to match the spec.

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__This issue now has a funding of 0.12 ETH (69.09 USD @ $575.79/ETH) attached to it.__

is some one working on this ?

@vaibhavchellani nope, feel free to pick it

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work has been started__.

These users each claimed they can complete the work by 8 months, 2 weeks ago.
Please review their action plans below:

1) ab320012 has started work.

1.add to and from to receipt

  1. assign to and from to receipt in the following map:
    typehttps://github.com/paritytech/parity/blob/master/rpc/src/v1/impls/light/eth.rs#L461

Learn more on the Gitcoin Issue Details page.

@ab320012 Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

  • [x] warning (3 days)
  • [ ] escalation to mods (6 days)

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__Work for 0.12 ETH (72.93 USD @ $607.75/ETH) has been submitted by__:

  1. @ab320012

@vs77bb please take a look at the submitted work:

  • (Link Not Provided) by @ab320012

@vs77bb this is resolved

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


__The funding of 0.12 ETH (64.13 USD @ $534.44/ETH) attached to this issue has been approved & issued to @ab320012.__

Fixed in #8756.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

barakman picture barakman  Â·  3Comments

vmenond picture vmenond  Â·  3Comments

gaoxiangxyz picture gaoxiangxyz  Â·  3Comments

danfinlay picture danfinlay  Â·  3Comments

famfamfam picture famfamfam  Â·  3Comments