维护

主节点需要定期维护,以确保您不会从支付队列中退出。这包括及时安装达世币的更新版本,以及保持服务器的安全性和性能。此外,主节点应该对提案进行投票,并为了网络的利益和他们所持有的达世币的价值而执行其他任务。

Masternode Software Update

The Dash Core software requires regular updates in order to remain consistent with the current network consensus. Depending on whether you installed Dash manually or using dashman, you must follow the procedure appropriate for your masternode, as described below.

Option 1: Updating from dashman

若要使用Dashman更新达世币,请登录到您的服务器并输入以下命令:

~/dashman/dashman sync
~/dashman/dashman update

检查您的主节点的状态:

~/dashman/dashman status

The Dash software on the masternode is now updated.

方法2: 手动更新

To update Dash manually, log in to your server using ssh or PuTTY. If your crontab contains an entry to automatically restart dashd, invoke crontab -e and comment out the appropriate line by adding the # character. It should look something like this:

# * * * * * pidof dashd || ~/.dashcore/dashd

Then stop Dash running:

~/.dashcore/dash-cli stop

Visit the GitHub releases page and copy the link to the latest x86_64-linux-gnu version. Go back to your terminal window and enter the following command, pasting in the address to the latest version of Dash Core by right clicking or pressing Ctrl + V:

cd /tmp
wget https://github.com/dashpay/dash/releases/download/v0.13.0.0-rc10/dashcore-0.13.0.0-rc10-x86_64-linux-gnu.tar.gz

Verify the integrity of your download by running the following command and comparing the output against the value for the file as shown in the SHA256SUMS.asc file:

sha256sum dashcore-0.13.0.0-rc10-x86_64-linux-gnu.tar.gz

Extract the compressed archive and copy the new files to the directory:

tar xfv dashcore-0.13.0.0-rc10-x86_64-linux-gnu.tar.gz
cp -f dashcore-0.13.0/bin/dashd ~/.dashcore/
cp -f dashcore-0.13.0/bin/dash-cli ~/.dashcore/

重新启动达世币:

~/.dashcore/dashd

您将看到一条消息,上面写着 “Dash Core服务器激活” 。我们现在将更新Sentinel:

cd ~/.dashcore/sentinel/
git checkout master
git pull

Finally, uncomment the line to automatically restart Dash in your crontab by invoking crontab -e again and deleting the # character.

The Dash software on the masternode is now updated.

Updating Masternode Information

Periodically, it may be necessary to update masternode information if any information relating to the owner or operator changes. Examples may include a change in IP address, change in owner/operator payout address, or change in percentage of the reward allocated to an operator. It is also possible to revoke a masternode’s registered status (in the event of a security breach, for example) to force both owner and operator to update their details.

ProUpServTx

A Provider Update Service Transaction (ProUpServTx) is used to update information relating to the operator. An operator can update the IP address and port fields of a masternode entry. If a non-zero operatorReward was set in the initial ProRegTx, the operator may also set the scriptOperatorPayout field in the ProUpServTx. If scriptOperatorPayout is not set and operatorReward is non-zero, the owner gets the full masternode reward. The ProUpServTx takes the following syntax:

protx update_service proTxHash ipAndPort operatorKey (operatorPayoutAddress feeSoureceAddress)

Where:

  • proTxHash: The hash of the initial ProRegTx
  • ipAndPort: IP and port in the form “ip:port”
  • operatorKey: The operator BLS private key associated with the registered operator public key
  • operatorPayoutAddress (optional): The address used for operator reward payments. Only allowed when the ProRegTx had a non-zero operatorReward value.
  • feeSourceAddress (optional): An address used to fund ProTx fee. operatorPayoutAddress will be used if not specified.

Example:

protx update_service d6ec9a03e1251ac8c34178f47b6d763dc4ea6d96fd6eddb3c7aae2359e0f474a 140.82.59.51:10002 4308daa8de099d3d5f81694f6b618381e04311b9e0345b4f8b025392c33b0696 yf6Cj6VcCfDxU5yweAT3NKKvm278rVbkhu

fad61c5f21cf3c0832f782c1444d3d2e2a8dbff39c5925c38033730e64ecc598

The masternode is now removed from the PoSe-banned list, and the IP:port and operator reward addresses are updated.

ProUpRegTx

A Provider Update Registrar Transaction (ProUpRegTx) is used to update information relating to the owner. An owner can update the operator’s BLS public key (e.g. to nominate a new operator), the voting address and their own payout address. The ProUpRegTx takes the following syntax:

protx update_registrar proTxHash operatorKeyAddr votingKeyAddr payoutAddress (feeSourceAddress)

Where:

  • proTxHash: The transaction id of the initial ProRegTx
  • operatorKeyAddr: An updated BLS public key, or 0 to use the last on-chain operator key
  • votingKeyAddr: An updated voting key address, or 0 to use the last on-chain operator key
  • payoutAddress: An updated Dash address for owner payments, or 0 to use the last on-chain operator key
  • feeSourceAddress (optional): An address used to fund ProTx fee. PayoutAddress will be used if not specified.

Example to update payout address:

protx update_registrar cedce432ebabc9366f5eb1e3abc219558de9fbd2530a13589b698e4bf917b8ae 0 0 yi5kVoPQQ8xaVoriytJFzpvKomAQxg6zea

ProUpRevTx

A Provider Update Revocation Transaction (ProUpRevTx) is used by the operator to terminate service or signal the owner that a new BLS key is required. It will immediately put the masternode in the PoSe-banned state. The owner must then issue a ProUpRegTx to set a new operator key. After the ProUpRegTx is mined to a block, the new operator must issue a ProUpServTx to update the service-related metadata and clear the PoSe- banned state (revive the masternode). The ProUpRevTx takes the following syntax:

protx revoke proTxHash operatorKey (reason feeSourceAddress)

Where:

  • proTxHash: The transaction id of the initial ProRegTx
  • operatorKey: The operator BLS private key associated with the registered operator public key
  • reason (optional): Integer value indicating the revocation reason
  • feeSourceAddress (optional): An address used to fund ProTx fee. operatorPayoutAddress will be used if not specified.

Example:

protx revoke 9f5ec7540baeefc4b7581d88d236792851f26b4b754684a31ee35d09bdfb7fb6 565950700d7bdc6a9dbc9963920bc756551b02de6e4711eff9ba6d4af59c0101

DashCentral 投票,验证和监测

DashCentral是由社区成员Rango管理的以支持社区为主的网站。它已成为一个 事实上的 网站,用来讨论预算提案,以方便从图形用户界面投票,但它也提供了监测主节点的功能。

将您的主节点添加到DashCentral

Dashcentral允许您在浏览器的舒适环境下对提案进行投票。在完成 注册后,转到 主节点 页面并单击 现在添加主节点 按钮。在以下屏幕上输入您的钱包地址:

../_images/maintenance-dc-add-masternode.png

向DashCentral添加一个主节点

单击 添加主节点 。您的主节点现在已经被添加到DashCentral。

从DashCentral启用投票

投票私钥 下单击 编辑 来输入您的主节点私钥,以便通过DashCentral 网站界面进行投票。输入投票密码(与登录密码不同,但同样重要需要记住!),并在以下屏幕上输入私钥(在主节点上的dash.conf文件中使用的相同的密钥):

../_images/maintenance-dc-add-privkey.png

将投票私钥添加到DashCentra

需要注意的是,激活您的主节点的私钥与存储1000个达世币的钱包地址的私钥无关。这些密钥可用于代表主节点发送命令,如投票,但不能用于获取保证金。这些密钥在您的设备上是被加密的,且从未以纯文本形式存储在DashCentral服务器上。一旦您输入了密钥,单击 在服务器上存储加密的投票私钥 。您现在可以从DashCentral 网站界面对提案进行投票。

验证所有权

您也可以从您的地址发出一条消息来验证您的主节点对DashCentral的所有权。在 所有权 下单击 未验证 ,将出现以下屏幕:

../_images/maintenance-dc-verify.png

验证您的主节点对DashCentral的所有权

有关如何使用软件钱包保证金地址的说明将会显示出来。如果您正在使用除Trezor以外的硬件钱包,您则需要使用DMT应用程序对地址进行签名。如果您正在使用Trezor硬件钱包,转到您的Trezor wallet,复制钱包地址,然后单击 签名和验证 。以下屏幕将会出现,您可以在其中输入DashCentral提供的信息和您希望签名的地址:

../_images/maintenance-dc-sign.png

从Trezor钱包签名信息

单击 签名 ,在您的Trezor设备上确认并输入您的PIN码来签名该信息。信息签名将出现在 签名 框中。复制此签名并将其粘贴到DashCentral上的方框中,并单击 验证所有权 。验证工作现已完成。

../_images/maintenance-dc-verified.png

主节点所有权已被成功验证

安装DashCentral监测脚本

DashCentral提供一项监测您的主节点的服务,它会在系统崩溃时自动重新启动dashd,并在发生错误时发送电子邮件。转到 账户设置 页面,并生成一个新的API密钥,必要时向您的帐户添加一个PIN码。滚动到以下屏幕:

../_images/maintenance-dc-monitoring.png

设置DashCentral监测脚本

右键单击并选择 复制链接地址 将链接复制到DashCentral脚本的当前版本。打开PuTTY并连接到您的主节点,然后键入:

wget https://www.dashcentral.org/downloads/dashcentral-updater-v6.tgz

必要时用当前版本的DashCentral更新程序替换链接。使用以下命令解压压缩的归档文件:

tar xvzf dashcentral-updater-v6.tgz

通过键入查看您的主节点配置的详细信息:

cat .dashcore/dash.conf

复制 rpcuserrpcpassword 的值。然后通过键入来编辑DashCentral配置:

nano dashcentral-updater/dashcentral.conf

根据您的系统替换 api_key、您的主节点的钱包地址、 rpc_userrpc_passworddaemon_binarydaemon_datadir 的值。在常见的配置中, lwhite 是Linux用户的名称,可能如下所示:

../_images/maintenance-dc-update-config.png

DashCentral更新程序配置文件

################
# dashcentral-updater configuration
################

our %settings = (
    # Enter your DashCentral api key here
    'api_key' => 'api_key_from_dashcentral'
);

our %masternodes = (
    'masternode_collateral_address' => {
        'rpc_host'           => 'localhost',
        'rpc_port'           => 9998,
        'rpc_user'           => 'rpc_user_from_dash.conf',
        'rpc_password'       => 'rpc_password_from_dash.conf',
        'daemon_autorestart' => 'enabled',
        'daemon_binary'      => '/home/<username>/.dashcore/dashd',
        'daemon_datadir'     => '/home/<username>/.dashcore'
    }
);

Ctrl + X 退出,确认您想要使用 Y ** 保存,然后按下 **Enter 键。通过运行DashCentral脚本测试您的配置,然后查看网站。如果测试成功,您会看到更新已被发送:

dashcentral-updater/dcupdater
../_images/maintenance-dc-update.png

手动测试DashCentral更新程序

../_images/maintenance-dc-success.png

DashCentral更新程序已成功地将数据发送到DashCentral站点

一旦您验证了您的配置有效,我们就可以在您的系统上编辑crontab,以便将dcudater脚本安排为每2分钟运行一次。这允许系统在发生故障时为您提供早期警告,甚至会在dashd守护进程挂起或崩溃将其重新启动。这是一个有效的方法,以确保您不会从支付队列中掉线。键入以下命令:

crontab -e

如有必要,请选择编辑器,并在sentinel行后面添加以下行到crontab中,将lWhite替换为您在系统上的用户名:

*/2 * * * * /home/lwhite/dashcentral-updater/dcupdater
../_images/maintenance-dc-crontab.png

编辑crontab以自动运行DashCentral更新程序

Ctrl + X 退出,确认您想要使用 Y 保存,然后按下 Enter 键。现在,dcupdater脚本将每两分钟运行一次,并在必要时重新启动dashd,在发生错误时给您发送电子邮件。

主节点监测工具

几个由社区成员操作的站点可用于监测与主节点网络有关的关键信息和统计数据。

区块浏览器

由于达世币是一个公有区块链,所以可以使用区块浏览器查看任何达世币钱包地址的余额,以及检查在任何给定块中输入的交易。每个唯一的交易也可以通过txid进行搜索。可以使用多种不同区块浏览器查看达世币网络。

达世币主节点工具

https://github.com/Bertrand256/dash-masternode-tool

由社区成员Bertrand256编写和维护的Dash Masterode工具(DMT)允许您从所有主要硬件钱包,如Trezor、Ledger和KeepKey,激活主节点。它还有在不影响保证金的情况下对提案进行投票和提取主节点区块奖励。

DASH Ninja

https://www.dashninja.pl

由论坛成员和Dash Core开发人员elbereth运营的DASH Ninja提供了关于在主节点网络中采用不同版本达世币的关键统计数据。它还提供了多个如监测达世币管理、主节点奖励时间和主节点地理分布的功能,以及提供了一个简单的区块链浏览器。

DashCentral

https://www.dashcentral.org

由论坛成员Rango运营的DashCentral,提供了一种高级服务,通过先进的网络界面监测主节点并就预算提案进行投票。也可下载 Android app应用 。

Masternode.me

https://stats.masternode.me

由论坛成员和Dash Core开发人员moocowmoo运营的Masternode.me,提供了关于价格、生成速率、区块链信息和一些主节点信息的顺序报告。

达世币主节点信息

http://178.254.23.111/~pub/Dash/Dash_Info.html

由论坛成员和Dash Core 开发人员 Corning运营的网站,提供了达世币主节点网络的许多关键统计信息的可视化表示,包括总主节点数关于时间、价格信息和网络分布的图表。