Recently, ecological partners often consult us about searching transactions and node data storage through API.
They often encounter this kind of problem:
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
The return value is null .
Usually this is because your own node needs to open the persit_index configuration. When running the node by yourself, this configuration is easily overlooked.
The specific method is as follows:
The HTTP RPC port is specified by jsonrpc_tcp_port in the toml configuration file. Others include jsonrpc_ws_port, jsonrpc_tcp_port, jsonrpc_http_port, jsonrpc_local_tcp_port, jsonrpc_local_http_port. You can refer to the tethys.toml default configuration file provided in the release. The default data is stored in blockchain_db and storage_db under the running path (pwd). It can be configured separately through conflux_data_dir and block_db_dir in the configuration file. It should be noted that if you need to access the old receipt data, you need to set persist_tx_index to true.