Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/143.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Blockchain 以太坊区块链:testnet环境设置_Blockchain_Ethereum_Go Ethereum_Geth - Fatal编程技术网

Blockchain 以太坊区块链:testnet环境设置

Blockchain 以太坊区块链:testnet环境设置,blockchain,ethereum,go-ethereum,geth,Blockchain,Ethereum,Go Ethereum,Geth,为了避免信任第三方的需要,并避免在我的电脑上完全下载区块链,我想在本地服务器上设置一个同步以太坊testnet区块链的完整节点,然后使用geth实例将我的电脑连接到此服务器。 这在某种程度上是可能的吗? 我该怎么做 您只需通过rpc连接到本地geth服务器即可 geth attach http://host:port 您可以阅读geth的rpc API 您可以在同步之后或同步期间在geth服务器上使用此命令启动rpc侦听器 admin.startRPC(host, port, cors, ap

为了避免信任第三方的需要,并避免在我的电脑上完全下载区块链,我想在本地服务器上设置一个同步以太坊testnet区块链的完整节点,然后使用geth实例将我的电脑连接到此服务器。
这在某种程度上是可能的吗?
我该怎么做

您只需通过rpc连接到本地geth服务器即可

geth attach http://host:port
您可以阅读geth的rpc API

您可以在同步之后或同步期间在geth服务器上使用此命令启动rpc侦听器

admin.startRPC(host, port, cors, apis)
作为替代方案,您可以在主pc上使用light sync,这样您就不需要下载完整的区块链

geth --light

但这取决于你将如何使用它来帮助其他有同步问题的人。我认为[对于开发和测试]在本地设置以太坊区块链是一个好主意,而不是与任何testnet或mainnet连接

参考: