getpdetradestatus RPC sometimes returns state error

Hey @Support,

getpdetradestatus “sometimes” returns such an error below. I cannot repeat it. I use my fullnode compiled from the source with mainnet_20201028_1 tag. Is there anyone who knows the reason and possible solution?

{‘Id’: 1, ‘Result’: None, ‘Error’: {‘Code’: -8000, ‘Message’: ‘Get pde state error’, ‘StackTrace’: '-8000: -4005: status pdetradestatus- with prefix aN���\x16T�\x07��\x11{(���r�VW?Y\x13�\\x17��\\x01� not found\nGet PDEX Status Error\\n\t/incognito/fullnode/dataaccessobject/statedb/error.go:365\\n\t/incognito/fullnode/dataaccessobject/statedb/accessor_pde.go:151\\n\t/incognito/fullnode/rpcserver/rpcservice/blockservice.go:917\*HttpServer).handleGetPDETradeStatus\n\t/incognito/fullnode/rpcserver/http_pde.go:662\*HttpServer).ProcessRpcRequest\n\t/incognito/fullnode/rpcserver/http.go:302\*HttpServer).handleRequest.func2\n\t/incognito/fullnode/rpcserver/http.go:182\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1374\nGet pde state error\\n\t/incognito/fullnode/rpcserver/rpcservice/error.go:291\*HttpServer).handleGetPDETradeStatus\n\t/incognito/fullnode/rpcserver/http_pde.go:664\*HttpServer).ProcessRpcRequest\n\t/incognito/fullnode/rpcserver/http.go:302\*HttpServer).handleRequest.func2\n\t/incognito/fullnode/rpcserver/http.go:182\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1374 '}, ‘Params’: [{‘TxRequestIDStr’: ‘XXX’}], ‘Method’: ‘getpdetradestatus’, ‘Jsonrpc’: ‘1.0’}

1 Like

Hi @abduraman,

Normally, a trading transaction needs to submit to Beacon to verify that it a valid transaction, it may take up to 2 beacon blocks (which is 80 seconds).

That why if you create trading transaction and call RPC to check trading-status right away, it says transaction-id doesn’t exist.

I suggest you call that RPC after 2 minutes.


Hey @khanhj,

Can there be any other reason for this? Since I put a periodic check (once in ~1 min) to get the trade status, it still sometimes gives that error even 10 minutes later.


you tried this on your fullnode or the official fullnode?
if this problem happened in your fullnode, try the RPC request on official mainnet fullnode to see if this problem existed or not.

the error show that that transaction id does not existed, mean the trading transaction does not reached the beacon.

ping me on telegram: khanhj
for quick disscuss


Hi, I have the same problem as abduraman, some transactions get errors and others not, even after a long time. Using the last devel branch. I have tried on my own fullnode and on official fullnode. Do you have any ideia ?

Hi @pfrp,

What exactly the error you get?
What is the requesting RPC command?
I need to know which pair of token you trying to trade

You can see:
curl --data-binary ‘{“id”:2,“jsonrpc”: “1.0”,“method”: “getpdetradestatus”,“params”: [{“TxRequestIDStr”: “987da9210dfd14ac114003d3a74f67d93ba049ce5ec960e08e6cf00fe4136e88” }] }’

I think some transactions either cannot reach mempool or they are dropped from mempool. Trade RPC returns without error but there is no transaction. I searched hash via both incscan and official explorer.

Hi @pfrp,

your trading transaction does not exist in mempool or block. This means it was failed.

    "Id": 1,
    "Result": null,
    "Error": {
        "Code": -1017,
        "Message": "Tx is not existed in mem and block",
        "StackTrace": "-1017: Tx is not existed in block or mempool\nTx is not existed in mem and block\\n\t/Users/autonomous/projects/incognito-chain/rpcserver/rpcservice/error.go:291\\n\t/Users/autonomous/projects/incognito-chain/rpcserver/rpcservice/txservice.go:947\*HttpServer).handleGetTransactionByHash\n\t/Users/autonomous/projects/incognito-chain/rpcserver/http_tx.go:264\*HttpServer).ProcessRpcRequest\n\t/Users/autonomous/projects/incognito-chain/rpcserver/http.go:302\*HttpServer).handleRequest.func2\n\t/Users/autonomous/projects/incognito-chain/rpcserver/http.go:182\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357 "
    "Params": [
    "Method": "gettransactionbyhash",
    "Jsonrpc": "1.0"

I think the JS SDK was not updated for inter PrivacyTokens trade. I will try again with the new vesion just released. Tks

FYI @future-readers

One of the reasons for this error is the stuck transaction in mempool. If a trade tx is stuck* in mempool, getpdetradestatus may return this error.

*Please read this: Timeout in mempool