Open achal-singh opened 4 years ago
I have observed this behavior with parity light and warp sync provider nodes only, but it works perfectly fine with archive nodes. Is there a way to fix it while using the light client?
@ricmoo I would really appreciate some help here, as I'm stuck with this issue for quite some days now. Please help. :)
I haven’t really dealt much with light nodes. Can you send along the command line parameters you are using? I’ll try to reproduce this tomorrow, but it might be that light nodes don’t actually keep that data on-disk... :s
[network] warp = false allow_ips = "all"
[rpc] disable = false port = 8545 interface = "0.0.0.0" cors = [] apis = ["web3", "eth", "pubsub", "net", "parity", "private", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub", "signer", "secretstore", "parity_accounts", "personal", "parity_set"] hosts = ["all"] server_threads = 4
[footprint] tracing = "on"
pruning = "fast" pruning_history = 500 pruning_memory = 10000 cache_size_db = 128 cache_size_blocks = 8 cache_size_queue = 40 cache_size_state = 25 cache_size = 128 # Overrides above caches with total size fast_and_loose = false db_compaction = "ssd" fat_db = "auto" scale_verifiers = true num_verifiers = 6
[misc] logging = "own_tx=trace" log_file = "/var/log/parity.log" color = true`
Also, please suggest any changes you might think are necessary to this config file. I'm quite new to setting up parity node and have very limited knowledge about the parameters. I'm executing this parity node inside of a docker container, so the ENTRYPOINT command is: ENTRYPOINT ["/bin/parity", "--jsonrpc-server-threads=8", "--config=/root/.local/share/io.parity.ethereum/config.toml"]
this.ethersProvider.getBlock(blockNumber).then(async res => { const pr = res.transactions.map(hash => this.ethersProvider.getTransaction(hash).then(res => res) ); const txs = await Promise.all(pr); console.log(txs);
The ERROR thrown on my console is this:
Error: Bad response on request: [ TransactionIndex ]. Error cause was EmptyResponse, (majority count: 31 / total: 31)
at getResult (/home/achal/xhub/blockchain-services/eth/node_modules/ethers/providers/json-rpc-provider.js:40:21)
at exports.XMLHttpRequest.request.onreadystatechange (/home/achal/xhub/blockchain-services/eth/node_modules/ethers/utils/web.js:111:30)
at exports.XMLHttpRequest.dispatchEvent (/home/achal/xhub/blockchain-services/eth/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
at setState (/home/achal/xhub/blockchain-services/eth/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
at IncomingMessage.
Hi @ricmoo, I am getting the following error when I'm using my own JSON-RPC client, a parity light node, and executing getTransactionReceipt() function, but getTransaction is working absolutely fine with the same provider.
const ethers = require('ethers'); const provider = new ethers.providers.JsonRpcProvider( 'http://<MY_PARITY_NODE_IP>:8545' );
(async () => { const a = await provider.getTransactionReceipt( '0x52db3310c90e6c60a35ea8d6b27ee4fa292fcd7700ea15ce0c09495928995bd4' ); console.log(a); })();
Could you please help me with this?