Entendendo os Masternodes

Os Masternodes, antes exclusivos da rede Dash, estão se tornando populares à medida que a tecnologia é colocada em outros blockchains. Esta seção da documentação descreve os princípios e mecanismos dos masternodes e os serviços que eles fornecem especificamente para a rede do Dash.

Simplificando, um masternode é um servidor com uma cópia completa do blockchain, que garante um determinado nível mínimo de desempenho e funcionalidade para executar determinadas tarefas relacionadas à validação de bloco, bem como PrivateSend e InstantSend, como recursos de anonimato e transação instantânea. no Dash são chamados. Os masternodes são pagos por este serviço, usando um conceito conhecido como Prova de Serviço. Isto é, além da prova de trabalho feita por mineiros para garantir o blockchain. Os Masternodes também podem votar governança e propostas de financiamento, com cada masternode recebendo um voto (sim/não/abstenção) em cada proposta submetida ao sistema.

Qualquer um pode executar um masternode. O objetivo é ter descentralização suficiente para garantir que nenhuma pessoa individual controle uma fração significativa dos masternodes. No entanto, para evitar o inchaço da rede com masternodes desnecessários ou incentivar os operadores imprudentes, há uma condição que precisa ser cumprida: prova de propriedade de 1000 Dash. As moedas não precisam estar no masternode, mas precisam ser mantidas de uma maneira que seja transparente para toda a rede. Se o proprietário move ou gasta essas moedas, o masternode pára de funcionar e o pagamento é interrompido.

Masternodes are paid by the network for the PrivateSend, InstantSend and governance services they provide. 45% of the block reward is paid out to the masternodes, 45% to miners and 10% to the budget. In practice, half of the reward from a normal block goes to the miner and half to the masternode. 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.

Ter tantos servidores mantendo uma cópia completa do blockchain e trabalhando para a moeda pode ser extremamente útil. Graças ao sistema de recompensas, não há risco de não ter masternodes suficientes, e os desenvolvedores podem contar com eles rapidamente implementando qualquer novo recurso descentralizado que desejarem implementar. É aí que reside a verdadeira força do Dash - um sistema incentivado de milhares de servidores distribuídos trabalhando 24x7 significa que o Dash pode escalar com mais eficiência e implantar serviços mais rapidamente do que um blockchain executado inteiramente por voluntários não remunerados. Quanto mais masternodes, melhor e mais segura a rede do Dash.

As of November 2018, the Dash network has over 5000 masternodes located in over 45 countries and hosted on over 140 ISPs. The block reward is approximately 3.34 Dash, so the selected masternode receives 1.67 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.

DIP003 Masternode Changes

Dash 0.13.0 implements DIP003, which introduces several changes to how a Dash masternode is set up and operated. A list of available documentation appears below:

Important concepts and changes:

  • It is possible to upgrade an existing masternode in-place without starting a new server and without moving your 1000 DASH collateral.
  • A masternode was previously «started» using the masternode start-alias command based on a masternode.conf file. Under DIP003, this file is no longer used, and masternodes are «registered» instead of «started». Masternodes begin offering services when a ProRegTx special transaction containing a particular key is written to the blockchain.
  • As before in masternode.conf, 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.
  • The ProRegTx contains 2 Dash addresses (also called public keys) and one BLS public key, which represent 3 different roles in the masternode and define update and voting rights. The keys are:
    1. ownerKeyAddr: This is a Dash address (public key) controlled by the masternode owner. It is different from the address used for the collateral. Because the owner uses the private key associated with this address to issue ProUpRegTx transactions, it must be unique for each masternode.
    2. operatorPubKey: This is the BLS public key of the masternode operator. Only the operator is allowed to issue ProUpServTx transactions. Because the operator key is used during live masternode operation to sign masternode-related P2P messages, quorum-related messages and governance trigger votes, the BLS key must be unique for each masternode.
    3. votingKeyAddr: This is a Dash address (public key) used for proposal voting. Votes signed with this key are valid while the masternode is in the registered set.
  • Masternode payments were previously sent to the address holding the collateral. Under DIP003, the owner should specify a different address to receive payments in the ProRegTx. The owner may optionally specify a non-zero percentage as payment to a separate masternode operator, if applicable.
  • The masternode configuration can later be updated using ProUpServTx, ProUpRegTx and ProUpRevTx transactions. See Updating Masternode Information in DIP003 and Updating Masternode Information in this documentation for more details.
  • All functions related to DIP003 will only take effect once Spork 15 is enabled on the network. Until then, it is necessary to set up the masternode following the old process and then work through the upgrade procedure. In this state, the masternode will continue to function in compatibility mode, and all DIP003 related functions, such as payments to a separate address or percentage payments to operators, will not yet have any effect. The ownerKeyAddr and votingKeyAddr must also be identical until Spork 15 is enabled.

The process of setting up or upgrading a masternode is as follows:

  1. Set up your server and operating system
  2. Install the Dash software and synchronize the blockchain
  3. Generate a BLS key pair and enter the private key on the masternode
  4. Prepare a ProRegTx transaction
  5. Sign the ProRegTx transaction
  6. Submit the signed ProRegTx transaction

Step 1 can be omitted if you have an existing server. Steps 2 and 3 require direct access to the masternode. Steps 3 and 4 require access to a Dash Wallet (or DMT). Step 5 requires access to the wallet actually holding the collateral. Step 6 requires a Dash balance to pay the transaction fee.

Masternodes vs. mineração

Dash, como o Bitcoin e a maioria das outras criptomoedas, é baseado em um registro descentralizado de todas as transações, conhecido como blockchain. Este blockchain é garantido através de um mecanismo de consenso; no caso do Dash e do Bitcoin, o mecanismo de consenso é o Proof of Work (PoW). Mineração tentam resolver problemas difíceis com computadores especializados e, quando resolvem o problema, recebem o direito de adicionar um novo bloco ao blockchain. Se todas as outras pessoas que executam o software concordarem que o problema foi resolvido corretamente, o bloco é adicionado ao blockchain e o minerador é recompensado.

O Dash funciona um pouco diferente do Bitcoin, porque tem uma rede de dois níveis. A segunda camada é acionada por masternodes (Full Nodes), que permitem a privacidade financeira (PrivateSend), transações instantâneas (InstantSend) e o sistema descentralizado de governança e orçamento. Como esse segundo nível é tão importante, os masternodes também são recompensados quando os mineiros descobrem novos blocos. A distribuição é a seguinte: 45% da recompensa em bloco vai para a mineradora, 45% para os masternodes e 10% para o sistema de orçamento (criado por superblocos todos os meses).

O sistema masternode é referido como Prova de Serviço (PoSe), uma vez que os masternodes fornecem serviços cruciais para a rede. De fato, toda a rede é supervisionada pelos masternodes, que têm o poder de rejeitar os blocos mal formados dos mineiros. Se um mineiro tentasse levar a recompensa do bloco inteiro para si ou tentasse executar uma versão antiga do software Dash, a rede masternode ficaria órfã desse bloco, e não seria adicionado ao blockchain.

Em suma, os mineradores tem poder a primeira camada, que é o básico de envio e o recebimento de fundos e prevenção de doublespending. Masternodes tem poder da segunda camada, que fornecem os recursos adicionais que tornam a Dash diferente de outros criptomoedas. E computadores de mineração não podem servir como masternodes. Além disso, cada masternode é «protegido» por 1000 DASH. Essas DASH permaneçam sob o controle exclusivo de seu proprietário em todos os momentos e ainda pode ser gasto livremente. Os fundos não são bloqueados de forma alguma. No entanto, se os fundos são movidos ou gasto, o dono do masternode vai ficar off-line e parar de receber recompensas.

Lógica de pagamento

Masternode paymentss in Dash version 0.13.0 are entirely deterministic and based on a simple list sort algorithm. For documentation of version 0.12.0 payment logic, see the legacy masternode payment documentation. Dash version 0.13.0 implements DIP003 and defines two sets of masternodes.

  1. The full set, which contains all registered masternodes that have not spent their collateral funding transactions.
  2. The valid set, a subset of the full set which contains all masternodes which are not marked as Proof of Service (PoSe) banned.

Each masternode in the set of valid masternodes is identified by the block at which it was last paid. If it has never received payment or was banned for failing to meet the PoSe requirements, then the block at which it was first registered or at which PoSe was restored is used instead. The list is sorted in ascending order, and the first entry is paid. If this results in more than one masternode, then the hash of the masternode ProRegTx is sorted to break the tie.

Seleção de quórum

InstantSend transactions in Dash version 0.13.0 are secured using a consensus of deterministically selected masternodes. This set of masternodes is informally termed a quorum and must be in a majority agreement, at least six out of ten, for a successful lock of the transaction inputs. Multiple quorums are self-selected for each input in an InstantSend transaction using the mathematical distance between the hash of each input and of the set of masternode funding transactions.

Cada masternode que recebe a solicitação de bloqueio de transação do InstantSend compara o hash da transação de financiamento do masternode com o hash da entrada solicitando o bloqueio. Depois de validar as entradas não são gastas, os dez masternodes mais longe deste hash transmitiram sua aceitação da fechadura.

Todas as entradas do InstantSend devem ter pelo menos seis blocos ou a transação será rejeitada.

Requisitos de Masternode

  • 1000 Dash: Indiscutivelmente a parte mais difícil. Dash pode ser obtido em trocas como Poloniex, Bittrex, Kraken e LiveCoin. O serviço da Shapeshift também é um excelente caminho.
  • Um servidor ou VPS executando o Linux: Os guias mais recentes usam o Ubuntu 16.04 LTS. Recomendamos serviços VPS como Vultr e DigitalOcean, embora qualquer provedor decente faça isso. Geralmente, uma instância com especificações de baixa a média serve, embora os requisitos de desempenho aumentem de acordo com esse roteiro.
  • Um endereço IP dedicado: Estes geralmente vêm com o VPS/servidor.
  • Um pouco de tempo e (coração): Masternodes costumava exigir uma configuração complexa, mas ferramentas como o Dashman agora simplificam bastante o processo.

Além do Dash 1000 realizado em garantia, os masternodes também possuem requisitos mínimos de hardware. A partir da versão 12.1, estes requisitos são os seguintes:

  Mínimo Recomendado
CPU 1x 1 GHz 1x 2 GHz
RAM 2 GB 4 GB
Disco 20 GB 40 GB
Network 400 GB/mth 1 TB/mth

O uso de largura de banda da Masternode varia entre 300 e 500 GB por mês e crescerá conforme a rede.

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.