polkadot

Polkadot node

Channel Revision Published Runs on
latest/edge 48 09 May 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 21.10 Ubuntu 20.04
latest/edge 47 09 May 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 21.10 Ubuntu 20.04
latest/edge 46 09 May 2025
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 21.10 Ubuntu 20.04
latest/edge 15 11 Dec 2023
Ubuntu 24.04 Ubuntu 22.04 Ubuntu 21.10 Ubuntu 20.04
juju deploy polkadot --channel edge
Show information

Platform:

Ubuntu
24.04 22.04 21.10 20.04

Learn about actions >

  • find-validator-address

    Checks if this node is currently validating for any validator address found on-chain. It does so by checking if any session key on-chain is present on this node. Returns the validator address and the session key if this node is validating. This action does the same as the update-status hook does for a validator/collator. However, the update-status only shows if the node is validating or not, while this action also gives the validator address and the session key used.

  • get-node-help

    Gets the help information from the client binary. Note that to get a readable output it is recommended to use '--format json' and parse the output with the 'jq' command line tool. Example Juju 2.x: juju run-action --wait polkadot/0 get-node-help --format json | jq -r '.["unit-polkadot-0"].results["help-output"]' Example Juju 3.x: juju run polkadot/0 get-node-help --format json | jq -r '.["polkadot/0"].results["help-output"]'

  • get-node-info

    Gets system information about the node and its container.

  • get-session-key

    Runs author_rotateKeys and returns a new session-key.

  • has-session-key

    Checks if node has a session key, using an RPC call.

    Params
    • key string

      Key to check if exist on node. E.g. key='0xhjd39djk309'

    Required

    key

  • insert-key

    Inserts a key in the keystore of the node using a local RPC call. WARNING: don't do double signing by inserting the same key for two nodes! Keys are generated using the external tool subkey (not provided by the charm) E.g 'subkey generate --network efinity'

    Params
    • address string

      The public part of the key in hex format. E.g. address='0xf0014b9f4b10ac206a0f3ba9630e1df1f80214e7724e96ab00ccb35d08045777'

    • mnemonic string

      The private part of the key as a seed phrase. E.g. mnemonic='reunion learn town satisfy social split ticket improve sunset faculty tail adjust'

    Required

    mnemonic, address

  • is-validating-next-era

    Checks if this node will be validating next era for the validator address passed as parameter. It does so by checking if the session key that will be used for that validator is present on this node. Returns a message whether this node will be validating next era or not. If it will, the session key is returned as well.

    Params
    • address string

      The public address to check. E.g. DuLr6CeLXezrfumF6EkqLeAx9paMcADYU6zHpSZVB8gvjht

    Required

    address

  • restart-node-service

    This actions restarts the service running the blockchain node.

  • set-node-key

    Sets a new private key in '/home/polkadot/node-key' and restarts the node service. A node key can be generated with the external tool subkey (not provided by the charm) E.g. subkey generate-node-key --file node-key. The content of node-key is the private key and what should be used for the 'key' parameter.

    Params
    • key string

      Private node key.

    Required

    key

  • start-node-service

    This actions starts the service running the blockchain node.

  • start-validating

    Makes this node start validating. It will use the config parameter 'mnemonic-secret-id' to sign the transaction and therefore start validating for that address. It does so by setting a new session key on-chain. The actual move of the validator might thus take some time to have effect. NOTE: Make sure the wallet is correct and has funds to pay for the transaction, or this will fail.

    Params
    • address string

      Optional! The public address to start validating for. E.g. DuLr6CeLXezrfumF6EkqLeAx9paMcADYU6zHpSZVB8gvjht Only needed if the node should start validating for a different address than the one in the config parameter 'mnemonic-secret-id'. This is typically the case for proxy accounts. I.e. if 'mnemonic-secret-id' is the mnemonic of a proxy account, this parameter should be the address of the validator account.

  • stop-node-service

    This actions stops the service running the blockchain node.