Skip to content

Commit

Permalink
Merge pull request #48 from OriginTrail/bugfix/data-structure
Browse files Browse the repository at this point in the history
Add instructions for manually updating node configuration
  • Loading branch information
Kuki145 committed Apr 16, 2021
2 parents 6609fe0 + 8403df8 commit 285768e
Show file tree
Hide file tree
Showing 2 changed files with 202 additions and 15 deletions.
215 changes: 201 additions & 14 deletions source/Running-a-Node/updating-from-v4.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
How to update your node to v5.0.0 and enable additional blockchains
===================================================================
How to update your node from v4 to v5 and enable additional blockchains
=======================================================================

This article will guide you through updating your node to version v5.0.0 and enabling additional blockchain integrations.
This article will guide you through updating your node to version v5 and enabling additional blockchain integrations.

⚠️ Before you start ⚠️
------------------------

The OriginTrail v5 release schedule is:

* Testnet v5 update will be launched on **Wednesday, March 17th**
* **Mainnet v5 launch ETA is Tuesday, March 23rd**, after successfully completing and reviewing the testnet update process

**DO NOT ATTEMPT TO UPDATE YOUR NODE TO v5 prior to official releases as the process will fail!**

**Until version 5 is launched on the networks, use these instructions for informational purposes and preparation only.**

Preparing your host machine
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -56,8 +47,202 @@ ou only need to complete the first step ("Backing up your node data") and you ca

.. warning:: **If you do not backup your node it will not be possible to recover your node in case of an error, avoid this step at your own risk**

How to update your node (both testnet and mainnet nodes)
--------------------------------------------------------

How to update your node configuration manually
----------------------------------------------

Open your node configuration file in an editor you're familiar with, for example nano

.. code:: bash
nano .origintrail_noderc
Then apply the following changes:


1. Edit your blockchain section so that it contains an array called "implementations" which contains objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+------------------------------------+-------------------------------------+
| Before | After |
+====================================+=====================================+
| .. code-block:: |.. code-block:: |
| | |
| { | { |
| "blockchain": { | "blockchain": { |
| "rpc_server_url": "...", | "implementations": [ |
| ... | { |
| }, | "rpc_server_url": "...", |
| ... | ... |
| } | } |
| | ] |
| | }, |
| | ... |
| | } |
| | |
+------------------------------------+-------------------------------------+


2. Move your node wallet values inside the blockchain implementation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+--------------------------------------+----------------------------------------------+
| Before | After |
+======================================+==============================================+
| .. code-block:: |.. code-block:: |
| | |
| { | { |
| "blockchain": { | "blockchain": { |
| "rpc_server_url": "...", | "implementations": [ |
| ... | { |
| }, | "rpc_server_url": "...", |
| "node_wallet": "0x123...", | "node_wallet": "0x123...", |
| "node_private_key": "481...", | "node_private_key": "481...", |
| "management_wallet": "0xabc...", | "management_wallet": "0xabc...", |
| ... | ... |
| } | } |
| | ] |
| | }, |
| | ... |
| | } |
| | |
+--------------------------------------+----------------------------------------------+



3. If you have a custom ERC725 identity filepath set, move it also to the blockchain section and rename the parameter to "identity_filepath"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+------------------------------------------------+-----------------------------------------------+
| Before | After |
+================================================+===============================================+
| .. code-block:: |.. code-block:: |
| | |
| { | { |
| "blockchain": { | "blockchain": { |
| "rpc_server_url": "...", | "implementations": [ |
| ... | { |
| }, | "rpc_server_url": "...", |
| "node_wallet": "0x123...", | "node_wallet": "0x123...", |
| "node_private_key": "481...", | "node_private_key": "481...", |
| "management_wallet": "0xabc...", | "management_wallet": "0xabc...", |
| "erc725_identity_filepath": "myid.json", | "identity_filepath": "myid.json", |
| ... | ... |
| } | } |
| | ] |
| | }, |
| | ... |
| | } |
| | |
+------------------------------------------------+-----------------------------------------------+


4. If you have the "id" parameter specified in the "network" section, remove it so that is loaded from the default configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+------------------------------------------------+-----------------------------------------------+
| Before | After |
+================================================+===============================================+
| .. code-block:: |.. code-block:: |
| | |
| { | { |
| "network": { | "network": { |
| "id": "MainnetV4.0", | "remoteWhitelist": [...], |
| "remoteWhitelist": [...], | ... |
| ... | }, |
| }, | ... |
| ... | } |
| } | |
| | |
| | |
+------------------------------------------------+-----------------------------------------------+

5. Add the new necessary fields, "blockchain_title" and "network_id", to the blockchain implementation:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+------------------------------------------------+-----------------------------------------------+
| Before | After (for mainnet) |
+================================================+===============================================+
| .. code-block:: |.. code-block:: |
| | |
| { | { |
| "blockchain": { | "blockchain": { |
| "rpc_server_url": "...", | "blockchain_title": "Ethereum", |
| ... | "network_id": "ethr:mainnet", |
| }, | "implementations": [ |
| "node_wallet": "0x123...", | { |
| "node_private_key": "481...", | "rpc_server_url": "...", |
| "management_wallet": "0xabc...", | "node_wallet": "0x123...", |
| "erc725_identity_filepath": "myid.json", | "node_private_key": "481...", |
| ... | "management_wallet": "0xabc...", |
| } | "identity_filepath": "myid.json", |
| | ... |
| | } |
| | ] |
| | }, |
| | ... |
| | } |
| | |
+------------------------------------------------+-----------------------------------------------+

+------------------------------------------------+-----------------------------------------------+
| Before | After (for testnet) |
+================================================+===============================================+
| .. code-block:: |.. code-block:: |
| | |
| { | { |
| "blockchain": { | "blockchain": { |
| "rpc_server_url": "...", | "blockchain_title": "Ethereum", |
| ... | "network_id": "ethr:rinkeby:1", |
| }, | "implementations": [ |
| "node_wallet": "0x123...", | { |
| "node_private_key": "481...", | "rpc_server_url": "...", |
| "management_wallet": "0xabc...", | "node_wallet": "0x123...", |
| "erc725_identity_filepath": "myid.json", | "node_private_key": "481...", |
| ... | "management_wallet": "0xabc...", |
| } | "identity_filepath": "myid.json", |
| | ... |
| | } |
| | ] |
| | }, |
| | ... |
| | } |
| | |
+------------------------------------------------+-----------------------------------------------+


6. Restart your node and verify update
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Restart your node with the following command so that the changes are loaded into the node:

.. code:: bash
docker restart otnode
After restarting, we recommend observing your node logs with the following command and watching for any errors that show up:

.. code:: bash
docker logs otnode --tail 1000 -f
Once you see a log line stating ``OT Node started`` your node is successfully updated and running on the newest version, congratulations!


In case of any problems or questions, please direct your inquiries to the
`#v5-update OriginTrail Discord channel <https://discord.gg/breb2qx57D>`__ to
get the quickest support by the OriginTrail community and core developers

If you have decided to enable xDAI support, please consult the :ref:`Enabling xDai<Enable XDai>` section to understand the procedure
and how it refers to tokens being used.

Your node identity on Ethereum will not change and there will be no additional transactions (cost) if you update your
configuration with only the Ethereum blockchain enabled. In case of any issues please get in touch via support@origin-trail.com

How to update your node automatically (both testnet and mainnet nodes)
----------------------------------------------------------------------


Step 1: Extract the migration script for updating the node
Expand Down Expand Up @@ -131,6 +316,8 @@ The instructions below explain how to enable the xDai implementation on a mainne
got to the :ref:`Testnet Update steps<Testnet Update>`.


.. _Enable XDai:

MAINNET UPDATE: Enabling xDai on OriginTrail mainnet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Table of Contents
:maxdepth: 10
:caption: Running a node

Running-a-Node/updating-from-v4
Running-a-Node/basic-setup
Running-a-Node/high-availability-setup
Running-a-Node/identity-management
Running-a-Node/backup-and-restore
Running-a-Node/updating-from-v4

.. toctree::
:maxdepth: 10
Expand Down

0 comments on commit 285768e

Please sign in to comment.