Electrum SIG File Documentation Guide

Introduction

In order to help convert electrum to ravencoin, we need to document what each file does so that we can reference it in the future. In order to do that we will have a brief overview of the files in our electrum-sig-info repository and more in-depth commenting in the file itself.

If you are unfamiliar with github, there will be a quick guide at the bottom of the page.

Guide

  1. To prevent working over each other, I have created a bare-bones web app for tracking who does what and preventing two people from working on the same file at the same time.

Go to https://rvn4lyfe.com/helpers

Enter your discord tag and choose the file you would like to document.

electrum_client and electrum_server refer to the root of their respective repositories.

This will need to be done before each file you choose to document. This cannot be undone, so contact kralverde#0550 if you wish to remove yourself from taking up a file slot.

If you do not complete your file documentation in two days, it will be opened up for someone else to complete.

  1. Create a fork of

https://github.com/Electrum-RVN-SIG/electrum-sig-info

and

https://github.com/Electrum-RVN-SIG/electrum-ravencoin (client)

or

https://github.com/Electrum-RVN-SIG/electrumx-ravencoin (server)

depending on if you are checking a client or server file

  1. In the electrum client or server repositories, read through your chosen file and make relevant comments if needed.

  1. In the electrum-sig-info repository, find the html file that corresponds with your file and write a brief but descriptive run down on what the file does, and what, if anything, needs to be modified for ravencoin. Please only modify where it asks for your name and the paragraph marker(s). We will modify the files to fit in with the site better in the future.

If there is nothing of relevance in a file (I used a script sorry) just make a note of that in electrum-sig-info and move on.

  1. Make a pull request for each of your forks to merge into the base repository.

  1. Repeat steps 1-5 for more files.

Example

Here is an example for the exchange_rate.py class, which is used to get real time information about fiat comparisons from RVN exchanges.

Client repository comments:

https://github.com/Electrum-RVN-SIG/electrum-ravencoin/commit/6fa7b47c48b8d4cd5138750a86b803c2826bd122

electrum-sig-info file:

https://github.com/Electrum-RVN-SIG/electrum-sig-info/blob/gh-pages/template.html (raw)

https://electrum-rvn-sig.github.io/electrum-sig-info/electrum_client_info/electrum/exchange_rate.html (html)

Raw html files

These have already been auto-generated for each relevant file with the file_name field changed to the file path. If you need the source for whatever reason, here it is:

https://github.com/Electrum-RVN-SIG/electrum-sig-info/blob/gh-pages/template.html (raw)

https://electrum-rvn-sig.github.io/electrum-sig-info/template.html (html)

Github Guide

You will need to create a github account. This guide will assume you have git CLI installed.

Create and Edit a Fork

Log into github

Navigate to the repository you want to fork.

                                                ^ Click this

This will create the fork and redirect you to it.

                                        ^ Click this and copy the website

Open terminal/cmd/whatever cli you use.

cd into a directory to clone your fork into. (I just use my desktop dir.) (I have a messy desktop.)

run $ git clone {url}

Where {url} is from the one you got from the code button.

cd into the directory it makes.

Make the changes you want to.

run $ git add .

                ^

(The period is important)

run $ git commit -m “message”

(e.g. git commit -m “Added commenting to bitcoin.py”)

run $ git push

Input your credentials.

Your changes are now uploaded.

Make a pull request

Log into github.com

If you made changes and uploaded as above, then you can click this ^

Click this ^

All done :)