how to run a xdai node
Hardware requirement
xdai官网未找到具体硬件要求, 所以参考以太坊的硬件要求
实际使用中
xdai fast 节点同步完成, 占用 31G存储空间
xdai archive 节点同步完成,占用 252G
Install xDai Client - Run a Non-Validator Node
-
OpenEthereum (previously Parity): Rust Client (还没有来得及验证运行)
-
Nethermind: .NET Client (192.168.1.91, 运行ok)
1cd /root/xdai/nethermind 2./Nethermind.Launcher
rpc endpont : 192.168.1.91:8545
rpc example
1curl --location --request POST '192.168.1.91:8545' \ 2--header 'Content-Type: application/json' \ 3--data-raw '{ 4 "jsonrpc":"2.0", 5 "method":"eth_blockNumber", 6 "params":[], 7 "id":83 8}'
rpc response
1{ 2 "jsonrpc": "2.0", 3 "id": 83, 4 "result": "0x42fb6f" 5}
rpc wiki:或者参考eth 的rpc调用
https://docs.nethermind.io/nethermind/ethereum-client/json-rpc
JSON RPC public endpoints
https://www.xdaichain.com/for-developers/developer-resources#json-rpc-endpoints