View difference between Paste ID: nmgtawca and fuunc0fC
SHOW: | | - or go back to the newest paste.
1
guide for beta9
2
Edited by corsaro (thanks to 5an1ty, savetheworld, punkrock, maciek, sexor and hirish)
3
4
5
6
1. set up a beta-node and make sure it's in sync with the betanet. open ports 5000 and 5001 and, if used, the https-port you are using.
7
 
8
 $ wget https://downloads.lisk.io/lisk/beta/installLisk.sh
9
 $ bash installLisk.sh install -r beta -0 yes
10
 $ sudo ufw allow 5000
11
 $ sudo ufw allow 5001
12
 
13
 1.1 Go to you config.json and make the API public by chanign "false" to "true", save the file and reload the client (bash lisk.sh reload)
14
 
15
2. Visit http://beta-nano.elevate.sh/ or https://beta-nano.elevate.sh/ if your node supports https
16
2.1 Chose "Custom node" and enter the URL of your node. For example: http://YOUR.IP.ADD.RESS:5000 or https://YOUR.IP.ADD.RESS:2443 (if your https-port is 2443)
17
 
18
3. now create a new lisk account on betanet, save the passphrase, get beta-LSK (https://betanet-faucet.lisk.io/) and register a delegate
19
4. get public key of your account from https://betanet-explorer.lisk.io/
20
21
5. Now to encrypt the passphrase you have 2 solutions:
22
23
24-
A. install npm, n and lisk-commander (to encrypt your passphrase)
24+
A. install npm, n and lisk-commander (first solution to encrypt your passphrase)
25
26
sudo apt-get install npm
27
sudo npm i -g npm
28
sudo npm install -g n
29
sudo n 6.14.1
30
sudo npm install lisk-commander@beta -g`
31
then type 'lisk' and then type `encrypt passphrase`
32
33
 
34
$ lisk
35
lisk> encrypt passphrase
36
Please enter your secret passphrase: *****
37
Please re-enter your secret passphrase: *****
38
Please enter your password: ***
39
Please re-enter your password: ***
40
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
41
¦ encryptedPassphrase ¦ salt=5426da113a5896f11255f69bb49c49eb&cipherText=947b537de9&iv=67d7344ce8a3b2fc879e316a&tag=dc5db5bfb41a3e968278e99651c68523&version=1 ¦
42
+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
43
44
```
45
46
47
In the first step, type in your passphrase and then type in the password you want to use for encryption.
48
Afterwards you will get an encryptedPassphrase key value pair.
49
50-
B. install lisk-nms (to encrypt your passphrase)
50+
51
B. install lisk-nms (second solution to encrypt your passphrase)
52
53
sudo apt-get install npm
54
sudo npm i -g npm
55
sudo npm install -g n
56
sudo n 8.9.0
57
58
sudo npm install -g lisk-nms
59
60
 
61
lisk-nms login http://127.0.0.1:5000 . (should get a return true)
62
 
63
lisk-nms encrypt
64
 
65
....then follow promts.  Create default password ( for encrypting &^&)
66
 (save the encrypted key and insert it into the toggle forging later.)
67
68
 
69
 USAGE
70
  $ lisk-nms [COMMAND]
71
72
COMMANDS
73
  encrypt        Encrypt passphrase for use on forging nodes
74
  forging        get the forging state of your node
75
  help           display help for lisk-nms
76
  info           get the info of a node
77
  login          Login to a specific node
78
  status         get the status of a node
79
  toggleforging  get the toggleforging of a node
80
81
82
83
84
85
6. Now create a JSON object like below:
86
87
88
{
89
"encryptedPassphrase": "salt=5426da113a5896f11255f69bb49c49eb&cipherText=947b537de9&iv=67d7344ce8a3b2fc879e316a&tag=dc5db5bfb41a3e968278e99651c68523&version=1",
90
"publicKey": "123a8aac752b37c676b0d46a798f7625e37efa1e96091983274e04ab7aae2"
91
}
92
93
94
95
Add this JSON object to your config.json under forging.delegates. like the following example:
96
97
98
"forging": {
99
  "force": false,
100
  "delegates": [{
101
                "encryptedPassphrase": "THE ENCRYPTED SECRET YOU GOT FROM THE OUTPUT OF STEP 5",
102
                "publicKey": "PUT THE PUBLIC KEY OF YOUR ACCOUNT HERE"
103
            }],
104
    "access": {
105
            "whiteList": [
106
                "127.0.0.1"
107
           ]
108
        }
109
    },
110
111
112
113
114
7. to enable forging now you have different methods:
115
116
117
118
119
A) use curl
120
121
curl -k -H "Content-Type: application/json" -X PUT -d '{"password":"THE PASSWORD YOU USED TO ENCRYPT THE SEED AT STEP 5", "forging": true, "publicKey":"PUT THE PUBLIC KEY OF YOUR ACCOUNT HERE"}' http://localhost:5000/api/node/status/forging
122
123
124
NOTE:
125
use 'history -c'  to clear bash history
126
and 'clear' to clear the terminal
127
128
129
B) use node and request
130
131
create a config file named toggle_forging.js .  (vi  toggle_forging.js) paste the below.
132
 
133
134
135
136
const request = require('request');
137
 
138
 request({
139
        url: 'http://127.0.0.1:5000/api/node/status/forging',
140
        method: 'PUT',
141
        json: {
142
  forging: true,
143
                publicKey: 'PUT THE PUBLIC KEY OF YOUR ACCOUNT HERE',
144
                password: 'THE PASSWORD YOU USED TO ENCRYPT THE SEED AT STEP 5'
145
        }
146
 }, function (err, res) {
147
        console.log('Forging enabling result:', err, res ? res.body : null);
148
 });
149
 
150
151
152
153
save it, then:
154
 
155
 
156
sudo npm install request -g
157
node toggle_forging.js
158
159
160
161
162
C) use php
163
164
sudo apt-get install php
165
sudo apt-get install php-curl
166
wget https://raw.githubusercontent.com/S3x0r/Lisk-Enable-Forging/master/forging.php
167
type 'nano forging.php' then edit forging.php adding pub key and pass
168
then activate forging typing 'php forging.php'
169
170
171
172
That's all folks