coinbase / mesh-ethereum

Ethereum Mesh API Implementation
Apache License 2.0
102 stars 70 forks source link

Implement `/mempool/transaction` endpoint #91

Open thepabloaguilar opened 2 years ago

thepabloaguilar commented 2 years ago

Is your feature request related to a problem? Please describe.

Currently rosetta-ethereum does not support querying transaction in a mempool.

Describe the solution you'd like

Implementation of /mempool/transaction as described here

viveksb007 commented 2 years ago

hey @thepabloaguilar are you currently working on this? If not, I would like to give it a try. Thanks

thepabloaguilar commented 2 years ago

Hey @viveksb007, no I'm not working on this right now! Feel free to get it

viveksb007 commented 2 years ago

Hey @shrimalmadhur, Do transactions in mempool have trace information (can we query debug_traceTransaction for transactions in mempool)? From the docs it seems like debug_traceTransaction is used to re-run transaction which is already executed. So confirming this part.

In current transaction response, from attribute is filled by obtaining info from trace and put only inside the trace block shown below link. So we have from attribute in transactions in mempool, where should we put this from info if not in trace?

"trace": {
        "from": "0x687422eea2cb73b5d3e242ba5456b782919afc85",
        "gas": "0x4791e",
        "gasUsed": "0x0",
        "input": "0x",
        "output": "0x",
        "time": "13.5µs",
        "to": "0xc662a694fdaa5406a8ee2ca2e94890d58ab578d9",
        "type": "CALL",
        "value": "0xde0b6b3a7640000"
      }