I run parity in a default mode (--pruning=fast) and want to find out my balance on erc20-contract. I run RPC-command:
{'jsonrpc': '2.0',
'id': 330186953061876261,
'method': 'eth_call',
'params': [{'to': '0x0affa06e7fbe5bc9a764c979aa66e8256a631f02',
'data': '0x70a08231000000000000000000000000948f20d662dc17a4ddc16abda082c2b49e2295ea'},
'pending']}
which (I believe) used to work with previous versions of Parity.
I receive the following response:
{'jsonrpc': '2.0',
'error': {'code': -32000,
'message': 'This request is not supported because your node is running with state pruning. Run with --pruning=archive.'},
'id': 330186953061876261}
I don't get it: why I can't perform such a request with --pruning=fast. I need a pending state, not the historical data. BTW, everything is Ok with state "latest".
I believe it's something to do with this code:
@tomusdrw mentioned that elsewhere in the code we fallback to latest if pending isn't available; the error code here appears to be misplaced 馃槄
This bug still exists in Parity 2.2.9 and 2.3.2
We should either fallback to latest consistently or the error message should be improved.
To produce pending block please run with --force-sealing.
Thankyou @tomusdrw
This bug still exists in v2.5.9
Closed by #11127.