Here we will be using a local chain-maind folder as the home directory. By default chain data are stored in your home directory ~/.chain-maind. For example, when joining the testnet testnet-croeseid-4:
Edit ./chain-main/config/app.toml and update the following section
[api]# Enable defines if the API server should be enabled.enable =true# Swagger defines if swagger documentation should automatically be registered.swagger =true# Address defines the API server to listen on.address ="tcp://0.0.0.0:1317"...[grpc]# Enable defines if the gRPC server should be enabled.enable =true# Address defines the gRPC server address to bind to.address ="0.0.0.0:9090"
Start the node
Afterward, you should be able to start you node by running
./chain-maindstart--home./chain-maind/
where the blockchain data, keys will be stored at the folder <current_path>/chain-maind/
Access RPC server
Tendermint (Local access only)
You can access Tendermint Swagger UI here: https://docs.tendermint.com/master/rpc/#/
Switch the servers to localhost in the dropdown and you can interact with the Swagger UI.
The reason we have to go to the grpc/proto directory is that gRPC will look for proto files dependency, and they expect that to be under the path you are currently at. To avoid this limitation, we can specify the proto import path.