Skip to content

Set Up Your Account to Secure the Tanssi Ecosystem

Introduction

Before you can start participating in the Tanssi protocol, validating blocks, and securing the Tanssi ecosystem, you'll need to set up your account and establish your node's eligibility.

This step maps your Tanssi stash account (the one keeping track of your rewards) to your node's session keys (the ones used for communication and consensus), allowing the protocol to include your node in the active set.

By following the steps outlined in this guide, you'll learn everything you need to know to validate within the Tanssi ecosystem.

Checking Prerequisites

Before setting up your account, make sure that:

Map an Account to Your Node

The first step is a two-step process that generates and maps the session keys to your account. Session keys can be compared to the node's ID, and are used to perform network operations, such as signing validity proofs, whereas your account keeps track of your work and related rewards, and could have an on-chain identity. By mapping the session key to your account, you create an association between your account and your node.

You will need to create session keys for your primary and backup servers. Each server should have its own unique keys. Since the keys never leave your servers, you can consider them a unique ID for that server.

Generate Session Keys

To generate session keys, send an RPC call using the author_rotateKeys method to your node's HTTP endpoint. For reference, if your node's HTTP endpoint is at port 9944, the JSON-RPC call might look like this:

curl http://127.0.0.1:9944 -H \
"Content-Type:application/json;charset=utf-8" -d \
  '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"author_rotateKeys",
    "params": []
  }'

Your hex-encoded session keys will be printed to the terminal in the "result" field.

curl http://127.0.0.1:9944 -H \
"Content-Type:application/json;charset=utf-8" -d \
'{
"jsonrpc":"2.0",
"id":1,
"method":"author_rotateKeys",
"params": []
}'
{"jsonrpc":"2.0","id":1,"result": "0xca17757962a065eeebec2c6e0d2dc7fb24b56967fd9003e4d22bf4981da86fd4ac7cd701462730a76ab539d5a48f4fd2821acf07743335e56eef84d1544686480ada0ff0f38dfccee43515e619e03b0de95a08c74fcbb2da26af55ad144d5f54829a57d7d77bb9333cf9301eaa5d20c384f67388f36b402e33a03b949148325e80b812699fb22d9e4b4976e1d0e9964034489cb0b5b6b70c37d227fb54ffe50b444434b488361038b8b6949c36f0073c6bd52f2907c0991e32257d96bb946c590320539c343fc1f2e1dd1951a0ff38c6c9ea2f93a263e81ee95da1de0697e47e32"}

Note

Make sure you write down your session keys. In the next section, you'll need to map them to your account.

Map Session Keys

To perform the next step and map your session keys to your account, head to the developer portal, click on the Developer tab, select Extrinsics from the dropdown, and take the following steps:

  1. Select your account, which should be the same account that you previously registered with Tanssi
  2. Select the session module and the setKeys extrinsic
  3. For keys, enter your session keys
  4. For proof, enter 0x
  5. Click Submit Transaction and sign and send the transaction from your wallet

Create and submit a transaction to set session keys on Polkadot.js Apps

Using the session.keyOwner method, you can verify that your session keys have been mapped to your account as expected. To do this on the developer portal, click on the Developer tab, select Chain state from the dropdown, and take the following steps:

  1. Select the session module and the keyOwner query
  2. Enter gran in the SpCoreCryptoKeyTypeId field
  3. For Bytes, enter the first sixty six hex-encoded characters from your session keys (e.g., 0x00a12170e0925a9bf98f31bbdd7988550c1bf587766a2d2735e969aa5b4291dc)
  4. Click the + button next to the extrinsic field
  5. The account associated with the session keys, which should be your account, will be displayed at the bottom of the page

Create and submit query to verify session keys on the developer portal

And that's it! You've successfully mapped your account, and your node is now eligible to participate in the protocol.

Last update: April 9, 2025
| Created: February 28, 2024