Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c716694
Missing quotation marks in relay topology.json
dostrelith678 Jun 16, 2020
8bd9c18
missing backslashes, removed dollar signs for consistency
dostrelith678 Jun 17, 2020
516800a
correct tx-out-count in *CALCULATE FEE*
dostrelith678 Jun 17, 2020
1710574
typo
dostrelith678 Jun 17, 2020
70a1b4a
adding return address
CarlosLopezDeLara Jun 17, 2020
692382c
Corrected parameter name
bergr01 Jun 17, 2020
a82af1a
fix cli image url
NOCTLJRNE Jun 17, 2020
c540d06
Exercise 1 references setting up a node but currently points to the k…
sionsmith Jun 18, 2020
f276874
Update 080_register_stakepool.md
AskBid Jun 18, 2020
5a69aca
Merge pull request #201 from NOCTLJRNE/patch-1
ArturWieczorek Jun 18, 2020
0c84b71
Merge pull request #197 from DamjanOstrelic/master
ArturWieczorek Jun 18, 2020
6363ef0
Merge pull request #199 from CarlosLopezDeLara/patch-3
ArturWieczorek Jun 18, 2020
1df54e7
Merge pull request #202 from osodevops/oso_fix_page_link_exercise_1
ArturWieczorek Jun 18, 2020
c85e546
Merge pull request #203 from AskBid/patch-1
ArturWieczorek Jun 18, 2020
210464b
Merge pull request #200 from bergr01/patch-6
brunjlar Jun 18, 2020
e669f19
Update README.md
robcohen Jun 19, 2020
fe6f2dd
fix indentation: query utxo to show as code block
CarlosLopezDeLara Jun 19, 2020
a8306e7
Update 030_faucet.md
nilaysaha Jun 20, 2020
826022b
Merge pull request #204 from CarlosLopezDeLara/patch-4
ArturWieczorek Jun 22, 2020
1d95107
Update 081_start_your_nodes.md
CarlosLopezDeLara Jun 22, 2020
b2acabe
Adding `start your nodes` to readme
CarlosLopezDeLara Jun 22, 2020
f37766f
Update Exercise-6-solutions.md
CarlosLopezDeLara Jun 22, 2020
75cee85
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
fa046b7
Update README.md
CarlosLopezDeLara Jun 23, 2020
1450ffe
Merge pull request #212 from CarlosLopezDeLara/patch-7
ArturWieczorek Jun 23, 2020
6553146
Merge pull request #210 from CarlosLopezDeLara/patch-5
ArturWieczorek Jun 23, 2020
97c89ba
Update Exercise-6-solutions.md
CarlosLopezDeLara Jun 23, 2020
4f100ee
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
ea5a2c2
Merge pull request #214 from CarlosLopezDeLara/patch-8
ArturWieczorek Jun 23, 2020
eaf61c4
Merge pull request #211 from CarlosLopezDeLara/patch-6
ArturWieczorek Jun 23, 2020
10c55e9
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
a2e9322
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
8563515
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
cf54efb
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
9699af8
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
6d91b60
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
3561c02
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
ecbfd0e
Update 080_register_stakepool.md
CarlosLopezDeLara Jun 23, 2020
a3e8aee
Fixed a typo
NETZkultur Jun 24, 2020
6ef86d6
Update 000_install.md
CarlosLopezDeLara Jun 24, 2020
a83a164
Update 000_install.md
CarlosLopezDeLara Jun 24, 2020
6bed0f3
Update 000_install.md
CarlosLopezDeLara Jun 24, 2020
8a5f534
Fix link
steakandbake Jun 24, 2020
b9dfad3
Update 080_register_stakepool.md
steakandbake Jun 25, 2020
6549388
Merge pull request #215 from NETZkultur/patch-1
ArturWieczorek Jun 25, 2020
d832436
Merge pull request #217 from steakandbake/steakandbake-patch-1
ArturWieczorek Jun 25, 2020
c0c9227
Update Exercise-5.md
kevinhammond Jun 29, 2020
0a86f2c
Merge pull request #219 from steakandbake/master
kevinhammond Jun 29, 2020
d399ed5
Merge pull request #216 from CarlosLopezDeLara/patch-9
kevinhammond Jun 29, 2020
746c1a8
Merge pull request #213 from CarlosLopezDeLara/metadata
kevinhammond Jun 29, 2020
097c5d4
Merge pull request #206 from nilaysaha/patch-1
kevinhammond Jun 29, 2020
1c9572b
Update 030_faucet.md
kevinhammond Jun 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,28 @@ The current release of tutorials focus on setting up & monitoring the node and u
## Exercises

A set of exercises to help you become familiar with running a stake pool on the Testnet can be found [here](Shelley-testnet/).
```eval_rst
.. toctree::
:maxdepth: 3
:titlesonly:
:hidden:

node-setup/000_AWS.md
node-setup/000_install.md
node-setup/010_getConfigFiles_AND_Connect.md
node-setup/011_cli.md
node-setup/012_understanding-config-files.md
node-setup/020_keys_and_addresses.md
node-setup/030_faucet.md
node-setup/040_transactions.md
node-setup/050_register_key.md
node-setup/060_node_keys.md
node-setup/061_KES_period.md
node-setup/070_core_relay.md
node-setup/080_register_stakepool.md
node-setup/081_start_your_nodes.md
node-setup/090_retire_stakepool.md
node-setup/091_logging.md
node-setup/092_ekg.md
node-setup/093_prometheus.md
```
2 changes: 1 addition & 1 deletion Shelley-testnet/Exercise-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This should be everything that you need to get you up and running.

### Exercises

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.
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.

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

Expand Down
42 changes: 26 additions & 16 deletions Shelley-testnet/Exercise-5.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shelley Stakepool Exercise Sheet 5

LATEST TAG: 1.13.0
LATEST TAG: 1.14.0

## Running a Stake Pool

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

### Exercises

1. Generate a registration certificate for your stake pool:
1. Generate a JSON file containing the _metadata_ for your stake pool, and get the hash:

cardano-cli shelley stake-pool metadata-hash ...

Put the file somewhere accessible, and obtain its URL.

2. Generate a registration certificate for your stake pool:

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

Expand All @@ -59,14 +65,16 @@ Please report any bugs through the cardano-node and cardano-tutorials github rep
If you don’t know what to choose, set the cost to 256 ada,
the margin to 0.07 (i.e. 7%)
and the pledge to 1,000 ada.

You will also need to specify the metadata URL and hash for your pool from Step 1.

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

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

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

cardano-node run ...

5. Advertise that your pool is running.
6. Obtain your stake pool id

cardano-cli shelley stake-pool id ...

If necessary, advertise that your pool is running using the P2P and off-chain registration workarounds that are described in the tutorials.

__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.

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

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

7. Optional Exercise (Easy).
8. Optional Exercise (Easy).

Persuade other Testnet users to delegate to your pool.

8. Optional Exercise (Medium).
9. Optional Exercise (Medium).

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

9. Optional Exercise (Easy).
10. Optional Exercise (Easy).

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

10. Optional Exercise (Easy).
11. Optional Exercise (Easy).

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

11. Optional Exercise (Medium).
12. Optional Exercise (Medium).

Set up two stake pools, each behind its own relay node.
Set up two new stake pools, each behind its own relay node.
Advertise both pools.

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.
Expand Down
2 changes: 1 addition & 1 deletion Shelley-testnet/solutions/Exercise-1-solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ In the `relay/ff-topology.json` we instruct the node to "talk" to the block-pro
{
"Producers": [
{
"addr": x.x.x.x", # Replace with your public IP
"addr": "x.x.x.x", # Replace with your public IP
"port": 3000,
"valency": 1
},
Expand Down
20 changes: 10 additions & 10 deletions Shelley-testnet/solutions/Exercise-2-solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Let's create a second __payment key pair__ and __address__ (You should have crea

**Generate Payment Key Pair**

$ cardano-cli shelley address key-gen \
cardano-cli shelley address key-gen \
--verification-key-file payment2.vkey \
--signing-key-file payment2.skey

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

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**.

$ cardano-cli shelley address build \
cardano-cli shelley address build \
--payment-verification-key-file payment2.vkey \
--stake-verification-key-file stake2.vkey \
--out-file payment2.addr
--out-file payment2.addr \
--testnet-magic 42


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

cardano-cli shelley stake-address build \
--staking-verification-key-file stake2.vkey \
--out-file stake2.addr
--out-file stake2.addr \
--testnet-magic 42


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

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

$ cardano-cli shelley query protocol-parameters \
cardano-cli shelley query protocol-parameters \
--testnet-magic 42 \
--out-file protocol.json

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

$ cardano-cli shelley query utxo \
cardano-cli shelley query utxo \
--address $(cat payment.addr) \
--testnet-magic 42

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

**CALCULATE FEE**

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)
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)

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

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

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

We use the __payment.skey__ to sign the transaction

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

**SUBMIT TRANSACTION**

$ cardano-cli shelley transaction submit \
cardano-cli shelley transaction submit \
--tx-file tx008.signed \
--testnet-magic 42

Expand Down
4 changes: 3 additions & 1 deletion Shelley-testnet/solutions/Exercise-6-solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ GitHub repositories.
--pool-margin 0.03 \
--pool-reward-account-verification-key-file stake2.vkey \
--pool-owner-stake-verification-key-file stake2.vkey \
--out-file pool2.cert
--out-file pool2.cert \
--testnet-magic 42

cardano-cli shelley stake-address registration-certificate \
--stake-verification-key-file stake2.vkey \
Expand Down Expand Up @@ -410,6 +411,7 @@ GitHub repositories.
--pool-reward-account-verification-key-file stake2.vkey \
--pool-owner-stake-verification-key-file stake1.vkey \
--out-file pool1.cert
--testnet-magic 42

Here we have additionally (although this was not required) changed the reward account to `stake2.vkey`,
so the rewards from both our pools will go to the same stake key `stake2.vkey` from now on.
Expand Down
19 changes: 16 additions & 3 deletions node-setup/000_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For Debian/Ubuntu use the following instead:


sudo apt-get update -y
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
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

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.

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

cabal --version

Finally we download and install GHC:
Download and install GHC:

wget https://downloads.haskell.org/~ghc/8.6.5/ghc-8.6.5-x86_64-deb9-linux.tar.xz
tar -xf ghc-8.6.5-x86_64-deb9-linux.tar.xz
Expand All @@ -91,6 +91,19 @@ Finally we download and install GHC:
./configure
sudo make install
cd ..

Install Libsodium

git clone https://github.com/input-output-hk/libsodium
cd libsodium
git checkout 66f017f1
./autogen.sh
./configure
make
sudo make install

export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"


## Download the source code for cardano-node

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

git fetch --all --tags
git tag
git checkout tags/1.13.0
git checkout tags/1.14.0


## Build and install the node
Expand Down
2 changes: 1 addition & 1 deletion node-setup/011_cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ by typing
--cold-signing-key-file cold.skey \
--operational-certificate-issue-counter-file cold.counter

![`cardano-cli` command hierarchy](cli.png)
![`cardano-cli` command hierarchy](011_cli.png)
8 changes: 4 additions & 4 deletions node-setup/020_keys_and_addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ It's content look like this:

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

cat payment.address
cat payment.addr
> 00ec78e3d3916636101f6d9539c451f248ba200f38f2c33129f7ef36d66853603e872296956a4d86

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

and make sure that your node is running. Then use

cardano-cli shelley query utxo \
--address $(cat payment.addr) \
--testnet-magic 42
cardano-cli shelley query utxo \
--address $(cat payment.addr) \
--testnet-magic 42

you should see something like this:

Expand Down
6 changes: 5 additions & 1 deletion node-setup/030_faucet.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ If all goes well, the last line of the output should declare success and say how
* Connection #0 to host faucet.ff.dev.cardano.org left intact
{"success":true,"amount":1000000000,"fee":168141,"txid":"8ed4383f7af20e81c9cef88b8aab0ff2b1b284dff0ed6614480f8dbfec7d6fb5"}


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

export CARDANO_NODE_SOCKET_PATH=~/cardano-node/relay/db/node.socket
Expand All @@ -42,3 +41,8 @@ You should see something like this:
TxHash TxIx Lovelace
----------------------------------------------------------------------------------------
65e99578e91dbf400c42989b5b5ae6dde877510900074f4afd8ff472639da6b3 0 1000000000000

(Please note: although this command usually completes very quickly, under some conditions it could take severl minutes or even hours to complete.)


IMPORTANT: Extra funds can be returned to 00677291d73b71471afa49fe2d20b96f7227b05f863dafe802598964533e0dc3bc0cf7eb8153441db271a2288560378b209014350792f273bdc307f06ca34f0c6f
Loading