Deploy NuCypher’s node in testnet – Natali
NuCypher is not going to hold an ICO or other token sale, instead, the team plans to distribute using the Worklock mechanism, a prerequisite for which at the moment is the creation of a node and the staking of tokens during the year (final details and parameters of the operation of the Worklock will appear later)
And now we will deploy the node in the Gorli-Ethereum testnet, and also stake the test tokens.
The official instructions are here:
Staking Guide
Getting Started guide
We use Ubuntu 18.04 2 CPU, 2 GB RAM, 60 GB SSD
First install everything you need to work:
sudo apt update
sudo apt install python3
sudo apt install libffi-dev
sudo apt install python3-dev
sudo apt install python3-virtualenv
sudo apt-get install python3-venvsudo apt-get install python3-dev
Next, in the working folder, install the virtual environment:
python3 -m venv ./nucypher-venv
Activate it:
source nucypher-venv/bin/activate
Now at the beginning of the command line should appear (nucypher-venv).
Install the packages NuCypher:
pip3 install -U nucypher
If everything was successful, the nucypher – – help command should work correctly.
Next, we will need several active terminals, I use the utility screen
sudo apt install screen
Launch it
screen
And create a new console by pressing ctrl+a and c. View available consoles ctrl+a and w. select console ctrl+a and “console number”.
To work in a virtual environment don’t forget to activate it in each console:
source nucypher-venv/bin/activate
Now we need an Ethereum node in the Görli network, you can use any supported client, we took Geth.
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum
Run a light node (in the main network is recommended to run the full node):
geth --goerli --syncmode light
Wait until it is synchronized to the current block in the network. This node must be constantly synchronized, so we leave it to work in a separate terminal.
In the new terminal, we create two accounts in the Görli network. On one will work our node, the other will stake tokens. If you do not need a node, you can not do the last steps and do not create second account.
geth attach /home/<username>/.ethereum/goerli/geth.ipc
<username> replace with your login name in the system if you root “/home ” need to remove.
>personal.newAccount()
>personal.newAccount()
>eth.accounts
>web3.toChecksumAddress(eth.accounts[0])
>web3.toChecksumAddress(eth.accounts[1])
>exit
For each account we get some ETH for transactions https://goerli-faucet.slock.it/
Next, you need to leave a request to receive test tokens in Discord, simply sending message to the channel #testnet-faucet
.getfunded <your_eth_checksumaddress>
Confirm by sending
.confirm
Go to the terminal. Create new Staker, <your_username> replace with your login name in the system if you root “/home “ need to remove.:
nucypher stake init-stakeholder --provider ipc:///home/<your_username>/.ethereum/goerli/geth.ipc --poa
Initialize staking by specifying the value of tokens and the duration of staking
nucypher stake create
Activate restaking
nucypher stake restake --enable
This is enough to start staking tokens. Next we will run our node, <your_username> replace with your login name in the system if you root “/home “ need to remove, your_stakeraddress is account with tokens.
nucypher ursula init --provider ipc:///home/<your_username>/.ethereum/goerli/geth.ipc --poa --staker-address <your_stakeraddress>
Select the node address, confirm the IP and set the password
Now bond the node with the Staker
nucypher stake set-worker
Run the node
nucypher ursula run --teacher discover.nucypher.network:9151 --interactive
Check the status
Ursula >>> status
You can also view the status of your node in the browser
https://<your_node_ip>:9151/status
Special thanks for help Владимиру Профитову (@VladimirSkalp)
Published at Wed, 16 Oct 2019 21:37:54 +0000
{flickr|100|campaign}
