この記事で扱われている symbol-shoestringの ver.は 0.1.0です
公式ページ
discord
symbol-shoestringの導入方法についてはこちら
shoestring.wizard
python3 -m shoestring.wizard
コマンドを使用せずに nodeを構築または メンテナンス出来る GUIツール
どの ディレクトリからでも実行可能で wizard中で nodeの場所を指定出来る
setup
nodeを構築
upgrade
node設定を変更する時に使用
shoestring/overrides.iniを変更した後に反映させる時にここを使う
reset data
block dataを削除 再同期する時に使用する
renew certificates
1年期限の nodeの ssl証明を更新する
※ただしこれを実行すると transportも更新される
renew voting keys
voting nodeで votingkeyを更新する
各 private keyの表示
main
作業ディレクトリの最上層にある ca.key.pem
openssl pkey -in ca.key.pem -noout -text
↑を実行すると
ED25519 Private-Key:
priv:
2e:bc:da:ca:7a:34:8a:41:2c:11:32:7c:13:14:ae:
d7:b0:2c:40:31:2e:f3:87:f7:3c:14:1e:d9:ce:e1:
d8:19
pub:
48:d6:96:28:57:48:5c:47:e5:8d:17:34:42:9b:53:
b0:ca:dc:26:b8:ea:99:49:32:7b:49:04:5e:6f:45:
95:65
priv(秘密鍵) と pub(公開鍵)が表示される
privであれば ここから":"を抜くと
2ebcdaca7a348a412c11327c1314aed7b02c40312ef387f73c141ed9cee1d819
となり これが mainの private key(秘密鍵)となる
※pub(公開鍵)のみの表示をする場合
openssl pkey -in ca.key.pem -noout -text_pub
remote
keys/
にある
openssl pkey -in keys/remote.pem -noout -text
vrf
keys/
にある
openssl pkey -in keys/vrf.pem -noout -text
transport
keys/cert/
にある
openssl pkey -in keys/cert/node.key.pem -noout -text
各 accountの表示された鍵の見方は mainと同様に ":"を取る
nodeの ssl証明の表示
作業ディレクトリから実行する場合
openssl x509 -in keys/cert/node.crt.pem -noout -text
コマンドツール
現在までに実行する事が出来た コマンドを挙げる
healthcheck
nodeが正常に動作しているかを確認する
python3 -m shoestring health --config 作業ディレクトリの場所/shoestring/shoestring.ini --directory 作業ディレクトリの場所
作業ディレクトリの中からは
python3 -m shoestring health --config shoestring/shoestring.ini --directory .
実行結果
※ httpsで nodeを構築した場合 この命令は正しく動作しない
reset-data
block dataを削除する
python3 -m shoestring reset-data --config 作業ディレクトリの場所/shoestring/51/shoestring/shoestring.ini --directory 作業ディレクトリの場所
作業ディレクトリの中からは
python3 -m shoestring reset-data --config shoestring/shoestring.ini --directory .
再同期させる時に実行する
docker-compose down
で nodeを止めてからこれを行い
docker-compose up -d
で nodeを始動する
renew-voting-keys
voting nodeの votingKeyを更新する
python3 -m shoestring renew-voting-keys --config 作業ディレクトリ/shoestring/shoestring.ini --directory 作業ディレクトリ
作業ディレクトリの中からは
python3 -m shoestring renew-voting-keys --config shoestring/shoestring.ini --directory .
upgrade
shoestring/overrides.ini
の内容を変更した後 この命令を実行すると
nodeに overrides.iniの内容が適用される(事が判っている)
※作業ディレクトリ内からの操作の場合のみを記す
shoestring/overrides.iniの内容
[user.account]
enableDelegatedHarvestersAutoDetection = true
[harvesting.harvesting]
maxUnlockedAccounts = 5
beneficiaryAddress =
[node.node]
minFeeMultiplier = 100
[node.localnode]
host = 9.dusanjp.com
vi shoestring/overrides.ini
等で overrides.ini
を編集後
mainnet nodeの場合
python3 -m shoestring upgrade --config shoestring/shoestring.ini --overrides shoestring/overrides.ini --directory 作業ディレクトリの場所
testnet nodeの場合は --package sai
を追記する
python3 -m shoestring upgrade --config shoestring/shoestring.ini --overrides shoestring/overrides.ini --directory 作業ディレクトリの場所 --package sai
setup
nodeを新たに構築する
別の作業ディレクトリを新たに作成し ca.key.pem
fileと shoestring
ディレクトリを新たな作業ディレクトリに copyする
新たな作業ディレクトリに移動し
python3 -m shoestring setup --config shoestring/shoestring.ini --ca-key-path ca.key.pem --directory . --overrides shoestring/overrides.ini --package sai
setup命令は upgrade命令と同様に mainnet/testnetを指定する必要がある
ここでは testnet用の fileを使用した為 --package sai
を追記した
mainnetの場合は --package sai
の追記は不要
これで作成された nodeは 正常に動作する
※この setup命令の使用方法は実験的に行ったもので 本来の使用方法は別にある
使用例は以下の記事を参照