Difference between revisions of "Using Custom Node/Gateway Binaries"

From xx network wiki
Jump to navigation Jump to search
m
m
Line 98: Line 98:


<li><p>Reload the systemd service files.</p>
<li><p>Reload the systemd service files.</p>
{{terminal|skin=noborder|text=<span class="noselect">'''$''' </span>sudo systemctl daemon-reexec}}
{{terminal|skin=noborder|text=<span class="noselect">'''$''' </span>sudo systemctl daemon-reload}}
</li>
</li>



Revision as of 22:47, 2 February 2022

Follow the instructions below to upgrade your cMix service file to use a custom hash file.

  1. First, create a file that will contain custom hashes with nano or your favorite text editor.

  2. Next, populate the file with a template that matches below.

  3. Overwrite the template values with correct hashes and paths. Whenever the blockchain indicates your provided hash to be the current hash, the wrapper script will instead use the file at your specified path rather than the file provided from the blockchain. For example,

    When the blockchain reports 0xbff325726f814f76ee6a56a04690841bfe803c18716ed7240320dfd465fd59b8 to be the current gateway binary hash, the wrapper script will now use your custom gateway binary at /tmp/gateway-custom.binary, and does the same for the wrapper script.

  4. Next, the wrapper script config needs to be modified. To do so, open the cMix service file with nano or your favorite text editor.

  5. Add the argument --hash-path /opt/xxnetwork/config/custom_hashes.json to the config with the path pointing to the file from step 1.

  6. Once the change is made, save the file by pressing Ctrl+X and when prompted to save the buffer, press Y. Finally, when prompted with the file name, press Enter.

  7. Reload the systemd service files.

  8. Finally, restart the wrapper script for your changes to take effect.

From now on, any changes made to the custom hash json file will be dynamically loaded without requiring a restart.

Incorrect operation may result in problems with your wrapper script. After making changes to the json file, ensure your wrapper script is operating correctly.