From a5bc40c49a2fb7cefde3404163a7b759636b671c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 9 May 2019 22:16:17 +0200
Subject: [PATCH] added instructions, update genesis

Change-Id: Iadc8ac18d37817d0ebed7480466ba6d46c133574
---
 genesis.json              | 11 -----------
 instructions/README.md    | 34 ++++++++++++++++++++++++++++++++++
 instructions/genesis.json | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 11 deletions(-)
 delete mode 100644 genesis.json
 create mode 100644 instructions/README.md
 create mode 100644 instructions/genesis.json

diff --git a/genesis.json b/genesis.json
deleted file mode 100644
index 54d9a15..0000000
--- a/genesis.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
-    "config": {
-        "chainId": 4226,
-        "homesteadBlock": 0,
-        "eip155Block": 0,
-        "eip158Block": 0
-    },
-    "difficulty": "256",
-    "gasLimit": "134217728",
-    "alloc": {}
-}
\ No newline at end of file
diff --git a/instructions/README.md b/instructions/README.md
new file mode 100644
index 0000000..305e727
--- /dev/null
+++ b/instructions/README.md
@@ -0,0 +1,34 @@
+## Joining the JAMI Private Network
+
+These instructions are valid for OS X and Linux hosts, Windows hosts should check the syntax.
+
+Step 1: Get the latest Go-Ethereum client from https://geth.ethereum.org/downloads/
+Step 2: Unzip the contents of the tar archive above to a location on your computer - for the rest of the guide we assume you are on a Linux machine and you have unzipped the contents to /home/jamichain - you can use a different location, in which case please make sure to use it for the rest of the instruction guide
+Step 3: Copy the geth executable (just a file) to /home/jamichain and delete the tar archive and the left-over directory
+Step 4: Inside /home/jamichain create a folder called data
+Step 5: Copy the genesis.json file from this repository into /home/jamichain
+Step 6: Inside the /home/jamichain run the command ./geth --datadir data/ init genesis.json (if the command fails check that the data folder has been created and that you are allowed to execute geth)
+Step 7: Run the command geth --datadir=/home/jamichain/data --syncmode=full --networkid 1551 --rpc --rpcaddr 0.0.0.0 --rpcapi "eth,net,web3,personal,admin" --bootnodes "enode://11ba6d3bfdc29a8afb24dcfcf9a08c8008005ead62756eadb363523c2ca8b819efbb264053db3d73949f1375bb3f03090f44cacfb88bade38bb6fc2cb3d890a5@173.231.120.228:30301" console
+
+The above steps will allow you to sync with the Jami blockchain in read-only mode (i.e. you cannot mine blocks - however you can submit transactions). 
+
+
+## Running as a SystemD Service
+
+If you want to run the Jami blockchain as a SystemD service, you can use the following example file (call it jami.service in your SystemD script directory):
+
+
+[Unit]
+Description=Geth Node
+[Service]
+Type=simple
+ExecStart=/home/geth/geth --datadir=/home/jamichain/data --syncmode=full --networkid 1551 --rpc --rpcaddr 0.0.0.0 --rpcapi "eth,net,web3,personal,admin" --bootnodes "enode://11ba6d3bfdc29a8afb24dcfcf9a08c8008005ead62756eadb363523c2ca8b819efbb264053db3d73949f1375bb3f03090f44cacfb88bade38bb6fc2cb3d890a5@173.231.120.228:30301"
+Restart=always
+User=geth
+[Install]
+WantedBy=multi-user.target
+
+
+Please note that the --rpc, --rpcaddr and --rcpapi are OPTIONAL. You are welcome not to include them if you do not want to access the node via JSON-RPC.
+  
+
diff --git a/instructions/genesis.json b/instructions/genesis.json
new file mode 100644
index 0000000..9318c52
--- /dev/null
+++ b/instructions/genesis.json
@@ -0,0 +1,35 @@
+{
+    "config": {
+      "chainId": 1551,
+      "homesteadBlock": 1,
+      "eip150Block": 2,
+      "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+      "eip155Block": 3,
+      "eip158Block": 3,
+      "byzantiumBlock": 4,
+      "constantinopleBlock": 5,
+      "clique": {
+        "period": 5,
+        "epoch": 30000
+      }
+    },
+    "nonce": "0x0",
+    "timestamp": "0x5c75cb4c",
+    "extraData": "0x000000000000000000000000000000000000000000000000000000000000000029B5638EB1440f715EB65E6ff1879dCA633A6Adf65FA721fAdfB68ba85e3a5587dfbdbeac9521eD10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+    "gasLimit": "0x47b760",
+    "difficulty": "0x1",
+    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+    "coinbase": "0x0000000000000000000000000000000000000000",
+    "alloc": {
+      "29B5638EB1440f715EB65E6ff1879dCA633A6Adf": {
+        "balance": "0x200000000000000000000000000000000000000000000000000000000000000"
+      },
+      "65FA721fAdfB68ba85e3a5587dfbdbeac9521eD1": {
+        "balance": "0x200000000000000000000000000000000000000000000000000000000000000"
+      }
+    },
+    "number": "0x0",
+    "gasUsed": "0x0",
+    "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
+}
+
-- 
GitLab