Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- guide for beta9
- Edited by corsaro (thanks to 5an1ty, savetheworld, punkrock, maciek, sexor and hirish)
- 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.
- $ wget https://downloads.lisk.io/lisk/beta/installLisk.sh
- $ bash installLisk.sh install -r beta -0 yes
- $ sudo ufw allow 5000
- $ sudo ufw allow 5001
- 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)
- 2. Visit http://beta-nano.elevate.sh/ or https://beta-nano.elevate.sh/ if your node supports https
- 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)
- 3. now create a new lisk account on betanet, save the passphrase, get beta-LSK (https://betanet-faucet.lisk.io/) and register a delegate
- 4. get public key of your account from https://betanet-explorer.lisk.io/
- 5. Now to encrypt the passphrase you have 2 solutions:
- A. install npm, n and lisk-commander (first solution to encrypt your passphrase)
- sudo apt-get install npm
- sudo npm i -g npm
- sudo npm install -g n
- sudo n 6.14.1
- sudo npm install lisk-commander@beta -g`
- then type 'lisk' and then type `encrypt passphrase`
- $ lisk
- lisk> encrypt passphrase
- Please enter your secret passphrase: *****
- Please re-enter your secret passphrase: *****
- Please enter your password: ***
- Please re-enter your password: ***
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------+
- ¦ encryptedPassphrase ¦ salt=5426da113a5896f11255f69bb49c49eb&cipherText=947b537de9&iv=67d7344ce8a3b2fc879e316a&tag=dc5db5bfb41a3e968278e99651c68523&version=1 ¦
- +--------------------------------------------------------------------------------------------------------------------------------------------------------------+
- ```
- In the first step, type in your passphrase and then type in the password you want to use for encryption.
- Afterwards you will get an encryptedPassphrase key value pair.
- B. install lisk-nms (second solution to encrypt your passphrase)
- sudo apt-get install npm
- sudo npm i -g npm
- sudo npm install -g n
- sudo n 8.9.0
- sudo npm install -g lisk-nms
- lisk-nms login http://127.0.0.1:5000 . (should get a return true)
- lisk-nms encrypt
- ....then follow promts. Create default password ( for encrypting &^&)
- (save the encrypted key and insert it into the toggle forging later.)
- USAGE
- $ lisk-nms [COMMAND]
- COMMANDS
- encrypt Encrypt passphrase for use on forging nodes
- forging get the forging state of your node
- help display help for lisk-nms
- info get the info of a node
- login Login to a specific node
- status get the status of a node
- toggleforging get the toggleforging of a node
- 6. Now create a JSON object like below:
- {
- "encryptedPassphrase": "salt=5426da113a5896f11255f69bb49c49eb&cipherText=947b537de9&iv=67d7344ce8a3b2fc879e316a&tag=dc5db5bfb41a3e968278e99651c68523&version=1",
- "publicKey": "123a8aac752b37c676b0d46a798f7625e37efa1e96091983274e04ab7aae2"
- }
- Add this JSON object to your config.json under forging.delegates. like the following example:
- "forging": {
- "force": false,
- "delegates": [{
- "encryptedPassphrase": "THE ENCRYPTED SECRET YOU GOT FROM THE OUTPUT OF STEP 5",
- "publicKey": "PUT THE PUBLIC KEY OF YOUR ACCOUNT HERE"
- }],
- "access": {
- "whiteList": [
- "127.0.0.1"
- ]
- }
- },
- 7. to enable forging now you have different methods:
- A) use curl
- 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
- NOTE:
- use 'history -c' to clear bash history
- and 'clear' to clear the terminal
- B) use node and request
- create a config file named toggle_forging.js . (vi toggle_forging.js) paste the below.
- const request = require('request');
- request({
- url: 'http://127.0.0.1:5000/api/node/status/forging',
- method: 'PUT',
- json: {
- forging: true,
- publicKey: 'PUT THE PUBLIC KEY OF YOUR ACCOUNT HERE',
- password: 'THE PASSWORD YOU USED TO ENCRYPT THE SEED AT STEP 5'
- }
- }, function (err, res) {
- console.log('Forging enabling result:', err, res ? res.body : null);
- });
- save it, then:
- sudo npm install request -g
- node toggle_forging.js
- C) use php
- sudo apt-get install php
- sudo apt-get install php-curl
- wget https://raw.githubusercontent.com/S3x0r/Lisk-Enable-Forging/master/forging.php
- type 'nano forging.php' then edit forging.php adding pub key and pass
- then activate forging typing 'php forging.php'
- That's all folks
Add Comment
Please, Sign In to add comment