"One Click Tangle" intends to make lives easier to IOTA adopters by providing pre-configured scripts and recipes that allow to deploy IOTA Networks and Nodes "in one click".
MIT License
55
stars
36
forks
source link
Fix the format peers are added to the peering.json file #41
An error shows up when trying to add peers via the command line
When the command
./hornet.sh install -p "\/ip4\/178.18.253.217\/tcp\/15600\/p2p\/12D3KooWMkDp22T9hPEz7mMaM9EgDGioiUiRxSiFKXBwt1mcHbpm" -i "gohornet\/hornet:1.0.3" is run where /ip4/178.18.253.217/tcp/15600/p2p/12D3KooWMkDp22T9hPEz7mMaM9EgDGioiUiRxSiFKXBwt1mcHbpm is the peer address (forward slashes have been added in the actual command so that sed can be able to process it without errors)
An error shows up, saying Invalid config peer address
Which makes alias and multiaddress as two separate peers instead of one. This PR attempts to fix this issue.
Type of change
Bug fix (a non-breaking change which fixes an issue)
How the change has been tested
Clone the repository
Remove the existing config.json in the one-click-tangle/hornet-mainnet/config/config.json file and add the latest config file found here
Edit the config.json file to change the dasboard.bindAddress to 0.0.0.0:8081 instead of localhost:8081 and also change the dashboard.auth.passwordHash and the dashboard.auth.passwordSalt respectively so that you are able to log in to the dashboard.
Install the hornet configuration by running ./hornet.sh install -p "\/ip4\/178.18.253.217\/tcp\/15600\/p2p\/12D3KooWMkDp22T9hPEz7mMaM9EgDGioiUiRxSiFKXBwt1mcHbpm" -i "gohornet\/hornet:1.0.3"
Check dashboard to see if the node is running, and the peer that you added exists in the peering.json file, and that the node is synching and after synching becomes healthy.
Description of change
An error shows up when trying to add peers via the command line
When the command
./hornet.sh install -p "\/ip4\/178.18.253.217\/tcp\/15600\/p2p\/12D3KooWMkDp22T9hPEz7mMaM9EgDGioiUiRxSiFKXBwt1mcHbpm" -i "gohornet\/hornet:1.0.3"
is run where/ip4/178.18.253.217/tcp/15600/p2p/12D3KooWMkDp22T9hPEz7mMaM9EgDGioiUiRxSiFKXBwt1mcHbpm
is the peer address (forward slashes have been added in the actual command so that sed can be able to process it without errors)An error shows up, saying Invalid config peer address
This is because of the line https://github.com/iotaledger/one-click-tangle/blob/afb1bd878d2ad2a0c62fcfa423ffe24ce7f17300/hornet-mainnet/hornet.sh#L96 here there are two extra curly braces which mess up the peering.json configuration.
Instead of the correct format, according to the documentation here https://hornet.docs.iota.org/post_installation/peering.html#adding-node-peers
We have
Which makes
alias
andmultiaddress
as two separate peers instead of one. This PR attempts to fix this issue.Type of change
How the change has been tested
sed -i 's/\[\]/\[{"alias": "peer1","multiAddress": "'$peer'"}\]/g' config/peering.json
./hornet.sh install -p "\/ip4\/178.18.253.217\/tcp\/15600\/p2p\/12D3KooWMkDp22T9hPEz7mMaM9EgDGioiUiRxSiFKXBwt1mcHbpm" -i "gohornet\/hornet:1.0.3"
Change checklist