叉勺技术#

A multi-phased fork, colloquially known as a “spork”, is a mechanism unique to Dash used to safely deploy new features to the network through network-level variables to avoid the risk of unintended network forking during upgrades. It can also be used to disable certain features if a security vulnerability is discovered - see the features page for a brief introduction to sporks.

Enforcement of spork-controlled code can be activated remotely by members of the core development team signing a network message using a relevant private key. Should problems arise, the code can be deactivated in the same manner, without the need for a network-wide rollback or client update. This documentation describes the meaning of each spork currently existing on the network, and how to check their respective statuses.

Spork 函数#

使用整数值设置Sporks。许多的sporks都可设置特定的新纪元时间(自1970年1月1日起走过的秒数),用作活动时间。启用的sporks设置为0(直至激活前的秒数)。该函数常用于设置未来的spork启用日期,在发生变更之前,一直保持有效。以下为目前网络上存在的sporks及其服务功能:

在 v21.0.0 版本发生变更: Mainnet spork values were hardened by immutably setting them. Sporks continue to be valuable for testing on other networks; however, on mainnet, the risks of maintaining them now outweigh the benefits of retaining them.

SPORK_2_即时发送_已启用

Governs the ability of Dash clients to use InstantSend functionality. InstantSend is described in DIP0010 LLMQ-based InstantSend.

SPORK_3_即时发送_区块_过滤

如果已启用,主节点将拒绝那些含有与已锁定但尚未被证实的即时发送相冲突的区块。

SPORK_9_超级块_已启用

如果已启用,则验证并发布超级块,以支付提案获胜者。

SPORK_17_QUORUM_DKG_ENABLED

激活 DKG process to create LLMQ quorums。激活 DKG 和基于 DKG 的 PoSe 的 Spork 将在 80%的主节点完成v0.14升级后被打开。

SPORK_19_CHAINLOCKS_ENABLED

激活 ChainLocks, 一种杜绝区块链重构事件带来的支付风险的机制。 ChainLocks 被定义于 DIP0008 ChainLocks

SPORK_21_QUORUM_ALL_CONNECTED

Enables connections between all masternodes in a quorum to optimize the signature recovery process.

SPORK_23_QUORUM_POSE

Enforces Proof of Service requirements for masternodes to support a minimum protocol version and maintain open ports.

SPORK_24_TEST_EHF

Supports enhanced hard fork (EHF) testing.

查看spork状态#

The spork show and spork active commands issued in the debug window (or from dash-cli on a masternode) allow you to interact with sporks. You can open the debug window by selecting Window > Console.

../../../_images/dashcore-sporks.png

Dash Core调试控制台输出spork show和spork active#