-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnu.sh
112 lines (81 loc) · 3.58 KB
/
nu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt update
apt install -y python3 python3-pip libffi-dev python3-dev python3-virtualenv python3-venv python3-dev gcc nodejs python-dev software-properties-common
add-apt-repository -y ppa:ethereum/ethereum
apt-get update
apt-get install -y ethereum
pip install --upgrade setuptools
pip install wheel cytoolz npm
#python3 -m venv ./nucypher-venv
#source nucypher-venv/bin/activate
#pip3 install -U nucypher
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".
#in each screen
source nucypher-venv/bin/activate
geth --goerli --syncmode light
#DETACH CTRL+A+D
screen
source nucypher-venv/bin/activate
geth attach /root/.ethereum/goerli/geth.ipc
personal.newAccount()
personal.newAccount()
eth.accounts
web3.toChecksumAddress(eth.accounts[0])
web3.toChecksumAddress(eth.accounts[1])
eth.syncing
exit
#Staker
#Link for requesting a test ETH https://goerli-faucet.slock.it/
#Link to discord NuCypher-bot https://discord.gg/CmNNFjn
.getfunded <your_eth_checksumaddress>
nucypher stake init-stakeholder --provider ipc:///root/.ethereum/goerli/geth.ipc --network cassandra
nucypher stake create
nucypher stake restake --enable
nucypher stake list
nucypher stake set-worker
#Worker
#install docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
apt update
apt-cache policy docker-ce
apt install docker-ce
systemctl status docker
nucypher ursula init --provider ipc:///root/.ethereum/goerli/geth.ipc --poa --network cassandra --staker-address <your staker address>
nucypher ursula run --interactive
export NUCYPHER_KEYRING_PASSWORD=<YOUR KEYRING_PASSWORD>
export NUCYPHER_WORKER_ETH_PASSWORD=<YOUR WORKER ETH ACCOUNT PASSWORD>
# Interactive Ursula-Worker Initialization
docker run -it -v ~/.ethereum:/root/.ethereum -v ~/.local/share/nucypher:/root/.local/share/nucypher -e NUCYPHER_KEYRING_PASSWORD nucypher:latest nucypher ursula init --provider file:///root/.ethereum/goerli/geth.ipc --staker-address <YOUR STAKING ADDRESS> --network <NETWORK_NAME>
# Daemonized Ursula
docker run -d -v ~/.ethereum:/root/.ethereum -v ~/.local/share/nucypher:/root/.local/share/nucypher -p 9151:9151 -e NUCYPHER_KEYRING_PASSWORD -e NUCYPHER_WORKER_ETH_PASSWORD nucypher/nucypher:latest nucypher ursula run
# https://IP:9151/status
#phase2
nucypher stake restake --disable
nucypher stake windown --enable
nucypher stake list
nucypher stake accounts
geth attach /root/.ethereum/goerli/geth.ipc
eth.accounts
nucypher status stakers --provider ~/.ethereum/goerli/geth.ipc --poa --network cassandra --staking-address 0xfa9a7330cad89ffb6fed36adda7fba19f8a3e927
nucypher stake collect-reward --staking-reward
nucypher stake collect-reward --policy-reward
nucypher stake winddown --disable
nucypher stake divide
nucypher stake prolong
nucypher stake detach-worker
nucypher stake set-worker
nucypher ursula destroy
nucypher ursula init
nucypher ursula run
#phase 3
nucypher status stakers --provider ~/.ethereum/goerli/geth.ipc --poa --network cassandra --staking-address 0xfa9a7330cad89ffb6fed36adda7fba19f8a3e927
#bid status
nucypher worklock status --network cassandra --provider ~/.ethereum/goerli/geth.ipc --poa --bidder-address 0xfa9a7330cad89ffb6fed36adda7fba19f8a3e927
#place bid
nucypher worklock bid --network cassandra --provider ~/.ethereum/goerli/geth.ipc --poa
#claim NU
nucypher worklock claim --network cassandra --provider ~/.ethereum/goerli/geth.ipc --poa
nucypher stake list