Symbnol ノードの立ち上げ ガイドでは Symbol Bootstrap を使用してノードを簡単に作成 する方法について説明しています。このガイドでは、セットアッププロセスはノードをホストするマシン上で実行されます。つまり、秘密鍵はインターネットに接続されたマシンで生成されます。 より強固なレベルのセキュリティ が必要な場合は、このガイドに従いますが、より複雑なセットアップ手順が要求されます。
この 要約 は symbol-bootstrap start
コマンドを config
フェーズに分割して、オフラインで実行し、設定フォルダが生成され、それ以外の start
コマンドはノードのホスト先である、オンラインのマシンで実行されます。 メインアカウントの秘密鍵がオフラインマシン以外に暴露されることはありません 。
マシン | 機能 |
---|---|
設定 |
|
ノード |
|
ノードはすべてのハーベスト報酬が、このアカウントの秘密鍵を必要とせずに 外部アカウント に送られるように設定することもできます。これは 非カストディアルセットアップ と呼ばれ、 ノードが稼働してから 設定する必要があるため、このページの最後に適切なガイドへの案内があります。
マシンの設定 中はオフラインです:
Symbol Bootstrap の使用 ガイドに示されるように Symbol Bootstrap のインストール をします。プリセットとアセンブリについて理解するために、そのガイドの 構成 セクションを必ず確認してください。
symbol-cli ガイドで示されるように Symbol CLI をインストール して、次のように実行します:
npm install --global symbol-cli
初回の Symbol Bootstrap の実行 ではイメージのダウンロードが必要です:
symbol-bootstrap config -p mainnet -a <assembly> --noPassword
rm -rf target
この最初の実行の出力は使用しないため --noPassword
を使用し、 target
フォルダは削除します。
このマシンで秘密鍵を生成するため 設定マシンをインターネットから切断 します。
メインアカウントのプロファイルを作成 これはすべてのハーベスティング手数料を受け取り、ハーベスト時に インポータンススコア が使用されるアカウントです。
このガイドの目的は、アカウントの秘密鍵がオンラインマシン上で使用されないようにすることです
このステップでは、メインアカウントを保持し、その秘密鍵を使用してトランザクションに署名する symbol-cli
プロファイルを作成します。マシンは現在オフラインなので、ネットワーク関連のデータを提供する必要があります。
注釈
以下のコマンドは、 新しい メインアカウントを作成することを前提に profile create
コマンドを使用します。メインとして使用したい アカウント が既にある場合は、代わりに profile import
コマンドを使用してください。
symbol-cli profile create --profile offline-main --default
--url http://localhost:3000 --network MAIN_NET
--generation-hash 57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6
--namespace-id symbol.xym --divisibility 6
--epoch-adjustment 1615853185
symbol-cli profile create --profile offline-test --default
--url http://localhost:3000 --network TEST_NET
--generation-hash 45FBCF2F0EA36EFA7923C9BC923D6503169651F7FA4EFC46A8EAF5AE09057EBD
--namespace-id symbol.xym --divisibility 6
--epoch-adjustment 1573430400
プロンプトが表示されたら、プロファイルを保護するためのパスワードを入力して PrivateKey
インポートタイプを選択します。
✔ Enter your wallet password: … *********
✔ Select an import type: › PrivateKey
Account
┌───────────────┬──────────────────────────────────────────────────────────────────────┐
│ Property │ Value │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Address │ NCCE5O-BMZHWM-IYZKR6-4WZKFD-4P7DTS-IRXJZ2-3LI │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Public Key │ 51C2CB98B61D666A993FA9B25EEBCB48DE5F0B1B7D8B79ECB7AFCB1E5E601108 │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Private Key │ ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● │
├───────────────┼──────────────────────────────────────────────────────────────────────┤
│ Password │ ●●●●●●●●● │
└───────────────┴──────────────────────────────────────────────────────────────────────┘
SUCCESS Stored offline-main profile
symbol-cli
が後に使用できるようになりました。すべてのトランザクションはメインアカウントが署名するため、 手数料 の支払いにいくらかの資産があることを確認してください。
メインアカウントの秘密鍵をメモして、安全な場所に保管してください
Symbol Bootstrap 用に custom.yml
と命名して カスタムプリセットファイル を 作成 します。これには最低でも次の行を含める必要があります:
privateKeySecurityMode: PROMPT_MAIN
nodes:
-
mainPrivateKey: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
これらのプロパティの詳細については、Symbol Bootstrap のドキュメントの セキュリティーモードのセクション を参照してください。
投票 の有効化や 報酬プログラム への加入などのカスタマイズを行う場合は、それらを提供することもできます。
privateKeySecurityMode: PROMPT_MAIN
nodes:
-
mainPrivateKey: ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
voting: true
rewardProgram: SuperNode
host: my-symbol-node.com # Could also be an IP address
Symbol Bootstrap を再度実行 今回は必要なすべてのパラメータを使用します:
symbol-bootstrap config -p mainnet -a <assembly> -c custom.yml
設定ファイル の暗号化に使用する パスワード の入力を求められます。
? Enter password to use to encrypt and decrypt custom presets, addresses.yml,
and preset.yml files. When providing a password, private keys will be
encrypted. Keep this password in a secure place! ******
info Password has been provided
info Generating config from preset testnet
info Assembly preset dual
info Generating Main account...
info Generating Transport account...
info Generating Remote account...
info Generating VRF account...
info User for docker resolved: 1000:1000
info Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.1.8 bash createNodeCertificates.sh
info Certificate for node api-node created
info Generating api-node server configuration
info Generating api-broker broker configuration
info Non-voting node api-node.
info Configuration generated.
これにより、 addresses.yml
ファイルと複数の構成ファイルを含む target
ディレクトリが生成されます。
メインアカウントの秘密鍵は、これらのファイルのいずれにも存在しません
Symbol Bootstrap はデフォルトで リモートハーベスティング を有効にします。つまり、サーバ上の 平文テキストファイル内のメインの秘密鍵を使用することはありません 。ノードとそのメインアカウント間のプロキシとして機能するリモートキーのみです。
custom.yml
を開いて mainPrivateKey
が含まれる 行を削除して ください。
すでに Symbol Bootstrap は config
ステージで使用したので、そのような機密キーをプレーンテキストファイルに置く必要はありません。
後で使用するので target
ディレクトリ全体をペンドライブ (またはネットワークに繋がっていない媒体) に コピー します。
Still in the offline Configuration machine, you are now going to prepare a series of link transactions manually. These transactions will be created by symbol-cli
, signed by your main account, and will be moved to an online machine to be announced later on.
The following commands all use --max-fee 1000000
which means that 1 XYM will be paid for each transaction. Feel free to use a different number after reading the fees documentation.
Concerning deadlines
All transactions have a deadline, meaning that they must be announced (and confirmed) before the deadline expires.
There is currently a limitation in symbol-cli
which sets this deadline to 2 hours after transaction creation, for all non-multisig transactions.
追跡中 の既知の制限
アカウントキーリンクトランザクション ペイロードを取得します。
This links your main account to the remote account used for リモートハーベスティング. Symbol Bootstrap generated this account for you, and you can find its public key in the target/addresses.yml
file:
remote:
publicKey: 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F
In the --linked-public-key
parameter below, use the remote account public key:
symbol-cli transaction accountkeylink --max-fee 1000000 --mode normal
--linked-public-key 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F
--action Link
Enter the password you used when you created the symbol-cli
profile and do not announce the transaction (the machine is offline).
✔ Enter your wallet password: … *********
┌──────────────────────────────────────────────────────────────────────────────────┐
│ ACCOUNT_KEY_LINK │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Max fee: │ 1,000,000 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Network type: │ TEST_NET │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Deadline: │ 2021-03-27 10:41:41.286 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Action: │ Link │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Linked key: │ 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F │
├───────────────┴──────────────────────────────────────────────────────────────────┤
│ Signature details │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Payload: │ A10000000000000042E0E0A0B8D7E1F27805F3537F80BFEAB6FEAC318908C486 │
│ │ 4D03260B83ED1D0332D6EA6E086A4B68C578DB690D78D50BDA5C706B1DC66472 │
│ │ 9326511547E42E0FCC6D13D64FB9BF69B72846C3FE99127D48C3293F473D528F │
│ │ B902600CB7DA10330000000001984C4140420F000000000026F54C1B0A000000 │
│ │ 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F │
│ │ 01 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Hash: │ 08C63D3AFAC3767F43053AFF1ACA61381FE81929B2384B91C450010A547AFA4A │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Signer: │ CC6D13D64FB9BF69B72846C3FE99127D48C3293F473D528FB902600CB7DA1033 │
└───────────────┴──────────────────────────────────────────────────────────────────┘
✔ Do you want to announce this transaction? … no
Select all the text in the Payload
box and paste it into a new text file named payloads.txt
. Remove all spaces and other decorations to obtain a single line containing only numbers and uppercase letters:
A100000000000000703C88DEDC4ABC2917F00ADB12C45F2C333B1113405C3CFAB289E78D9C54DDFCB1FE7C3048B6DA735568A935C6C08AF7E70AEC614A2EE9590967A7A044E52B0DCC6D13D64FB9BF69B72846C3FE99127D48C3293F473D528FB902600CB7DA10330000000001984C4140420F000000000038F32C1B0A0000001544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F01
VRF キーリンクトランザクション ペイロードを取得します。
この鍵はハーベスティングに必要です。
Again, Symbol Bootstrap has already generated this key for you and you can find it in the target/addresses.yml
file:
vrf:
publicKey: 856B6CCA574508158D66046CACEA2D81CB626DEEFDD3B6C466514CE31F32A52B
Use the VRF account public key in the --linked-public-key
parameter below and do not announce the transaction (the machine is offline):
symbol-cli transaction vrfkeylink --max-fee 1000000 --mode normal
--linked-public-key 856B6CCA574508158D66046CACEA2D81CB626DEEFDD3B6C466514CE31F32A52B
--action Link
Again, copy the content of the Payload
box, trim it, and add it to payloads.txt
, in a new line.
投票キーリンクトランザクション ペイロードを取得します。
このキーは投票ノードにのみ必要です。
If you added voting: true
to custom.yml
when creating the configuration, then Symbol Bootstrap has created this key too in target/addresses.yml
:
voting:
publicKey: 05693B4300ABFD28CD6BA434DD26F9FAF2342927FE32840898DCB895B8A17E84
Use the Voting account public key in the --linked-public-key
parameter below and do not announce the transaction (the machine is offline):
symbol-cli transaction votingkeylink --max-fee 1000000 --mode normal
--linked-public-key 05693B4300ABFD28CD6BA434DD26F9FAF2342927FE32840898DCB895B8A17E84
--action Link --start-point 1 --end-point 360
Again, copy the content of the Payload
box, trim it, and add it to payloads.txt
, in a new line.
以前に target
フォルダをコピーしたペンドライブに payloads.txt
をコピーします。
Move now to the online machine, the one that is permanently connected to the Internet and will host the node. Plug in the pen drive with the node configuration.
Symbol Bootstrap の使用 ガイドで示されるように Symbol Bootstrap をインストール します。
symbol-cli ガイドで示されるように Symbol CLI をインストール して、次のように実行します:
npm install --global symbol-cli
Create an announcer profile for symbol-cli
. This is only a temporary account used to announce the payloads; it does not require funds:
symbol-cli profile create --profile announcer --default
--network MAIN_NET
--url http://ngl-api-001.symbolblockchain.io:3000
symbol-cli profile create --profile announcer --default
--network TEST_NET
--url http://ngl-dual-101.testnet.symboldev.network:3000
When prompted, enter a password to secure your profile, and select the PrivateKey
import type:
✔ Enter your wallet password: ... *********
✔ Select an import type: » PrivateKey
...
SUCCESS Stored announcer profile
You will now use symbol-cli
to announce to the network the transactions you prepared in payloads.txt
.
リモートキーリンクのアナウンス:
symbol-cli transaction payload --sync --announce
✔ Enter the transaction payload:
payloads.txt
から最初の長いテキスト行を貼り付けて、 Enter キーを押下します:
SUCCESS Transaction loaded:
┌──────────────────────────────────────────────────────────────────────────────────┐
│ ACCOUNT_KEY_LINK │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Max fee: │ 1,000,000 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Network type: │ TEST_NET │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Deadline: │ 2021-03-27 10:41:41.286 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Signer: │ TBGPYD-CO35V2-AMOYEJ-LEM44H-372M3I-6RWVFY-QCY │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Action: │ Link │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Linked key: │ 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F │
└───────────────┴──────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────────┐
│ ACCOUNT_KEY_LINK │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Max fee: │ 1,000,000 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Network type: │ TEST_NET │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Deadline: │ 2021-03-27 10:41:41.286 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Signer: │ CC6D13D64FB9BF69B72846C3FE99127D48C3293F473D528FB902600CB7DA1033 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Action: │ Link │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Linked key: │ 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F │
├───────────────┴──────────────────────────────────────────────────────────────────┤
│ Signature details │
├───────────────┬──────────────────────────────────────────────────────────────────┤
│ Payload: │ A10000000000000042E0E0A0B8D7E1F27805F3537F80BFEAB6FEAC318908C486 │
│ │ 4D03260B83ED1D0332D6EA6E086A4B68C578DB690D78D50BDA5C706B1DC66472 │
│ │ 9326511547E42E0FCC6D13D64FB9BF69B72846C3FE99127D48C3293F473D528F │
│ │ B902600CB7DA10330000000001984C4140420F000000000026F54C1B0A000000 │
│ │ 1544FE6F504A8B8536C2407664916AFB5C917400FD1B941B981933CDFE52AE3F │
│ │ 01 │
├───────────────┼──────────────────────────────────────────────────────────────────┤
│ Hash: │ 08C63D3AFAC3767F43053AFF1ACA61381FE81929B2384B91C450010A547AFA4A │
└───────────────┴──────────────────────────────────────────────────────────────────┘
...
SUCCESS Transaction announced
SUCCESS Transaction confirmed
注釈
If the transaction is announced but it never gets confirmed (symbol-cli
is stuck in Processing
for more than a minute) it can be due to a number of things. Without interrupting symbol-cli
, copy the transaction hash, open a new terminal and run:
symbol-cli transaction status --hash <transaction hash>
If there has been any issue with the transaction, this should give you the cause and you can then interrupt symbol-cli
.
If you need to try again, never re-announce the same payload. Create a new one (from the Configuration machine) and announce it again.
よく発生する問題:
Failure_Core_Insufficient_Balance
): The main account (which signed the transaction) does not have enough funds to pay the fee. Transfer some funds and try with a new payload.Failure_Core_Past_Deadline
): Create a new payload and announce it again before the deadline expires (See the Concerning deadlines box above).symbol-cli
will be stuck in Processing
and you will get no relevant information from the transaction status
. Just don’t announce the same payload more than once.VRF キーリンクのアナウンス:
symbol-cli transaction payload --sync --announce
✔ Enter the transaction payload:
payloads.txt
から 2 つ目の長いテキスト行を貼り付けて、トランザクションが承認されるのを待ちます。
投票キーリンクをアナウンスします (投票ノードの場合):
symbol-cli transaction payload --sync --announce
✔ Enter the transaction payload:
payloads.txt
から 3 つ目の長いテキスト行を貼り付けて、トランザクションが承認されるのを待ちます。
すべてのキーリンクトランザクションが承認されたら、ノードが設定され、最終的には起動することができます。
Go to the directory containing the target
directory copied from the Configuration machine and start the node:
symbol-bootstrap start
他のパラメータは必要なく、すでに設定は target
ディレクトリにあり、 Symbol Bootstrap がそれを使用します。
ノードが起動すると多くのデバッグ出力が画面に表示されます。
info Password has been provided
info The generated preset target/preset.yml already exist, ignoring configuration. (run -r to reset or --upgrade to upgrade)
...
これでノードは 稼働中 になり、そのメイン秘密鍵が設定した (オフライン) マシンを離れることはありません。
For added security, you can now turn the node’s main account into a マルチシグアカウント. This is useful, for example, for node providers that work in a non-custodial manner. Read about this process in the 非カストディアルなノードのセットアップ guide.