添加对等点不会在 Geth 控制台中添加对等点
Add Peers does not add a peer in Geth console
我正在尝试添加对等点。我在 geth.The 上使用以下命令创建了两个节点 boot node creation command is
geth --datadir ./chaindata3 --port 30304 --nodiscover --networkid 12 --rpc --rpcport "8546" --rpccorsdomain "*" --ipcdisable console
其他节点创建命令
geth --datadir ./chaindata4 --port 30307 --nodiscover --networkid 12 --ipcdisable --bootnodes "enode://7143091f47a3d4aae216ce781e28b53c1faa9daa08bbeaa9a01adbd9b3933fb3b83acff00a375bf0a4b30b1135b7aabef422c28c60279de34e9399a3d91d7c88@127.0.0.1:30304" console
当我键入命令时 admin.peers 它 returns 一个空列表。有人可以帮我解决这个问题吗?
两个节点应该以相同的起源启动。
直接启动 Geth 而不用创世纪初始化它会创建一个具有默认网络 ID 和共识算法的块,这将与基础创世纪不同。
设置实际启动节点,不将基本节点(第一个完整节点作为启动节点)。
bootnode -genkey boot.key
bootnode -addr localhost:port -nodekey boot.key -verbosity 9
启动其他指向引导节点的节点
例如:
geth --datadir "data" --syncmode "full" --rpcport port --rpc --rpcaddr "localhost" --port port --rpccorsdomain "*" --rpcapi "personal,eth,net,db,web3,txpool,miner" --bootnodes "enode://************@localhost:port" --networkid 100 --ipcdisable --mine console
抱歉不能format:that为什么要添加新答案
我正在尝试添加对等点。我在 geth.The 上使用以下命令创建了两个节点 boot node creation command is
geth --datadir ./chaindata3 --port 30304 --nodiscover --networkid 12 --rpc --rpcport "8546" --rpccorsdomain "*" --ipcdisable console
其他节点创建命令
geth --datadir ./chaindata4 --port 30307 --nodiscover --networkid 12 --ipcdisable --bootnodes "enode://7143091f47a3d4aae216ce781e28b53c1faa9daa08bbeaa9a01adbd9b3933fb3b83acff00a375bf0a4b30b1135b7aabef422c28c60279de34e9399a3d91d7c88@127.0.0.1:30304" console
当我键入命令时 admin.peers 它 returns 一个空列表。有人可以帮我解决这个问题吗?
两个节点应该以相同的起源启动。 直接启动 Geth 而不用创世纪初始化它会创建一个具有默认网络 ID 和共识算法的块,这将与基础创世纪不同。
设置实际启动节点,不将基本节点(第一个完整节点作为启动节点)。
bootnode -genkey boot.key
bootnode -addr localhost:port -nodekey boot.key -verbosity 9
启动其他指向引导节点的节点
例如:
geth --datadir "data" --syncmode "full" --rpcport port --rpc --rpcaddr "localhost" --port port --rpccorsdomain "*" --rpcapi "personal,eth,net,db,web3,txpool,miner" --bootnodes "enode://************@localhost:port" --networkid 100 --ipcdisable --mine console
抱歉不能format:that为什么要添加新答案