Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add dashmate upgrade info #369

Merged
merged 8 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions docs/user/masternodes/dashmate-existing-host.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.. meta::
:description: This guide describes how to set up a Dash evolution masternode.

.. _evonode-upgrade-existing-host:

=========================
Dashmate on existing host
=========================

Set up a dashmate node
----------------------

1. Download and install the `latest dashmate version
<https://github.com/dashpay/platform/releases/latest>`__. For more details, refer to the
:ref:`install instructions <evonode-setup-install-dashmate>`.
2. Set up an evonode::

dashmate setup

1. Select the network type
2. Select ``evolution masternode`` when asked for node type
3. Select ``Yes`` when asked if your masternode is already registered
4. Select ``Yes`` when asked about importing existing data (the data is already present from the "Sync
a full node" steps above)
5. Import your existing masternode's keys
6. Obtain an SSL certificate. See the :ref:`SSL certificates <evonode-ssl-cert>` section for
details.

Stop existing dashd
-------------------

1. Stop your existing dashd process
2. Make sure you do not have any startup schedulers configured to restart dashd (systemd, cron, etc.)

Start dashmate node
-------------------

1. Start the node::

dashmate start

2. Make sure the node works properly by running the following status commands::

dashmate status
dashmate status core
dashmate status platform

Cleanup old dashd data
----------------------

Once you have confirmed everything is operating correctly, remove the old dashd data from your
server to free up storage space.
81 changes: 81 additions & 0 deletions docs/user/masternodes/dashmate-new-host.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. meta::
:description: This guide describes how to set up a Dash evolution masternode.

.. _evonode-upgrade-new-host:

======================
Dashmate on a new host
======================

Setup a new node
----------------

1. :ref:`Set up a new server <server-config>`
2. Download and install the `latest dashmate version
<https://github.com/dashpay/platform/releases/latest>`__. For more details, refer to the
:ref:`install instructions <evonode-setup-install-dashmate>`.

Sync a full node
----------------

To minimize downtime, sync the Core blockchain without interrupting the existing node. The easiest
way to do this is by syncing a full node and then converting it to an evonode.

1. Set up a dashmate full node to sync Core first::

dashmate setup

2. Select the network type and then ``fullnode`` for the node type
3. Enable the indexes required by Platform and then start dashmate to sync::

dashmate config set core.indexes '["tx"]'
dashmate start

4. Make sure Core is syncing::

dashmate status core

Set up an evonode
-----------------

1. Once Core has finished syncing, reset the configuration and services. Use ``--keep-data`` so the
synced data is retained::

dashmate stop
dashmate reset --keep-data --hard

2. Transfer the IP address to the new node. Alternatively, you can use the :ref:`protx
update_service_evo command <dip3-update-service-evonode>` to set a new IP address for your
dashmate-based evonode.
3. Set up an evonode::

dashmate setup

1. Select the network type
2. Select ``evolution masternode`` when asked for node type
3. Select ``Yes`` when asked if your masternode is already registered
4. Select ``No`` when asked about importing existing data (the data is already present from the "Sync
a full node" steps above)
5. Import your existing masternode's keys
6. Obtain an SSL certificate. See the :ref:`SSL certificates <evonode-ssl-cert>` section for
details.

Shutdown existing masternode
----------------------------

1. Shut down your existing server or dashd process
2. If you keep the existing server running, ensure you do not have any startup schedulers configured
(systemd, cron, etc.)

Start dashmate node
-------------------

1. Start the node::

dashmate start

2. Make sure the node works properly by running the following status commands::

dashmate status
dashmate status core
dashmate status platform
93 changes: 93 additions & 0 deletions docs/user/masternodes/dashmate-upgrade-v0_25.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.. meta::
:description: This guide describes how to set up a Dash evolution masternode.

.. _evonode-upgrade-from-dashmate-v0_25:

===========================
Upgrade from dashmate v0.25
===========================

Check your current dashmate version to make sure you are on the right path::

dashmate --version

Install the new dashmate version
--------------------------------

1. Stop dashmate::

dashmate stop

2. Download and install the `latest dashmate version
<https://github.com/dashpay/platform/releases/latest>`__. For more details, refer to the
:ref:`install instructions <evonode-setup-install-dashmate>`.

3. Reset previous services to ensure compatibility with the new version. Use ``--keep-data`` so the
existing blockchain is retained::

dashmate reset --keep-data

.. _evonode-setup-ssl:

Set up SSL certificate
----------------------

There are two ways to set up SSL certificates:

1. Register for the ZeroSSL service and set your API key. Since ZeroSSL provides an API, dashmate
can update your certificates automatically. The free plan only provides 3 free certificates (or 3
renewals of 1 certificate). Other plans require paying with a credit card.
2. Obtain SSL certificates for your IP address using any available provider and upload certificate
files. `SSL Dragon <https://www.ssldragon.com/>`_ and `SuperbitHost
<https://www.superbithost.com/ssl-certificates/>`_ are two options that accept cryptocurrency.

Choose which option works best for you and follow the relevant steps below to configure dashmate
with your certificate.

.. _evonode-setup-ssl-zerossl:

ZeroSSL
~~~~~~~

1. Register on `https://zerossl.com/ <https://zerossl.com/>`_. We recommend not using your personal
email address.
2. Log in and click ``Developer`` on the left sidebar.
3. Copy your ZeroSSL API key. **Do not create a "New certificate".**

.. figure:: img/zerossl-developer-tab.png
:width: 75%

ZeroSSL Developer tab showing the API key

4. Set your ZeroSSL API key in dashmate::

dashmate config set platform.gateway.ssl.enabled true
dashmate config set platform.gateway.ssl.provider zerossl
dashmate config set platform.gateway.ssl.providerConfigs.zerossl.apiKey [YOUR-KEY]
dashmate ssl obtain

.. _evonode-setup-ssl-files:

Files
~~~~~

1. Update the dashmate config::

dashmate config set platform.gateway.ssl.enabled true
dashmate config set platform.gateway.ssl.provider file

2. Copy ``bundle.crt`` and ``private.key`` to the dashmate home directory
``$HOME/.dashmate/mainnet/platform/gateway/ssl``

Start dashmate node
-------------------

1. Start the node::

dashmate start

2. Make sure the node works properly by running the following status commands::

dashmate status
dashmate status core
dashmate status platform
46 changes: 46 additions & 0 deletions docs/user/masternodes/dashmate-upgrade-v1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.. meta::
:description: This guide describes how to set up a Dash evolution masternode.

.. _evonode-upgrade-from-dashmate-v1:

========================
Upgrade from dashmate v1
========================

Check your current dashmate version to make sure you are on the right path::

dashmate --version


Install the new dashmate version
--------------------------------

1. Stop dashmate::

dashmate stop

2. Download and install the `latest dashmate version
<https://github.com/dashpay/platform/releases/latest>`__. For more details, refer to the
:ref:`install instructions <evonode-setup-install-dashmate>`.

3. Reset previous services to ensure compatibility with the new version. Use ``--keep-data`` so the
existing blockchain is retained::

dashmate reset --keep-data

4. Update services::

dashmate update

Start dashmate node
-------------------

1. Start the node::

dashmate start

2. Make sure the node works properly by running the following status commands::

dashmate status
dashmate status core
dashmate status platform
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/user/masternodes/maintenance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ Example::
The masternode is now removed from the PoSe-banned list, and the IP:port
and operator reward addresses are updated.

.. _dip3-update-service-evonode:

ProUpServTx for Evonode
-----------------------

Expand Down
80 changes: 80 additions & 0 deletions docs/user/masternodes/setup-evonode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -551,3 +551,83 @@ external to the wallet::

yjZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN


.. _upgrade-evonode:

Upgrade Core-only evonode
=========================

There are three options to proceed with upgrading an existing Core-only evonode to support Platform.
Please choose one which is suitable for you:

1. Upgrade an existing dashmate node. If you already have a dashmate-based evonode that meets the
:ref:`minimum system requirements <evonode-hardware-reqs-table>`, you just need to update
dashmate and obtain SSL certificates. You can upgrade from :ref:`dashmate v0.25
<evonode-upgrade-from-dashmate-v0_25>` or :ref:`dashmate v1.0 <evonode-upgrade-from-dashmate-v1>`.
2. :ref:`Set up a dashmate node on a new host <evonode-upgrade-new-host>`. If you are running an
evonode with dashd on a host that does not meet the :ref:`minimum system requirements
<evonode-hardware-reqs-table>`, we recommend setting up a new server and migrating your evonode
to it. Consider the following details when evaluating this option:

- You will need to set up a new server and keep the existing and new servers running while Core
is syncing on the new server.
- You must either be able to move your current public IP to the new server or update the IP
address using a :ref:`ProUpServTx <dip3-update-service>` update.
- Your existing node will continue to operate while you set up the new server, so any problems
with the new node will not affect the existing one.
- This is a good opportunity to upgrade the OS and software to current versions.
3. :ref:`Set up a dashmate node on your existing host <evonode-upgrade-existing-host>`. If you
prefer to install dashmate on the same server as your existing node, make sure you have enough
disk space to store two copies of the Core blockchain at the same time during the migration (for
about 10 mins).

Prerequisites
-------------

- ARM64 or x86-64 Linux host (Ubuntu is recommended) that meets the :ref:`minimum requirements
<evonode-hardware-reqs-table>`
- Public IPv4 address
- Network configuration (firewall, security groups) allowing public access to the following TCP
ports:

- 9999/tcp
- 443/tcp
- 26656/tcp
- 80/tcp (if you are going to use ZeroSSL)
- Backup of any existing Dash Core and dashmate configuration data, including private keys
- `ZeroSSL API access key <https://app.zerossl.com/developer>`_ or SSL certificate for the public
IPv4 address (not DNS name)

.. _evonode-ssl-cert:

SSL certificates
----------------

There are two ways to get SSL certificates:

1. Register for the ZeroSSL service and set your API key. Since ZeroSSL provides an API, dashmate
can update your certificates automatically. The free plan only provides 3 free certificates (or 3
renewals of 1 certificate). Other plans require paying with a credit card. You can get an API key
for dashmate by completing the following steps:

- Register on `https://zerossl.com/ <https://zerossl.com/>`_. *We recommend not using your
personal email address.*
- Log in and click ``Developer`` on the left sidebar.
- Copy your ZeroSSL API key to provide to dashmate later. *Do not create a "New certificate".*

.. figure:: img/zerossl-developer-tab.png
:width: 75%

ZeroSSL Developer tab showing the API key

2. Obtain SSL certificates for your IP address using any available provider and upload the
certificate files to your server. `SSL Dragon <https://www.ssldragon.com/>`_ and `SuperbitHost
<https://www.superbithost.com/ssl-certificates/>`_ are two options that accept cryptocurrency.

.. toctree::
:maxdepth: 1

dashmate-upgrade-v0_25
dashmate-upgrade-v1
dashmate-new-host
dashmate-existing-host