1

Here is my parity config:

[rpc]
disable = false
port = 8545
interface = "all"
cors = ["*"]
apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub"]
hosts = ["none"]


[footprint]
tracing="on"
pruning="fast"
pruning_memory=100000

For some reason, my connection is always refused when I try and connect to the RPC API like so:

curl --data '{"method":"trace_replayBlockTransactions","params":["0x2ed119",["trace"]],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST http://localhost:8545

What am I missing here? I thought this would be fairly straightforward...

1 Answer 1

1

As per https://wiki.parity.io/JSONRPC-trace-module#the-ad-hoc-tracing-api in order to perform certain trace methods.

your node must be in archive mode or the transaction should be within the most recent 1000 blocks.

specifically, your config has pruning="fast" in the footprint section where it should be pruning="archive" for this method to work.

3
  • two comments: 1) Why am I getting "connection refused" though? 2) I have the pruning_memory set, I would think it would store as many states as it could in that memory (not just 1000 blocks worth)?
    – istrau2
    Oct 19, 2018 at 15:50
  • 1) Could you add the exact error you're getting to your question? I'm actually not certain the wildcard works in the cors setting the way you expect it does; "all" is probably what you want (albeit that is insecure). 2) It's more the case that tracing doesn't work with pruning at all, hence pruning needs to be set to "archive".
    – Joshua Mir
    Oct 19, 2018 at 16:31
  • 1) The exact error is curl: (7) Failed to connect to localhost port 8545: Connection refused. 2) Why not, I mean it can obviously work for the last 1000 blocks, why not for an arbitrary number? What happens when you set tracing="on" and pruning="fast"? Shouldn't the node know how to handle that kind of a situation.
    – istrau2
    Oct 19, 2018 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.