Skip to content

Commit 849dcc7

Browse files
authored
Merge pull request #1 from input-output-hk/master
Updated docs from base
2 parents 5fc9f40 + 1c9572b commit 849dcc7

14 files changed

+159
-53
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,28 @@ The current release of tutorials focus on setting up & monitoring the node and u
99
## Exercises
1010

1111
A set of exercises to help you become familiar with running a stake pool on the Testnet can be found [here](Shelley-testnet/).
12+
```eval_rst
13+
.. toctree::
14+
:maxdepth: 3
15+
:titlesonly:
16+
:hidden:
17+
18+
node-setup/000_AWS.md
19+
node-setup/000_install.md
20+
node-setup/010_getConfigFiles_AND_Connect.md
21+
node-setup/011_cli.md
22+
node-setup/012_understanding-config-files.md
23+
node-setup/020_keys_and_addresses.md
24+
node-setup/030_faucet.md
25+
node-setup/040_transactions.md
26+
node-setup/050_register_key.md
27+
node-setup/060_node_keys.md
28+
node-setup/061_KES_period.md
29+
node-setup/070_core_relay.md
30+
node-setup/080_register_stakepool.md
31+
node-setup/081_start_your_nodes.md
32+
node-setup/090_retire_stakepool.md
33+
node-setup/091_logging.md
34+
node-setup/092_ekg.md
35+
node-setup/093_prometheus.md
36+
```

Shelley-testnet/Exercise-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This should be everything that you need to get you up and running.
3838

3939
### Exercises
4040

41-
1. Download, Build and Install the Cardano Node Software using the instructions in the [Cardano Tutorial](../node-setup/020_keys_and_addresses.md). You may need to do this repeatedly, so you may want to bookmark the instructions. You will need to use the correctly tagged version at each stage. The most recent tag at the time of writing is 1.13.0.
41+
1. Download, Build and Install the Cardano Node Software using the instructions in the [Cardano Tutorial](../node-setup/000_install.md). You may need to do this repeatedly, so you may want to bookmark the instructions. You will need to use the correctly tagged version at each stage. The most recent tag at the time of writing is 1.13.0.
4242

4343
2. Download the genesis, topology, and configuration files, as described in the tutorial.
4444

Shelley-testnet/Exercise-5.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Shelley Stakepool Exercise Sheet 5
22

3-
LATEST TAG: 1.13.0
3+
LATEST TAG: 1.14.0
44

55
## Running a Stake Pool
66

@@ -43,7 +43,13 @@ Please report any bugs through the cardano-node and cardano-tutorials github rep
4343

4444
### Exercises
4545

46-
1. Generate a registration certificate for your stake pool:
46+
1. Generate a JSON file containing the _metadata_ for your stake pool, and get the hash:
47+
48+
cardano-cli shelley stake-pool metadata-hash ...
49+
50+
Put the file somewhere accessible, and obtain its URL.
51+
52+
2. Generate a registration certificate for your stake pool:
4753

4854
cardano-cli shelley stake-pool registration-certificate ...
4955

@@ -59,14 +65,16 @@ Please report any bugs through the cardano-node and cardano-tutorials github rep
5965
If you don’t know what to choose, set the cost to 256 ada,
6066
the margin to 0.07 (i.e. 7%)
6167
and the pledge to 1,000 ada.
68+
69+
You will also need to specify the metadata URL and hash for your pool from Step 1.
6270

63-
2. Pledge some stake to your stake pool.
71+
3. Pledge some stake to your stake pool.
6472
You do this by creating a delegation certificate (as you did in
6573
[Exercise 4](Exercise-4.md)) that delegates
6674
enough stake from the "owner staking key" specified in the registration certificate
6775
to your own pool to cover your pledge promise.
6876

69-
3. Register the pool online.
77+
4. Register the pool online.
7078
Registration is done by submitting a transaction that contains the
7179
pool registration certificate.
7280
You can include the pledge delegation certificate in the same transaction.
@@ -79,47 +87,49 @@ In addition to the usual transaction fees, you will also have to pay the
7987
Note that this transaction will have to be signed by the payment key,
8088
the cold key and the staking key.
8189

82-
4. Start your stake pool, and link it to the relay node as you did in
90+
5. Start your stake pool, and link it to the relay node as you did in
8391
[Exercise 3](Exercise-3.md).
8492

8593
cardano-node run ...
8694

87-
5. Advertise that your pool is running.
95+
6. Obtain your stake pool id
96+
97+
cardano-cli shelley stake-pool id ...
98+
99+
If necessary, advertise that your pool is running using the P2P and off-chain registration workarounds that are described in the tutorials.
88100

89-
__Note:__ At the time of writing, there is no way to determine your pool id yet. Please use the CBOR-hex from the cold key verification file instead.
90101

91-
6. Check that you are delegating to your own pool,
102+
7. Check that you are delegating to your own pool through the pledge address,
92103
then wait until the following epoch (around 6 hours),
93104
and confirm that your pool is producing blocks by e.g. inspecting the log data.
94105
Also confirm that your pool is receiving the correct rewards.
95106
Congratulations, you are now a fully fledged Shelley Testnet pool operator!
96107

97-
__Note:__ At the time of writing, there is no way to check rewards yet. This feature is coming very soon.
98108

99-
7. Optional Exercise (Easy).
109+
8. Optional Exercise (Easy).
100110

101111
Persuade other Testnet users to delegate to your pool.
102112

103-
8. Optional Exercise (Medium).
113+
9. Optional Exercise (Medium).
104114

105115
Join forces with one or more other Testnet stakepool operators
106116
to run a new stake pool that you jointly own.
107117
What happens if you fail to collectively meet the pledge that you have promised?
108118

109-
9. Optional Exercise (Easy).
119+
10. Optional Exercise (Easy).
110120

111121
Change your pool’s cost, margin and pledge.
112122
What is the effect on the rewards that you receive?
113123
How long does it take for the change to take effect?
114124

115-
10. Optional Exercise (Easy).
125+
11. Optional Exercise (Easy).
116126

117127
Retire (de-register) your original pool, and start a new one with different cost,
118-
margin and pledge. Update your pool advertisement.
128+
margin and pledge. Update your pool advertisement if you need to.
119129

120-
11. Optional Exercise (Medium).
130+
12. Optional Exercise (Medium).
121131

122-
Set up two stake pools, each behind its own relay node.
132+
Set up two new stake pools, each behind its own relay node.
123133
Advertise both pools.
124134

125135
You have now successfully set up and run your own stake pool and learnt the basics of how to manage it. In the final exercises, we will test some operational parameters that are relevant to running a pool and see how to submit more forms of transaction.

Shelley-testnet/solutions/Exercise-1-solutions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ In the `relay/ff-topology.json` we instruct the node to "talk" to the block-pro
194194
{
195195
"Producers": [
196196
{
197-
"addr": x.x.x.x", # Replace with your public IP
197+
"addr": "x.x.x.x", # Replace with your public IP
198198
"port": 3000,
199199
"valency": 1
200200
},

Shelley-testnet/solutions/Exercise-2-solutions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Let's create a second __payment key pair__ and __address__ (You should have crea
3636

3737
**Generate Payment Key Pair**
3838

39-
$ cardano-cli shelley address key-gen \
39+
cardano-cli shelley address key-gen \
4040
--verification-key-file payment2.vkey \
4141
--signing-key-file payment2.skey
4242

@@ -83,10 +83,10 @@ This has created another set of keys, these ones will later allow us to delegate
8383

8484
Now we will use both `payment2.vkey` and `stake2.vkey`to build a **payment address**. This will link our payment address to our **stake keys** and **stake address**.
8585

86-
$ cardano-cli shelley address build \
86+
cardano-cli shelley address build \
8787
--payment-verification-key-file payment2.vkey \
8888
--stake-verification-key-file stake2.vkey \
89-
--out-file payment2.addr
89+
--out-file payment2.addr \
9090
--testnet-magic 42
9191

9292

@@ -96,7 +96,7 @@ And, now generate you stake address. This will collect your rewards from delegat
9696

9797
cardano-cli shelley stake-address build \
9898
--staking-verification-key-file stake2.vkey \
99-
--out-file stake2.addr
99+
--out-file stake2.addr \
100100
--testnet-magic 42
101101

102102

@@ -106,13 +106,13 @@ And, now generate you stake address. This will collect your rewards from delegat
106106

107107
To create our transaction we will need the protocl parameters, so let's query the parameters and save them in `protocol.json`
108108

109-
$ cardano-cli shelley query protocol-parameters \
109+
cardano-cli shelley query protocol-parameters \
110110
--testnet-magic 42 \
111111
--out-file protocol.json
112112

113113
We also need the UTXO details of the __payment.addr__ that will send the funds.
114114

115-
$ cardano-cli shelley query utxo \
115+
cardano-cli shelley query utxo \
116116
--address $(cat payment.addr) \
117117
--testnet-magic 42
118118

@@ -144,7 +144,7 @@ So we are currently on slot 266201, __Let's make our transaction TTL 267500__. W
144144

145145
**CALCULATE FEE**
146146

147-
Our transaction will have 1 input (tx-in-count), the UTXO from our sending address `e757f0...5d8cf` from above, and 2 outputs (tx-in-count), the receiveing address (payment2.addr) and a second ouput to send the change (payment.addr)
147+
Our transaction will have 1 input (tx-in-count), the UTXO from our sending address `e757f0...5d8cf` from above, and 2 outputs (tx-out-count), the receiving address (payment2.addr) and a second ouput to send the change (payment.addr)
148148

149149
$ cardano-cli shelley transaction calculate-min-fee \
150150
--tx-in-count 1 \
@@ -169,7 +169,7 @@ Now we need to make some quick math, lets say we want to send 100 tADA to `payme
169169

170170
Again, you may want to open a text editor to work on building the transaction, and then when it is ready you can go to the CLI
171171

172-
$ cardano-cli shelley transaction build-raw \
172+
cardano-cli shelley transaction build-raw \
173173
--tx-in e757f08b856c5f12d5784f749c4fc2b1fda8b48299b520f29f6055ce94a5d8cf#0 \
174174
--tx-out $(cat payment2.addr)+100000000 \
175175
--tx-out $(cat payment.addr)+499398236348 \
@@ -190,7 +190,7 @@ Again, you may want to open a text editor to work on building the transaction, a
190190

191191
We use the __payment.skey__ to sign the transaction
192192

193-
$ cardano-cli shelley transaction sign \
193+
cardano-cli shelley transaction sign \
194194
--tx-body-file tx008.raw \
195195
--signing-key-file payment.skey \
196196
--testnet-magic 42 \
@@ -199,7 +199,7 @@ We use the __payment.skey__ to sign the transaction
199199

200200
**SUBMIT TRANSACTION**
201201

202-
$ cardano-cli shelley transaction submit \
202+
cardano-cli shelley transaction submit \
203203
--tx-file tx008.signed \
204204
--testnet-magic 42
205205

Shelley-testnet/solutions/Exercise-6-solutions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ GitHub repositories.
285285
--pool-margin 0.03 \
286286
--pool-reward-account-verification-key-file stake2.vkey \
287287
--pool-owner-stake-verification-key-file stake2.vkey \
288-
--out-file pool2.cert
288+
--out-file pool2.cert \
289+
--testnet-magic 42
289290

290291
cardano-cli shelley stake-address registration-certificate \
291292
--stake-verification-key-file stake2.vkey \
@@ -410,6 +411,7 @@ GitHub repositories.
410411
--pool-reward-account-verification-key-file stake2.vkey \
411412
--pool-owner-stake-verification-key-file stake1.vkey \
412413
--out-file pool1.cert
414+
--testnet-magic 42
413415

414416
Here we have additionally (although this was not required) changed the reward account to `stake2.vkey`,
415417
so the rewards from both our pools will go to the same stake key `stake2.vkey` from now on.

node-setup/000_install.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ For Debian/Ubuntu use the following instead:
3636

3737

3838
sudo apt-get update -y
39-
sudo apt-get install build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 -y
39+
sudo apt-get install build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 libtool autoconf -y
4040

4141
If you are using a different flavor of Linux, you will need to use the package manager suitable for your platform instead of `yum` or `apt-get`, and the names of the packages you need to install might differ.
4242

@@ -82,7 +82,7 @@ Above instructions install Cabal version `3.2.0.0`. You can check the version by
8282

8383
cabal --version
8484

85-
Finally we download and install GHC:
85+
Download and install GHC:
8686

8787
wget https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb9-linux.tar.xz
8888
tar -xf ghc-8.6.5-x86_64-deb9-linux.tar.xz
@@ -91,6 +91,19 @@ Finally we download and install GHC:
9191
./configure
9292
sudo make install
9393
cd ..
94+
95+
Install Libsodium
96+
97+
git clone https://github.com/input-output-hk/libsodium
98+
cd libsodium
99+
git checkout 66f017f1
100+
./autogen.sh
101+
./configure
102+
make
103+
sudo make install
104+
105+
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
106+
94107

95108
## Download the source code for cardano-node
96109

@@ -116,7 +129,7 @@ For the FF-testnet, we will use tag `1.13.0`, which we can check out as follows:
116129

117130
git fetch --all --tags
118131
git tag
119-
git checkout tags/1.13.0
132+
git checkout tags/1.14.0
120133

121134

122135
## Build and install the node

node-setup/011_cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ by typing
3333
--cold-signing-key-file cold.skey \
3434
--operational-certificate-issue-counter-file cold.counter
3535

36-
![`cardano-cli` command hierarchy](cli.png)
36+
![`cardano-cli` command hierarchy](011_cli.png)

node-setup/020_keys_and_addresses.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ It's content look like this:
5454

5555
This created the file payment.addr that is already associated with our stake keys:
5656

57-
cat payment.address
57+
cat payment.addr
5858
> 00ec78e3d3916636101f6d9539c451f248ba200f38f2c33129f7ef36d66853603e872296956a4d86
5959

6060
4. To query your address (see the utxo's at that address),
@@ -66,9 +66,9 @@ This created the file payment.addr that is already associated with our stake key
6666

6767
and make sure that your node is running. Then use
6868

69-
cardano-cli shelley query utxo \
70-
--address $(cat payment.addr) \
71-
--testnet-magic 42
69+
cardano-cli shelley query utxo \
70+
--address $(cat payment.addr) \
71+
--testnet-magic 42
7272

7373
you should see something like this:
7474

node-setup/030_faucet.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ If all goes well, the last line of the output should declare success and say how
2525
* Connection #0 to host faucet.ff.dev.cardano.org left intact
2626
{"success":true,"amount":1000000000,"fee":168141,"txid":"8ed4383f7af20e81c9cef88b8aab0ff2b1b284dff0ed6614480f8dbfec7d6fb5"}
2727

28-
2928
Now, check the balance of your address to see if you have got the funds:
3029

3130
export CARDANO_NODE_SOCKET_PATH=~/cardano-node/relay/db/node.socket
@@ -42,3 +41,8 @@ You should see something like this:
4241
TxHash TxIx Lovelace
4342
----------------------------------------------------------------------------------------
4443
65e99578e91dbf400c42989b5b5ae6dde877510900074f4afd8ff472639da6b3 0 1000000000000
44+
45+
(Please note: although this command usually completes very quickly, under some conditions it could take severl minutes or even hours to complete.)
46+
47+
48+
IMPORTANT: Extra funds can be returned to 00677291d73b71471afa49fe2d20b96f7227b05f863dafe802598964533e0dc3bc0cf7eb8153441db271a2288560378b209014350792f273bdc307f06ca34f0c6f

0 commit comments

Comments
 (0)