Основы мастернод#

Overview#

Мастерноды когда-то были уникальной особенностью сети Dash, но сейчас приобрели они популярность и в других криптовалютах, так как технология перешла в другие блокчейны посредством форка. Данная документация объясняет принципы и механизмы работы мастернод и той работы, которую они выполняют для сети Dash.

Simply put, a masternode is a server with a full copy of the Dash blockchain, which guarantees a certain minimum level of performance and functionality to perform certain tasks related to block validation, as well as InstantSend and CoinJoin, as the and instant transaction and privacy features in Dash are called. The masternodes are paid for this service, using a concept known as Proof of Service. This is in addition to the Proof of Work done by miners to secure the blockchain. Masternodes are also allowed to vote on governance and funding proposals, with each masternode receiving one vote (yes/no/abstain) on each proposal submitted to the system.

Anyone can run a masternode. The objective is to have enough decentralization to ensure that no single person controls a significant fraction of the masternodes. However, to avoid bloating the network with unnecessary masternodes or encouraging reckless operators, there is one condition that needs to be fulfilled: proof of ownership of DASH collateral. The coins don’t need to be in the masternode, but they need to be kept in a certain way that is transparent to the entire network. If the owner moves or spends those coins, the masternode stops working and payment ceases.

Masternodes are paid by the network for the InstantSend, CoinJoin and governance services they provide. 10% of the block reward goes to the budget with the remaining 90% split between miners and masternodes per this block reward reallocation table. Then, every 16,616 blocks (approximately 30.29 days), a superblock is created that contains the entire 10% payout to the budget proposal winners. Masternodes are selected for payment in each block (approximately every 2.6 minutes) from a deterministic masternode list, and moved to the back of the list after payment. As more masternodes are created, the duration between payments increases. If the collateral behind a masternode is spent, or if a masternode stops providing services to the network for more than one hour, it is removed from the list until normal service resumes. In this way, masternodes are given incentive to provide efficient and reliable services to the network.

Наличие столь большого числа серверов, хранящих полную копию блокчейна и работающих на монету может быть чрезвычайно полезным. Благодаря системе наград, отсутствует риск недостаточного числа мастернод и разработчики, при желении внедрить новые децентрализованные технологий, могут на них полагаться. Именно в этом истинная сила Dash- сеть финансово стимулируемых децентрализованных серверов, работающих 24х7, дающих возможность Dash более эффективно масштабироваться и внедрять функции, чем блокчейны, работающие исключительно на энтузиазме неоплачиваемых добровольцев. Чем больше мастернод, тем лучше и безопаснее сеть Dash.

As of September 2023, the Dash network has almost 3500 masternodes located in 19 countries and hosted on over 140 ISPs. The block reward is approximately 2.310 Dash, so the selected masternode receives 1.344 Dash per payment or approximately 6 Dash per month. The block reward decreases by 7.14% approximately once per year, so the annual earnings for a masternode owner is approximately 7% of the collateral, and will decrease over time as calculated here. See this tool to calculate real-time payment rates, and this site for various real-time statistics on the masternode network.

Эволюционные мастерноды (Эвоноды)#

Evolution Masternodes (evonodes) are a subset of masternodes that have been created to host Dash Platform. An evonode is a lot like a regular masternode with the following differences:

Мастернода

Evonode

Залог

1000 DASH

4000 DASH (4x залог для обычной мастерноды)

Характеристики

Lesser than evonode

Выше, чем у обычных мастернод

Сервисы

Только Dash Core

Как Dash Core, так и Platform

Вес голоса

йъ

Имеет силу голоса в 4 раза чем обычная мастернода

Masternode Concepts#

A list of available documentation appears below:

Important concepts:

  • Masternodes are «registered» and begin offering services when a ProRegTx special transaction containing a particular key is written to the blockchain.

  • The ProRegTx references the transaction id (txid) and index holding the collateral. The IP address and port of the masternode are also defined in this transaction.

  • ProRegTx содержит 2 адреса Dash (которые ещё называют публичными ключами) и один публичный ключ BLS, который представляет 3 различных роли в мастерноде и определяет права на обновление и голосование. Ключами являются:

    1. ownerKeyAddr: Это адрес Dash (публичный ключ), который контролируется владельцем мастерноды. Он отличается от адреса, используемого для хранения залога. Так как владелец использует приватный ключ, который связан с этим адресом для проведения транзакций ProUpRegTx, он должен быть уникальным для каждой мастерноды.

    2. operatorPubKey: Это публичный ключ BLS оператора мастерноды. Только оператору разрешено проводить транзакции ProUpServTx. Поскольку ключ оператора используется во время работы мастерноды в реальном времени для подписи P2P-сообщений, связанных с мастернодой, сообщений о кворуме и триггера голосов управления, ключ BLS должен быть уникальным для каждой мастерноды.

    3. votingKeyAddr: Это адрес Dash (публичный ключ), который используется для голосований по предложениям. Голоса, подписанные соответствующим приватным ключом, действительны, пока мастернода находится в зарегистрированном наборе.

  • Masternode owners should specify an address different from the collateral to receive payments in the ProRegTx. The owner may optionally specify a non-zero percentage as payment to a separate masternode operator, if applicable.

  • Конфигурацию мастерноды можно обновить со временем, используя транзакции ProUpServTx, ProUpRegTx и ProUpRevTx. Для получения более подробных сведений смотрите Обновление информации о мастернодах в DIP003 и Информация по обновлению мастеноды в этой документации.

Процесс настройки или обновления мастерноды заключается в следующем:

  1. Настройте свой сервер и операционную систему

  2. Установите программное обеспечение Dash и синхронизируйте блокчейн

  3. Сгенерируйте пару BLS-ключей и введите приватный ключ для мастерноды

  4. Подготовка транзакции ProRegTx

  5. Подпишите транзакцию ProRegTx

  6. Подтвердите подписанную транзакцию ProRegTx

Шаг 1 можно пропустить, если у вас есть существующий сервер. Шаги 2 и 3 требуют прямого доступа к мастерноде. Для шагов 3 и 4 требуется доступ к кошельку Dash (или DMT). Шаг 5 требует доступа к кошельку, на котором удерживается залог. Шаг 6 требует информации о балансе Dash для оплаты транзакционных комиссий.

Мастерноды и майнинг#

Dash, ровно как Bitcoin и большинство других криптовалют, основывается на технологии распределённого списка транзакций, называемой блокчейном. Блокчейн защищён через механизм консенсуса; в случае Dash и Bitcoin, этот механизм называется Proof of Work (доказательство выполненной работы). При данном консенсусе Miners майнеры пытаются решить сложные криптографические задачи, используя специальное программное обеспечение и/или компьютеры. Когда они решают задачу, то получают право добавить новый блок в блокчейн. Если все остальные люди, у которых запущено соответствующее программное обеспечение, согласны с тем, что задача решена верно, то блок добавляется в блокчейн и майнер получает вознаграждение.

Dash works a little differently from Bitcoin, however, because it has a two-tier network. The second tier is powered by masternodes (Full Nodes), which enable financial privacy (CoinJoin), instant transactions (InstantSend), and the decentralized governance and budget system. Because this second tier is so important, masternodes are also rewarded when miners discover new blocks. The breakdown is as follows: 90% of the block reward is split between the miner and a masternode per the distribution found here, while 10% is reserved for the budget system (created by superblocks every month).

Система мастернод характеризуется концепцией Proof of Service (PoSe) -доказательство службы, поскольку мастерноды предоставляют жизненно важные услуги для сети. Фактически, мастерноды осуществляют наблюдение за работой всей сети и наделены властью отказывать неверно сформированным майнерами блокам. Если бы майнер попытался забрать всю награду за блок себе или запустить старую версию программного обеспечения Dash, то сеть мастернод определила бы его блок как «сиротский» и он не был бы добавлен в блокчейн.

In short, miners power the first tier, which is the basic sending and receiving of funds and prevention of doublespending. Masternodes power the second tier, which provide the added features that make Dash different from other cryptocurrencies. Masternodes do not mine, and mining computers cannot serve as masternodes. Additionally, each masternode is “secured” by DASH collateral. Those DASH remain under the sole control of their owner at all times, and can still be freely spent. The funds are not locked in any way. However, if the funds are moved or spent, the associated masternode will go offline and stop receiving rewards.

Логика выплат#

Since Dash version 0.13.0, masternode payments are entirely deterministic and based on a simple list sort algorithm. Dash version 0.13.0 implemented DIP003 which defines two sets of masternodes.

  1. Полный набор, который содержит все зарегистрированные мастерноды, не потратившие своё залоговое подтверждение.

  2. Допустимый набор является подмножеством полного набора, который содержит все мастерноды, у которых нет метки бана Proof of Service (PoSe).

Каждая мастернода в наборе допустимых мастернод имеет свой ID, присвоенный ей при регистрационной транзакции и ассоциируется с блоком, в котором мастернодой последний раз была получена выплата. Если мастернода ни разу не получала выплату или была заблокирована за несоблюдение требований PoSe, то вместо блока последней выплаты используется блок, в котором мастернода была впервые зарегистрирована или в котором была восстановлена блокирования. Список сортируется в порядке возрастания по высоте блока и хешу ProRegTx (в качестве идентификатора для случаев, когда две мастерноды были зарегистрированы в одном блоке), и выплата отравляется первой записи в нём.

Evonode Payment Logic#

Because the reward distribution percentages are fixed, the number of evonodes is expected to stabilize around a fixed number based on the total number of masternodes (considering the current number of ~3850 Masternodes, ~450 evonodes are expected). This is because if there are more than that fixed number of evonodes, running a regular MN will be more profitable than running an evonode, and hosts will convert their evonodes into MNs.

Evonodes will receive 100% of the fees generated from Platform and 37.5% of the masternode portion of Core block rewards. Regular MNs will receive the remaining 62.5% of the masternode portion of Core block rewards and 0% of Platform fees.

Доказательство предоставления услуги#

Proof of Service (PoSe) is a scoring system used to determine if a masternode is providing network services in good faith. A number of metrics are involved in the calculation, so it is not possible to game the system by causing masternodes to be PoSe banned for failing to respond to ping requests by e.g. a DDoS attack just prior to payment. Each failure to provide service results in an increase in the PoSe score relative to the maximum score, which is equal to the number of registered masternodes. If the score reaches the number of registered masternodes, a PoSe ban is enacted and the masternode must be repaired to ensure it provides reliable service and registered in the list again using a ProUpServTx. The current scoring rules as of Dash 0.14 are:

  • Проблемы при участии в DKG= 66% наказания

  • Каждый последующий блок снижает количество баллов PoSe на 1

Выбор кворума#

In past versions of Dash, quorums of 10 masternodes were formed spontaneously to lock InstantSend transactions. As of Dash 0.14, quorums are deterministically formed, contain more masternodes and remain alive for a longer period of time. While they remain responsible for InstantSend transactions, the locking mechanism has changed to automatically attempt locks on most network transactions according to the requirements described here. Masternodes are now also responsible for more network consensus functions, such as ChainLocks. Masternode quorums are formed through a process of distributed key generation. Failure to participate in DKG will eventually result in a PoSe ban as described above.

Требования к мастернодам#

  • DASH collateral: Hosting a master node requires a large amount of DASH collateral. Arguably the hardest part. Dash can be obtained from exchanges such as Poloniex, Bittrex, Kraken and LiveCoin. Shapeshift’s service is also an excellent way.

  • A server or VPS running Linux: Most recent guides use Ubuntu 20.04 LTS. We recommend VPS services such as Vultr and DigitalOcean, although any decent provider will do. Generally an instance with low to average specifications will do, although performance requirements will increase according to this roadmap.

  • Выделенный IP адрес: обычно они прилагаются к VPS/серверу.

In addition to the DASH held in collateral, masternodes also have minimum hardware requirements. For Dash versions 0.14 and higher, these requirements are as follows:

Минимальные

Рекомендованные

ЦПУ

1x 2 ГГц

2x 2 GHz

Оперативная память

4 GB + 2 GB swap

8 GB + 4 GB swap

Место на жёстком диске

60 GB

80 GB

Сеть

400 Гб/мес

1 Тб/мес

Мастернода передаёт информации порядка 300-500 Гб в месяц и это число будет расти вместе с сетью.

Dash Evolution#

The exact hardware requirements for Dash Evolution masternodes have yet to be determined, although some pointers can be taken from the roadmap and this blog post. It should be possible to run Dash masternodes on normal VPS servers until the block size reaches approximately 20 MB, after which custom hardware such as GPUs and eventually ASICs may be required.