Skip to content

Commit

Permalink
Update query tipe JSON in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Apr 12, 2021
1 parent 9af6ed7 commit b4c3a96
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 28 deletions.
13 changes: 7 additions & 6 deletions doc/reference/building-and-signing-tx.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,16 @@ When building and submitting a transaction in the shelley era you need to check
Look for the value of `SlotNo`

{
"blockNo": 16829,
"headerHash": "3e6f59b10d605e7f59ba8383cb0ddcd42480ddcc0a85d41bad1e4648eb5465ad",
"slotNo": 369200
"epoch": 259,
"hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
"slot": 26633911,
"block": 5580350
}

Therefore, if N = 200 slots

invalid-hereafter = 369200 + 200
invalid-hereafter = 369400
invalid-hereafter = 26633911 + 200
invalid-hereafter = 26634111

**Build the transaction**

Expand All @@ -85,7 +86,7 @@ This time we include all the paramenters:
--tx-in 4e3a6e7fdcb0d0efa17bf79c13aed2b4cb9baf37fb1aa2e39553d5bd720c5c99#4 \
--tx-out $(cat payment2.addr)+100000000 \
--tx-out $(cat payment.addr)+999899832035 \
--invalid-hereafter 369400 \
--invalid-hereafter 26634111 \
--fee 167965 \
--out-file tx.raw

Expand Down
7 changes: 4 additions & 3 deletions doc/stake-pool-operations/KES_period.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ We check the current tip of the blockchain:
cardano-cli query tip --mainnet

{
"blockNo": 36914,
"headerHash": "58df595137e71c0fa65edc99add11704b00e5f163475bd804e4bd59c126bfc9b",
"slotNo": 8520857
"epoch": 259,
"hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
"slot": 26633911,
"block": 5580350
}

In this example, we are currently in slot 8520857, and we know from the genesis file that one period lasts for 129600 slots. So we calculate the current period by
Expand Down
17 changes: 9 additions & 8 deletions doc/stake-pool-operations/getConfigFiles_AND_Connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ To start a passive node:

**Replace x.x.x.x with your public IP and indicate the correct paths to the required files.**

Many commands relay on the environment variable CARDANO_NODE_SOCKET_PATH:
Many commands rely on the environment variable CARDANO_NODE_SOCKET_PATH:

export CARDANO_NODE_SOCKET_PATH=path/to/db/node.socket

Check that the node is syncing by fetching the current tip. When syncing slotNo should be increasing.
Check that the node is syncing by fetching the current tip. When syncing `slot` should be increasing.

cardano-cli query tip --mainnet
cardano-cli query tip --mainnet

{
"blockNo": 36322,
"headerHash": "3f1bea22be21452415851ae670f4bac9340471cb7f2f6a664fac56d7f60dbaad",
"slotNo": 888561
}
{
"epoch": 259,
"hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
"slot": 26633911,
"block": 5580350
}

**Note**`--mainnet` identifies the Cardano mainnet, for testnets use `--testnet-magic 1097911063` instead.
15 changes: 8 additions & 7 deletions doc/stake-pool-operations/node_keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,24 @@ Then we need the current tip of the blockchain:

cardano-cli query tip --mainnet
{
"blockNo": 36929,
"headerHash": "44c2a2be237ea485c15bf2a50c12b4d2aabe6d4233cb1b2131efc080615a17d0",
"slotNo": 906528
"epoch": 259,
"hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
"slot": 26633911,
"block": 5580350
}

Look for Tip `slotNo` value. In this example we are on slot 906528. So we have KES period is 251:
Look for tip `slot` value. In this example we are on slot 26633911. So we have KES period is 7398:

expr 906528 / 3600
> 251
expr 26633911 / 3600
> 7398

To generate the certificate:

cardano-cli node issue-op-cert \
--kes-verification-key-file kes.vkey \
--cold-signing-key-file cold.skey \
--operational-certificate-issue-counter cold.counter \
--kes-period 251 \
--kes-period 7398 \
--out-file node.cert

#### Move the cold keys to secure storage and remove them from your local machine.
Expand Down
9 changes: 5 additions & 4 deletions doc/stake-pool-operations/simple_transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ Query the tip of the blockchain:

cardano-cli query tip --mainnet

Look for the value of `slotNo`
Look for the value of `slot`

{
"blockNo": 16829,
"headerHash": "3e6f59b10d605e7f59ba8383cb0ddcd42480ddcc0a85d41bad1e4648eb5465ad",
"slotNo": 369200
"epoch": 259,
"hash": "dbf5104ab91a7a0b405353ad31760b52b2703098ec17185bdd7ff1800bb61aca",
"slot": 26633911,
"block": 5580350
}

Calculate your TTL, for example: 369200 + 200 slots = 369400
Expand Down

0 comments on commit b4c3a96

Please sign in to comment.