[
  {
    "path": ".github/workflows/build.yml",
    "content": "name: build\non: pull_request\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0\n      - uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 #v4.3.0\n        with:\n          python-version: 3.x\n      - run: pip install -r requirements.txt\n      - run: mkdocs build --strict\n\nenv:\n  GH_TOKEN: ${{ secrets.GH_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/cleanup-docker-pr.yml",
    "content": "name: cleanup-docker-pr\non:\n  pull_request:\n    types: [closed]\n\nenv:\n  PR_NUMBER: ${{ github.event.number }}\n  OWNER: orgs/nanocurrency\n  PACKAGE_NAME: nano-docs\n  PER_PAGE: 100\n\njobs:\n  container_cleanup:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Clean up PR specific container\n        uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 #v6.3.3\n        with:\n          github-token: ${{ secrets.GHCR_TOKEN }}\n          script: |\n            const response = await github.request(\"GET /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions\",\n              { per_page: ${{ env.PER_PAGE }}\n            });\n            for(version of response.data) {\n                if (version.metadata.container.tags[0] == \"pr-${{ env.PR_NUMBER }}\") {\n                    console.log(\"delete \" + version.id)\n                    const deleteResponse = await github.request(\"DELETE /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions/\" + version.id, { });\n                    console.log(\"status \" + deleteResponse.status)\n                }\n            }\n"
  },
  {
    "path": ".github/workflows/cleanup-docker-untagged.yml",
    "content": "name: cleanup-docker-untagged\non:\n  push:\n    branches:\n      - main\n\nenv:\n  OWNER: orgs/nanocurrency\n  PACKAGE_NAME: nano-docs\n  PER_PAGE: 100\n\njobs:\n  container_cleanup:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Clean up untagged containers\n        uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0 #v6.3.3\n        with:\n          github-token: ${{ secrets.GHCR_TOKEN }}\n          script: |\n            const response = await github.request(\"GET /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions\",\n              { per_page: ${{ env.PER_PAGE }}\n            });\n            for(version of response.data) {\n                if ( version.metadata.container.tags.length == 0 ) {\n                    console.log(\"delete \" + version.id)\n                    const deleteResponse = await github.request(\"DELETE /${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions/\" + version.id, { });\n                    console.log(\"status \" + deleteResponse.status)\n                }\n            }\n"
  },
  {
    "path": ".github/workflows/deploy-staging.yml",
    "content": "name: deploy\non:\n  push:\n    branches:\n      - staging\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    env:\n      PRODUCTION: TRUE\n    if: github.repository == 'nanocurrency/nano-docs-staging'\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-python@v5\n        with:\n          python-version: 3.x\n      - run: pip install -r requirements.txt\n      - run: mkdocs gh-deploy --force\nenv:\n  GH_TOKEN: ${{ secrets.GH_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/deploy.yml",
    "content": "name: deploy\non:\n  push:\n    branches:\n      - main\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    env:\n      PRODUCTION: TRUE\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-python@v5\n        with:\n          python-version: 3.x\n      - run: pip install -r requirements.txt\n      - run: mkdocs gh-deploy --force\nenv:\n  GH_TOKEN: ${{ secrets.GH_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/publish-docker-master.yml",
    "content": "name: publish-docker-master\non:\n  push:\n    branches:\n      - main\n\njobs:\n  build_publish:\n    runs-on: ubuntu-latest\n    env:\n      PRODUCTION: TRUE\n    steps:\n      - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0\n\n      # Build and test Docker image\n      - run: |\n          echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u nanocurrency --password-stdin\n          docker pull squidfunk/mkdocs-material:9.4.10@sha256:01605a03397a654b74b9de3157f56915d1e075e2d3bd22fcf3fb82c443553c25\n          docker build -t ghcr.io/nanocurrency/nano-docs:latest .\n          docker push ghcr.io/nanocurrency/nano-docs:latest\n"
  },
  {
    "path": ".github/workflows/publish-docker-pr.yml",
    "content": "name: publish-docker-pr\non: pull_request\n\nenv:\n  PR_NUMBER: ${{ github.event.number }}\n\njobs:\n  build_publish:\n    runs-on: ubuntu-latest\n    env:\n      PRODUCTION: TRUE\n    steps:\n      - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0\n\n      # Build and test Docker image\n      - run: |\n          echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u nanocurrency --password-stdin\n          docker pull squidfunk/mkdocs-material:9.4.10@sha256:01605a03397a654b74b9de3157f56915d1e075e2d3bd22fcf3fb82c443553c25\n          docker build -t ghcr.io/nanocurrency/nano-docs:pr-${{ env.PR_NUMBER }} .\n          docker push ghcr.io/nanocurrency/nano-docs:pr-${{ env.PR_NUMBER }}\n"
  },
  {
    "path": ".github/workflows/push-to-staging.yml",
    "content": "name: push-to-staging\non:\n  workflow_dispatch:\n    inputs:\n      branch:\n        description: \"nano-docs branch to push to staging\"\n        default: \"staging\"\n        required: true\n\njobs:\n  push:\n    runs-on: ubuntu-latest\n    steps:\n      - name: push\n        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0\n        with:\n          fetch-depth: 0\n          ref: ${{ github.event.inputs.branch }}\n          token: ${{ secrets.GH_TOKEN }}\n      - run: |\n          git remote add nano-docs-staging https://github.com/nanocurrency/nano-docs-staging.git\n          git push nano-docs-staging ${{ github.event.inputs.branch }}:staging"
  },
  {
    "path": ".gitignore",
    "content": "site/\n.idea\nvenv\n.cache"
  },
  {
    "path": "Dockerfile",
    "content": "FROM squidfunk/mkdocs-material:9.4.10@sha256:01605a03397a654b74b9de3157f56915d1e075e2d3bd22fcf3fb82c443553c25\n\n# Set build directory\n#WORKDIR /docs\n\n# Copy files necessary for build\nCOPY ./ /docs\n\nRUN \\\n  pip install --upgrade pip && \\\n  pip install -r /docs/requirements.txt\n\n# Set working directory\nWORKDIR /docs\n\n# Expose MkDocs development server port\nEXPOSE 8000\n\n# Start development server by default\nENTRYPOINT [\"mkdocs\"]\nCMD [\"serve\", \"--dev-addr=0.0.0.0:8000\"]\n"
  },
  {
    "path": "docs/CNAME",
    "content": "docs.nano.org"
  },
  {
    "path": "docs/articles/readme.md",
    "content": "Please see https://github.com/nanocurrency/nano-docs/issues/555 for details the article management process and list of ideas."
  },
  {
    "path": "docs/commands/command-line-interface.md",
    "content": "title: Command Line Interface\ndescription: Reference for the CLI commands available for the nano node\n\n# Command Line Interface\n## nano_node commands\n| Command | Description |\n|---------|-------------|      \n| `--account_create --wallet=<wallet>` | Insert next deterministic key into `<wallet>` |\n| `--account_get --key=<key>` | Get account number for the `<key>` |\n| `--account_key --account=<account>` | Get the public key for `<account>` |\n| `--clear_send_ids` | Remove all send IDs from the database (dangerous: not intended for production use). Optional `--data_path=<path>`|\n| `--compare_rep_weights` | Displays a summarized comparison between the hardcoded bootstrap weights and representative weights from the ledger. Full comparison is output to logs. Optional `--data_path=<path>`. |\n| `--confirmation_height_clear` | Requires `--account` and sets the confirmation heights of the specified account to 0. Use `all` to reset all accounts. Do not use while the node is running. |\n| `--daemon` | Start node daemon. Network and path will be output. |\n| `--diagnostics` | Run internal diagnostics and validate existing config file (or create default config file if it doesn't exist). |\n| `--final_vote_clear` | Either specify a single `--root` to clear or `--all` to clear all final votes (not recommended). |\n| `--generate_config node|rpc|log` | Write configuration to stdout, populated with commented-out defaults suitable for this system. Use `--use_defaults` for uncommented values. |\n| `--help` | Print out options. |\n| `--initialize` | Initializes the data folder, if it is not already initialized. Meant for an empty data folder. |\n| `--key_create` | Generates an adhoc random keypair and prints it to stdout. |\n| `--key_expand --key=<key>` | Derive public key and account number from `<key>`. |\n| `--migrate_database_lmdb_to_rocksdb` | Deletes existing rocksdb subfolder if it exists and migrates the ledger from LMDB to RocksDB. Does not delete the data.ldb file afterwards. Optional `--data_path=<path>` |\n| `--online_weight_clear` | Clear record history for long term online weight trending. Optional `--data_path=<path>`|\n| `--peer_clear` | Clear cached peers. Optional `--data_path=<path>`|\n| `--rebuild_database` | Rebuild LMDB database with `--vacuum` for best compaction. Requires approximately `data.ldb size * 2` free space on disk. |\n| `--snapshot` | Compact database and create snapshot, functions similar to vacuum but does not replace the existing database. Optional: `--unchecked_clear`, `--clear_send_ids`, `--online_weight_clear`, `--peer_clear`, `--confirmation_height_clear`. |\n| `--unchecked_clear` | Clear unchecked blocks. Optional `--data_path=<path>`|\n| `--update_config`| Reads the current node configuration and updates it with missing keys and values and delete keys that are no longer used. Updated configuration is written to stdout. |\n| `--vacuum` | Compact database. If `data_path` is missing, the database in the data directory is compacted. Optional: `--unchecked_clear`, `--clear_send_ids`, `--online_weight_clear`, `--peer_clear`, `--confirmation_height_clear`, `--rebuild_database`. Requires approximately `data.ldb size * 2` free space on disk. |\n| `--validate_blocks` | Validate blocks in the ledger, includes checks for confirmation height. Optional `--threads` for multithreaded validation. |\n| `--version` | Prints out version. |\n| `--wallet_add_adhoc`<br>&nbsp;&nbsp;`--wallet=<wallet>`<br>&nbsp;&nbsp;`--key=<key>` | Insert `<key>` into `<wallet>`. |\n| `--wallet_create`<br>&nbsp;&nbsp;`--seed=<seed>`<br>&nbsp;&nbsp;`--password=<password>` | Creates a new wallet with optional `<seed>` and optional `<password>`, and prints the ID. |\n| `--wallet_change_seed`<br>&nbsp;&nbsp;`--wallet=<wallet>`<br>&nbsp;&nbsp;`--seed=<seed>` | Changes seed for `<wallet>` to `<seed>`. |\n| `--wallet_decrypt_unsafe`<br>&nbsp;&nbsp;`--wallet=<wallet>`<br>&nbsp;&nbsp;`--password=<password>` | Decrypts `<wallet>` using `<password>`. <br>**USE WITH CAUTION: THIS WILL PRINT YOUR PRIVATE KEY AND SEED TO STDOUT** |\n| `--wallet_destroy --wallet=<wallet>` | Destroys `<wallet>` and all keys it contains. |\n| `--wallet_import`<br>&nbsp;&nbsp;`--file=<filepath>`<br>&nbsp;&nbsp;`--wallet=<wallet>`<br>&nbsp;&nbsp;`--password=<password>` | Imports keys in `<filepath>` using `<password>` into `<wallet>`. If the wallet id does not exist and `--force` is included, a new wallet will be created with the provided wallet id value. |\n| `--wallet_list` | Dumps wallet IDs and public keys. |\n| `--wallet_remove`<br>&nbsp;&nbsp;`--wallet=<wallet>`<br>&nbsp;&nbsp;`--account=<account>` | Remove `<account>` from `<wallet>`. |\n| `--wallet_representative_get`<br>&nbsp;&nbsp;`--wallet=<wallet>` | Prints default representative for `<wallet>`. |\n| `--wallet_representative_set`<br>`--wallet=<wallet>`<br>&nbsp;&nbsp;`--account=<account>` | Set `<account>` as default representative for `<wallet>`. |\n\n## Launch Options\nThe node is typically run like this:\n\n```bash\n./nano_node --daemon [--launch_options]\n```\n!!! note \"Intended for developer use\"\n\tThese options are only for developer use so please understand the impacts before use.\n\n| Option | Description |\n|--------|-------------|\n| `--network` | Allows selection of a different network at runtime. Values `live`, `beta` and `test` supported. |\n| `--data_path=<path>` | Use the supplied `<path>` as the data directory. |\n| `--config key=value` | Pass node configuration values. This takes precedence over any values in the configuration file. This option can be repeated multiple times. |\n| `--rpcconfig key=value` | Pass RPC configuration values. This takes precedence over any values in the configuration file. This option can be repeated multiple times. |\n| `--enable_pruning` | \"Enable experimental ledger pruning\" |\n| `--block_processor_batch_size` | Increase block processor transaction batch write size, default 0 (limited by config block_processor_batch_max_time), 256k for fast_bootstrap. |\n| `--block_processor_full_size` | Increase block processor allowed blocks queue size before dropping live network packets and holding bootstrap download, default 65536, 1 million for fast_bootstrap. |\n| `--block_processor_verification_size` | Increase batch signature verification size in block processor, default 0 (limited by config signature_checker_threads), unlimited for fast_bootstrap. |\n| `--fast_bootstrap` | **legacy bootstrap:** Increase bootstrap processor limits to allow more blocks before hitting full state and verify/write more per database call. Also disable deletion of processed unchecked blocks. |\n| `--allow_bootstrap_peers_duplicates` | **legacy bootstrap:** Allow multiple connections to the same peer in bootstrap attempts. |\n| `--inactive_votes_cache_size` | Increase cached votes without active elections size, default 16384. |\n| `--vote_processor_capacity` | Vote processor queue size before dropping votes, default 144k. |\n| `--disable_activate_successors` | Disables activate_successors in active_elections |\n| `--disable_add_initial_peers` | Disables the add initial peers function called on startup which reads the peers table and contacts all the peers listed in it. |\n| `--disable_ascending_bootstrap` | Disable ascending bootstrap |\n| `--disable_backup` | Turn off automatic wallet backup process. |\n| `--disable_block_processor_republishing` | Disables block republishing by disabling the local_block_broadcaster component |\n| `--disable_block_processor_unchecked_deletion` | Disable deletion of unchecked blocks after processing. |\n| `--disable_bootstrap_bulk_pull_server` | Disables the legacy bulk pull server for bootstrap operations |\n| `--disable_bootstrap_bulk_push_client` | Disables the legacy bulk push client for bootstrap operations | \n| `--disable_bootstrap_listener` | Turn off listener on the bootstrap network so incoming TCP (bootstrap) connections are rejected. Note: this does not impact TCP traffic for the live network. |\n| `--disable_lazy_bootstrap` | Turn off use of lazy bootstrap. |\n| `--disable_legacy_bootstrap` | Turn off use of legacy bootstrap. |\n| `--disable_max_peers_per_ip` | Disables the limit on the number of peer connections allowed per IP address |\n| `--disable_max_peers_per_subnetwork` | Disables the limit on the number of peer connections allowed per subnetwork |\n| `--disable_ongoing_bootstrap` | Turn off the ability for ongoing bootstraps to occur. |\n| `--disable_ongoing_telemetry_requests` | Disables ongoing telemetry requests to peers | \n| `--disable_providing_telemetry_metrics` | Do not provide any telemetry data to nodes requesting it. Responses are still made to requests, but they will have an empty payload. |\n| `--disable_rep_crawler` | Turn off the rep crawler process. |\n| `--disable_request_loop` | Turn off the request loop. |\n| `--disable_search_pending` | Disables the periodic search for pending transactions | \n| `--disable_tcp_realtime` | Turn off use of TCP live network (TCP for bootstrap will remain available). |\n| `--disable_unchecked_cleanup` | Prevent periodic cleaning of unchecked table. |\n| `--disable_unchecked_drop` | Prevent drop of all unchecked entries at node/wallet start. |\n| `--disable_wallet_bootstrap` | Turn off use of wallet-based bootstrap. |\n\n## Debug commands\n| Command | Description |\n|---------|-------------|\n| `--debug_account_count` | Display the number of accounts. |\n| `--debug_account` | Display the total counts of each version for all accounts (including unpocketed). |\n| `--debug_block_count` | Display the number of blocks. |\n| `--debug_block_dump` | Print ledger blocks - use with caution due to the potentially large amount of data this can output. |\n| `--debug_bootstrap_generate` | Generate bootstrap sequence of blocks. |\n| `--debug_cemented_block_count` | Display the number of cemented blocks (blocks which are under the confirmation height of their accounts). |\n| `--debug_dump_frontier_unchecked_dependents` | Dump frontiers which have matching unchecked keys. |\n| `--debug_dump_online_weight` | List online weights table and current online_weights value. |\n| `--debug_dump_representatives` | List representatives and weights. |\n| `--debug_generate_crash_report` | After a node crash on Linux, this command reads the dump files generated from that crash and produces a \"nano_node_crash_report.txt\" file. Requires `addr2line` to be installed on the system. |\n| `--debug_opencl` | Profile OpenCL work generation for (optional) `--device=<device>` on `--device=<platform>` using `--threads=<threads>` count. |\n| `--debug_output_last_backtrace_dump` | Output the stacktrace stored after a node crash. |\n| `--debug_profile_bootstrap` | Profile simulated bootstrap process. |\n| `--debug_profile_frontiers_confirmation` | Profile frontiers confirmation speed. |\n| `--debug_profile_generate` | Profile work generation. Optional: `--pow_sleep_interval` which sets an amount to sleep (in nanoseconds) between batches of POW calculations when using the CPU. `--difficulty`, `--multiplier` (only the latter is used if both given) to set the work generation threshold. |\n| `--debug_profile_kdf` | Profile kdf function. |\n| `--debug_profile_sign` | Profile signature generation. |\n| `--debug_profile_validate` | Profile work validation. |\n| `--debug_profile_votes` | Profile vote verification. |\n| `--debug_rpc` | Allows running RPC commands without enabling the RPC server. Not recommended for daily usage. Example: `echo '{\"action\": \"block_count\"}' | nano_node --debug_rpc` |\n| `--debug_stacktrace` | Prints a stacktrace example, useful to verify that it includes the desired information, such as files, function names and line numbers. |\n| `--debug_sys_logging` | On *nix system this checks writing to the system log. On Windows it writes to the event viewer, a registry entry needs to exist for this to work correctly which can be created by running this command for the first time as an administrator. |\n| `--debug_unconfirmed_frontiers` | Prints the account, height, frontiers and cemented frontier for all accounts which are not fully confirmed. Sorted by height in descending order. |\n| `--debug_validate_blocks` | Alias to `--validate_blocks`. |\n| `--debug_verify_profile` | Profile signature verification. |\n| `--debug_dump_trended_weight`| Dump trended weights table |\n| `--debug_profile_process`| Profile active blocks processing (only for nano_dev_network)|\n| `--debug_random_feed`| Generates output to RNG test suites |\n| `--debug_peers`| Display peer IPv6:port connections |\n| `--debug_prune`| Prune accounts up to last confirmed blocks **EXPERIMENTAL**|\n\n## Removed\n\n| Command | Description |\n|---------|-------------|\n| `--vote_dump` | Dump most recent votes from representatives. |\n"
  },
  {
    "path": "docs/commands/rpc-protocol.md",
    "content": "title: RPC Protocol\ndescription: Reference for the RPC commands available for the Nano node\n\n# RPC Protocol\n\nThe RPC protocol accepts JSON HTTP POST requests. The following are RPC commands along with the responses that are expected. This page is split into the following sections:\n\n| Section | Purpose |\n|---------|---------|\n| <span class=\"no-break\">**[Node RPCs](#node-rpcs)**</span>                        | For interacting with the node and ledger. |\n| <span class=\"no-break\">**[Wallet RPCs](#wallet-rpcs)**</span>                    | For interacting with the built-in, QT-based node wallet. **NOTE**: This wallet is only recommended for development and testing. |\n| <span class=\"no-break\">**[Unit Conversion RPCs](#unit-conversion-rpcs)**</span> | For converting different units to and from raw. |\n| <span class=\"no-break\">**[Deprecated RPCs](#deprecated-rpcs)**</span>           | No longer recommended for use. |\n\n## Node RPCs\n\n!!! warning \"Unconfirmed blocks returned\"\n    Unless otherwise specified, RPC calls can return unconfirmed blocks and related details. In the most important cases where balances or similar details may include unconfirmed amounts, additional warnings have been included. Refer to [Block confirmation procedures](/integration-guides/key-management/#block-confirmation-procedures) for details.\n\n---\n\n### account_balance \nReturns how many RAW is owned and how many have not yet been received by **account**  \n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json \n{\n  \"action\": \"account_balance\",\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```\n\n**Response:**\n```json\n{\n  \"balance\": \"10000\",\n  \"pending\": \"10000\",\n  \"receivable\": \"10000\"\n}\n```\n\n**Optional \"include_only_confirmed\"**\n_version 22.0+_   \nBoolean, true by default. Results in `balance` only including blocks on this account that have already been confirmed and `receivable` only including incoming send blocks that have already been confirmed on the sending account.\n\n---\n\n### account_block_count\nGet number of blocks for a specific **account**  \n\n**Request:**\n```json\n{\n  \"action\": \"account_block_count\",\n  \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n}\n```\n\n**Response:**\n```json\n{\n  \"block_count\" : \"19\"\n}\n```\n\n---\n\n### account_get\nGet account number for the **public key**  \n\n**Request:**\n```json\n{\n  \"action\": \"account_get\",\n  \"key\": \"3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039\"\n}\n```\n\n**Response:**\n```json\n{\n  \"account\" : \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}\n```\n\n---\n\n### account_history  \n\nReports send/receive information for an account. Returns only **send & receive** blocks by default (unless raw is set to true - see optional parameters below): change, state change & state epoch blocks are skipped, open & state open blocks will appear as receive, state receive/send blocks will appear as receive/send entries. Response will start with the latest block for the account (the frontier), and will list all blocks back to the open block of this account when \"count\" is set to \"-1\". **Note**: \"local_timestamp\" returned since version 18.0, \"height\" field returned since version 19.0 and \"confirmed\" returned since version 23.0\n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"account_history\",\n  \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n  \"count\": \"1\"\n}\n```\n\n**Response:**\n```json\n{\n  \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n  \"history\": [\n    {\n      \"type\": \"send\",\n      \"account\": \"nano_38ztgpejb7yrm7rr586nenkn597s3a1sqiy3m3uyqjicht7kzuhnihdk6zpz\",\n      \"amount\": \"80000000000000000000000000000000000\",\n      \"local_timestamp\": \"1551532723\",\n      \"height\": \"60\",\n      \"hash\": \"80392607E85E73CC3E94B4126F24488EBDFEB174944B890C97E8F36D89591DC5\",\n      \"confirmed\": \"true\"\n    }\n  ],\n  \"previous\": \"8D3AB98B301224253750D448B4BD997132400CEDD0A8432F775724F2D9821C72\"\n}\n```\n\nIf the `count` limit results in stopping before the end of the account chain, then the response will also contain a `previous` field (outside of the `history` field) which contains the block hash that would be next to process if `count` was larger.\n\n**Optional parameters:**\n\n- `raw` (bool): if set to `true` instead of the default `false`, instead of outputting a simplified send or receive explanation of blocks (intended for wallets), output all parameters of the block itself as seen in block_create or other APIs returning blocks. It still includes the \"account\" and \"amount\" properties you'd see without this option.  State/universal blocks in the raw history will also have a `subtype` field indicating their equivalent \"old\" block. Unfortunately, the \"account\" parameter for open blocks is the account of the source block, not the account of the open block, to preserve similarity with the non-raw history.   \n- `head` (64 hexadecimal digits string, 256 bit): instead of using the latest block for a specified account, use this block as the head of the account instead. Useful for pagination.\n- `include_linked_account` (bool): _version 28.0+._ When set to `true`, the response will include a new field `linked_account`, which returns the linked account associated with the block (or \"0\" if no linked account exists/was found e.g. due to pruning).\n- `offset` (decimal integer): skips a number of blocks starting from `head` (if given). Not often used. _Available since version 11.0_    \n- `reverse` (bool): if set to `true` instead of the default `false`, the response starts from `head` (if given, otherwise the first block of the account), and lists blocks up to the frontier (limited by \"count\"). **Note**: the field `previous` in the response changes to `next`. _Available since version 19.0_  \n- `account_filter` (array of public addresses): results will be filtered to only show sends/receives connected to the provided account(s). _Available since version 19.0_. **Note:** In v19.0, this option does not handle receive blocks; fixed in v20.0.\n\n---\n\n### account_info\nReturns frontier, open block, change representative block, balance, last modified timestamp from local database & block count for **account**. Only works for accounts that have received their first transaction and have an entry on the ledger, will return \"Account not found\" otherwise. To open an account, use [receive](#receive).  \n\n--8<-- \"unconfirmed-information.md\"\n    The balance is obtained from the frontier, which may be unconfirmed. As long as you follow the [guidelines](/integration-guides/key-management/#transaction-order-and-correctness), you can rely on the **balance** for the purposes of creating transactions for this account. If the frontier is never confirmed, then the blocks that proceed it will also never be confirmed.\n\n    If you need only details for confirmed blocks, use the `include_confirmed` option below and referenced the `confirmed_*` fields added in to the response.\n\n**Request:**\n```json\n{\n  \"action\": \"account_info\",\n  \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n}\n```\n\n**Response:**\n```json\n{\n  \"frontier\": \"FF84533A571D953A596EA401FD41743AC85D04F406E76FDE4408EAED50B473C5\",\n  \"open_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n  \"representative_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n  \"balance\": \"235580100176034320859259343606608761791\",\n  \"modified_timestamp\": \"1501793775\",\n  \"block_count\": \"33\",\n  \"account_version\": \"1\",\n  \"confirmation_height\" : \"28\",\n  \"confirmation_height_frontier\" : \"34C70FCA0952E29ADC7BEE6F20381466AE42BD1CFBA4B7DFFE8BD69DF95449EB\"\n}\n```\n\nIn response `confirmation_height` only available for _version 19.0+_  \nIn response `confirmation_height_frontier` only available for _version 21.0+_ which is the block hash at that confirmation height.  \n\n**Optional \"include_confirmed\"**\n_version 22.0+_   \nBoolean, false by default. Adds new return fields with prefix of `confirmed_` for consistency:\n\n- `confirmed_balance`: balance for only blocks on this account that have already been confirmed\n- `confirmed_height`: matches `confirmation_height` value\n- `confirmed_frontier`: matches `confirmation_height_frontier` value\n- If `representative` option also `true`, `confirmed_representative` included: representative account from the confirmed frontier block\n- If `receivable` option also `true`, `confirmed_receivable` included: balance of all receivable amounts where the matching incoming send blocks have been confirmed on their account\n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"account_info\",  \n  \"account\": \"nano_1gyeqc6u5j3oaxbe5qy1hyz3q745a318kh8h9ocnpan7fuxnq85cxqboapu5\",\n  \"representative\": \"true\",\n  \"weight\": \"true\",\n  \"receivable\": \"true\",\n  \"include_confirmed\": \"true\"\n}\n```\n\n**Response:**\n```json\n{\n    \"frontier\": \"80A6745762493FA21A22718ABFA4F635656A707B48B3324198AC7F3938DE6D4F\",\n    \"open_block\": \"0E3F07F7F2B8AEDEA4A984E29BFE1E3933BA473DD3E27C662EC041F6EA3917A0\",\n    \"representative_block\": \"80A6745762493FA21A22718ABFA4F635656A707B48B3324198AC7F3938DE6D4F\",\n    \"balance\": \"11999999999999999918751838129509869131\",\n    \"confirmed_balance\": \"11999999999999999918751838129509869131\",\n    \"modified_timestamp\": \"1606934662\",\n    \"block_count\": \"22966\",\n    \"account_version\": \"1\",\n    \"confirmed_height\": \"22966\",\n    \"confirmed_frontier\": \"80A6745762493FA21A22718ABFA4F635656A707B48B3324198AC7F3938DE6D4F\",\n    \"representative\": \"nano_1gyeqc6u5j3oaxbe5qy1hyz3q745a318kh8h9ocnpan7fuxnq85cxqboapu5\",\n    \"confirmed_representative\": \"nano_1gyeqc6u5j3oaxbe5qy1hyz3q745a318kh8h9ocnpan7fuxnq85cxqboapu5\",\n    \"weight\": \"11999999999999999918751838129509869131\",\n    \"pending\": \"0\",\n    \"receivable\": \"0\",\n    \"confirmed_pending\": \"0\",\n    \"confirmed_receivable\": \"0\"\n}\n```\n\n**Optional \"representative\", \"weight\", \"pending\"**\n_version 9.0+_   \nBooleans, false by default. Additionally returns representative, voting weight, pending/receivable balance for account   \n\n**Request:**\n```json\n{\n  \"action\": \"account_info\",\n  \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\",\n  \"representative\": \"true\",\n  \"weight\": \"true\",\n  \"pending\": \"true\"\n}\n```\n\n**Response:**\n```json\n{\n  \"frontier\": \"FF84533A571D953A596EA401FD41743AC85D04F406E76FDE4408EAED50B473C5\",\n  \"open_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n  \"representative_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n  \"balance\": \"235580100176034320859259343606608761791\",\n  \"modified_timestamp\": \"1501793775\",\n  \"block_count\": \"33\",\n  \"account_version\": \"1\",\n  \"confirmation_height\" : \"28\",\n  \"confirmation_height_frontier\" : \"34C70FCA0952E29ADC7BEE6F20381466AE42BD1CFBA4B7DFFE8BD69DF95449EB\",\n  \"representative\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\",\n  \"weight\": \"1105577030935649664609129644855132177\",\n  \"pending\": \"2309370929000000000000000000000000\",\n  \"receivable\": \"2309370929000000000000000000000000\"\n}\n```\n\n---\n\n### account_key\nGet the public key for **account**  \n\n**Request:**\n```json\n{\n  \"action\": \"account_key\",\n  \"account\" : \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}\n```  \n**Response:**\n```json\n{\n  \"key\": \"3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039\"\n}\n```\n\n---\n\n### account_representative \nReturns the representative for **account**  \n\n**Request:**\n```json\n{\n  \"action\": \"account_representative\",\n  \"account\": \"nano_39a73oy5ungrhxy5z5oao1xso4zo7dmgpjd4u74xcrx3r1w6rtazuouw6qfi\"\n}\n```  \n**Response:**\n```json\n{\n  \"representative\" : \"nano_16u1uufyoig8777y6r8iqjtrw8sg8maqrm36zzcm95jmbd9i9aj5i8abr8u5\"\n}\n```\n\n---\n\n### account_weight  \nReturns the voting weight for **account**  \n\n**Request:**\n```json\n{\n  \"action\": \"account_weight\",\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"weight\": \"10000\"\n}\n```\n\n---\n\n### accounts_balances  \nReturns how many RAW is owned and how many have not yet been received by **accounts list**  \n\n--8<-- \"unconfirmed-information.md\"\n    The receivable balances are calculated from potentially unconfirmed blocks. Account balances are obtained from their frontiers. An atomic [account_info](#account_info) RPC call is recommended for the purposes of creating transactions.\n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"accounts_balances\",\n  \"accounts\": [\"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\", \"nano_3i1aq1cchnmbn9x5rsbap8b15akfh7wj7pwskuzi7ahz8oq6cobd99d4r3b7\"]\n}\n```  \n**Response:**\n```json\n{\n  \"balances\" : {\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": {\n        \"balance\": \"325586539664609129644855132177\",\n        \"pending\": \"2309372032769300000000000000000000\",\n        \"receivable\": \"2309372032769300000000000000000000\"\n    },\n    \"nano_3i1aq1cchnmbn9x5rsbap8b15akfh7wj7pwskuzi7ahz8oq6cobd99d4r3b7\":\n    {\n      \"balance\": \"10000000\",\n      \"pending\": \"0\",\n      \"receivable\": \"0\"\n    }\n  }\n}\n```  \n\n**Optional \"include_only_confirmed\"**\n_version 25.0+_   \nBoolean, true by default. Results in `balance` only including blocks on the provided account that have already been confirmed and `receivable` only including incoming send blocks that have already been confirmed on the sending account.\n\n!!! info \"Error handling\"\n    With _version 25.0+_, `accounts_balances` response errors come in a different entry, named as `errors`. This\n    fixes the breaking change added in V24.0. Please notice that when an account is not found in the ledger, no error\n    is returned anymore. It now returns a zero balance and zero as receivable.\n    ```json\n    {\n      \"balances\": {\n        \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": {\n          \"balance\": \"325586539664609129644855132177\",\n          \"pending\": \"2309370929000000000000000000000000\",\n          \"receivable\": \"2309370929000000000000000000000000\"\n        },\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": {\n          \"balance\": \"0\",\n          \"pending\": \"0\",\n          \"receivable\": \"0\"\n        }\n      },\n      \"errors\": {\n        \"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\": \"Bad account number\"\n      }\n    }\n    ```\n    If all requested entries result in errors, no entry will be added in the response for `balances`. Similarly,\n    if there are no errors, no entry will be added for `errors`.  \n    Request:\n    ```json\n    {  \n      \"action\": \"accounts_balances\",  \n      \"accounts\": [\"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\"]  \n    }\n    ```\n    Response:\n    ```json\n    {\n      \"errors\": {\n        \"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\": \"Bad account number\"\n      }\n    }\n    ```\n    In _version 24.0+_, `accounts_balances` response errors are returned per account entry in `balances` object.\n    If an account does not exist, zero balance and zero receivables should be returned, but V24.0 has a bug: unopened\n    accounts with receivables return an error instead of the receivables.\n    ```json\n    {\n      \"balances\": {\n        \"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6\": {\n          \"balance\": \"442000000000000000000000000000\",\n          \"pending\": \"0\",\n          \"receivable\": \"0\"\n        },\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": {\n          \"error\": \"Account not found\"\n        }\n      }\n    }\n    ```\n\n\n---\n\n### accounts_frontiers  \nReturns a list of pairs of account and block hash representing the head block for **accounts list**  \n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"accounts_frontiers\",\n  \"accounts\": [\"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\", \"nano_3i1aq1cchnmbn9x5rsbap8b15akfh7wj7pwskuzi7ahz8oq6cobd99d4r3b7\"]\n}\n```  \n**Response:**\n```json\n{\n  \"frontiers\" : {\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": \"791AF413173EEE674A6FCF633B5DFC0F3C33F397F0DA08E987D9E0741D40D81A\",\n    \"nano_3i1aq1cchnmbn9x5rsbap8b15akfh7wj7pwskuzi7ahz8oq6cobd99d4r3b7\": \"6A32397F4E95AF025DE29D9BF1ACE864D5404362258E06489FABDBA9DCCC046F\"\n  }\n}\n```  \n\n!!! info \"Error handling\"\n    With _version 25.0+_, `accounts_frontiers` response errors come in a different entry, named `errors`.\n    ```json\n    {\n      \"frontiers\": {\n        \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": \"023B94B7D27B311666C8636954FE17F1FD2EAA97A8BAC27DE5084FBBD5C6B02C\"\n      },\n      \"errors\": {\n        \"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\": \"Bad account number\",\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": \"Account not found\"\n      }\n    }\n    ```\n    If all requested entries result in errors, no entry will be added in the response for `frontiers`. Similarly,\n    if there are no errors, no entry will be added for `errors`.  \n    Request:\n    ```json\n    {  \n      \"action\": \"accounts_frontiers\",  \n      \"accounts\": [\"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\"]  \n    }\n    ```\n    Response:  \n    ```json\n    {\n      \"errors\": {\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": \"Account not found\"\n      }\n    }\n    ```\n    In _version 24.0+_, `accounts_frontiers` response errors were returned per account entry in the\n    `frontiers` object.\n    ```json\n    {\n      \"frontiers\": {\n        \"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6\": \"75BD65296241EB871918EBE3E99E9A191970A2724B3214B27F8AB205FF4FC30A\",\n        \"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\": \"error: Bad account number\",\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": \"error: Account not found\"\n      }\n    }\n    ```\n\n---\n\n### accounts_receivable  \n\n_since V24.0, use [accounts_pending](#accounts_pending) for V23.3 and below_\n\nReturns a list of confirmed block hashes which have not yet been received by these **accounts**  \n\n**Request:**\n```json\n{\n  \"action\": \"accounts_receivable\",\n  \"accounts\": [\"nano_1111111111111111111111111111111111111111111111111117353trpda\", \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"],\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": [\"142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D\"],\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": [\"4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74\"]\n  }\n}\n```  \n**Optional \"threshold\"**  \n_version 8.0+_   \nNumber (128 bit, decimal). Returns a list of receivable block hashes with amount more or equal to **threshold**   \n\n**Request:**\n```json\n{\n  \"action\": \"accounts_receivable\",\n  \"accounts\": [\"nano_1111111111111111111111111111111111111111111111111117353trpda\", \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"],\n  \"count\": \"1\",\n  \"threshold\": \"1000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": {\n      \"142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D\": \"6000000000000000000000000000000\"\n    },\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": {\n      \"4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74\": \"106370018000000000000000000000000\"\n    }\n  }\n}\n```  \n**Optional \"source\"**  \n_version 9.0+_   \nBoolean, false by default. Returns a list of receivable block hashes with amount and source accounts   \n\n**Request:**\n```json\n{\n  \"action\": \"accounts_receivable\",\n  \"accounts\": [\"nano_1111111111111111111111111111111111111111111111111117353trpda\", \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"],\n  \"count\": \"1\",\n  \"source\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": {\n      \"142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D\": {\n        \"amount\": \"6000000000000000000000000000000\",\n        \"source\": \"nano_3dcfozsmekr1tr9skf1oa5wbgmxt81qepfdnt7zicq5x3hk65fg4fqj58mbr\"\n      }\n    },\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": {\n      \"4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74\": {\n        \"amount\": \"106370018000000000000000000000000\",\n        \"source\": \"nano_13ezf4od79h1tgj9aiu4djzcmmguendtjfuhwfukhuucboua8cpoihmh8byo\"\n      }\n    }\n  }\n}\n```  \n**Optional \"include_active\"**\n\n_version 15.0+_   \nBoolean, false by default. Include active (not confirmed) blocks    \n\n**Request:**\n```json\n{\n  \"action\": \"accounts_receivable\",\n  \"accounts\": [\"nano_1111111111111111111111111111111111111111111111111117353trpda\", \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"],\n  \"count\": \"1\",\n  \"include_active\": \"true\"\n}\n```  \n\n**Optional \"sorting\"**\n\n_version 19.0+_    \nBoolean, false by default. Additionally sorts each account's blocks by their amounts in descending order.\n\n**Optional \"include_only_confirmed\"**\n\n_version 19.0+_  \nBoolean, true by default (_version 22.0+_), previously false by default. Only returns confirmed blocks but with the caveat that their confirmation height might not be up-to-date yet. If false, unconfirmed blocks will also be returned.\n\n---\n\n### accounts_representatives \nReturns the representatives for given **accounts**  \n\n**Request:**\n```json\n{\n  \"action\": \"accounts_representatives\",\n  \"accounts\": [\"nano_16u1uufyoig8777y6r8iqjtrw8sg8maqrm36zzcm95jmbd9i9aj5i8abr8u5\",\"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"]\n}\n```  \n**Response:**\n```json\n{\n  \"representatives\" : {\n    \"nano_16u1uufyoig8777y6r8iqjtrw8sg8maqrm36zzcm95jmbd9i9aj5i8abr8u5\": \"nano_3hd4ezdgsp15iemx7h81in7xz5tpxi43b6b41zn3qmwiuypankocw3awes5k\",\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n  }\n}\n```\n\n!!! info \"Error handling\"\n    With _version 25.0+_, `accounts_representatives` response errors come in a different entry, named `errors`.\n    ```json\n    {\n      \"representatives\": {\n      \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\":   \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n      },\n      \"errors\": {\n        \"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\": \"Bad account number\",\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": \"Account not found\"\n      }\n    }\n    ```\n    If all requested entries result in errors, no entry will be added in the response for `representatives`. Similarly,\n    if there are no errors, no entry will be added for `errors`.  \n    Request:\n    ```json\n    {  \n      \"action\": \"accounts_representatives\",  \n      \"accounts\": [\"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\"]  \n    }\n    ```\n    Response:  \n    ```json\n    {\n      \"errors\": {\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": \"Account not found\"\n      }\n    }\n    ```\n    In _version 24.0+_, `accounts_representatives` response errors were returned per account entry in the\n    `representatives` object.\n    ```json\n    {\n      \"representatives\": {\n        \"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6\": \"nano_3wfddg7a1paogrcwi3yhwnaerboukbr7rs3z3ino5toyq3yyhimo6f6egij6\",\n        \"nano_36uccgpjzhjsdbj44wm1y5hyz8gefx3wjpp1jircxt84nopxkxti5bzq1rnz\": \"error: Bad account number\",\n        \"nano_1hrts7hcoozxccnffoq9hqhngnn9jz783usapejm57ejtqcyz9dpso1bibuy\": \"error: Account not found\"\n      }\n    }\n    ```\n\n---\n\n### available_supply  \nReturns how many raw are in the public supply  \n\n**Request:**\n```json\n{\n  \"action\": \"available_supply\"\n}\n```  \n**Response:**\n```json\n{\n  \"available\": \"133248061996216572282917317807824970865\"\n}\n```\n\n---\n\n### block_account  \nReturns the account containing block  \n\n**Request:**\n```json\n{\n  \"action\": \"block_account\",\n  \"hash\": \"023B94B7D27B311666C8636954FE17F1FD2EAA97A8BAC27DE5084FBBD5C6B02C\"\n}\n```  \n**Response:**\n```json\n{\n  \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n}\n```\n\n---\n\n### block_confirm   \n_version 12.2+_   \nRequest confirmation for **block** from known online representative nodes. Check results with [confirmation history](#confirmation_history).\n\n**Request:**\n```json\n{\n  \"action\": \"block_confirm\",\n  \"hash\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"started\": \"1\"\n}\n```\n\n**NOTE:** Unless there was an error encountered during the command, the response will always return `\"started\": \"1\"`. This response does not indicate the block was successfully confirmed, only that an error did not occur. This response happens even if the block has already been confirmed previously and notifications will be triggered for this block (via HTTP callbacks or WebSockets) in all cases. This behavior may change in a future release.\n\n---\n\n### block_count  \nReports the number of blocks in the ledger and unchecked synchronizing blocks   \n\n**Request:**\n```json\n{\n  \"action\": \"block_count\"\n}\n```  \n**Response:**\n```json\n{\n  \"count\": \"1000\",\n  \"unchecked\": \"10\",\n  \"cemented\": \"25\"\n}\n```\n**Note:** If the node is running the RocksDB backend the unchecked count may only be estimate.  \n\n**Optional \"include_cemented\"**\n\n_version 19.0+ (enable_control required in version 19.0, not required in version 20.0+)_  \nDefault \"true\". If \"true\", \"cemented\" in the response will contain the number of cemented blocks. (In V19.0 default was \"false\")\n\n--8<-- \"warning-enable-control.md\"\n\n---\n\n### block_create\n_enable_control required, version 9.0+_  \nCreates a json representations of new block based on input data & signed with **private key** or **account** in **wallet**. Use for offline signing. Using the optional `json_block` is recommended since v19.0.  \n\n--8<-- \"warning-enable-control.md\"\n\n\n**Request sample for state block:**  \n```json\n{\n  \"action\": \"block_create\",\n  \"json_block\": \"true\",\n  \"type\": \"state\",\n  \"balance\": \"1000000000000000000000\",\n  \"key\": \"0000000000000000000000000000000000000000000000000000000000000002\",\n  \"representative\": \"nano_1hza3f7wiiqa7ig3jczyxj5yo86yegcmqk3criaz838j91sxcckpfhbhhra1\",\n  \"link\": \"19D3D919475DEED4696B5D13018151D1AF88B2BD3BCFF048B45031C1F36D1858\",\n  \"previous\": \"F47B23107E5F34B2CE06F562B5C435DF72A533251CB414C51B2B62A8F63A00E4\"\n}\n```  \nParameters for state block:\n\n* `balance`: **final** balance for account after block creation, formatted in 'raw' units using a decimal integer. If balance is less than previous, block is considered as send subtype!\n* `wallet` (optional): The wallet ID that the account the block is being created for is in.\n* `account` (optional): The [account](../glossary.md#account) the block is being created for.\n* `key` (optional): Instead of using \"wallet\" & \"account\" parameters, you can directly pass in a private key.\n* `source` (optional): The block hash of the source of funds for this receive block (the send block that this receive block will pocket).\n* `destination` (optional): The [account](../glossary.md#account) that the sent funds should be accessible to.\n* `link` (optional): Instead of using \"source\" and \"destination\" parameters, you can directly pass \"link\". If the block is sending funds, set link to the public key of the destination account. If it is receiving funds, set link to the hash of the block to receive. If the block has no balance change but is updating representative only, set link to 0. See [Block format section](../integration-guides/the-basics.md#block-format) for more information\n* `representative`: The [account](../glossary.md#account) that block account will use as its representative.\n* `previous`: The block hash of the previous block on this account's block chain (\"0\" for first block).\n\n**Warning:** It is **critical** that `balance` is the balance of the account **after** created block!\n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"block\" in the response will contain a JSON subtree instead of a JSON string.\n \n**Optional \"work\"**\n\nWork value (16 hexadecimal digits string, 64 bit). Uses **work** value for block from external source  \n\n**Optional \"version\"**\n\n_version 21.0+_\nWork version string. Currently \"work_1\" is the default and only valid option. Only used if optional **work** is not given.\n\n**Optional \"difficulty\"**\n\n_version 21.0+_  \nDifficulty value (16 hexadecimal digits string, 64 bit). Uses **difficulty** value to generate work. Only used if optional **work** is not given.  \n\nIf difficulty and work values are both not given, RPC processor tries to calculate difficulty for work generation based on ledger data: epoch from previous block or from link for receive subtype; block subtype from previous block balance.  \n\n**Examples**\n\n**Response sample for above request**:  \n```json\n{\n  \"hash\": \"FF0144381CFF0B2C079A115E7ADA7E96F43FD219446E7524C48D1CC9900C4F17\",\n  \"difficulty\": \"ffffffe1278b3dc6\", // since V21.0\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_3qgmh14nwztqw4wmcdzy4xpqeejey68chx6nciczwn9abji7ihhum9qtpmdr\",\n    \"previous\": \"F47B23107E5F34B2CE06F562B5C435DF72A533251CB414C51B2B62A8F63A00E4\",\n    \"representative\": \"nano_1hza3f7wiiqa7ig3jczyxj5yo86yegcmqk3criaz838j91sxcckpfhbhhra1\",\n    \"balance\": \"1000000000000000000000\",\n    \"link\": \"19D3D919475DEED4696B5D13018151D1AF88B2BD3BCFF048B45031C1F36D1858\",\n    \"link_as_account\": \"nano_18gmu6engqhgtjnppqam181o5nfhj4sdtgyhy36dan3jr9spt84rzwmktafc\",\n    \"signature\": \"3BFBA64A775550E6D49DF1EB8EEC2136DCD74F090E2ED658FBD9E80F17CB1C9F9F7BDE2B93D95558EC2F277FFF15FD11E6E2162A1714731B743D1E941FA4560A\",\n    \"work\": \"cab7404f0b5449d0\"\n  }\n}\n```  \n\n---\n\n### block_hash  \n_version 13.0+_   \nReturning block hash for given **block** content. Using the optional `json_block` is recommended since v19.0.  \n\n**Request:**\n```json\n{  \n  \"action\": \"block_hash\",\n  \"json_block\": \"true\", \n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_3qgmh14nwztqw4wmcdzy4xpqeejey68chx6nciczwn9abji7ihhum9qtpmdr\",\n    \"previous\": \"F47B23107E5F34B2CE06F562B5C435DF72A533251CB414C51B2B62A8F63A00E4\",\n    \"representative\": \"nano_1hza3f7wiiqa7ig3jczyxj5yo86yegcmqk3criaz838j91sxcckpfhbhhra1\",\n    \"balance\": \"1000000000000000000000\",\n    \"link\": \"19D3D919475DEED4696B5D13018151D1AF88B2BD3BCFF048B45031C1F36D1858\",\n    \"link_as_account\": \"nano_18gmu6engqhgtjnppqam181o5nfhj4sdtgyhy36dan3jr9spt84rzwmktafc\",\n    \"signature\": \"3BFBA64A775550E6D49DF1EB8EEC2136DCD74F090E2ED658FBD9E80F17CB1C9F9F7BDE2B93D95558EC2F277FFF15FD11E6E2162A1714731B743D1E941FA4560A\",\n    \"work\": \"cab7404f0b5449d0\"\n  }\n}\n```  \n**Response:**\n```json\n{\n  \"hash\": \"FF0144381CFF0B2C079A115E7ADA7E96F43FD219446E7524C48D1CC9900C4F17\"\n}\n```\n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"block\" must contain a JSON subtree instead of a JSON string.\n\n---\n\n### block_info  \nRetrieves a json representation of the block in `contents` along with:\n\n* _since version 18.0_: `block_account`, transaction `amount`, block `balance`, block `height` in account chain, block local modification `timestamp`\n* _since version 19.0_: Whether block was `confirmed`, `subtype` (_for state blocks_) of `send`, `receive`, `change` or `epoch`\n* _since version 23.0_: `successor` returned\n\nUsing the optional `json_block` is recommended since v19.0.  \n\n**Request:**\n```json\n{  \n  \"action\": \"block_info\",\n  \"json_block\": \"true\",\n  \"hash\": \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\"\n}\n```  \n**Response:**\n```json\n{\n  \"block_account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n  \"amount\": \"30000000000000000000000000000000000\",\n  \"balance\": \"5606157000000000000000000000000000000\",\n  \"height\": \"58\",\n  \"local_timestamp\": \"0\",\n  \"successor\": \"8D3AB98B301224253750D448B4BD997132400CEDD0A8432F775724F2D9821C72\",\n  \"confirmed\": \"true\",\n  \"contents\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n    \"previous\": \"CE898C131AAEE25E05362F247760F8A3ACF34A9796A5AE0D9204E86B0637965E\",\n    \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n    \"balance\": \"5606157000000000000000000000000000000\",\n    \"link\": \"5D1AA8A45F8736519D707FCB375976A7F9AF795091021D7E9C7548D6F45DD8D5\",\n    \"link_as_account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n    \"signature\": \"82D41BC16F313E4B2243D14DFFA2FB04679C540C2095FEE7EAE0F2F26880AD56DD48D87A7CC5DD760C5B2D76EE2C205506AA557BF00B60D8DEE312EC7343A501\",\n    \"work\": \"8a142e07a10996d5\"\n  },\n  \"subtype\": \"send\"\n}\n```\n\nNote: The `Balance` in contents is a uint128. However, it will be a hex-encoded (like `0000000C9F2C9CD04674EDEA40000000` for [1 nano](../protocol-design/distribution-and-units.md#unit-dividers)) when the block is a legacy *Send Block*. If the block is a *State-Block*, the same `Balance` will be a numeric-string (like `1000000000000000000000000000000`).\n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"contents\" will contain a JSON subtree instead of a JSON string.\n\n\n**Optional `include_linked_account`**\n\n_version 28.0+_\n(bool):  When set to `true`, the response will include a new field `linked_account`, which returns the linked account associated with the block (or \"0\" if no linked account exists/was found e.g. due to pruning).\n\n\n---\n\n### blocks  \nRetrieves a json representations of **blocks**. Using the optional `json_block` is recommended since v19.0.  \n\n**Request:**\n```json\n{\n  \"action\": \"blocks\",\n  \"json_block\": \"true\",\n  \"hashes\": [\"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\"]\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": {\n    \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\": {\n      \"type\": \"state\",\n      \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"previous\": \"CE898C131AAEE25E05362F247760F8A3ACF34A9796A5AE0D9204E86B0637965E\",\n      \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n      \"balance\": \"5606157000000000000000000000000000000\",\n      \"link\": \"5D1AA8A45F8736519D707FCB375976A7F9AF795091021D7E9C7548D6F45DD8D5\",\n      \"link_as_account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n      \"signature\": \"82D41BC16F313E4B2243D14DFFA2FB04679C540C2095FEE7EAE0F2F26880AD56DD48D87A7CC5DD760C5B2D76EE2C205506AA557BF00B60D8DEE312EC7343A501\",\n      \"work\": \"8a142e07a10996d5\"\n    }\n  }\n}\n```\n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"contents\" will contain a JSON subtree instead of a JSON string.\n\n---\n\n### blocks_info   \nRetrieves a json representations of `blocks` in `contents` along with:\n\n* _since version 18.0_: `block_account`, transaction `amount`, block `balance`, block `height` in account chain, block local modification `timestamp`\n* _since version 19.0_: Whether block was `confirmed`, `subtype` (_for state blocks_) of `send`, `receive`, `change` or `epoch`\n* _since version 23.0_: `successor` returned\n\nUsing the optional `json_block` is recommended since v19.0.  \n\n**Request:**\n```json\n{\n  \"action\": \"blocks_info\",\n  \"json_block\": \"true\",\n  \"hashes\": [\"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\"]\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": {\n    \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\": {\n      \"block_account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"amount\": \"30000000000000000000000000000000000\",\n      \"balance\": \"5606157000000000000000000000000000000\",\n      \"height\": \"58\",\n      \"local_timestamp\": \"0\",\n      \"successor\": \"8D3AB98B301224253750D448B4BD997132400CEDD0A8432F775724F2D9821C72\",\n      \"confirmed\": \"true\",\n      \"contents\": {\n        \"type\": \"state\",\n        \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n        \"previous\": \"CE898C131AAEE25E05362F247760F8A3ACF34A9796A5AE0D9204E86B0637965E\",\n        \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n        \"balance\": \"5606157000000000000000000000000000000\",\n        \"link\": \"5D1AA8A45F8736519D707FCB375976A7F9AF795091021D7E9C7548D6F45DD8D5\",\n        \"link_as_account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n        \"signature\": \"82D41BC16F313E4B2243D14DFFA2FB04679C540C2095FEE7EAE0F2F26880AD56DD48D87A7CC5DD760C5B2D76EE2C205506AA557BF00B60D8DEE312EC7343A501\",\n        \"work\": \"8a142e07a10996d5\"\n      },\n      \"subtype\": \"send\"\n    }\n  }\n}\n```\n**Optional `include_linked_account`**\n\n_version 28.0+_\n(bool): When set to `true`, the response will include a new field `linked_account`, which returns the linked account associated with the block (or \"0\" if no linked account exists/was found e.g. due to pruning).\n  \n**Optional \"pending\", \"source\"**\n\n_pending, source: version 9.0+_  \nBooleans, false by default. Additionally checks if block is pending, returns source account for receive & open blocks (0 for send & change blocks).\n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"blocks_info\",\n  \"hashes\": [\"E2FB233EF4554077A7BF1AA85851D5BF0B36965D2B0FB504B2BC778AB89917D3\"],\n  \"pending\": \"true\",\n  \"source\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"E2FB233EF4554077A7BF1AA85851D5BF0B36965D2B0FB504B2BC778AB89917D3\": {\n      \"block_account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n      \"amount\": \"30000000000000000000000000000000000\",\n      \"contents\": {\n        ...\n      },\n      \"pending\": \"0\",\n      \"source_account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"balance\": \"40200000001000000000000000000000000\"\n    }\n  }\n}\n```\n**Optional \"receive_hash\"**\n\n_version 24.0+_  \nBoolean, default false. If \"true\", displays the hash of the send block's corresponding receive (if any). Returns 0 for non-send blocks, and for receivable blocks that do not yet have a corresponding receive.\n\n**Request:**\n```json\n{\n  \"action\": \"blocks_info\",\n  \"hashes\": [\"67D9F9F03566D22926159193BD5BDE549FBE8308807C666BCCD3CEA098FBF49D\"], \n  \"receive_hash\": \"true\" \n}\n```\n\n**Response**\n```json\n{\n    \"blocks\": {\n        \"67D9F9F03566D22926159193BD5BDE549FBE8308807C666BCCD3CEA098FBF49D\": {\n            \"block_account\": \"nano_1pnano6m6o1ix3eshr6fj9rryd4ckziyii1mf3ychqno9t3soz638dc9fj9a\",\n            \"amount\": \"1240000000000000000000000000\",\n            \"balance\": \"11017588042701000000000000000000\",\n            \"height\": \"271199\",\n            \"local_timestamp\": \"1674588370\",\n            \"successor\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n            \"confirmed\": \"true\",\n            \"contents\": {\n              ...\n            },\n            \"subtype\": \"send\",\n            \"receive_hash\": \"4DCA5A5E2C732A6899292B9091B7A90CE87E8063954498DF30F469416E6DD6C0\"\n        }\n    }\n}\n```\n\n**Optional \"json_block\"**  \n_version 19.0+_  \nDefault \"false\". If \"true\", \"contents\" will contain a JSON subtree instead of a JSON string.\n\n**Optional \"include_not_found\"**  \n_version 19.0+_  \nDefault \"false\". If \"true\", an additional \"blocks_not_found\" is provided in the response, containing a list of the block hashes that were not found in the local database. Previously to this version an error would be produced if any block was not found.\n\n**Request:**\n```json\n{\n  \"action\": \"blocks_info\",\n  \"include_not_found\": \"true\",\n  \"hashes\": [\"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\", \"0000000000000000000000000000000000000000000000000000000000000001\"]\n}\n```\n\n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\": {\n      \"block_account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"amount\": \"30000000000000000000000000000000000\",\n      \"balance\": \"5606157000000000000000000000000000000\",\n      \"height\": \"58\",\n      \"local_timestamp\": \"0\",\n      \"confirmed\": \"false\",\n      \"contents\": {\n        ...\n      }\n    }\n  },\n  \"blocks_not_found\": [\n    \"0000000000000000000000000000000000000000000000000000000000000001\"\n  ]\n}\n```\n\n---\n\n### bootstrap  \nInitialize bootstrap to specific **IP address** and **port**. Not compatible with launch flag [--disable_legacy_bootstrap](/commands/command-line-interface/#-disable_legacy_bootstrap)   \n\n**Request:**\n```json\n{\n  \"action\": \"bootstrap\",\n  \"address\": \"::ffff:138.201.94.249\",\n  \"port\": \"7075\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```\n\n**Optional \"bypass_frontier_confirmation\"**  \n_version 20.0-21.3_  \nDefault \"false\". If \"true\", frontier confirmation will not be performed for this bootstrap. Normally not to be changed.\n\n**Optional \"id\"**  \n_version 21.0+_  \nString, empty by default. Set specific ID for new bootstrap attempt for better tracking.\n\n---\n\n### bootstrap_any  \nInitialize multi-connection bootstrap to random peers. Not compatible with launch flag [--disable_legacy_bootstrap](/commands/command-line-interface/#-disable_legacy_bootstrap)   \n\n**Request:**\n```json\n{\n  \"action\": \"bootstrap_any\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```\n**Optional \"force\"**  \n_version 20.0+_  \nBoolean, false by default. Manually force closing of all current bootstraps  \n\n**Optional \"id\"**  \n_version 21.0+_  \nString, empty by default. Set specific ID for new bootstrap attempt for better tracking.\n\n**Optional \"account\"**\n_version 22.0+_\nString, empty by default. Public address for targeting a specific account on bootstrap attempt\n\n---\n\n### bootstrap_lazy  \n_enable_control required, version 17.0+_   \nInitialize lazy bootstrap with given block **hash**. Not compatible with launch flag [--disable_lazy_bootstrap](/commands/command-line-interface/#-disable_lazy_bootstrap). As of _version 22.0_, response includes whether new election was `started` and whether a new lazy `key_inserted` was successful.\n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"bootstrap_lazy\",\n  \"hash\": \"FF0144381CFF0B2C079A115E7ADA7E96F43FD219446E7524C48D1CC9900C4F17\"\n}\n```  \n**Response:**\n```json\n{\n  \"started\": \"1\",\n  \"key_inserted\": \"0\"\n}\n```\n**Optional \"force\"**\n\nBoolean, false by default. Manually force closing of all current bootstraps  \n\n**Optional \"id\"**  \n_version 21.0+_  \nString, empty by default. Set specific ID for new bootstrap attempt for better tracking.\n\n---\n\n### bootstrap_priorities  \n_enable_control required, version 28.0+_   \nDumps info about priority and blocking sets to aid in debugging any potential problems\n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"bootstrap_priorities\"\n}\n```  \n\n---\n\n### bootstrap_reset  \n_enable_control required, version 28.0+_   \nResets ascending bootstrap state - both priority and blocking sets are cleared.\n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"bootstrap_reset\"\n}\n```  \n\n---\n\n### bootstrap_status  \n_version 17.0+_\n\n--8<-- \"warning-debug-only-command.md\"\n\nReturning status of current bootstrap attempt\n\n**Request:**\n```json\n{\n  \"action\": \"bootstrap_status\"\n}\n```  \n**Response:**\n_versions 21.0+_\n```json\n{\n  \"bootstrap_threads\": \"2\",\n  \"running_attempts_count\": \"2\",\n  \"total_attempts_count\": \"6\",\n  \"connections\": {\n    \"clients\": \"31\",\n    \"connections\": \"45\",\n    \"idle\": \"0\",\n    \"target_connections\": \"64\",\n    \"pulls\": \"1158514\"\n  },\n  \"attempts\": [\n    {\n      \"id\": \"EE778222D6407F94A666B8A9E03D242D\",\n      \"mode\": \"legacy\",\n      \"started\": \"true\",\n      \"pulling\": \"1158544\",\n      \"total_blocks\": \"4311\",\n      \"requeued_pulls\": \"7\",\n      \"frontier_pulls\": \"0\",\n      \"frontiers_received\": \"true\",\n      \"frontiers_confirmed\": \"false\",\n      \"frontiers_confirmation_pending\": \"false\",\n      \"frontiers_age\": \"4294967295\",\n      \"last_account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n      \"duration\": \"133\"\n    },\n    {\n      \"id\": \"291D2CC32F44E004896C4215A6CDEDAFEF317F6AC802C244E8F4B4F2456175CB\",\n      \"mode\": \"lazy\",\n      \"started\": \"true\",\n      \"pulling\": \"1\",\n      \"total_blocks\": \"1878\",\n      \"requeued_pulls\": \"4\",\n      \"lazy_blocks\": \"1878\",\n      \"lazy_state_backlog\": \"1\",\n      \"lazy_balances\": \"4\",\n      \"lazy_destinations\": \"0\",\n      \"lazy_undefined_links\": \"0\",\n      \"lazy_pulls\": \"13\",\n      \"lazy_keys\": \"2\",\n      \"lazy_key_1\": \"E6D0B5BD5EBDB3CEC7DBC32EDC3C2DBD5ABA17C54E34485A358BF8948039ED6A\",\n      \"duration\": \"17\"\n    }\n  ]\n}\n```\n\n??? abstract \"Response V17.0-V20.0\"\n    ```json\n    {\n      \"clients\": \"0\",\n      \"pulls\": \"0\",\n      \"pulling\": \"0\",\n      \"connections\": \"31\",\n      \"idle\": \"31\",\n      \"target_connections\": \"16\",\n      \"total_blocks\": \"13558\",\n      \"runs_count\": \"0\",\n      \"requeued_pulls\": \"31\",\n      \"frontiers_received\": \"true\",\n      \"frontiers_confirmed\": \"false\",\n      \"mode\": \"legacy\",\n      \"lazy_blocks\": \"0\",\n      \"lazy_state_backlog\": \"0\",\n      \"lazy_balances\": \"0\",\n      \"lazy_destinations\": \"0\",\n      \"lazy_undefined_links\": \"0\",\n      \"lazy_pulls\": \"32\",\n      \"lazy_keys\": \"32\",\n      \"lazy_key_1\": \"36897874BDA3028DC8544C106BE1394891F23DDDF84DE100FED450F6FBC8122C\",\n      \"duration\": \"29\"\n    }\n    ```\n\n---\n\n### chain  \nReturns a consecutive list of block hashes in the account chain starting at **block** back to **count** (direction from frontier back to open block, from newer blocks to older). Will list all blocks back to the open block of this chain when count is set to \"-1\". The requested block hash is included in the answer.  \n\n**Request:**\n```json\n{\n  \"action\": \"chain\",\n  \"block\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": [\n    \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n  ]\n}\n```\n**Optional \"offset\"**\n\n_version 18.0+_   \nNumber, 0 by default. Return the account chain block hashes **offset** by the specified number of blocks    \n\n**Optional \"reverse\"**\n\n_version 18.0+_   \nBoolean, false by default. Returns a list of block hashes in the account chain starting at **block** up to **count** (direction from open block up to frontier, from older blocks to newer). Equal to [successors](#successors)    \n\n---\n\n### confirmation_active  \n_version 16.0+_   \nReturns list of active elections qualified roots (excluding stopped & aborted elections); since V21, also includes the number of unconfirmed and confirmed active elections. Find info about specific qualified root with [confirmation_info](#confirmation_info)  \n\n!!! note\n    The roots provided are two parts and differ between the first account block and subsequent blocks:\n\n    * First account block (open): account public key + `0000000000000000000000000000000000000000000000000000000000000000`\n    * Other blocks: previous hash + previous hash\n\n\n**Request:**\n```json\n{\n  \"action\": \"confirmation_active\"\n}\n```  \n**Response:**\n```json\n{\n \"confirmations\": [\n   \"8031B600827C5CC05FDC911C28BBAC12A0E096CCB30FA8324F56C123676281B28031B600827C5CC05FDC911C28BBAC12A0E096CCB30FA8324F56C123676281B2\"\n ],\n \"unconfirmed\": \"133\", // since V21.0\n \"confirmed\": \"5\" // since V21.0\n}\n```   \n   \n**Optional \"announcements\"**\n\nNumber, 0 by default. Returns only active elections with equal or higher announcements count. Useful to find long running elections   \n\n---\n\n### confirmation_history  \n_version 12.0+_\n\n--8<-- \"warning-debug-only-command.md\"\n \nduration, time, confirmation_stats: version 17.0+_   \nReturns hash, tally weight, election duration (in milliseconds), election confirmation timestamp for recent elections winners; since V20.0, the confirmation request count; since V21.0, the number of blocks and voters. Also returns stats: count of elections in history (limited to 2048) & average duration time.\n\nWith version 19.0+ `confirmation_history_size` can be managed in the configuration file to adjust the number of elections to be kept in history and returned by this call. Due to timings inside the node, the default 2048 limit will return all confirmations up to traffic levels of approximately 56 confirmations/sec. To properly track levels above this, increase this value or use the confirmation subscription through the [websocket](/integration-guides/websockets) instead.\n\n**Request:**\n```json\n{\n  \"action\": \"confirmation_history\"\n}\n```  \n**Response:**\n```json\n{\n  \"confirmation_stats\": {\n    \"count\": \"2\",\n    \"average\": \"5000\"\n  },\n  \"confirmations\": [\n    {\n      \"hash\": \"EA70B32C55C193345D625F766EEA2FCA52D3F2CCE0B3A30838CC543026BB0FEA\",\n      \"duration\": \"4000\",\n      \"time\": \"1544819986\",\n      \"tally\": \"80394786589602980996311817874549318248\",\n      \"final\": \"80394786589602980996311817874549318248\", // since V22.0\n      \"blocks\": \"1\", // since V21.0\n      \"voters\": \"37\", // since V21.0\n      \"request_count\": \"2\" // since V20.0\n    },\n    {\n      \"hash\": \"F2F8DA6D2CA0A4D78EB043A7A29E12BDE5B4CE7DE1B99A93A5210428EE5B8667\",\n      \"duration\": \"6000\",\n      \"time\": \"1544819988\",\n      \"tally\": \"68921714529890443063672782079965877749\",\n      \"final\": \"68921714529890443063672782079965877749\", // since V22.0\n      \"blocks\": \"1\", // since V21.0\n      \"voters\": \"64\", // since V21.0\n      \"request_count\": \"7\" // since V20.0\n    }\n  ]\n}\n```   \n**Optional \"hash\"**\n\nValid block hash, filters return for only the provided hash. If there is no confirmation available for that hash anymore, the following return can be expected:  \n```json\n{\n  \"confirmation_stats\": {\n    \"count\": \"0\"\n  },\n  \"confirmations\": \"\"\n}\n```  \n\nIf the block is unknown on the node, the following error will be returned:  \n```\"error\": \"Invalid block hash\"```  \n \n---\n\n### confirmation_info \n_version 16.0+_   \nReturns info about an unconfirmed active election by **root**. Including announcements count, last winner (initially local ledger block), total tally of voted representatives, concurrent blocks with tally & block contents for each. Using the optional `json_block` is recommended since v19.0. Updated in v28.0 to include a list of representatives_final (representatives that have voted with final votes). \n\n!!! note\n    The roots provided are two parts and differ between the first account block and subsequent blocks:\n\n    * First account block (open): `0000000000000000000000000000000000000000000000000000000000000000` + account public key\n    * Other blocks: previous hash + previous hash\n\n\n**Request:**\n```json\n{\n  \"action\": \"confirmation_info\",\n  \"json_block\": \"true\",\n  \"root\": \"EE125B1B1D85D3C24636B3590E1642D9F21B166C0C6CD99C9C6087A1224A0C44EE125B1B1D85D3C24636B3590E1642D9F21B166C0C6CD99C9C6087A1224A0C44\"\n}\n```  \n**Response:**\n```json\n{\n  \"announcements\": \"2\",\n  \"voters\": \"29\",\n  \"last_winner\": \"B94C505029F04BC057A0486ADA8BD07981B4A8736AE6581F2E98C6D18498146F\",\n  \"total_tally\": \"51145880360832646375807054724596663794\",\n  \"final_tally\": \"51145880360832646375807054724596663794\",\n  \"blocks\": {\n    \"B94C505029F04BC057A0486ADA8BD07981B4A8736AE6581F2E98C6D18498146F\": {\n      \"tally\": \"51145880360832646375807054724596663794\",\n      \"contents\": {\n        \"type\": \"state\",\n        \"account\": \"nano_3fihmbtuod33s4nrbqfczhk9zy9ddqimwjshzg4c3857es8c9631i5rg6h9p\",\n        \"previous\": \"EE125B1B1D85D3C24636B3590E1642D9F21B166C0C6CD99C9C6087A1224A0C44\",\n        \"representative\": \"nano_3o7uzba8b9e1wqu5ziwpruteyrs3scyqr761x7ke6w1xctohxfh5du75qgaj\",\n        \"balance\": \"218195000000000000000000000000\",\n        \"link\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n        \"link_as_account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n        \"signature\": \"B1BD285235C612C5A141FA61793D7C6C762D3F104A85102DED5FBD6B4514971C4D044ACD3EC8C06A9495D8E83B6941B54F8DABA825ADF799412ED9E2C86D7A0C\",\n        \"work\": \"05bb28cd8acbe71d\"\n      }\n    }\n  }\n}   \n```   \n\n**Optional \"contents\"**\n\nBoolean, true by default. Disable contents for each block   \n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"contents\" will contain a JSON subtree instead of a JSON string.\n\n**Optional \"representatives\"**\n\nBoolean, false by default. Returns list of votes representatives & its weights for each block   \n\n**Request:**\n```json\n{\n  \"action\": \"confirmation_info\",\n  \"json_block\": \"true\",\n  \"root\": \"EE125B1B1D85D3C24636B3590E1642D9F21B166C0C6CD99C9C6087A1224A0C44EE125B1B1D85D3C24636B3590E1642D9F21B166C0C6CD99C9C6087A1224A0C44\",\n  \"representatives\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"announcements\": \"5\",\n  \"last_winner\": \"B94C505029F04BC057A0486ADA8BD07981B4A8736AE6581F2E98C6D18498146F\",\n  \"total_tally\": \"51145880360792646375807054724596663794\",\n  \"blocks\": {\n    \"B94C505029F04BC057A0486ADA8BD07981B4A8736AE6581F2E98C6D18498146F\": {\n      \"tally\": \"51145880360792646375807054724596663794\",\n      \"contents\": {\n        \"type\": \"state\",\n        \"account\": \"nano_3fihmbtuod33s4nrbqfczhk9zy9ddqimwjshzg4c3857es8c9631i5rg6h9p\",\n        \"previous\": \"EE125B1B1D85D3C24636B3590E1642D9F21B166C0C6CD99C9C6087A1224A0C44\",\n        \"representative\": \"nano_3o7uzba8b9e1wqu5ziwpruteyrs3scyqr761x7ke6w1xctohxfh5du75qgaj\",\n        \"balance\": \"218195000000000000000000000000\",\n        \"link\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n        \"link_as_account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n        \"signature\": \"B1BD285235C612C5A141FA61793D7C6C762D3F104A85102DED5FBD6B4514971C4D044ACD3EC8C06A9495D8E83B6941B54F8DABA825ADF799412ED9E2C86D7A0C\",\n        \"work\": \"05bb28cd8acbe71d\"\n      },\n      \"representatives\": {\n        \"nano_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh\": \"12617828599372664613607727105312358589\",\n        \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\": \"5953738757270291536911559258663615240\",\n        ...\n        \"nano_3i4n5n6c6xssapbdtkdoutm88c5zjmatc5tc77xyzdkpef8akid9errcpjnx\": \"0\"\n      }\n    }\n  }\n}\n```   \n\n---\n\n### confirmation_quorum  \n_version 16.0+_   \nReturns information about node elections settings & observed network state:\n\n- `quorum_delta`: Online weight times `online_weight_quorum_percent`\n- `online_weight_quorum_percent`: Percent of online vote weight required for confirmation\n- `online_weight_minimum`: When calculating online weight, the node is forced to assume at least this much voting weight is online, thus setting a floor for voting weight to confirm transactions at `online_weight_minimum` * `quorum_delta`\n- `online_stake_total`: Total online weight from gossip vote traffic\n- `peers_stake_total`: Total online weight from direct node connections\n- `trended_stake_total`: Median of online weight samples taken every 5 minutes over previous 2 week period\n- Removed in _version 22.0_: `peers_stake_required`\n\n**Request:**\n```json\n{  \n  \"action\": \"confirmation_quorum\"      \n}\n```  \n**Response:**\n```json\n{\n  \"quorum_delta\": \"41469707173777717318245825935516662250\",\n  \"online_weight_quorum_percent\": \"50\",\n  \"online_weight_minimum\": \"60000000000000000000000000000000000000\",\n  \"online_stake_total\": \"82939414347555434636491651871033324568\",\n  \"peers_stake_total\": \"69026910610720098597176027400951402360\",\n  \"trended_stake_total\": \"81939414347555434636491651871033324568\"\n}   \n```   \n\n**Optional \"peer_details\"**\n\n_version 17.0+_ \n\nBoolean, false by default. If true, add account/ip/rep weight for each peer considered in the summation of *peers_stake_total*.\n\n**Response field \"peers_stake_required\"**\n\n_version 19.0+_\n\nThe effective stake needed from directly connected peers for quorum. Per v19, this field is computed as `max(quorum_delta, online_weight_minimum)`. If `peers_stake_total` is lower than this value, the node will not mark blocks as confirmed.\n\n---\n\n### database_txn_tracker\n_enable_control required, v19.0+_  \n\n--8<-- \"warning-debug-only-command.md\"\n  \nReturns a list of open database transactions which are equal or greater than the `min_read_time` or `min_write_time` for reads and read-writes respectively.  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"database_txn_tracker\",\n  \"min_read_time\" : \"1000\",\n  \"min_write_time\" : \"0\"\n}\n```\n**Response on Windows/Debug:**  \n```json\n{\n  \"txn_tracking\": [\n    {\n      \"thread\": \"Blck processing\",  // Which thread held the transaction\n      \"time_held_open\": \"2\",        // Seconds the transaction has currently been held open for\n      \"write\": \"true\",              // If true it is a write lock, otherwise false.\n      \"stacktrace\": [\n        {\n          \"name\": \"nano::mdb_store::tx_begin_write\",\n          \"address\": \"00007FF7142C5F86\",\n          \"source_file\": \"c:\\\\users\\\\wesley\\\\documents\\\\raiblocks\\\\nano\\\\node\\\\lmdb.cpp\",\n          \"source_line\": \"825\"\n        },\n        {\n          \"name\": \"nano::block_processor::process_batch\",\n          \"address\": \"00007FF714121EEA\",\n          \"source_file\": \"c:\\\\users\\\\wesley\\\\documents\\\\raiblocks\\\\nano\\\\node\\\\blockprocessor.cpp\",\n          \"source_line\": \"243\"\n        },\n        {\n          \"name\": \"nano::block_processor::process_blocks\",\n          \"address\": \"00007FF71411F8A6\",\n          \"source_file\": \"c:\\\\users\\\\wesley\\\\documents\\\\raiblocks\\\\nano\\\\node\\\\blockprocessor.cpp\",\n          \"source_line\": \"103\"\n        },\n        ...\n      ]\n    }\n    ... // other threads\n  ]\n}\n```\n\n---\n\n### delegators  \n_version 8.0+_   \nReturns a list of pairs of delegator accounts and balances given a representative **account**\n\n**Request:**\n```json\n{\n  \"action\": \"delegators\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\"\n}\n```  \n**Response:**\n```json\n{\n  \"delegators\": {\n    \"nano_13bqhi1cdqq8yb9szneoc38qk899d58i5rcrgdk5mkdm86hekpoez3zxw5sd\": \"500000000000000000000000000000000000\",\n    \"nano_17k6ug685154an8gri9whhe5kb5z1mf5w6y39gokc1657sh95fegm8ht1zpn\": \"961647970820730000000000000000000000\"\n  }\n}\n```   \n\n**Optional parameters:**  \n_since V23.0_  \n\n* `threshold`: minimum required balance for a delegating account to be included in the response\n* `count`: number of delegators to return\n* `start`: account in the list you would like to start after, to allow for paging responses\n\n---\n\n### delegators_count  \n_version 8.0+_   \nGet number of delegators for a specific representative **account**  \n\n**Request:**\n```json\n{\n  \"action\": \"delegators_count\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\"\n}\n```  \n**Response:**\n```json\n{\n  \"count\": \"2\"\n}\n```   \n\n---\n\n### deterministic_key  \nDerive deterministic keypair from **seed** based on **index**  \n\n**Request:**\n```json\n{\n  \"action\": \"deterministic_key\",\n  \"seed\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n  \"index\": \"0\"\n}\n```  \n**Response:**\n```json\n{\n  \"private\": \"9F0E444C69F77A49BD0BE89DB92C38FE713E0963165CCA12FAF5712D7657120F\",\n  \"public\": \"C008B814A7D269A1FA3C6528B19201A24D797912DB9996FF02A1FF356E45552B\",\n  \"account\": \"nano_3i1aq1cchnmbn9x5rsbap8b15akfh7wj7pwskuzi7ahz8oq6cobd99d4r3b7\"\n}\n```  \n\n---\n\n### election_statistics  \n_version 27.0+_ \n\nReturns the number of each election type, the maximum and average election age from Active Election Container (AEC).\n\nValues in `max_election_age` and `average_election_age` are in milliseconds.\n\n**Request:**\n```json\n{\n  \"action\": \"election_statistics\"\n}\n```  \n**Response sample:**\n```json\n{\n    \"normal\": \"152\",\n    \"priority\": \"1\",\n    \"hinted\": \"0\",\n    \"optimistic\": \"19\",\n    \"total\": \"172\",\n    \"aec_utilization_percentage\": \"3.42\",\n    \"max_election_age\": \"5493\",\n    \"average_election_age\": \"421\"\n}\n```\n\n---\n\n### epoch_upgrade  \n_enable_control required, version 20.0+_ \n\n--8<-- \"warning-debug-only-command.md\"\n\nUpgrade network to new **epoch** with epoch signer private **key**. This spawns a background task to iterate over all accounts and add the epoch block to any accounts that do not have it. It will return `{ \"started\" = \"1\" }` if the background task was spawned successfully or `{ \"started\" = \"0\" }` if the operation could not be started. Reasons for not being able to start the operations include the node being stopped and a previous being in progress. `epoch` can be set to either 1 (representing the [network upgrade to state blocks](../releases/network-upgrades.md#state-blocks)) or 2 (representing the [network upgrade for increase work difficulty](../releases/network-upgrades.md#increased-work-difficulty)).\n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"epoch_upgrade\",\n  \"epoch\": \"1\",\n  \"key\": \"0000000000000000000000000000000000000000000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"started\": \"1\"\n}\n```  \n**Optional \"count\"**  \nNumber. Determines limit of number of accounts to upgrade.\n\n**Optional \"threads\"**  \n_version 21.0+_  \nNumber. Determines limit of work threads to use for concurrent upgrade processes (useful with multiple work peers or high work peer latency).\n\n---\n\n### frontier_count  \nReports the number of accounts in the ledger  \n\n**Request:**\n```json\n{\n  \"action\": \"frontier_count\"\n}\n```  \n**Response:**\n```json\n{\n  \"count\": \"920471\"\n}\n```\n\n---\n\n### frontiers  \nReturns a list of pairs of account and block hash representing the head block starting at **account** up to **count**  \n\n**Request:**\n```json\n{\n  \"action\": \"frontiers\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"frontiers\" : {\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n  }\n}\n```\n\n---\n\n### keepalive  \n_enable_control required_  \nTells the node to send a keepalive packet to **address**:**port**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"keepalive\",\n  \"address\": \"::ffff:192.169.0.1\",\n  \"port\": \"1024\"\n}\n```  \n**Response:**\n```json\n{\n  \"started\": \"1\"\n}\n```\n\n---\n\n### key_create \nGenerates an **adhoc random keypair**  \n\n**Request:**\n```json\n{\n  \"action\": \"key_create\"\n}\n```  \n**Response:**\n```json\n{\n  \"private\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\",\n  \"public\": \"3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}\n```  \n\n---\n\n### key_expand  \nDerive public key and account number from **private key**  \n\n**Request:**\n```json\n{\n  \"action\": \"key_expand\",\n  \"key\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\"\n}\n```  \n**Response:**\n```json\n{\n  \"private\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\",\n  \"public\": \"3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}\n```  \n\n---\n\n### ledger\n_enable_control required, version 9.0+_   \nReturns frontier, open block, change representative block, balance, last modified timestamp from local database & block count starting at **account** up to **count**   \n\n--8<-- \"warning-enable-control.md\"\n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"ledger\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"accounts\": {\n    \"nano_11119gbh8hb4hj1duf7fdtfyf5s75okzxdgupgpgm1bj78ex3kgy7frt3s9n\": {\n      \"frontier\": \"E71AF3E9DD86BBD8B4620EFA63E065B34D358CFC091ACB4E103B965F95783321\",\n      \"open_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"representative_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"balance\": \"0\",\n      \"modified_timestamp\": \"1511476234\",\n      \"block_count\": \"2\"\n    }\n  }\n}\n```  \n**Optional \"representative\", \"weight\", \"receivable\"**  \nBooleans, false by default. Additionally returns representative, voting weight, receivable balance for each account   \n\n**Request:**\n```json\n{\n  \"action\": \"ledger\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n  \"count\": \"1\",\n  \"representative\": \"true\",\n  \"weight\": \"true\",\n  \"receivable\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"accounts\": {\n    \"nano_11119gbh8hb4hj1duf7fdtfyf5s75okzxdgupgpgm1bj78ex3kgy7frt3s9n\": {\n      \"frontier\": \"E71AF3E9DD86BBD8B4620EFA63E065B34D358CFC091ACB4E103B965F95783321\",\n      \"open_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"representative_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"balance\": \"0\",\n      \"modified_timestamp\": \"1511476234\",\n      \"block_count\": \"2\",\n      \"representative\": \"nano_1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjtwnqposrs\",\n      \"weight\": \"0\",\n      \"pending\": \"0\",\n      \"receivable\": \"0\"\n    }   \n  }   \n}\n```  \n**Optional \"modified_since\"**  \n_version 11.0+_   \nUNIX timestamp (number), 0 by default. Return only accounts modified in local database after specific timestamp   \n\n**Optional \"sorting\"**  \nBoolean, false by default. Additional sorting accounts in descending order  \nNOTE: The \"count\" option is ignored if \"sorting\" is specified\n\n**Optional \"threshold\"**  \n_version 19.0+_  \nNumber (128 bit, decimal), default 0. Return only accounts with balance above **threshold**. If **receivable** is also given, the number compared with the threshold is the sum of account balance and receivable balance.\n\n---\n\n### node_id\n_enable_control required, version 17.0+_ \n\n--8<-- \"warning-debug-only-command.md\"\n \nReturns private key, public key and node ID number with checksum (similar to account representation) from the existing node ID created on startup. \"as_account\" field is **deprecated**  \n_version 20.0 will generate the node_id with `node_` prefix, earlier versions will generate with `nano_` prefix_  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"node_id\"\n}\n```  \n**Response:**\n```json\n{\n  \"private\": \"2AD75C9DC20EA497E41722290C4DC966ECC4D6C75CAA4E447961F918FD73D8C7\",\n  \"public\": \"78B11E1777B8E7DF9090004376C3EDE008E84680A497C0805F68CA5928626E1C\",\n  \"as_account\": \"nano_1y7j5rdqhg99uyab1145gu3yur1ax35a3b6qr417yt8cd6n86uiw3d4whty3\",\n  \"node_id\": \"node_1y7j5rdqhg99uyab1145gu3yur1ax35a3b6qr417yt8cd6n86uiw3d4whty3\"\n}\n```  \n\n---\n\n### peers  \nReturns a list of pairs of online peer IPv6:port and its node protocol network version    \n\n**Request:**\n```json\n{\n  \"action\": \"peers\"\n}\n```  \n \n**Response version 8.0+:**\n```json\n{\n  \"peers\": {\n    \"[::ffff:172.17.0.1]:32841\": \"16\"\n  }\n}\n```   \n\n**Response before version 8.0:**\n```json\n{\n  \"peers\": [\n      \"[::ffff:172.17.0.1]:32841\"\n  ]\n}\n```   \n**Optional \"peer_details\"**\n\n_version 18.0+_   \nBoolean, false by default. Returns a list of peers IPv6:port with its node protocol network version and node ID. The node ID is random and is not a Nano address. As of Version V21+ `type` returns `tcp`, as `udp` was **deprecated** and is not longer used for peering with that node.\n\n_version 20.0 will generate the node_id with `node_` prefix, earlier versions will generate with `nano_` prefix_  \n\n**Request:**\n```json\n\n{\n  \"action\": \"peers\",\n  \"peer_details\": \"true\"\n}\n```\n\n**Response:**\n```json\n{\n  \"peers\": {\n    \"[::ffff:172.17.0.1]:7075\": {\n      \"protocol_version\": \"18\",\n      \"node_id\": \"node_1y7j5rdqhg99uyab1145gu3yur1ax35a3b6qr417yt8cd6n86uiw3d4whty3\",\n      \"type\": \"tcp\"\n    }\n  }\n}\n```\n\n---\n\n### populate_backlog\n_enable_control required_ \nScans all accounts, checks for unconfirmed blocks in account chains, and then queues those blocks for confirmation via the election scheduler. Useful for local test networks, since default backlog population is normally done over longer intervals (e.g. 5 minutes).\n\n--8<-- \"warning-enable-control.md\"\n\n**Request**\n```json\n{ \n  \"action\": \"populate_backlog\"   \n}\n```\n**Response**\n```json\n{\n  \"success\": \"\" \n}\n```\n\n---\n\n### process  \nPublish **block** to the network. Using the optional `json_block` is recommended since v19.0. In v20.0-v21.3, blocks are watched for confirmation by default (see optional `watch_work`).  If `enable_control` is not set to `true` on the node, then the optional `watch_work` must be set to `false`. In V22.0+ the work watcher has been removed.\n\nNote: after v25.0, it is possible that the block processing queue can internally drop a block if the queue gets full. This stat can be checked for `blockprocessor` type, and `drop` details.\n\n--8<-- \"warning-process-sub-type-recommended.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"process\",\n  \"json_block\": \"true\",\n  \"subtype\": \"send\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n    \"previous\": \"6CDDA48608C7843A0AC1122BDD46D9E20E21190986B19EAC23E7F33F2E6A6766\",\n    \"representative\": \"nano_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh\",\n    \"balance\": \"40200000001000000000000000000000000\",\n    \"link\": \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\",\n    \"link_as_account\": \"nano_33t5by1653nt196hfwm5q3wq7oxtaix97r7bhox5zn8eratrzoqsny49ftsd\",\n    \"signature\": \"A5DB164F6B81648F914E49CAB533900C389FAAD64FBB24F6902F9261312B29F730D07E9BCCD21D918301419B4E05B181637CF8419ED4DCBF8EF2539EB2467F07\",\n    \"work\": \"000bc55b014e807d\"\n  }\n}\n```  \n**Response:**\n```json\n{\n  \"hash\": \"E2FB233EF4554077A7BF1AA85851D5BF0B36965D2B0FB504B2BC778AB89917D3\"\n}\n```\n**Optional \"force\"**  \n_version 13.1+_  \nBoolean, false by default. Manually forcing fork resolution if processed block is not accepted as fork\n\n**Optional \"subtype\"**  \n_version 18.0+_  \nString, empty by default. Additional check for state blocks subtype, i.e. prevent accidental sending to incorrect accounts instead of receiving receivable blocks. Options:\n\n* `send` - account balance is reduced\n* `receive` - account balance is increased\n* `open` - first block on account with account balance initially set higher than 0\n* `change` - account balance is unchanged, representative field value changed to valid public address\n* `epoch` - block signed with epoch signer private key (does not allow balance or representative changes)\n\n**Optional \"json_block\"**  \n_version 19.0+_  \nBoolean, default \"false\". If \"true\", \"block\" must contain a JSON subtree instead of a JSON string.\n\n**Optional \"watch_work\"**  \n_added in version 20.0+_  \n_removed in version 22.0_  \nBoolean, default \"true\". If \"true\", **block** will be placed on watch for confirmation, with equivalent functionality to in-wallet transactions using [send](#send), [receive](#receive) and [account_representative_set](#account_representative_set), including republishing and rework if confirmation is delayed (default is 5 seconds, set by `work_watcher_period` config entry) and if [active_difficulty](#active_difficulty) is higher than the block's PoW difficulty.\n\n**Optional \"async\"**  \n_version 22.0+_  \nBoolean, default \"false\". If \"true\", requests will add the blocks to the block processor queue and `{\"started\":\"1\"}` will be immediately returned, instead of waiting for block process completion to return. To know if the block was properly processed, monitor the [WebSocket topic `new_unconfirmed_block`](../integration-guides/websockets.md#new-unconfirmed-blocks) and a notification for that successful block will be sent.\n\n---\n\n### receivable\n\n_since V23.0, use [pending](#pending) for V22.1 and below_  \nReturns a list of block hashes which have not yet been received by this account.\n\n**Request:**\n```json\n{\n  \"action\": \"receivable\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": [ \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\" ]\n}\n```   \n**Optional \"count\"**  \nNumber. Determines limit of number of blocks to return.\n\n**Optional \"threshold\"**  \n_version 8.0+_   \nNumber (128 bit, decimal). Returns a list of receivable block hashes with amount more or equal to **threshold**  \n\n**Request:**\n```json\n{\n  \"action\": \"receivable\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\",\n  \"count\": \"1\",\n  \"threshold\": \"1000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\": \"6000000000000000000000000000000\"\n  }\n}\n```  \n**Optional \"source\"**  \n_version 9.0+_   \nBoolean, false by default. Returns a list of receivable block hashes with amount and source accounts   \n\n**Request:**\n```json\n{\n  \"action\": \"receivable\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\",\n  \"count\": \"1\",\n  \"source\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : {\n    \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\": {\n      \"amount\": \"6000000000000000000000000000000\",\n      \"source\": \"nano_3dcfozsmekr1tr9skf1oa5wbgmxt81qepfdnt7zicq5x3hk65fg4fqj58mbr\"\n    }\n  }\n}\n```  \n**Optional \"include_active\"**\n\n_version 15.0+_   \nBoolean, false by default. Include active blocks without finished confirmations \n\n**Request:**\n```json\n{\n  \"action\": \"receivable\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\",\n  \"count\": \"1\",\n  \"include_active\": \"true\"\n}\n```  \n\n**Optional \"min_version\"**\n\n_version 15.0+_   \nBoolean, false by default. Returns the minimum version (epoch) of a block which can pocket this receivable block.\n\n**Optional \"sorting\"**\n\nBoolean, false by default. Additionally sorts the blocks by their amounts in descending order.   \n\n_version 22.0+_   \nIf used with \"count\" returns the absolute sorted values.\n\n_version 19.0+_   \nIf used with \"count\" only sorts relative to the first receivable entries found up to count so not necessarily the ones with the largest receivable balance.   \n\n**Optional \"include_only_confirmed\"**\n\n_version 19.0+_  \nBoolean, true by default (_version 22.0+_), previously false by default. Only returns confirmed blocks but with the caveat that their confirmation height might not be up-to-date yet. If false, unconfirmed blocks will also be returned.\n\n---\n\n### receivable_exists\n\n_since V23.0, use [pending_exists](#pending_exists) for V22.1 and below_  \nCheck whether block is receivable by **hash**  \n\n**Request:**\n```json\n{\n  \"action\": \"receivable_exists\",\n  \"hash\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"exists\" : \"1\"\n}\n```\n\n**Optional \"include_active\"**\n\n_version 15.0+_   \nBoolean, false by default. Include active blocks without finished confirmations \n\n**Request:**\n```json\n{\n  \"action\": \"receivable_exists\",\n  \"hash\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"include_active\": \"true\"\n}\n```  \n\n**Optional \"include_only_confirmed\"**\n\n_version 19.0+_  \nBoolean, true by default (_version 22.0+_), previously false by default. Only returns confirmed blocks but with the caveat that their confirmation height might not be up-to-date yet. If false, unconfirmed blocks will also be returned.\n\n---\n\n### representatives  \nReturns a list of pairs of representative and its voting weight  \n\n**Request:**\n```json\n{\n  \"action\": \"representatives\"\n}\n```  \n**Response:**\n```json\n{\n  \"representatives\": {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": \"3822372327060170000000000000000000000\",\n    \"nano_1111111111111111111111111111111111111111111111111awsq94gtecn\": \"30999999999999999999999999000000\",\n    \"nano_114nk4rwjctu6n6tr6g6ps61g1w3hdpjxfas4xj1tq6i8jyomc5d858xr1xi\": \"0\"\n  }\n}\n```\n**Optional \"count\"**\n\n_version 9.0+_   \nNumber. Returns a list of pairs of representative and its voting weight up to **count**\n   \n**Optional \"sorting\"**\n\n_version 9.0+_   \nBoolean, false by default. Additional sorting representatives in descending order  \nNOTE: The \"count\" option is ignored if \"sorting\" is specified  \n\n---\n\n### representatives_online  \n_version 18.0+_   \nReturns a list of online representative accounts that have voted recently  \n\n**Request:**\n```json\n{\n  \"action\": \"representatives_online\"\n}\n```  \n**Response:**\n```json\n{\n  \"representatives\": [\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\",\n    \"nano_1111111111111111111111111111111111111111111111111awsq94gtecn\",\n    \"nano_114nk4rwjctu6n6tr6g6ps61g1w3hdpjxfas4xj1tq6i8jyomc5d858xr1xi\"\n  ]\n}\n```\n_versions 11.2–17.1_   \nReturns a list of pairs of online representative accounts that have voted recently and empty strings  \n**Response:**\n```json\n{\n  \"representatives\" : {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": \"\",\n    \"nano_1111111111111111111111111111111111111111111111111awsq94gtecn\": \"\",\n    \"nano_114nk4rwjctu6n6tr6g6ps61g1w3hdpjxfas4xj1tq6i8jyomc5d858xr1xi\": \"\"\n  }\n}\n```\n**Optional \"weight\"**\n\n_version 17.0+_   \nBoolean, false by default. Returns voting weight for each representative.  \n**Response:**\n```json\n{\n  \"representatives\": {\n    \"nano_114nk4rwjctu6n6tr6g6ps61g1w3hdpjxfas4xj1tq6i8jyomc5d858xr1xi\": {\n      \"weight\": \"150462654614686936429917024683496890\"\n    }\n  }\n}\n```\n\n**Optional \"accounts\"**  \nArray of accounts. Returned list is filtered for only these accounts.\n\n**Request:**\n```json\n{\n  \"action\": \"representatives_online\",\n  \"accounts\": [\"nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p\", \"nano_1111111111111111111111111111111111111111111111111117353trpda\"]\n}\n```  \n**Response:**\n```json\n{\n  \"representatives\": [\n    \"nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p\"\n  ]\n}\n```\n\n---\n\n### republish  \nRebroadcast blocks starting at **hash** to the network    \n\n**Request:**\n```json\n{\n  \"action\": \"republish\",\n  \"hash\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\",\n  \"blocks\": [\n    \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n    \"A170D51B94E00371ACE76E35AC81DC9405D5D04D4CEBC399AEACE07AE05DD293\"\n  ]\n}\n```   \n\n**Optional \"sources\"**\n\n_version 8.0+_   \nBoolean, false by default. Additionally rebroadcast source chain blocks for receive/open up to **sources** depth   \n\n**Request:**\n```json\n{\n  \"action\": \"republish\",\n  \"hash\": \"90D0C16AC92DD35814E84BFBCC739A039615D0A42A76EF44ADAEF1D99E9F8A35\",\n  \"count\": \"1\",\n  \"sources\": \"2\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": [\n    \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n    \"A170D51B94E00371ACE76E35AC81DC9405D5D04D4CEBC399AEACE07AE05DD293\",\n    \"90D0C16AC92DD35814E84BFBCC739A039615D0A42A76EF44ADAEF1D99E9F8A35\"\n  ]\n}\n```   \n\n**Optional \"destinations\"**\n\n_version 8.0+_   \nBoolean, false by default. Additionally rebroadcast destination chain blocks from receive up to **destinations** depth   \n\n**Request:**\n```json\n{\n  \"action\": \"republish\",\n  \"hash\": \"A170D51B94E00371ACE76E35AC81DC9405D5D04D4CEBC399AEACE07AE05DD293\",\n  \"count\": \"1\",\n  \"destinations\": \"2\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": [\n    \"A170D51B94E00371ACE76E35AC81DC9405D5D04D4CEBC399AEACE07AE05DD293\",\n    \"90D0C16AC92DD35814E84BFBCC739A039615D0A42A76EF44ADAEF1D99E9F8A35\",\n    \"18563C814A54535B7C12BF76A0E23291BA3769536634AB90AD0305776A533E8E\"\n  ]\n}\n```   \n\n---\n\n### sign\n_version 18.0+_  \nSigning provided **block** with private **key** or key of **account** from **wallet**. Using the optional `json_block` is recommended since v19.0.  \n\n**Request with private key:**\n```json\n{\n  \"action\": \"sign\",\n  \"json_block\": \"true\",\n  \"key\": \"1D3759BB2CA187A66875D3B8497624159A576FD315E07F702B99B92BC59FC14A\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n    \"previous\": \"6CDDA48608C7843A0AC1122BDD46D9E20E21190986B19EAC23E7F33F2E6A6766\",\n    \"representative\": \"nano_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh\",\n    \"balance\": \"40200000001000000000000000000000000\",\n    \"link\": \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\",\n    \"link_as_account\": \"nano_33t5by1653nt196hfwm5q3wq7oxtaix97r7bhox5zn8eratrzoqsny49ftsd\",\n    \"signature\": \"A5DB164F6B81648F914E49CAB533900C389FAAD64FBB24F6902F9261312B29F730D07E9BCCD21D918301419B4E05B181637CF8419ED4DCBF8EF2539EB2467F07\",\n    \"work\": \"000bc55b014e807d\"\n  }\n}\n```\n\n**Request with account from wallet:**\n```json\n{\n  \"action\": \"sign\",\n  \"json_block\": \"true\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_18ky5chy5ws89oi46ki4zjy6x5ezpmj98zg6icwke9bmuy99nosieyqf8c1h\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n    \"previous\": \"6CDDA48608C7843A0AC1122BDD46D9E20E21190986B19EAC23E7F33F2E6A6766\",\n    \"representative\": \"nano_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh\",\n    \"balance\": \"40200000001000000000000000000000000\",\n    \"link\": \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\",\n    \"link_as_account\": \"nano_33t5by1653nt196hfwm5q3wq7oxtaix97r7bhox5zn8eratrzoqsny49ftsd\",\n    \"signature\": \"A5DB164F6B81648F914E49CAB533900C389FAAD64FBB24F6902F9261312B29F730D07E9BCCD21D918301419B4E05B181637CF8419ED4DCBF8EF2539EB2467F07\",\n    \"work\": \"000bc55b014e807d\"\n  }\n}\n```\n**Response:**\n```json\n{\n  \"signature\": \"2A71F3877033F5966735F260E906BFCB7FA82CDD543BCD1224F180F85A96FC26CB3F0E4180E662332A0DFE4EE6A0F798A71C401011E635604E532383EC08C70D\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n    \"previous\": \"6CDDA48608C7843A0AC1122BDD46D9E20E21190986B19EAC23E7F33F2E6A6766\",\n    \"representative\": \"nano_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh\",\n    \"balance\": \"40200000001000000000000000000000000\",\n    \"link\": \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\",\n    \"link_as_account\": \"nano_33t5by1653nt196hfwm5q3wq7oxtaix97r7bhox5zn8eratrzoqsny49ftsd\",\n    \"signature\": \"2A71F3877033F5966735F260E906BFCB7FA82CDD543BCD1224F180F85A96FC26CB3F0E4180E662332A0DFE4EE6A0F798A71C401011E635604E532383EC08C70D\",\n    \"work\": \"000bc55b014e807d\"\n  }\n}\n```\n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", the input \"block\" must contain a JSON subtree instead of a JSON string. In addition, the response block will be a JSON subtree.\n\n\n**Optional sign block hash**  \n_Requires configuration changes. Set \"rpc.enable_sign_hash\" to \"true\"_  \n\n**Request:**\n```json\n{\n  \"action\": \"sign\",\n  \"hash\": \"E2FB233EF4554077A7BF1AA85851D5BF0B36965D2B0FB504B2BC778AB89917D3\"\n}\n```  \n**Response:**\n```json\n{\n  \"signature\": \"2A71F3877033F5966735F260E906BFCB7FA82CDD543BCD1224F180F85A96FC26CB3F0E4180E662332A0DFE4EE6A0F798A71C401011E635604E532383EC08C70D\"\n}\n```  \n\n---\n\n### stats\n_version 12.2+_  \nFor configuration and other details, please see [Statistics from RPC](/running-a-node/troubleshooting/#statistics-from-rpc)\n\n**Request counters:**\n```json\n{\n  \"action\": \"stats\",\n  \"type\": \"counters\"\n}\n```\n\n**Counters response:**\n```json\n{\n  \"type\": \"counters\",\n  \"created\": \"2018.03.29 01:46:36\",\n  \"entries\": [\n    {\n      \"time\": \"01:46:36\",\n      \"type\": \"traffic_tcp\",\n      \"detail\": \"all\",\n      \"dir\": \"in\",\n      \"value\": \"3122792\"\n    },\n    {\n      \"time\": \"01:46:36\",\n      \"type\": \"traffic_tcp\",\n      \"detail\": \"all\",\n      \"dir\": \"out\",\n      \"value\": \"203184\"\n    }\n    ...\n  ]\n}\n```\n\n_version 18.0+ also returns \"stat_duration_seconds\": the number of seconds since startup or since the last \"stats_clear\" call_\n\n**Request samples:**\n```json\n{\n  \"action\": \"stats\",\n  \"type\": \"samples\"\n}\n```\n\n**Samples response:**\n```json\n{\n  \"type\": \"samples\",\n  \"created\": \"2018.03.29 01:47:08\",\n  \"entries\": [\n    {\n      \"time\": \"01:47:04\",\n      \"type\": \"traffic_tcp\",\n      \"detail\": \"all\",\n      \"dir\": \"in\",\n      \"value\": \"59480\"\n    },\n    {\n      \"time\": \"01:47:05\",\n      \"type\": \"traffic_tcp\",\n      \"detail\": \"all\",\n      \"dir\": \"in\",\n      \"value\": \"44496\"\n    }\n    ...\n   ]\n}\n```\n_version 18.0+_  \nNOTE: This call is for debug purposes only and is unstable as returned objects may be frequently changed.\n\n**Request objects:**\n```json\n{\n  \"action\": \"stats\",\n  \"type\": \"objects\"\n}\n```\n\n**Objects response:**\n```json\n{\n  \"node\": {\n    \"ledger\": {\n      \"bootstrap_weights\": {\n        \"count\": \"125\",\n        \"size\": \"7000\"\n      }\n    },\n    \"peers\": {\n      \"peers\": {\n        \"count\": \"38\",\n        \"size\": \"7296\"\n      },\n      \"attempts\": {\n        \"count\": \"95\",\n        \"size\": \"3800\"\n      },\n    },\n    ...\n  }\n}\n```\n\n_version 22.0+_  \nNOTE: This call is for debug purposes only and is unstable as returned objects may be frequently changed and will be different depending on the ledger backend.\n\n**Request database:**\n```json\n{\n  \"action\": \"stats\",\n  \"type\": \"database\"\n}\n```\n\n**Database response:**  \n**LMDB:**\n```json\n{\n    \"branch_pages\": \"0\",\n    \"depth\": \"1\",\n    \"entries\": \"11\",\n    \"leaf_pages\": \"1\",\n    \"overflow_pages\": \"0\",\n    \"page_size\": \"4096\"\n}\n```\n**RocksDB:**  \n```json\n{\n    \"cur-size-all-mem-tables\": \"74063072\",\n    \"size-all-mem-tables\": \"487744504\",\n    \"estimate-table-readers-mem\": \"113431016\",\n    \"estimate-live-data-size\": \"17756425993\",\n    \"compaction-pending\": \"0\",\n    \"estimate-num-keys\": \"81835964\",\n    \"estimate-pending-compaction-bytes\": \"0\",\n    \"total-sst-files-size\": \"20350606013\",\n    \"block-cache-capacity\": \"318767104\",\n    \"block-cache-usage\": \"150310696\"\n}\n```\n---\n\n### stats_clear\n_version 18.0+_\n\nClears all collected statistics. The \"stat_duration_seconds\" value in the \"stats\" action is also reset.\n\n\n**Request:**\n```json\n{\n  \"action\": \"stats_clear\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```\n\n---\n\n### stop   \n_enable_control required_  \nMethod to safely shutdown node  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"stop\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```  \n\n---\n\n### successors  \nReturns a list of block hashes in the account chain starting at **block** up to **count** (direction from open block up to frontier, from older blocks to newer). Will list all blocks up to frontier (latest block) of this chain when count is set to \"-1\". The requested block hash is included in the answer.    \n\n**Request:**\n```json\n{\n  \"action\": \"successors\",\n  \"block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\" : [\n    \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\"\n  ]\n}\n```\n**Optional \"offset\"**\n\n_version 18.0+_   \nNumber, 0 by default. Return the account chain block hashes **offset** by the specified number of blocks    \n\n**Optional \"reverse\"**\n\n_version 18.0+_   \nBoolean, false by default. Returns a consecutive list of block hashes in the account chain starting at **block** back to **count** (direction from frontier back to open block, from newer blocks to older). Equal to [chain](#chain)    \n\n---\n\n### telemetry\n_version 21.0+_  \nReturn metrics from other nodes on the network. By default, returns a summarized view of the whole network. See below for details on obtaining local telemetry data.  \n[Networking - node telemetry](/protocol-design/networking#node-telemetry) contains more detailed information on the protocol implementation of telemetry.  \n**Request:**\n```json\n{\n  \"action\": \"telemetry\"\n}\n```\n**Response:**\n```json\n{\n    \"block_count\": \"214104509\",\n    \"cemented_count\": \"214104509\",\n    \"unchecked_count\": \"5161\",\n    \"account_count\": \"37186909\",\n    \"bandwidth_cap\": \"10485760\",\n    \"peer_count\": \"176\",\n    \"protocol_version\": \"21\",\n    \"uptime\": \"3188200\",\n    \"genesis_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n    \"major_version\": \"28\",\n    \"minor_version\": \"2\",\n    \"patch_version\": \"0\",\n    \"pre_release_version\": \"0\",\n    \"maker\": \"0\",\n    \"timestamp\": \"1765074100220\",\n    \"active_difficulty\": \"fffffff800000000\",\n    \"database_backend\": \"lmdb\",\n    \"confirmation_latency_ms_p50\": \"254\",\n    \"confirmation_latency_ms_p90\": \"510\",\n    \"confirmation_latency_ms_p99\": \"1205\",\n    \"bootstrap_status\": \"idle\",\n    \"node_id\": \"node_3odec59q6i9qarh5txyrxmu3aqhfzm54mxoxgtumwpzyq6obxqktdzcxkfag\",\n    \"signature\": \"067523993D0B4C07525DF4C5AA814FBCC40875F868C2A04A85AC288F75E152763196B7DCB11240921F6D8BA92E3E9F094D8F2F9D8B0970114CDAD48838372100\"\n}\n```\n\nThis contains a summarized view of the network with 10% of lower/upper bound results removed to reduce the effect of outliers. Returned values are calculated as follows:\n\n| Field Name | Response details |\n|------------|------------------------------------|\n| **block_count**       | average count of blocks in ledger (including unconfirmed) |\n| **cemented_count**    | average count of blocks cemented in ledger (only confirmed) |\n| **unchecked_count**   | average count of unchecked blocks. This should only be considered an estimate as nodes running RocksDB may not return exact counts. |\n| **account_count**     | average count of accounts in ledger |\n| **bandwidth_cap**     | `0` = unlimited; the mode is chosen if there is more than 1 common result otherwise the results are averaged (excluding `0`) |\n| **peer_count**        | average count of peers nodes are connected to |\n| **\\*_version**        | mode (most common) of (protocol, major, minor, patch, pre_release) versions |\n| **uptime**            | average number of seconds since the UTC epoch at the point where the response is sent from the peer |\n| **genesis_block**     | mode (most common) of genesis block hashes |\n| **maker**             | mode (most common), meant for third party node software implementing the protocol so that it can be distinguished, `0` = Nano Foundation, `1` = Nano Foundation pruned node |\n| **timestamp**         | number of milliseconds since the UTC epoch at the point where the response is sent from the peer |\n| **active_difficulty** | _V22.0+_ returns minimum network difficulty due to deprecated active difficulty measurements<br><br> _up to V21.3_ returns average of the current network difficulty, see [active_difficulty](/commands/rpc-protocol/#active_difficulty) \"network_current\" |\n| **database_backend**  | the database backend used by the node: `lmdb` or `rocksdb` |\n| **confirmation_latency_ms_p50** | 50th percentile (median) confirmation latency in milliseconds, based on recently confirmed elections |\n| **confirmation_latency_ms_p90** | 90th percentile confirmation latency in milliseconds, based on recently confirmed elections |\n| **confirmation_latency_ms_p99** | 99th percentile confirmation latency in milliseconds, based on recently confirmed elections |\n| **bootstrap_status**  | current bootstrap status of the node: `idle` or `active` |\n| **node_id**           | _V21.0+_ returns the node identifier used to sign the telemetry message. This allows receivers to verify which peer the telemetry originated from. |\n| **signature**         | _V21.0+_ returns the signature of the telemetry payload, created using the node's private key. It enables verification that the data was produced by the reported `node_id` and has not been altered. |\n\nThis only returns values which have been cached by the ongoing polling of peer metric data. Each response is cached for 60 seconds on the main network and 15 seconds on beta; a few additional seconds are added on for response delays.\n\n**Optional \"raw\"**  \nWhen setting raw to true metrics from all nodes are displayed. It additionally contains **address** and **port** from each peer.\n\n**Request:**\n```json\n{\n  \"action\": \"telemetry\",\n  \"raw\" : \"true\"\n}\n```\n\n**Response:**\n```json\n{\n  \"metrics\": [\n    {\n      \"block_count\": \"5777903\",\n      ...\n      \"node_id\": \"node_1cmi8difuruopgzpnb4ybrnnj5rproxwuwe5mad7ucbsekakiwn37qqg1zo5\",\n      \"signature\": \"5F8DEE5F895D53E122FDEB4B1B4118A41F9DDB818C6B299B09DF59131AF9F201BB7057769423F6B0C868B57509177B54D5D2C731405FE607527F5E2B6B2E290F\",\n      \"address\": \"::ffff:152.89.106.89\",\n      \"port\": \"54000\"\n    },\n    {\n      \"block_count\": \"5777902\",\n      ...    \n      \"node_id\": \"node_3ipxdjrha3rfg9h3spiz5jkprw8kdj7bph9fir51kf6pmryzznsyhakqznk3\",\n      \"signature\": \"D691B855D9EC70EA6320DE609EB379EB706845433E034AD22721E8F91BF3A26156F40CCB2E98653F1E63D4CE5F10F530A835DE1B154D1213464E3B9BB9BE4908\",\n      \"address\": \"::ffff:95.216.205.215\",\n      \"port\": \"54006\"\n    }\n    ...\n  ]\n}\n```\n\n**Optional \"address\" & \"port\"**  \nGet metrics from a specific peer. It accepts both ipv4 and ipv6 addresses\n```json\n{\n  \"action\": \"telemetry\",\n  \"address\": \"246.125.123.456\",\n  \"port\": \"7075\"\n}\n```\n\n!!!tip \"Requesting telemetry data from the local node\"\n    Metrics for the local node can be requested using the peering port and any loopback address **127.0.0.1**, **::1** or **[::1]**\n\n---\n\n### validate_account_number \nCheck whether **account** is a valid account number using checksum  \n\n**Request:**\n```json\n{\n  \"action\": \"validate_account_number\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111117353trpda\"\n}\n```  \n**Response:**\n```json\n{\n  \"valid\" : \"1\"\n}\n```\n\n---\n\n### version \nReturns version information for RPC, Store, Protocol (network), Node (Major & Minor version).  \nSince _version 20.0_ also returns the Network label and identifier (hash of the genesis open block), and Build Info. Since _version 21.0_ also returns Database backend information.  \n_RPC Version always returns \"1\" as of 01/11/2018_  \n\n**Request:**\n```json\n{\n  \"action\": \"version\"\n}\n```  \n**Response:**\n```json\n{\n  \"rpc_version\": \"1\",\n  \"store_version\": \"14\",\n  \"protocol_version\": \"17\",\n  \"node_vendor\": \"Nano 20.0\",\n  \"store_vendor\": \"LMDB 0.9.23\", // since V21.0\n  \"network\": \"live\", // since v20.0\n  \"network_identifier\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\", // since v20.0\n  \"build_info\": \"Build Info <git hash> \\\"<compiler> version \\\" \\\"<compiler version string>\\\" \\\"BOOST <boost version>\\\" BUILT \\\"<build date>\\\"\" // since v20.0\n}\n```\n\n---\n\n### unchecked  \n_version 8.0+_   \nReturns a list of pairs of unchecked block hashes and their json representation up to **count**. Using the optional `json_block` is recommended since v20.0.\n\n**Request:**\n```json\n{\n  \"action\": \"unchecked\",\n  \"json_block\": \"true\",\n  \"count\": \"1\",\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": {\n    \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\": {\n      \"type\": \"state\",\n      \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"previous\": \"CE898C131AAEE25E05362F247760F8A3ACF34A9796A5AE0D9204E86B0637965E\",\n      \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n      \"balance\": \"5606157000000000000000000000000000000\",\n      \"link\": \"5D1AA8A45F8736519D707FCB375976A7F9AF795091021D7E9C7548D6F45DD8D5\",\n      \"link_as_account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n      \"signature\": \"82D41BC16F313E4B2243D14DFFA2FB04679C540C2095FEE7EAE0F2F26880AD56DD48D87A7CC5DD760C5B2D76EE2C205506AA557BF00B60D8DEE312EC7343A501\",\n      \"work\": \"8a142e07a10996d5\"\n    }\n  }\n}\n```\n\n---\n\n### unchecked_clear   \n_enable_control required, version 8.0+_     \nClear unchecked synchronizing blocks   \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n    \"action\": \"unchecked_clear\"\n}\n```  \n**Response:**\n```json\n{\n    \"success\": \"\"\n}\n```  \n\n---\n\n### unchecked_get  \n_version 8.0+_  \nRetrieves a json representation of unchecked synchronizing block by **hash**. Using the optional `json_block` is recommended since v19.0.  \n\n**Request:**\n```json\n{\n  \"action\": \"unchecked_get\",\n  \"json_block\": \"true\",\n  \"hash\": \"19BF0C268C2D9AED1A8C02E40961B67EA56B1681DE274CD0C50F3DD972F0655C\"\n}\n```  \n**Response:**\n```json\n{\n  \"modified_timestamp\": \"1565856525\",\n  \"contents\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1hmqzugsmsn4jxtzo5yrm4rsysftkh9343363hctgrjch1984d8ey9zoyqex\",\n    \"previous\": \"009C587914611E83EE7F75BD9C000C430C720D0364D032E84F37678D7D012911\",\n    \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n    \"balance\": \"189012679592109992600249228\",\n    \"link\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n    \"link_as_account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n    \"signature\": \"845C8660750895843C013CE33E31B80EF0A7A69E52DDAF74A5F1BDFAA9A52E4D9EA2C3BE1AB0BD5790FCC1AD9B7A3D2F4B44EECE4279A8184D414A30A1B4620F\",\n    \"work\": \"0dfb32653e189699\"\n  }\n}\n```\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"contents\" will contain a JSON subtree instead of a JSON string.\n\n---\n\n### unchecked_keys   \n_version 8.0+_   \nRetrieves unchecked database keys, blocks hashes & a json representations of unchecked receivable blocks starting from **key** up to **count**. Using the optional `json_block` is recommended since v19.0.   \n\n--8<-- \"known-issue-unchecked-keys-rpc-rocksdb.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"unchecked_keys\",\n  \"json_block\": \"true\",\n  \"key\": \"19BF0C268C2D9AED1A8C02E40961B67EA56B1681DE274CD0C50F3DD972F0655C\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"unchecked\": [\n    {\n      \"key\": \"19BF0C268C2D9AED1A8C02E40961B67EA56B1681DE274CD0C50F3DD972F0655C\",\n      \"hash\": \"A1A8558CBABD3F7C1D70F8CB882355F2EF688E7F30F5FDBD0204CAE157885056\",\n      \"modified_timestamp\": \"1565856744\",\n      \"contents\": {\n        \"type\": \"state\",\n        \"account\": \"nano_1hmqzugsmsn4jxtzo5yrm4rsysftkh9343363hctgrjch1984d8ey9zoyqex\",\n        \"previous\": \"19BF0C268C2D9AED1A8C02E40961B67EA56B1681DE274CD0C50F3DD972F0655C\",\n        \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n        \"balance\": \"189012679592109992600249226\",\n        \"link\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n        \"link_as_account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n        \"signature\": \"FF5D49925AD3C8705E6EEDD993E8C4120E6107D7F1CB53B287773448DEA0B1D32918E67804248FC83609F0D93401D833DFA33127F21B6CD02F75D6E31A00450A\",\n        \"work\": \"8193ddf00947e694\"\n      }\n    }\n  ]\n}\n```   \n\n**Optional \"json_block\"**\n\n_version 19.0+_  \nDefault \"false\". If \"true\", \"contents\" will contain a JSON subtree instead of a JSON string.\n\n---\n\n### unopened  \n\n_enable_control required, version 19.0+_   \n\nReturns the total receivable balance for unopened accounts in the local database, starting at **account** (optional) up to **count** (optional), sorted by account number. _**Notes:**_ By default excludes the burn account.   \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"unopened\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n  \"count\": \"1\"\n}\n```   \n\n**Response:**\n```json \n{\n  \"accounts\": {\n    \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\": \"207034077034226183413773082289554618448\"\n  }\n}\n```   \n\n**Optional \"threshold\"**  \nNumber (128 bit, decimal), default 0. Return only accounts with total receivable balance above **threshold**.\n\n---\n\n### uptime   \n_version 18.0+_   \nReturn node uptime in seconds  \n\n**Request:**\n```json\n{\n  \"action\": \"uptime\"\n}\n```  \n**Response:**\n```json\n{\n    \"seconds\": \"6000\"\n}\n```  \n\n---\n\n### work_cancel\n_enable_control required_  \nStop generating **work** for block  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_cancel\",\n  \"hash\": \"718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```  \n\n---\n\n### work_generate\n_enable_control required_  \nGenerates **work** for block. **hash** is the frontier of the account or in the case of an open block, the public key representation of the account which can be found with [account_key](#account_key).  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_generate\",\n  \"hash\": \"718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2\"\n}\n```  \n**Response:**\n```json\n{\n  \"work\": \"2b3d689bbcb21dca\",\n  \"difficulty\": \"fffffff93c41ec94\", // of the resulting work\n  \"multiplier\": \"1.182623871097636\", // since v19.0, calculated from default base difficulty\n  \"hash\": \"718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2\" // since v20.0\n}\n```  \n\n**Optional \"use_peers\"**\n\n_version 14.0+_\nBoolean, false by default. If the optional `use_peers` parameter is set to `true`, then the node will query its work peers (if it has any).\nWithout this parameter, the node will only generate work locally.\n\n**Optional \"difficulty\"**\n\n!!! info \"Difficulty no longer useful\"\n    With _version 22.0+_ the difficulty is no longer used for prioritization so targeting higher difficulty thresholds on work generation is not useful. However, this can still be used for targeting a lower difficulty for receive blocks. This option may be removed in a future release.\n\n_version 19.0+_  \nDifficulty value (16 hexadecimal digits string, 64 bit). Uses **difficulty** value to generate work. Defaults to the network base difficulty.\n\n**Optional \"multiplier\"**\n\n!!! info \"Multiplier no longer useful\"\n    With _version 22.0+_ the difficulty is no longer used for prioritization so targeting higher multipliers on work generation is not useful. This option will be removed in a future release.\n\n_version 20.0+_  \nMultiplier from base difficulty (positive number). Uses equivalent difficulty as **multiplier** from base difficulty to generate work.  \n***Note:*** overrides the `difficulty` parameter.  \n\n**Optional \"account\"**\n\n_version 20.0+_  \nA valid Nano account. If provided and `use_peers` is set to `true`, this information will be relayed to work peers.\n\n**Optional \"version\"**\n\n_version 21.0+_  \nWork version string. Currently \"work_1\" is the default and only valid option.\n\n**Optional \"block\"**\n\n_version 21.0+_  \nA valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and `difficulty` or `multiplier` are both not given, RPC processor tries to calculate the appropriate difficulty threshold based on ledger data.  \n***Note:*** block should be the one where the resulting work value will be used, not the previous block.\n\n**Optional \"json_block\"**\n\n_version 21.0+_  \nDefault \"false\". If \"true\", `block` in the request should contain a JSON subtree instead of a JSON string.\n\n---\n\n### work_peer_add  \n_enable_control required, version 8.0+_     \nAdd specific **IP address** and **port** as work peer for node until restart   \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_peer_add\",\n  \"address\": \"::ffff:172.17.0.1\",\n  \"port\": \"7076\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```  \n\n---\n\n### work_peers   \n_enable_control required, version 8.0+_     \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_peers\"\n}\n```  \n**Response:**\n```json\n{\n  \"work_peers\": [\n    \"::ffff:172.17.0.1:7076\"\n  ]\n}\n```  \n\n---\n\n### work_peers_clear  \n_enable_control required, version 8.0+_     \nClear work peers node list until restart   \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_peers_clear\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```  \n\n---\n\n### work_validate \nCheck whether **work** is valid for block. Provides two values: **valid_all** is `true` if the work is valid at the current network difficulty (work can be used for any block). **valid_receive** is `true` if the work is valid for use in a receive block.\n\n**Read the details below when using this RPC in V21**.\n\n!!! warning \"Semantics change in V21.0\"\n    In V21.0, when the optional **difficulty** is *not* given, **valid** is no longer included in the response.\n\n    Use the new response fields **\"valid_all\"** and **\"valid_receive\"** taking into account the subtype of the block using this work value:\n\n    - **valid_all** validates at the current network difficulty. As soon as the node processes the first [epoch_2 block](/releases/network-upgrades#increased-work-difficulty), this difficulty is increased.\n    - **valid_receive** is completely accurate **only once the [epoch_2 upgrade](/releases/network-upgrades#increased-work-difficulty) is finished.** Until the upgrade is finished, it is only accurate if the account where this work will be used is already upgraded. The upgrade status of an account can be obtained from [account_info](#account_info). The account is upgraded if \"account_version\" is `\"2\"`.\n\n**Request:**\n```json\n{\n  \"action\": \"work_validate\",\n  \"work\": \"2bf29ef00786a6bc\",\n  \"hash\": \"718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2\"\n}\n```  \n**Response since v21.0:**\n```json\n{\n  \"valid_all\": \"1\",\n  \"valid_receive\": \"1\",\n  \"difficulty\": \"fffffff93c41ec94\",\n  \"multiplier\": \"1.182623871097636\" // calculated from the default base difficulty\n}\n```\n\n??? abstract \"Response up to v20.0\"\n    ```json\n    {\n      \"valid\": \"1\",\n      \"difficulty\": \"fffffff93c41ec94\", // since v19.0\n      \"multiplier\": \"9.4609\" // since v19.0\n    }\n    ```\n\n**Optional \"difficulty\"**\n\n_version 19.0+_  \nDifficulty value (16 hexadecimal digits string, 64 bit). Uses **difficulty** value to validate work. Defaults to the network base difficulty. Response includes extra field **valid** signifying validity at the given difficulty.  \n\n**Request with given \"difficulty\"**  \n```json\n{\n  \"action\": \"work_validate\",\n  \"difficulty\": \"ffffffffffffffff\",\n  \"work\": \"2bf29ef00786a6bc\",\n  \"hash\": \"718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2\"\n}\n```\n**Response with given \"difficulty:**\n```json\n{\n  \"valid\": \"0\",\n  \"valid_all\": \"1\", // since v21.0\n  \"valid_receive\": \"1\", // since v21.0\n  \"difficulty\": \"fffffff93c41ec94\",\n  \"multiplier\": \"1.182623871097636\"\n}\n```\n\n**Optional \"multiplier\"**\n\n_version 20.0+_  \nMultiplier from base difficulty (positive number). Uses equivalent difficulty as **multiplier** from base difficulty to validate work.  \n***Note:*** overrides the `difficulty` parameter.  \n\n**Optional \"version\"**\n\n_version 21.0+_\nWork version string. Currently \"work_1\" is the default and only valid option.\n\n---\n\n## Wallet RPCs\n\n!!! warning \"For development and testing only\"\n    Below are RPC commands that interact with the built-in, QT-based node wallet. This wallet is only recommended for development and testing. For production integrations, setting up custom [External Management](/integration-guides/key-management/#external-management) processes is required.\n\n---\n\n### account_create  \n_enable_control required_  \nCreates a new account, insert next deterministic key in **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"account_create\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\n  \n**Response:**\n```json\n{\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```\n**Optional \"index\"**\n\n_version 18.0+_  \nunset by default. Indicates which index to create account for starting with 0  \n\n**Request:**\n```json\n{\n  \"action\": \"account_create\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"index\": \"1\"\n}\n```\n\n**Optional \"work\"**\n\n_version 9.0+_  \nBoolean, true by default. Setting false disables work generation after creating account  \n\n**Request:**\n```json\n{\n  \"action\": \"account_create\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"work\": \"false\"\n}\n```\n\n---\n\n### account_list  \nLists all the accounts inside **wallet**  \n\n**Request:**\n```json\n{\n  \"action\": \"account_list\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"accounts\": [\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n  ]\n}\n```\n\n---\n\n### account_move  \n_enable_control required_  \nMoves **accounts** from **source** to **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"account_move\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"source\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"accounts\": [\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n  ]\n}\n```  \n**Response:**\n```json\n{\n  \"moved\" : \"1\"\n}\n```\n\n---\n\n### account_remove\n_enable_control required_  \nRemove **account** from **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"account_remove\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_39a73oy5ungrhxy5z5oao1xso4zo7dmgpjd4u74xcrx3r1w6rtazuouw6qfi\"\n}\n```  \n**Response:**\n```json\n{\n  \"removed\": \"1\"\n}\n```\n\n---\n\n### account_representative_set  \n_enable_control required_  \nSets the representative for **account** in **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"account_representative_set\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_39a73oy5ungrhxy5z5oao1xso4zo7dmgpjd4u74xcrx3r1w6rtazuouw6qfi\",\n  \"representative\": \"nano_16u1uufyoig8777y6r8iqjtrw8sg8maqrm36zzcm95jmbd9i9aj5i8abr8u5\"\n}\n```  \n**Response:**\n```json\n{\n  \"block\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\n**Optional \"work\"**\n\n_version 9.0+_  \nWork value (16 hexadecimal digits string, 64 bit). Uses **work** value for block from external source and disables work precaching for this account. Not using this field re-enables work precaching.  \n\n---\n\n### accounts_create  \n_enable_control required, version 9.0+_  \nCreates new accounts, insert next deterministic keys in **wallet** up to **count**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"accounts_create\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"2\"\n}\n```  \n**Response:**\n```json\n{\n  \"accounts\": [\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n    \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3s00000000\"\n  ]\n}\n```\n**Optional enabling work generation**  \n_version 11.2+_  \nBoolean, false by default. Enables work generation after creating accounts  \n\n**Request:**\n```json\n{\n  \"action\": \"accounts_create\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"2\",\n  \"work\": \"true\"\n}\n```  \n***Note:*** Before version 11.2 work generation was enabled by default, if you want to disable work generation for previous versions, use \"work\": \"false\"\n\n---\n\n### block_create (optional wallet)\nSee [block_create](#block_create) Node RPC command above\n\n---\n\n### password_change  \n_enable_control required_  \nChanges the password for **wallet** to **password**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"password_change\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"password\": \"test\"\n}\n```  \n**Response:**\n```json\n{\n  \"changed\" : \"1\"\n}\n```\n\n---\n\n### password_enter  \nEnters the **password** in to **wallet** to unlock it  \n\n**Request:**\n```json\n{\n  \"action\": \"password_enter\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"password\": \"test\"\n}\n```  \n**Response:**\n```json\n{\n  \"valid\": \"1\"\n}\n```\n\n---\n\n### password_valid  \nChecks whether the password entered for **wallet** is valid  \n\n**Request:**\n```json\n{\n  \"action\": \"password_valid\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"valid\" : \"1\"\n}\n```\n\n---\n\n### receive  \n_enable_control required_  \nReceive receivable **block** for **account** in **wallet**. If receiving the block opens the account, sets the account representative to a [wallet representative](#wallet_representative). Before v21, the representative is set to the account itself.  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"receive\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"block\": \"53EAA25CE28FA0E6D55EA9704B32604A736966255948594D55CBB05267CECD48\"\n}\n```  \n**Response:**\n```json\n{\n  \"block\": \"EE5286AB32F580AB65FD84A69E107C69FBEB571DEC4D99297E19E3FA5529547B\"\n}\n```\n**Optional \"work\"**\n\n_version 9.0+_  \nWork value (16 hexadecimal digits string, 64 bit). Uses **work** value for block from external source and disables work precaching for this account. Not using this field re-enables work precaching.  \n\n---\n\n### receive_minimum  \n_enable_control required, version 8.0+_   \nReturns receive minimum for node wallet  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"receive_minimum\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1000000000000000000000000\"\n}\n```\n\n---\n\n### receive_minimum_set  \n_enable_control required, version 8.0+_   \nSet **amount** as new receive minimum for node wallet until restart  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"receive_minimum_set\",\n  \"amount\": \"1000000000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"\n}\n```\n\n---\n\n### search_pending\n\nDeprecated in V24.0+. Replaced by [search_receivable](#search_receivable)\n\n---\n\n### search_receivable\n\n_since V24.0, use [search_pending](#search_pending) for V23.3 and below_\n\n_enable_control required_  \nTells the node to look for receivable blocks for any account in **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"search_receivable\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"started\": \"1\"\n}\n```\n---\n\n### search_pending_all\n\nDeprecated in V24.0+. Replaced by [search_receivable_all](#search_receivable_all)\n\n---\n\n### search_receivable_all  \n\n_since V24.0, use [search_pending_all](#search_pending_all) for V23.3 and below_\n\n_enable_control required, version 8.0+_  \nTells the node to look for receivable blocks for any account in all available wallets  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"search_receivable_all\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\": \"\"  \n}\n```\n\n---\n\n### send  \n_enable_control required_  \nSend **amount** from **source** in **wallet** to **destination**  \n\n--8<-- \"warning-enable-control.md\"\n\n!!! success \"Use of `id` option is highly recommended\"\n    Integrations using the node wallet must ensure idempotency for transactions and this can be done externally if preferred. Using the `id` field provides this option internally and is highly recommended for all node wallet uses.\n\n**Request:**\n```json\n{\n  \"action\": \"send\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"source\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"destination\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"amount\": \"1000000\",\n  \"id\": \"your-unique-id\"\n}\n```  \n**Response:**\n```json\n{\n  \"block\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\nProof of Work is precomputed for **one** transaction in the background when you are using the node wallet to track accounts.  If it has been a while since your last transaction it will send instantly, the next one will need to wait for Proof of Work to be generated.\n\nIf the request times out, then the send may or may not have gone through. If you want to the ability to retry a failed send, all send calls must specify the id parameter as follows\n\n**Highly recommended \"id\"**\n\n_version 10.0+_  \n\nYou can (and should) specify a **unique** id for each spend to provide [idempotency](https://en.wikipedia.org/wiki/Idempotence#Computer_science_meaning). That means that if you call `send` two times with the same id, the second request won't send any additional Nano, and will return the first block instead. The id can be any string. **This may be a required parameter in the future.**\n\nIf you accidentally reuse an id, the send will not go through (it will be seen as a duplicate request), so make sure your ids are unique! They must be unique per node, and are not segregated per wallet.\n\nUsing the same id for requests with different parameters (wallet, source, destination, and amount) is undefined behavior and may result in an error in the future.\n\n\n**Request:**\n```json\n{\n  \"action\": \"send\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"source\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"destination\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"amount\": \"1000000\",\n  \"id\": \"7081e2b8fec9146e\"\n}\n```  \n**Response:**\n```json\n{\n  \"block\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\n\nSending the request again will yield the same block, and will not affect the ledger.\n\n**Optional \"work\"**\n\n_version 9.0+_  \nWork value (16 hexadecimal digits string, 64 bit). Uses **work** value for block from external source and disables work precaching for this account. Not using this field re-enables work precaching.  \n\n**Request:**\n```json\n{\n  \"action\": \"send\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"source\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"destination\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"amount\": \"1000000\",\n  \"work\": \"2bf29ef00786a6bc\"\n}\n```  \n\n---\n\n### sign (optional wallet)\nSee [sign](#sign) Node RPC command above\n\n---\n\n### wallet_add  \n_enable_control required_  \nAdd an adhoc private key **key** to **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_add\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"key\": \"34F0A37AAD20F4A260F0A5B3CB3D7FB50673212263E58A380BC10474BB039CE4\"\n}\n```  \n**Response:**\n```json\n{\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```\n**Optional disabling work generation**\n\n_version 9.0+_  \nBoolean, false by default. Disables work generation after adding account  \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_add\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"key\": \"34F0A37AAD20F4A260F0A5B3CB3D7FB50673212263E58A380BC10474BB039CE4\",\n  \"work\": \"false\"\n}\n```  \n\n---\n\n### wallet_add_watch  \n_enable_control required, version 11.0+_  \nAdd watch-only **accounts** to **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_add_watch\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"accounts\": [\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n    \"nano_111111111111111111111111111111111111111111111111111000000000\"\n  ]\n}\n```  \n**Response:**\n```json\n{\n  \"success\" : \"\"\n}\n```\n\n---\n\n### wallet_balances  \nReturns how many raw is owned and how many have not yet been received by all accounts in **wallet**  \n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_balances\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"balances\" : {\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\": {\n      \"balance\": \"10000\",\n      \"pending\": \"10000\",\n      \"receivable\": \"10000\"\n    }\n  }\n}\n```\n**Optional \"threshold\"**\n\n_version 9.0+_   \nNumber (128 bit, decimal). Returns wallet accounts balances more or equal to **threshold**   \n\n---\n\n### wallet_change_seed  \n_enable_control required_  \nChanges seed for **wallet** to **seed**.  ***Notes:*** Clear all deterministic accounts in wallet! To restore account from new seed use RPC [accounts_create](#accounts_create).  \n`last_restored_account` and `restored_count` fields in response returned since _version 19.0+_  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_change_seed\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"seed\": \"74F2B37AAD20F4A260F0A5B3CB3D7FB51673212263E58A380BC10474BB039CEE\"\n}\n```  \n**Response:**\n```json\n{\n  \"success\" : \"\",\n  \"last_restored_account\": \"nano_1mhdfre3zczr86mp44jd3xft1g1jg66jwkjtjqixmh6eajfexxti7nxcot9c\",\n  \"restored_count\": \"1\"\n}\n```\n\n**Optional \"count\"**\n\n_version 18.0+_   \nNumber, 0 by default. Manually set **count** of accounts to restore from seed    \n\n---\n\n### wallet_contains  \nCheck whether **wallet** contains **account**  \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_contains\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"exists\": \"1\"\n}\n```\n\n---\n\n### wallet_create  \n_enable_control required_  \nCreates a new random wallet id  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_create\"\n}\n```  \n**Response:**\n```json\n{\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\n**Optional \"seed\"**\n\n_version 18.0+_   \nSeed value (64 hexadecimal digits string, 256 bit). Changes seed for a new wallet to **seed**, returning last restored account from given seed & restored count  \n\n---\n\n### wallet_destroy  \n_enable_control required_  \nDestroys **wallet** and all contained accounts  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_destroy\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"destroyed\": \"1\"\n}\n```\n\n---\n\n### wallet_export  \nReturn a json representation of **wallet**  \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_export\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"json\" : \"{\\\"0000000000000000000000000000000000000000000000000000000000000000\\\": \\\"0000000000000000000000000000000000000000000000000000000000000001\\\"}\"\n}\n```\n\n---\n\n### wallet_frontiers  \nReturns a list of pairs of account and block hash representing the head block starting for accounts from **wallet**  \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_frontiers\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"frontiers\": {\n    \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n  }\n}\n```\n\n---\n\n### wallet_history  \n_version 18.0+_   \nReports send/receive information for accounts in wallet. Change blocks are skipped, open blocks will appear as receive. Response will start with most recent blocks according to local ledger.\n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_history\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"history\":\n  [\n    {\n      \"type\": \"send\",\n      \"account\": \"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\",\n      \"amount\": \"30000000000000000000000000000000000\",\n      \"block_account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"hash\": \"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\",\n      \"local_timestamp\": \"1527698508\"\n    },\n    {\n      \"type\": \"send\",\n      \"account\": \"nano_38ztgpejb7yrm7rr586nenkn597s3a1sqiy3m3uyqjicht7kzuhnihdk6zpz\",\n      \"amount\": \"40000000000000000000000000000000000\",\n      \"block_account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",\n      \"hash\": \"CE898C131AAEE25E05362F247760F8A3ACF34A9796A5AE0D9204E86B0637965E\",\n      \"local_timestamp\": \"1527698492\"\n    }\n  ]\n}\n```\n**Optional \"modified_since\"**\n\nUNIX timestamp (number), 0 by default. Return only accounts modified in local database after specific timestamp   \n\n---\n\n### wallet_info  \n_version 15.0+_   \nGiven a **wallet** id, from all of the accounts in the wallet, returns:\n\n* Sum of their **balance** amounts\n* Total number of accounts as **accounts_count**\n* Number of deterministic accounts as **deterministic_count**\n* Number of adhoc (non-deterministic) accounts as **adhoc_count**\n* Index of last account derived from the walet seed as **deterministic_index** (equal to deterministic accounts number if no accounts were removed)\n* Sum of all frontier block heights as **accounts_block_count**\n* Sum of confirmed block heights as **accounts_cemented_block_count**\n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_info\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"balance\": \"10000\",\n  \"pending\": \"10000\",\n  \"receivable\": \"10000\",\n  \"accounts_count\": \"3\",\n  \"adhoc_count\": \"1\",\n  \"deterministic_count\": \"2\",\n  \"deterministic_index\": \"2\",\n  \"accounts_block_count\": \"14\",\n  \"accounts_cemented_block_count\": \"13\"\n}\n```\n\n---\n\n### wallet_ledger\n_enable_control required, version 11.0+_   \nReturns frontier, open block, change representative block, balance, last modified timestamp from local database & block count for accounts from **wallet**   \n\n--8<-- \"warning-includes-unconfirmed.md\"\n\n--8<-- \"warning-enable-control.md\"\n\n--8<-- \"deprecation-info-pending.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_ledger\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"accounts\": {\n    \"nano_11119gbh8hb4hj1duf7fdtfyf5s75okzxdgupgpgm1bj78ex3kgy7frt3s9n\": {\n      \"frontier\": \"E71AF3E9DD86BBD8B4620EFA63E065B34D358CFC091ACB4E103B965F95783321\",\n      \"open_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"representative_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"balance\": \"0\",\n      \"modified_timestamp\": \"1511476234\",\n      \"block_count\": \"2\"\n    }\n  }\n}\n```  \n**Optional \"representative\", \"weight\", \"receivable\"**\n\nBooleans, false by default. Additionally returns representative, voting weight, receivable balance for each account   \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_ledger\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"representative\": \"true\",\n  \"weight\": \"true\",\n  \"receivable\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"accounts\": {\n    \"nano_11119gbh8hb4hj1duf7fdtfyf5s75okzxdgupgpgm1bj78ex3kgy7frt3s9n\": {\n      \"frontier\": \"E71AF3E9DD86BBD8B4620EFA63E065B34D358CFC091ACB4E103B965F95783321\",\n      \"open_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"representative_block\": \"643B77F1ECEFBDBE1CC909872964C1DBBE23A6149BD3CEF2B50B76044659B60F\",\n      \"balance\": \"0\",\n      \"modified_timestamp\": \"1511476234\",\n      \"block_count\": \"2\",\n      \"representative\": \"nano_1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjtwnqposrs\",\n      \"weight\": \"0\",\n      \"pending\": \"0\",\n      \"receivable\": \"0\"\n    }\n  }\n}\n```  \n**Optional \"modified_since\"**\n\nUNIX timestamp (number), 0 by default. Return only accounts modified in local database after specific timestamp   \n\n---\n\n### wallet_lock   \n_enable_control required, version 9.0+_  \nLocks **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_lock\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"locked\": \"1\"\n}\n```\n\n---\n\n### wallet_locked   \nChecks whether **wallet** is locked  \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_locked\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"locked\": \"0\"\n}\n```\n---\n\n### wallet_pending\n\nDeprecated in V24.0+. Replaced by [wallet_receivable](#wallet_receivable)\n\n---\n\n### wallet_receivable\n\n_since V24.0, use [wallet_pending](#wallet_pending) for V23.3 and below_\n\n_enable_control required_   \nReturns a list of block hashes which have not yet been received by accounts in this **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_receivable\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": [\"142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D\"],\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": [\"4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74\"]\n  }\n}\n```  \n**Optional \"threshold\"**\n\nNumber (128 bit, decimal). Returns a list of receivable block hashes with amount more or equal to **threshold**   \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_receivable\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"1\",\n  \"threshold\": \"1000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": {\n      \"142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D\": \"6000000000000000000000000000000\"\n    },\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": {\n      \"4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74\": \"106370018000000000000000000000000\"\n    }\n  }\n}\n```  \n**Optional \"source\"**\n\n_version 9.0+_   \nBoolean, false by default. Returns a list of receivable block hashes with amount and source accounts   \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_receivable\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"1\",\n  \"source\": \"true\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": {\n    \"nano_1111111111111111111111111111111111111111111111111117353trpda\": {\n      \"142A538F36833D1CC78B94E11C766F75818F8B940771335C6C1B8AB880C5BB1D\": {\n        \"amount\": \"6000000000000000000000000000000\",\n        \"source\": \"nano_3dcfozsmekr1tr9skf1oa5wbgmxt81qepfdnt7zicq5x3hk65fg4fqj58mbr\"\n      }\n    },\n    \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\": {\n      \"4C1FEEF0BEA7F50BE35489A1233FE002B212DEA554B55B1B470D78BD8F210C74\": {\n        \"amount\": \"106370018000000000000000000000000\",\n        \"source\": \"nano_13ezf4od79h1tgj9aiu4djzcmmguendtjfuhwfukhuucboua8cpoihmh8byo\"\n      }\n    }\n  }\n}\n```  \n**Optional \"include_active\"**\n\n_version 15.0+_   \nBoolean, false by default. Include active blocks without finished confirmations \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_receivable\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"1\",\n  \"include_active\": \"true\"\n}\n```  \n\n**Optional \"min_version\"**\n\n_version 15.0+_   \nBoolean, false by default. Returns the minimum version (epoch) of a block which can pocket this receivable block.\n\n**Optional \"include_only_confirmed\"**\n\n_version 19.0+_  \nBoolean, true by default (_version 22.0+_), previously false by default. Only returns confirmed blocks but with the caveat that their confirmation height might not be up-to-date yet. If false, unconfirmed blocks will also be returned.\n\n---\n\n### wallet_representative  \nReturns the default representative for **wallet**  \n\n**Request:**\n```json\n{\n  \"action\": \"wallet_representative\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"representative\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```\n\n---\n\n### wallet_representative_set  \n_enable_control required_  \nSets the default **representative** for **wallet** _(used only for new accounts, already existing accounts use already set representatives)_  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_representative_set\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"representative\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"set\": \"1\"\n}\n```\n\n**Optional \"update_existing_accounts\"**\n\n_version 18.0+_   \nBoolean, false by default. Change representative for existing accounts in wallet. May require a lot of time to complete for large wallets due to work generation for change type state blocks  \n\n---\n\n### wallet_republish  \n_enable_control required, version 8.0+_   \nRebroadcast blocks for accounts from **wallet** starting at frontier down to **count** to the network     \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_republish\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"count\": \"2\"\n}\n```  \n**Response:**\n```json\n{\n  \"blocks\": [\n    \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n    \"A170D51B94E00371ACE76E35AC81DC9405D5D04D4CEBC399AEACE07AE05DD293\",\n    \"90D0C16AC92DD35814E84BFBCC739A039615D0A42A76EF44ADAEF1D99E9F8A35\"\n  ]       \n}\n```   \n\n---\n\n### wallet_work_get\n_enable_control required, version 8.0+_     \nReturns a list of pairs of account and work from **wallet**   \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"wallet_work_get\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"works\": {\n    \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\": \"432e5cf728c90f4f\"\n  }\n}\n```  \n\n---\n\n### work_get\n_enable_control required, version 8.0+_     \nRetrieves work for **account** in **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_get\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\"\n}\n```  \n**Response:**\n```json\n{\n  \"work\": \"432e5cf728c90f4f\"\n}\n```  \n\n---\n\n### work_set\n_enable_control required, version 8.0+_     \nSet **work** for **account** in **wallet**  \n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"work_set\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"account\": \"nano_1111111111111111111111111111111111111111111111111111hifc8npp\",\n  \"work\": \"0000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n    \"success\": \"\"\n}\n```  \n\n---\n\n## Unit Conversion RPCs\n\n---\n\n### nano_to_raw    \nConvert `nano` amount (10^30 raw) into `raw` (10^0) \n\n**Request:**\n```json\n{\n  \"action\": \"nano_to_raw\",\n  \"amount\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1000000000000000000000000000000\"\n}\n```\n\n### raw_to_nano    \nConvert `raw` amount (10^0) into `nano` (10^30 raw)\n\n**Request:**\n```json\n{\n  \"action\": \"raw_to_nano\",\n  \"amount\": \"1000000000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1\"\n}\n```\n\n---\n\n## Deprecated RPCs\n\n---\n\n\n### active_difficulty\n_added in version 19.0+_  \n_deprecated in version 22.0_\n\nReturns the difficulty values (16 hexadecimal digits string, 64 bit) and related multiplier from base difficulty.\n\n| Field Name                | Response Details |\n|---------------------------|------------------|\n| `multiplier`              | Multiplier of the `network_current` from the base difficulty of `network_minimum` for comparison. Note that in V22.0+ this will always be 1 (see below for details). |\n| `network_minimum`         | Minimum difficulty required for the network for all block types |\n| `network_current`         | _V22.0+_ same minimum difficulty above due to the deprecation of active difficulty calculations used for prioritization in previous versions; _up to V21.3_ 10 second trended average of adjusted difficulty seen on prioritized transactions, refreshed every 500ms |\n| `network_receive_minimum` | Lower difficulty threshold exclusively for receive blocks |\n| `network_receive_current` | _V22.0+_ same minimum receive difficulty above due to the deprecation of active difficulty calculations used for prioritization in previous versions; _up to V21.3_ 10 second trended average of adjusted difficulty seen on prioritized receive transactions, refreshed every 500ms |\n\n!!! info \"Constant values returned\"\n    Due to the deprecation of active difficulty calculations as of V22.0, this RPC call will return constant values as seen below. These values can be used as difficulty thresholds for the respective block types, but this RPC call should not be used for retrieving these values going forward.\n\n**Request:**\n```json\n{\n  \"action\": \"active_difficulty\"\n}\n```  \n\n**Response:**\n```json\n{\n    \"deprecated\": \"1\",\n    \"network_minimum\": \"fffffff800000000\",\n    \"network_receive_minimum\": \"fffffe0000000000\", // since V21.2\n    \"network_current\": \"fffffff800000000\",\n    \"network_receive_current\": \"fffffe0000000000\", // since V21.2\n    \"multiplier\": \"1\"\n}\n```\n\n**Optional \"include_trend\"**\n\nBoolean, false by default. Also returns the trend of difficulty seen on the network as a **list of multipliers**. Sampling occurs every 500ms. The list is ordered such that the first value is the most recent sample.  \nNote: Before v20, the sampling period was between 16 and 36 seconds.\n\n**Request:**\n```json\n{\n  \"action\": \"active_difficulty\",\n  \"include_trend\": \"true\"\n}\n```\n\n**Response:**\n```json\n{\n  ...,\n  \"difficulty_trend\": [\n    \"1.156096135149775\",\n    \"1.190133894573061\",\n    \"1.135567138563921\",\n    \"1.000000000000000\",\n    \"...\",\n    \"1.000000000000000\"\n  ]\n}\n```\n\n---\n\n### accounts_pending\n\nDeprecated in V24.0+. Replaced by [accounts_receivable](#accounts_receivable)\n\n---\n\n### history  \n\n**Deprecated**: please use `account_history` instead. It provides a `head` option which is identical to the history `hash` option.\n\n---\n\n### krai_from_raw   \n\nDeprecated in V28.0+. For alternatives, see [Unit Conversion RPCs](#unit-conversion-rpcs)\n\nDivide a raw amount down by the krai ratio.  \n\n**Request:**\n```json\n{\n  \"action\": \"krai_from_raw\",\n  \"amount\": \"1000000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1\"\n}\n```\n\n---\n\n### krai_to_raw    \n\nDeprecated in V28.0+. For alternatives, see [Unit Conversion RPCs](#unit-conversion-rpcs)\n\nMultiply an krai amount by the krai ratio.  \n\n**Request:**\n```json\n{\n  \"action\": \"krai_to_raw\",\n  \"amount\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1000000000000000000000000000\"\n}\n```\n\n---\n\n### mrai_from_raw    \n\nDeprecated in V28.0+. For alternatives, see [Unit Conversion RPCs](#unit-conversion-rpcs)\n\nDivide a raw amount down by the Mrai ratio.  \n\n**Request:**\n```json\n{\n  \"action\": \"mrai_from_raw\",\n  \"amount\": \"1000000000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1\"\n}\n```\n\n---\n\n### mrai_to_raw    \n\nDeprecated in V28.0+. For alternatives, see [Unit Conversion RPCs](#unit-conversion-rpcs)\n\nMultiply an Mrai amount by the Mrai ratio.  \n\n**Request:**\n```json\n{\n  \"action\": \"mrai_to_raw\",\n  \"amount\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1000000000000000000000000000000\"\n}\n```\n\n---\n\n### node_id_delete\n_enable_control required, _added in version 17.0+_  \n_deprecated in version 19.0_\n\n--8<-- \"warning-debug-only-command.md\"\n\nRemoving node ID (restart required to take effect)\n\n--8<-- \"warning-enable-control.md\"\n\n**Request:**\n```json\n{\n  \"action\": \"node_id_delete\"\n}\n```  \n**Response:**\n```json\n{\n  \"deprecated\": \"1\"\n}\n```  \n\n---\n\n### rai_from_raw    \n\nDeprecated in V28.0+. For alternatives, see [Unit Conversion RPCs](#unit-conversion-rpcs)\n\nDivide a raw amount down by the rai ratio.  \n\n**Request:**\n```json\n{\n  \"action\": \"rai_from_raw\",\n  \"amount\": \"1000000000000000000000000\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1\"\n}\n```\n\n---\n\n### rai_to_raw   \n\nDeprecated in V28.0+. For alternatives, see [Unit Conversion RPCs](#unit-conversion-rpcs)\n\nMultiply an rai amount by the rai ratio.  \n\n**Request:**\n```json\n{\n  \"action\": \"rai_to_raw\",\n  \"amount\": \"1\"\n}\n```  \n**Response:**\n```json\n{\n  \"amount\": \"1000000000000000000000000\"\n}\n```\n\n---\n\n### pending\n\nDeprecated in V23.0+. Replaced by [receivable](#receivable)\n\n---\n\n### pending_exists\n\nDeprecated in V23.0+. Replaced by [receivable_exists](#receivable_exists)\n\n---\n\n## Removed RPCs\n\n---\n\n### confirmation_height_currently_processing\n_added in version 19.0+_  \n_removed in version 27.0_\n\n--8<-- \"warning-debug-only-command.md\"\n\nReturns the hash of the block which is having the confirmation height set for, error otherwise. When a block is being confirmed, it must confirm all blocks in the chain below and iteratively follow all receive blocks. This can take a long time, so it can be useful to find which block was the original being confirmed.\n\n**Request:**\n```json\n{\n  \"action\": \"confirmation_height_currently_processing\"\n}\n```  \n**Response:**\n```json\n{\n  \"hash\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\n\n---\n\n### block_count_type  \nReports the number of blocks in the ledger by type (send, receive, open, change, state with version)   \n\n**Request:**\n```json\n{\n  \"action\": \"block_count_type\"\n}\n```  \n**Response:**\n```json\n{\n  \"send\": \"5016664\",\n  \"receive\": \"4081228\",\n  \"open\": \"546457\",\n  \"change\": \"24193\",\n  \"state_v0\": \"4216537\",\n  \"state_v1\": \"10653709\",\n  \"state\": \"14870246\"\n}\n```  \n\n---\n\n### payment_begin   \nBegin a new payment session. Searches wallet for an account that's marked as available and has a 0 balance. If one is found, the account number is returned and is marked as unavailable. If no account is found, a new account is created, placed in the wallet, and returned.  \n\n**Request:**\n```json\n{\n  \"action\": \"payment_begin\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"account\" : \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\"\n}\n```  \n\n---\n\n### payment_end  \nEnd a payment session.  Marks the account as available for use in a payment session. \n\n**Request:**\n```json\n{\n  \"action\": \"payment_end\",\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"wallet\": \"FFFD1BAEC8EC20814BBB9059B393051AAA8380F9B5A2E6B2489A277D81789EEE\"\n}\n```  \n**Response:**\n```json\n{\n}\n```   \n\n---\n\n### payment_init  \nMarks all accounts in wallet as available for being used as a payment session.  \n\n**Request:**\n```json\n{\n  \"action\": \"payment_init\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```  \n**Response:**\n```json\n{\n  \"status\": \"Ready\"\n}\n```  \n\n---\n\n### payment_wait  \nWait for payment of 'amount' to arrive in 'account' or until 'timeout' milliseconds have elapsed.  \n\n**Request:**\n```json\n{\n  \"action\": \"payment_wait\",\n  \"account\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"amount\": \"1\",\n  \"timeout\": \"1000\"\n}\n```  \n**Response:**\n```json\n{\n  \"deprecated\": \"1\",\n  \"status\" : \"success\"\n}\n```  \n"
  },
  {
    "path": "docs/core-development/code-standards.md",
    "content": "title: Code Standards\ndescription: Learn about the code standards expected when contributing to the nano protocol and node implementation\n\n# Code standards\n\n## Formatting\n\nclang-format is used to enforce most of the formatting rules, such as:\n\n* Tabs for indentation.\n* Open braces go on new lines.\n* Space before open parenthesis.\n* Space after comma.\n\nRunning `ci/clang-format-do.sh` on \\*nix systems is required before pushing your code to ensure that the formatting is good. If you want to do formatting from the IDE, chances are there's a plugin available. Visual Studio for instance provides a way to automatically format on saving. The definition file `.clang-format` is located in the project root directory. For CMake changes, running `cmake-format-do.sh` is required as well.\n\nMake sure you set up your editor to use tabs. Use tabs for indentation, and spaces for alignment [^1]. That way, you can use any tab size you want in your favorite editor, but the code will still look good for people with different settings.\n\n## General guidelines\n\n* Use `auto` type inference for local variables if it's clear from the context what the type will be. Use your best judgement, sometimes adding explicit types can increase readability [^2]\n* Handle exceptions, including IO exceptions for file and network operations.\n* Be liberal with `debug_assert`. Use asserts to check invariants, not potential runtime errors, which should be handled gracefully. `debug_assert` has an advantage over normal `assert` as it will always print out the stacktrace of the current thread when it hits. Debug asserts are for detecting bugs, not error handling. There is also `release_assert` which is similar to `debug_assert` but also hits in a release build. When there is unexpected behaviour and no suitable way to recover it can be used to halt program execution.\n* Be liberal with `logger.always_log` or `logger.try_log` statements, except in performance critical paths.\n* Add comments to explain complex and subtle situations, but avoid comments that reiterates what the code already says.\n* Use RAII and C++11 smart pointers to manage memory and other resources.\n\n## Performance and scalabiliy considerations\n\n* When making changes, think about performance and scalability. Pick good data structures and think about algorithmic complexity. \n    * Nested loops yield quadratic behavior - is there an alternative? A typical example is removing an inner lookup loop with an unordered set/map to improve lookup performance to O(1).\n* Make sure your change doesn't conflict with the scalability characteristics described in the white paper.\n\n## Security\n\nYour code will be reviewed with security in mind, but please do your part before creating a pull request:\n\n* Familiarize yourself with best practices for writing secure C++ code. In particular:\n    * Consult https://wiki.sei.cmu.edu/confluence/display/cplusplus\n    * Avoid using ANSI C functions. Many of these are prone to buffer overruns.\n    * Avoid using C strings and direct buffer manipulation.\n\n* Use static and dynamic analysis tools, such as valgrind, XCode instrumentation, linters and sanitizers. These tools are also great for debugging crashes and performance problems.\n\n[^1]: https://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces\n[^2]: http://www.acodersjourney.com/2016/02/c-11-auto/\n"
  },
  {
    "path": "docs/core-development/collaboration-process.md",
    "content": "title: Collaboration Process\ndescription: Find out how the open source collaboration process works with the nano protocol and node software\n\n# Collaboration Process\n\n## Code Process\n\n**Fork and do all your work on a branch**\n\nNano prefers the standard GitHub workflow. You create a fork of the nanocurrency/nano-node repository (or other repositories as needed), make changes on new branches for features/fixes, and push these up to be added as Pull Requests. \n\n**Create pull requests**\n\nBefore:\n\n* Branch out of the **develop** branch. The **master** branch is only updated on new releases.\n* Review your code locally. Have you followed the [Code Standards](code-standards.md) closely?\n* Run tests: `core_test`,`qt_test`,`rpc_test` (see [running tests](understanding-the-code.md#tests) for more details). Did you consider adding a test case for your feature?\n* Run [ASAN](../integration-guides/build-options.md#address-sanitizer), [TSAN](../integration-guides/build-options.md#thread-sanitizer) and [Valgrind](../integration-guides/build-options.md#valgrind) to detect memory, threading or other bugs\n* Run clang formatting script and resolve any raised issues: `ci/clang-format-do.sh`\n* Commit and push your fork branch\n\nAfter:\n\n* Create pull request on the upstream repository:\n    * Make sure you add a description that clearly describes the purpose of the PR.\n    * If the PR solves one or more issues, please reference these in the description.\n* Check that CI completes successfully - this can take up to a few hours depending on current CI queues. If any failures exist, fix the problem and push an update.\n* Respond to comments and reviews in a timely fashion.\n\n**Resolve conflicts**\n\nIf time passes between your pull request (PR) submission and the team accepting it, merge conflicts may occur due to activity on develop, such as merging other PR's before yours. In order for your PR to be accepted, you must resolve these conflicts.\n\nThe preferred process is to rebase your changes, resolve any conflicts, and push your changes again. [^1][^2]\n\n* Check out your branch\n* `git fetch upstream`\n* `git rebase upstream/develop`\n* Resolve conflicts in your favorite editor\n* `git add {filename}`\n* `git rebase --continue`\n* Commit and push your branch\n\n**Consider squashing or amending commits**\n\nIn the review process, you're likely to get feedback. You'll commit and push more changes, get more feedback, etc. \n\nThis can lead to a messy git history, and can make stuff like bisecting harder.\n\nOnce your PR is OK'ed, please squash the commits into a one.[^3]\n\nNote that you can also update the last commit with `git commit --amend`. Say your last commit had a typo. Instead of committing and having to squash it later, simply commit with amend and push the branch.\n\n## Finding issues or features to work on\n\n- Issues are available on GitHub, with the most urgent being in the latest milestone for release\n- Start with issues labeled as [`good first issue`](https://github.com/nanocurrency/nano-node/labels/good%20first%20issue) or connect with the NF core developers on [Discord](https://chat.nano.org) or the [forum](https://forum.nano.org) for ideas on how to help\n- If you find an issue you'd like to help with, comment and tag a [Nano Foundation team member](https://github.com/orgs/nanocurrency/people) who can evaluate and assign it to you\n\n## Submitting issues and feature requests\n\nStandard GitHub templates exist for submitting any found issues or feature requests. If you plan on working on a bug or feature that doesn't already have a GitHub Issue associated with it, please submit it first so the team is aware. See https://github.com/nanocurrency/nano-node/issues/new/choose for templates.\n\n## Discussion channels\n\nVarious channels exist for discussing code changes with the Nano Foundation and community.\n\n**GitHub**\n\nTo help persist useful information about a particular issue or feature, it is best to discuss within the related GitHub Issue or Pull Request. Members of the nano community and Nano Foundation actively follow and will engage when available.\n\n**Discord for chat**\n\nFor live chat, join the server at https://chat.nano.org and check out the `#protocol` and `#development` channels. The various channels under the `TESTING` section can also be helpful to follow.\n\n**Forum**\n\nAnother area for technical and code related discussions is the [forum](https://forum.nano.org). There are categories for `Protocol Design` and `Development` that are useful in discussing ideas. This can be a great place for getting feedback on ideas and exploring further before finalizing fixes and features in GitHub.\n\n## Proposals\n\nThere currently is no formal process for proposals on the nano network. This is an area actively being investigated and if requirements for submissions change, this area will be updated. For now, if you wish to propose an new idea, it is recommended to discuss on the [forum](https://forum.nano.org) first to gather feedback and use the [GitHub Issues](https://github.com/nanocurrency/nano-node/issues/new/choose) on the concept is solidifed/validated.\n\n[^1]: https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/\n[^2]: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/\n[^3]: https://github.com/todotxt/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit"
  },
  {
    "path": "docs/core-development/developer-discussions.md",
    "content": "title: Developer Discussions\ndescription: Links & notes for recurring live discussions about Nano development. Includes discussion between community developers and the Nano Foundation. Technical, developer-focused.\n\n# Developer Discussions\n\nLinks & notes for recurring live discussions about Nano development. Includes discussion between community developers and the Nano Foundation. Technical, developer-focused.\n\n!!! note\n    These developer discussions are best effort, live discussions, and may not contain the most accurate (or most recent) information. The intent of these discussions is to promote transparency, collaboration, & community-driven efforts, but development plans may change at any time. \n    \n    The below notes are also best effort, and may not be 100% accurate.\n\n## Sept 3, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1830969052820578365?t=Abqg6T-exPd5FhaQ2inY2w&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1f822rt/weekly_nano_developer_space_aug_3_2024/)\n\n## Aug 20, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1825895842437607934?t=3t1YvnV2gRsLJXoCgECw6w&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1ewzj2n/weekly_nano_developer_space_aug_20_2024/)\n\n## Aug 6, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1820822202297819143)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1elry5z/weekly_nano_developer_space_aug_6_2024/)\n\n## July 23, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1815748878320189616?t=L8QhI04wdbx87MQIJYoxug&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1eaa9i0/weekly_nano_developer_space_jul_23_2024/)\n- [YouTube](https://www.youtube.com/watch?v=cMK_Q50uWHk)\n\n## July 16, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1813204252380070206)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1e54dvm/weekly_nano_developer_space_july_16_2024/)\n- [YouTube](https://www.youtube.com/watch?v=Dx5ZEYwdbyw)\n    \n## July 9, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1810675179137192279?t=hEmkKBHOxRK9RofyNnUwVg&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1dz36p3/weekly_nano_developer_space_jul_9_2024/)\n- [YouTube](https://www.youtube.com/watch?v=Z7n75b8i9sI)\n  \n## July 2, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1808138726742065452?t=eqerZHL7ApiqRzFOs91V5g&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1dtmuk4/weekly_nano_developer_space_jul_2_2024/)\n- [YouTube](https://www.youtube.com/watch?v=JSEBA5HNqgE)\n\n## June 18, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1803065216919273931)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1dj46ct/weekly_nano_developer_space_june_18_2024/)\n  \n## June 11, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1800528535251267598?t=b7_ZOImygrwAW8yiRw8cdw&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1ddgvyj/weekly_nano_developer_talk_june_11_2024/)\n \n## May 21, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1792897054726824333)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1cx7jqw/weekly_nano_developer_space_may_21_2024/)\n \n## May 14, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1790381641107439731?t=Ms5Dy0bBFVqx8GbkOy8lGA)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1crv7i1/weekly_nano_developer_space_may_14_2024/)\n \n## April 30, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1785308297924432315)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1ch55iu/weekly_nano_developer_space_apr_30_2024/)\n\n## April 23, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1782771656408158483)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1cbhe9x/weekly_nano_developer_space_apr_23_2024/)\n  \n## April 16, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1780234655565746684?t=FGvjQKPRKAbxGRSIfCHR4A)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1c5gwux/weekly_nano_developer_space_apr_16_2024/)\n \n## April 9, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1777697905698107554)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1c0268f/weekly_nano_developer_space_apr_9_2024/)\n \n## March 26, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1772639556455567629?t=RTr-oEgf8ZoM1tEcfInxBw)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1bobrah/weekly_nano_developer_space_mar_26_2024/)\n \n## March 19, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1770091771541828085)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1bin1m6/weekly_nano_developer_space_mar_19_2024/)\n \n## March 12, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1767566192103825707)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1bd25p2/weekly_nano_developer_talk_mar_12_2024/)\n \n## March 5, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1765029691398734023?t=r6mG_OO6tKdnu32F5dhjnQ)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1b79viz/weekly_nano_developer_space_mar_5_2024/)\n \n## February 20, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1759956505606971745?t=98X_E9aTopR6qVaps1BEpw)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1avmgtd/weekly_nano_developer_space_feb_20_2024/)\n \n## February 13, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1757414995858526559)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1apv3i4/weekly_nano_developer_space_feb_13_2024/)\n  \n## February 6, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1754882713926926420?t=3KncD_dJcwZeI07_JXuNdg)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1akexw7/weekly_nano_developer_space_feb_6_2024/)\n  \n## January 30, 2024\n\n- [Developer call](https://x.com/gr0vity_dev/status/1752345979024490835)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/1af3o40/weekly_nano_developer_call_jan_30_2024/)\n  \n## January 23, 2024\n\n- [Developer call](https://x.com/ColinLeMahieu/status/1749804269925232822)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/19dv1ca/weekly_nano_developer_call_jan_23_2024/)\n  \n## January 16, 2024\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1747272701008634175)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/198wdac/weekly_nano_developer_call_jan_16_2023/)\n\n## January 9, 2024\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1744735898879811779)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/192my3t/weekly_nano_developer_space_jan_9_2024/)\n\n## December 12, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1734588963585728526)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/18gs1kr/weekly_nano_developer_space_dec_12_2023_last_one/)\n\n## December 5, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1732052255103221870)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/18bdsq8/weekly_nano_developer_talk_dec_5_2023/)\n\n## November 28, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1729515603529023585)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/185xrqi/weekly_nano_developer_call_nov_28_2023/)\n\n## November 21, 2023\n\n- [Developer call](https://twitter.com/gr0vity_dev/status/1726978836074742207)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/180p7jf/weekly_nano_developer_space_nov_21_2023/)\n\n## November 14, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1724442197179650478)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/17v5uat/weekly_nano_developer_space_november_14_2023/)\n\n## November 7, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1721905435056488743)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/17pwaa2/weekly_nano_developer_space_nov_7_2023/)\n\n## October 31, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1719368918895088121)\n\n## October 24, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1716817097408524743)\n\n## October 17, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1714280349738701183)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/17a344v/weekly_nano_developer_space_oct_17_2023/)\n\n## October 10, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1711743518576672943)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/174yxtu/weekly_nano_developer_space_oct_10_2023/)\n\n## October 3, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1709206677633782029)\n\n## September 26, 2023\n\n- [Developer call](https://twitter.com/ColinLeMahieu/status/1706669851912151247?t=YTMabUbEfkQgjIoVtGSKKg&s=19)\n- [Reddit discussion](https://www.reddit.com/r/nanocurrency/comments/16spnl2/colin_lemahieu_hosting_live_twitter_space_about/)\n"
  },
  {
    "path": "docs/core-development/overview.md",
    "content": "title: Core Development Overview\ndescription: All you need to know to help contribute to the core development of the nano node and protocol\n\n# Core Development\n\nWelcome and thanks for your interest in core development of the nano! The following resources contain information and guides for getting involved with the development of the node and protocol.\n\n## Getting started\n\nIt is recommended to have an understanding of how the nano protocol is designed to work so the code can be more easily read and evaluated.\n\n- Start by reviewing the [living whitepaper](../living-whitepaper/index.md)\n- Read through (or try out) the [running a node guides](../running-a-node/overview.md)\n- Understand [the basics](../integration-guides/the-basics.md) and maybe even some [advanced details](../integration-guides/advanced.md) about integrations\n- Learn how to [build the node yourself](../integration-guides/build-options.md)\n- Participate in the community through [Discord](https://chat.nano.org)\n- Start perusing the code in the repositories below and don't be afraid to ask questions\n\n\n## Code repositories\n\nThe Nano Foundation manages the [`nanocurrency`](https://github.com/nanocurrency) GitHub Organization account which includes various repositories for nano tools and implementations. Below is a partial list of the most common repositories referenced.\n\n| Name | Language | Purpose |\n|------|----------|---------|\n| [nanocurrency/nano-node](https://github.com/nanocurrency/nano-node) | C++| Primary node implementation used on the nano network |\n| [rs-nano-node](https://github.com/rsnano-node/rsnano-node) | Rust| Alternative node implementation by Gustav |\n| [nanocurrency/nano-work-server](https://github.com/nanocurrency/nano-work-server) | Rust | Standalone server for generating work values for blocks |\n| [nanocurrency/protocol](https://github.com/nanocurrency/protocol) | Kaitai Struct | Specification for nano network message protocol |\n| [nanocurrency/nanodb-specification](https://github.com/nanocurrency/nanodb-specification) | Kaitai Struct | Specification for database tables and fields used by the `nano-node` implementation |\n| [nanocurrency/nano-docs](https://github.com/nanocurrency/nano-docs) | Markdown | MKDocs based documentation this docs.nano.org site is built from |\n\nMost of the content in the following documentation is focused around the [nanocurrency/nano-node](https://github.com/nanocurrency/nano-node) repository, as that is where most development activity occurs. But there are tons of related projects creating useful tools, libraries, services and more for the nano ecosystem (see some options in [GitHub](https://github.com/search?q=nanocurrency&type=discussions)).\n\n## Security vulnerability reporting\n\n--8<-- \"warning-security-vulnerability-reporting.md\"\n\n## Nano Foundation core developers\n\nIn addition to contributions from the wider nano community, the [Nano Foundation](https://nano.org/foundation) manages a team of core developers who contribute to the protocol and primary node implementation. For a list of code contributors, see the [GitHub Insights page](https://github.com/nanocurrency/nano-node/graphs/contributors)."
  },
  {
    "path": "docs/core-development/understanding-the-code.md",
    "content": "title: Understanding the code\ndescription: Learn about the nano code for better development practices\n\n# Understanding the code\n\nThis guide is designed to give an overall structure of the core nano protocol codebase to help new developers get a better understanding of the different areas and how they interoperate. Due to the rapid changing nature of the protocol it’s possible some of the features are moved to different places or have changed entirely. Working on the protocol requires a very multi-disciplined and wide area of knowledge, none of it is particularly mandatory to get started but a good C++ understanding will help prevent being too overwhelmed initially:  \n\nItems required include:\n\n- Windows/MacOS/Linux\n- C++20 compiler\n- Boost\n- Git\n- CMake\n\nUseful experience includes modern C++ knowledge (up to C++20) including multithreading primitives (mutex, condition variables, atomics) & templates, Boost (asio & beast), RocksDB, LMDB, FlatBuffers, JSON-RPC, IPC, networking communication (ip/tcp, message passing, broadcasting algorithms), QT, signal handling, PKI cryptography, git & cross-platform development.\n\nThe main Nano projects are located inside the `/nano` subdirectory.  \n\n## Executable binaries\n\nAll executables have `nano_` prefix and projects have a `main` function inside `entry.cpp`\n\n**nano_node** – The standard way to start a node. There are 2 source files in here, `entry.cpp` and `daemon.cpp`. `nano_daemon::daemon::run()` is always called so is a good place to put a breakpoint if there are any issues during node operation (especially errors when launching initially).\n\n**nano_rpc** – This executable does not need to be run explicitly unless out of process RPC is selected. https://docs.nano.org/integration-guides/advanced/?h=+nano_rpc#running-nano-as-a-service Because this project is quite small it is all done inside the `entry.cpp` file and is probably an easier starting point template should anything else need to be moved out of process in the future.\n\n**nano_wallet** – This essentially does the same as `nano_node` but doesn’t support all CLI commands and has a graphical user interface for the wallet.\n\n---\n\n## Tests\n\nThe googletest (gtest) framework is used to validate a variety of functionality in the node, we do not currently use gmock in the codebase.  \n\n### Running tests\nThe dev network is forced for locally run tests, this lowers work and other settings to make it simpler to test.\nBuild with `cmake -DNANO_TEST=ON ..`\nSee docs.nano.org for more information. There may be intermittent failures, if so add them here https://github.com/nanocurrency/nano-node/issues/1121 and fix if possible.\n\n### Executables\n\n**core\\_test** – This is where the majority of tests should go. If there is any new functionality added or something has changed, it more often than not should have a test here! Any new core areas should have their own separate test file to encapsulate the logic.   \n\n**ipc\\_flatbuffers\\_test** – This actually doesn’t use the `gtest` library and has its own main file which just contains a simple example of using flatbuffers.  \n\n**load_test** – This creates a dynamic number of nodes, sends blocks from 1 of the nodes (primary) and waits until all other nodes have the same number of blocks. This does not normally need to be modified but is run as part CI at the end.  \n\n**rpc_test** – All RPC tests go here. There is some boilerplate to follow which creates an `ipc_server` for the node which mimics out of process rpc commands communicating with it. Care must be taken when creating write transactions as they are not allowed on io-threads (https://github.com/nanocurrency/nano-node/pull/1264). To make sure this is adhered to when calling the RPC commands, there is an RAII object `scoped_io_thread_name_change` which changes the current thread (normally the main one) to be `io`, and restores it when the object goes out of scope. For instance\n```\n...\nscoped_thread_name_io.reset ();\nnode.process (state_block);\nscoped_thread_name_io.renew ();\n```\n**slow_test** – Any core tests which are not suitable for CI because they take a long time (> a few seconds) should go here. There is a desire to make this file run once per night, but until then should be periodically run by developers.\n\n### Work/Sig verification modifying for tests\n\nA common mistake is to request work for the hash of the block to be added, but it should happen on the root (previous one). The work difficulty is different for the live/beta/dev networks and are set using the `work_thresholds` class. During any local testing, where a lot of blocks are processed, work generation and signature verification can take the majority of the time. To speed this up it can make sense to manually lower the work difficulty even further and change the sig verification to always return `true`.\n\n### Helpers\n\n**test_common** – This is a helper library which contains test specific (not node related) things which can be used by all test projects. This project should not have a `node` dependency. Anything which does should be put into `nano/node/testing.cpp`.\n\n### Fuzzer\n\nThe fuzzer uses libfuzzer which inputs arbitrary data continuously trying to find catch edge cases missed in traditional testing on specific examples. This is not currently supported on Windows. The executables are found in fuzzer_test/\\*. The node must be built with the CMake option `-DNANO_FUZZER_TEST=ON`, this does not require that `NANO_TEST` be set. Currently there are 3 executables built: fuzz_bignum, fuzz_buffer, fuzz_endpoint_parsing.\n\n**Notes:**  \nThere aren’t currently tests for specific CLIs so it’s recommended to abstract the functionality so that it can be tested in `core_test`.\n\n### Testing implementation details\nSometimes it is necessary to be able to change something about a class only for a test. Rather than make this the class interface public just for tests, the specific tests can be added as friends to the class, this is done like so for a test named like so TEST (node, example);\n```\nclass my_class\n{\nprivate:\n   int private_member; // the Test (node, example); test can access this member\n   friend class node_example_Test;\n};\n```\nThe test itself needs to be wrapped with the nano { } namespace for this to work correctly, if the class itself is in the nano namespace which is normally the case.\n\n### Additional pre-release testing\n- Run tests with TSAN/ASAN/Valgrind. All errors should be fixed before launch unless these are determined to be test related or false positives. We currently have some errors with using coroutines. There are blacklist files for the sanitizers which remove some errors caused by lmdb & rocksdb.\n\n---\n\n## Bootstrapping\n\nWhen you first start a Nano node, it must download & validate transactions until its ledger (account & transaction history) is in sync with the other nodes on the network. This process is called bootstrapping. There are 3 bootstrapping methods, ascending, legacy, and lazy. See [here](https://github.com/nanocurrency/nano-node/issues/3837) and [here](https://medium.com/nanocurrency/nano-explainer-lazy-bootstrapping-6f091e1eae8c) for more information. \n`node/bootstrap/boostrap_attempt.hpp` contains the base class definition for bootstrap attempts.\n\n### Ascending\n\n`node/bootstrap/bootstrap.cpp`\n\nNano node versions V24 & V25 introduced ascended bootstrapping - a complete rewrite of how Nano nodes sync account & transaction history from scratch.  Prior to V24, the bootstrap mechanism served transactions (blocks) in a top down format (i.e. newest to oldest / frontier to genesis), but since the blocks must be added to the local ledger from the bottom up (i.e. oldest to newest / genesis to frontier), the node spent a lot of time reordering transactions. This consumed a significant amount of disk space and disk IO (disk reads/writes), both of which contribute to long bootstrapping times (i.e. days or weeks).\n\nAscending bootstrapping sends & processes transactions from the bottom up, allowing nodes to easily trace transaction order without a complicated (and time consuming) re-ordering process. This significantly improves the speed of bootstrapping, removes complexity from the codebase, & reduces overall resource usage.\n\nFor more technical details, see [here](https://github.com/nanocurrency/nano-node/issues/3837).\n\n### Legacy\n\n`node/bootstrap/bootstrap_legacy.cpp`\n\nLegacy bootstrapping works by requesting frontiers periodically (every 5 minutes) from a random selection of peers, this is done in `nano::node::ongoing_bootstrap ()`. `bootstrap_frontier.cpp` contains the frontier req client and server. A `frontier_req` message is send from `frontier_req_client` to get a list of frontiers from a peer’s `frontier_req_server` starting at `frontier_req.start` which is done as `accounts_begin (transaction, current + 1);`. The accounts are sorted by their hash.\n\n### Lazy\n\n`node/bootstrap/bootstrap_lazy.hpp` \n\nLazy bootstrapping works by having nodes monitor the real-time network and observing live block confirmation. In combination with [optimistic elections](https://github.com/nanocurrency/nano-node/pull/4111), when a node sees confirmation for a new block, all previous blocks in the newly confirmed block's account-chain are also considered valid & confirmed, and are then inserted into node's local ledger.\n\n### Wallet lazy\n\nTODO\n\n### How messages are handled\n\n`node/bootstrap/bootstrap_server.cpp` \n\nWhen a message is received through the bootstrap server, its header is first checked inside `nano::bootstrap_server::receive_header_action ()`. The message is deserialized and added in `add_request ()` to the `std::queue<std::unique_ptr<nano::message>> requests` collection which holds a queue of messages. `run_next ()` is then called (and will be called after the request is finished if there are more messages to process), this runs the message through a `request_response_visitor` object which creates a `tcp_message_item` and adds it to the `tcp_message_manager` to be processed. The newest set of messages added were for telemetry. If new messages need adding that can be used as a guide: https://github.com/nanocurrency/nano-node/pull/2446\n\n---\n\n## Workers (thread pool)\n\nThe class definition for `thread_pool` is defined inside `nano/lib/threading.cpp`, which allows tasks to be added to a queue for execution as well as executed at a specific time. Previously there were worker/alarm classes, which were combined in https://github.com/nanocurrency/nano-node/pull/2871. Its primary purpose was to schedule write transactions off the io threads. It is generally recommended to push other tasks onto the io threads though to avoid bottlenecking these threads.\n\n---\n\n## Database\n\nThere are 2 logical areas where a persistent file is needed: the ledger and wallets. For this 2 NoSQL databases which store binary data are used, namely LMDB & RocksDB. The ledger database is comprised of a few files:\n\n- `nano/secure/store.hpp`: database interfaces, value object conversions, visitors, and high-level implementations\n- `nano/node/lmdb/`: anything specific to LMDB goes here\n- `nano/node/rocksdb/`: anything specific to RocksDB goes here\n\nThe wallets database uses the wallets_store which only has an LMDB backend.\n\n### Database upgrades\n\n`nano::lmdb::store::do_upgrades ()` is where LMDB database upgrades are done. For instance `void nano::lmdb::store::upgrade_v21_to_v22 ()` combines all block databases into a single one. Raw mdb functions are normally required as `block_store::get ()` and other functions normally can’t be used because they are updated to the latest db spec. The RocksDB upgrades were introduced by V25.0. It follows a similar approach implemented for LMDB. There were in the past multiple upgrades during a release when a beta build went out and a subsequent upgrade was desired. Previously a ledger reset was done and the version was re-used but this was deemed too inconvenient.\n\n### write_database_queue\nThis was introduced to reduce LMDB write lock contention between the block processor and the confirmation height processor. As during bootstrapping or high TPS the block processor can hold onto the lock up to 5s (by default), before the lock is held by the blockprocessor it signals that it is about to get the LMDB lock, the confirmation height processor can make use of this information and continue processing where it would otherwise be stalled. Ongoing pruning also makes use of this.\n\n---\n\n## Block processing\n\nThere are 4 types of legacy blocks: open, receive, send & change. There are the state blocks which encompass traits from the legacy subtypes as well as support epochs. In various places an `epoch_link` is checked, this indicates that the link field is set to one of the epoch accounts (for v1 state blocks), or possibly self for v2 state blocks upgrade blocks. No new legacy blocks can be created (there are about 10million), but they still need to be handled in any algorithm which deals with blocks because users can still be bootstrap from scratch. When a node is first launched without a ledger `block_store_partial::init ()` is called, this creates the genesis block. Blocks are then bootstrapped.\n\n---\n\n## Ledger\n\n`nano/secure/ledger.cpp` is where blocks are added and deleted to the ledger database.\n\nThe ledger cache is used when it may be expensive to try and determine the count of something in the ledger. It was originally used for the cemented count, because this is determined by adding the confirmation height from all accounts. This does mean that any external write operations from LMDB (such as CLI command `--confirmation_height_clear`) will cause this number to get out of sync. This is not possible with RocksDB backend because it does not allow multi-process write transactions.\n\n---\n\n## Node initialization\n\nThe biggest bottleneck for node start-up is caused by setting up the ledger cache. This requires scanning all accounts & conf height databases. A multi-threaded process (added in https://github.com/nanocurrency/nano-node/pull/2876) splits the account space into equal partitions (as accounts should be randomly distributed) and does sequential sorted reads in each partition; this is the most efficient way to search through any of the databases. Point/Random reads are very slow in comparison.\n\n### Keeping build times low\n\n`nano/node/node.hpp` is the largest build bottleneck, it can increase build times of files by up to 10 seconds on some systems! Some boost files tend to be large too, they offer forward declaration headers such as `<boost/property_tree/ptree_fwd.hpp>` & `<boost/stacktrace/stacktrace_fwd.hpp>` worth checking if they exist for any you are using in header files.\n\n### node_initialized_latch\n\nSome classes use `node_initialized_latch.wait ();` The latch was added in https://github.com/nanocurrency/nano-node/pull/2042 this is to prevent some of the issues in the node constructor initializer list where the `node` object is passed and a child constructor is wants to use a node member which is not yet initialized. This makes it resume operation once the latch is incremented at the beginning of the `node` constructor.\n\n### Initial output\nWhen the node is run it prints out some information about the database used, compiler etc. An example of appending to the output is here: https://github.com/nanocurrency/nano-node/pull/2807\n\n---\n\n## CMake \n\nCMake is used as the build system, and git submodules for any third party dependencies (except boost which must be installed separately by the developer). In `CMakeLists.txt` header files (.hpp) are above source files (.cpp), no particular reason but consistency is important.\n\n### Developer build options\n\n`-DNANO_TIMED_LOCKS=10` \n\nAdded: https://github.com/nanocurrency/nano-node/pull/2267. In `nano/lib/locks.hpp(.cpp)`, `std::mutex`, `std::condition_variable`, `std::unique_lock` & `std::lock_guard` are wrapped in custom classes (with the same interface) which adds some extra timing functionality to check if a mutex was help for a time longer than `NANO_TIMED_LOCKS` in milliseconds. This is useful to see if mutex contention is a cause of any performance loss. To pinpoint a specific mutex https://github.com/nanocurrency/nano-node/pull/2765 added `NANO_TIMED_LOCKS_FILTER=confirmation_height_processor`. The full list of mutexes is available in `nano/lib/locks.cpp` - `mutex_identifier()` .\n\n---\n\n## APIs\n\n### CLI\n\nThere are 2 places that CLI commands can be added for use with `nano_node`, `nano/node/cli.cpp` & `nano/nano_node/entry.cpp`. The `nano/node/cli.cpp` CLI commands are also shared with `nano_wallet` so this is the place to put shared logic which can be used by both. CLI commands prefixed with `debug_*` shouldn’t really be used by end users unless they are diagnosing issues. Sometimes it can be useful to compare the RPC output with CLI, and rpc results such as `block_count` will return cached results.\n\n### IPC\n\nWhen using the `nano_rpc` as a separate process (either child or manually starting it), there needs to be a way of communicating between processes. IPC supports tcp and unix domain sockets, `nano_rpc` only supports tcp as it can be run on a different computer. IPC 2.0 adds flatbuffer support (https://github.com/nanocurrency/nano-node/pull/2487) which can be used for the new RPC 2.0 (TBA).\n\n### Websockets\n\nWebsockets were introduced in https://github.com/nanocurrency/nano-node/pull/1840. Previously a HTTP callback had to be used, but websockets provides a more efficient 2 way communication protocol. Websocket events are available for various topics. For an example of adding a websocket topic look at: https://github.com/nanocurrency/nano-node/pull/2634. `observers.notify (message_a.data, endpoint);` is what ultimately invokes the websocket server to send a message which is deserialized inside `nano::websocket::message_builder`.\n\n---\n\n## Signal handling\n\nThere are 2 sets of signal handlers registered (both are only set when the `nano_node` is run as a daemon. `SIGSEGV` & `SIGABRT` are set at the beginning which will create dump files if there is a segmentation fault during program execution (added in https://github.com/nanocurrency/nano-node/pull/1921/). `SIGINT` & `SIGTERM` signals catch non-kill intentional closing of the executable, such as pressing ctrl+c (added in https://github.com/nanocurrency/nano-node/pull/2018). This shuts down the node allows any running write transactions to finish. Only async signal safe functions should be used in signal handlers, this limits it to very specific functions.\n\n---\n\n## Memory allocators\n\nA lot of our heap usage is from deserializing block/votes off the wire and ledger database. To solve this we use a memory pool allocator which reuses memory in a freelist: https://github.com/nanocurrency/nano-node/pull/2047\n\nIn `nano/lib/memory.hpp` a `nano::make_shared` function is defined which checks if the global variable `use_memory_pool` is set (initialized during node startup reading the config `node.use_memory_pools`, which defaults to true). The memory is never reclaimed, this is a performance optimization.\n\n---\n\n## Libraries and submodules\n\n### Boost\nWe use the Boost library where possible, such as coroutine, filesystem, endian converter, lexical_cast, multi_index_container etc. If there is a static/dynamic Boost library which is not used, there are generally no issues in adding it. Just make sure the build scripts and documentation are updated.\n\n**nano/boost**\nUse `nano/boost/asio` `nano/boost/beast` for includes, this wraps up various includes and prevents warnings being shown (particularly on Windows builds).\n\n### `nano/crypto_lib/`\n\nThis is a small library which has no dependency to anything in the nano core, which is needed as it is included by the ed25519 library as well. More info here: https://github.com/nanocurrency/nano-node/pull/1870\n\n### `test/common/`\n\nAny functionality which is shared between test projects and may also use gtest library. There is also `nano/node/testing.cpp` which has no gtest dependency because it is also used in CLI commands too.\n\n### `nano/lib` vs. `nano/secure`\nThe`nano/lib` library was originally intended to be used by other programs wanting some of the nano functionality, but those specific external C functions were removed and it has now become the place to put all commonly used code. As such anything which doesn’t depend on the node should go here, and the `secure` library is now mostly for ledger specific things.\n\n### git submodules\nWe have a variety of submodules https://docs.nano.org/node-implementation/contributing/?h=+submodule#about-the-code-base third party dependencies are to be kept as minimal as possible in order to keep build times lean, but if there is a suitable one it can be added a submodule.\n\n---\n\n## Assertions\n\n`debug_assert` is essentially the same as the traditional C++ assert but also outputs a stacktrace. Added in https://github.com/nanocurrency/nano-node/pull/2568. This should be used to check programmer logic.\n\n`debug_assert (!mutex.try_lock ());` When functions require that a mutex is required before being called we often check that the mutex is locked. Although this is technically undefined behaviour to be called by a thread which already owns the mutex we have been using this idiom for years and found no issues with the major compilers.\n\n`release_assert` this is an assert which is triggered in both release/debug build, it also outputs a stacktrace. This was added https://github.com/nanocurrency/nano-node/pull/1114. This should be used if some invariant doesn’t hold and there is no suitable way to recover from this. Such as reading something from the ledger which is meant to exist but doesn’t, can indicate ledger corruption.\n\n---\n\n## Voting/Consensus\n\nTo confirm a block a sufficient number of votes which are taken from `confirm_ack` messages are tallied up. If the tally is above the delta inside `nano::election::have_quorum ()` it returns true and the block is considered confirmed. `confirm_ack` messages can either contain the whole block or a hash (vote by hash). `confirm_req` message header as well as `confirm_ack` indicate what the type of the contents is in the header, either `not_a_block` which means dealing with block hashes or the block type. `nano/node/common.cpp` contains these messages (among others) and (de)serializing functions.\n\n### voting\nThe vote generator `nano::vote_generator::vote_generator` is responsible for collecting hashes that need a vote generated, combining them into a single `vote by hash` message, signing the package with the representative key and publishing the votes to the network.  A maximum of `nano::network::confirm_ack_hashes_max` hashes can be combined into a single vote `confirm_ack` message, this provides a decent tradeoff between optimizing vote signatures and reducing bandwidth.  While the process is running it waits for `config.vote_generator_delay` time in order to pack more hashes into a single vote message.  If there are more than `config.vote_generator_threshold` after waiting then it will wait for one additional `config.vote_generator_delay` before broadcasting the message.  This allows for fast vote publishing at lower rates while enabling more hashes to be combined together at higher rates.\n\n### vote_processor\nVotes are signed by the representative and the vote processor schedules checking these votes through the `signature_checker` inside `nano::vote_processor::verify_votes ()`.  Once a vote signature has been verified, the hashes within the vote packet are passed to active_elections where they are either added to an active election or added to the inactive votes cache if an election does not exist.\n\n### active_transactions\nThe active transactions class handles election management and prioritization.  When a block is processed and `nano::active_transactions::insert` called, a new election is started for the block hash if one does not already exist.  In addition to starting elections there is a 500ms `request_loop` that handles election management.  This process assists with moving elections through the different transition states as well as moving elections to a prioritized status if there is a backlog of elections.  During the requst loop the current network difficulty is updated through `update_active_multiplier` which takes the top `prioritized_cutoff` number of active elections that have not been confirmed and samples their difficulty multiplier.\n\nFinally, the active transactions class also handles frontiers that have not been confirmed.  Most commonly this is from bootstrapping, where the frontier of an account is added to the active elections and vote requests are sent to other nodes to confirm the frontier and thereby the rest of the account and ancestors through confirmation height processing.\n\n### confirmation_solicitor\nDuring the `request_loop` of the active transactions process, any election that is in the `active` state for more than 5 seconds will request votes from Principle Representative nodes that it has not seen a vote from yet.  These requests are added to the `confirmation_solicitor` which aggregates the hashes up to `nano::network::confirm_req_hashes_max` into a single `confirm_req` message and publishes it to select PR nodes that have not voted.  This helps fill any gaps in network communication failures where a vote may have been dropped which helps reach quorum on the highest priority elections.\n\n### request_aggregator\nThe request aggregator is responsible for collecting vote requests `confirm_req` messages from other nodes and finding the optimal responses.  A local vote cache is used for recently generated votes, if the block hash in the request exists in the cache then a cached vote is returned, if the hash does not exist then the hash is added to the vote generator and a new vote is generated and published to the requesting node.  The request aggregator also handles publishing forks if the request is for a competing fork.  If the local node has a different winning hash it will publish a vote for the winning hash instead of the requested hash in addition to sending the requesting node the winning block as well.\n\n### election\nAn election is created when a new block is processed.  The primary purpose of the election class is to tally the vote weight and ensure consensus between any competing forks. In order to efficiently move an election through the process it can have several states.  Initially `passive` where it is waiting for votes from other nodes, then after 5 seconds if it has not been confirmed it will transition to `active` where vote requests to other nodes are made.  After `active_request_count_min` rounds of requesting votes are complete if the election is still not confirmed it moves to `broadcasting` where it will publish the block to PR nodes that have not voted in an attempt to ensure the block has been propagated throughout the network.  Under low load the `active` and `broadcasting` states are rarely used as all elections are complete within the `passive` window.\n\nEvery vote that is added to the election triggers a check for whether quorum has been reached on the election.  Quorum requires that the winning hash has `node.online_reps.delta` more weight than any competing forks.  If quorum is reached the election is marked confirmed, transitions to the `confirmed` state and is added to the confirmation height procesor which updates the ledger.\n\nAfter an election is confirmed it can stay in the active elections container up to `confirmed_duration_factor` in order to continue to process votes and republish votes to other nodes, after which is it is removed.\n\nIf an election lasts longer than 5 minutes and has not been confirmed it is transitioned to `expired_unconfirmed` and removed from the queue.  This most often happens during high saturation when the active elections container reaches capacity.\n\n### continuous backlog population\n\nBacklog population is a process in which a node scans all accounts in its ledger, with or without confirmed blocks, and forwards (activates) the accounts which do not have all their blocks confirmed to the election scheduler for prioritization and eventual queuing in the proper bucket. It is necessary to do this periodically because the amount of space in each bucket is limited, and the number of accounts needing confirmations can be much higher than that (especially during bootstrap or network spam attack). \n\nContinuous backlog population changes the ledger scan interval from every 5 minutes to constant, with population rate & frequency controlled by `backlog_scan_batch_size` and `backlog_scan_frequency`.\n\nSee [here](https://github.com/nanocurrency/nano-node/pull/3999) for more details.\n\n### optimistic elections\n\nInstead of confirming every block in every account-chain one-by-one, the optimistic scheduler randomly samples accounts with unconfirmed blocks and activates an election for the account's head block (the latest _unconfirmed_ block in the account-chain). Once the head block is confirmed, all previous dependent blocks (within the account-chain _and_ in other dependent account-chains; i.e. cross-chain) are considered confirmed. The number of optimistic elections is limited, so it doesn't replace or impact the default election scheduling behavior.\n\nSee [here](https://github.com/nanocurrency/nano-node/pull/4111) for more details.\n\n### Confirmation height processor\nWhen a block is confirmed `void nano::node::process_confirmed ()` the block is added to the confirmation height processor. This begins the process of cementing it and all of its dependents, once this occurs these blocks can never be rolled back. There are 2 confirmation height algorithms bounded and unbounded. Originally only the unbounded one existed, this would store the block hash for the original block confirmed, all its previous blocks, and recurse the bottom most receive block to the source and repeat the process. If this hit something like the binance chain or (any long chain) it could use a lot of memory (unbounded amount). So this brought about the bounded confirmation height processor algorithm which starts at the very bottom of the account chains but does the same recursion when a receive block is hit. This limits the amount of block hashes needing to be stored in memory to be able to cement the bottom most blocks. Checkpoints are used if there are a lot of accounts which need to be traversed to reach which exceeds the maximum amount of memory . It does mean in certain cases the same iteration will need to be done more than once but this should be a rare case only during initial cementing.  \n\nOnce the uncemented count (block count – cemented count) is less than 16K the unbounded processor is used. As mentioned above this instead starts from the top (original confirmed block) and works downwards and saves all the blocks hit (not just hash) which means they don’t need to be re-read during writing  later. This does use a lot more memory though which is why this is limited to a certain number of blocks, once the unbounded cutoff is exceeded the bounded processor resumes.  \n\nBoth algorithms operate with a read transaction first which reduces write lock held time as it can do a lot of iterating. This does mean that there can be some inconsistency by the time the writing is done, but this shouldn’t be an issue because once a block is confirmed by the network it will stay confirmed by `debug_assert` checks are added to catch any programming mistakes. While it is more effort to maintain 2 algorithms the unbounded one largely existed before so it made sense to re-use it, given the performance improvements in almost cemented ledgers.\n\n### Frontiers confirmation\n`nano/node/frontiers_confirmation.cpp` contains code which starts at the beginning of the accounts database (`nano::blockstore_partial::accounts_begin`) and iterates in ascending order and prioritises accounts based on the number of uncemented blocks (stores up to 100k) and requests confirmation for a limited number of these accounts. When the cemented count is above the hardcoded bootstrap weights this is limited to the number of optimistic elections which is 50 in this case so it is expected to be quite slow in this case. Accounts in wallets are also checked.\n\n---\n\n## Telemetry\nnano/node/telemetry.cpp contains the logic for telemetry processing. This sets up an ongoing telemetry request round (every 60 seconds on the live network) where a telemetry_req message is sent to every peer. There is an `alarm` timeout of about 10 seconds in which we require the response (telemetry_ack) to be received otherwise it is rejected. Any calls to get_metrics_* return a cached result. To add a new definition to the telemetry_ack message this can be used as a guide which added the `active_multiplier`: https://github.com/nanocurrency/nano-node/pull/2728\n`telemetry_ack` messages are signed and are backwards compatible with older nodes (from v22 onwards). Those nodes will verify the whole message including any extra unknown data which is appended at the end is just ignored. To prevent ddosing by `telemetry_req` messages, nodes ignore messages received within that 60second (on live) boundary. This is done in `void nano::bootstrap_server::receive_header_action ()`\n\n---\n\n## Stats\n\n### Counters\nThe `stats` object is used to keep a count of events that have happened, this is a useful idiom for checking values in tests and is aggregated in the stats->counts RPC. There are main stat types and then details for that type. A simple example of adding new details and incrementing the stats can be seen here: https://github.com/nanocurrency/nano-node/pull/2515 Adding a type for a stat is a similar procedure just using the `nano::stat::type` enumerator.\n\n### Objects\nMost classes which have a member variable of container of multiple items (map, vector, list etc..) should have a function with a prototype of:\n`std::unique_ptr<container_info_component> collect_container_info (my_class & my_class, std::string const & name);`\nAnd then call this in an owning object which should itself be called recursively until it reaches the `node` object `collect_container_info`. They are typically not made as part of the class itself because it’s a very specialised function which is only called as part of the stats->object RPC, like so:\n`{\"action\":\"stats\",\"type\":\"objects\"}`\n\n---\n\n## Pruning\nPruning occurs periodically inside `nano::node::ongoing_ledger_pruning ()`. Pruning currently requires a full ledger to be bootstrapped and when an account frontier is confirmed it can then be pruned. The hashes of the pruned blocks are put into the pruned database so that we know to ignore any of these old blocks should the node bootstrap them again. Pending blocks cannot be pruned currently.\n\n---\n\n## Config files\nTOML config files are used, previously we used json files but TOML config files have the benefit of providing comments inside. There are no versions or upgrades done here, instead any defaults not explicitly overridden in the toml file get updated implicitly. There are few config files:\n\n### config-node.toml\nThis is actually called `daemonconfig.cpp` in the code base, but it wraps a `node_config` object.\n\n### Other config files  \n`config-rpc.toml` & `config-wallet.toml` contain settings which can be modified by the user to override the defaults. The most common ones are enabling rpc/websocket & rocksdb.\n\nThe `nano/node/node_rpc_config.cpp` are the rpc settings for the node.\n\n---\n\n## Key resources\n\n**nanodb-specification & protocol repositories**\n\nThere are 2 repositories which use kaitai specifications which should be updated (normally near the end of the release) if there are any changes to the https://github.com/nanocurrency/nanodb-specification or https://github.com/nanocurrency/protocol message\n\n**nano-docs**\n\nAll RPC/CLI changes should have a documentation update specifying the version that they work. There is a documentation label in the nano-node repository which is useful as a reminder that they should be added, documentation updates are often overlooked.\n\n**nano.community**\n\nA great community built resource for developers is https://nano.community/getting-started-devs/getting-started where broad details of the design are outlined along with code-level insights.\n\n---\n \n## Other notes\n\n**All threads should have a name set**\n\nAn easy example to follow is https://github.com/nanocurrency/nano-node/pull/2987/files This is so that debuggers/viewers which show threads can pick up the name to make it easier to navigate. It’s been known not to work in the Visual Studio Concurrency visualizer.\n\n**(de)serializing**\n\nWhere possible we try and store primitives in big-endian. As most systems are little-endian this means using `boost::endian::native_to_big` on primitives when serializing and `boost::endian::big_to_native` when deserializing.\n\n**Signature checker**\n\nThis is used by both blocks/votes and creates (total threads / 2) to perform signature verification of set batches; this is the biggest compute resource. Being able to lower this would be very beneficial, such as out of process sig verification and/or via GPU.\n\n**peers**\n\nPeers are written to disk periodically. This was added in https://github.com/nanocurrency/nano-node/pull/1608 \nIf the node has not been run in a long time (1 week), the peers list is cleared and the preconfigured peers list is used, this was added in https://github.com/nanocurrency/nano-node/pull/2506\n\n\n- Do not use the `node` object or include `node.hpp` in new core source files unless necessary, instead include the dependencies that it requires. We are still in the process of removing this idiom from other files because it adds circular dependencies, potentially ordering bugs and increases the build time.\n- Take care not to have nested `tx_begin_write ()`, it is quite easy to forget about this in tests, it will just cause a deadlock. To solve it, limit the scope:\n\t- Pass `std::shared_ptr` parameters by reference where possible, https://github.com/nanocurrency/nano-node/pull/3029\n\t- Be cautious with random DB reads, they are much slower than sequential reads. This PR sped up the delegators by a factor of 100 RPC by removing the block_get call needed in the loop. https://github.com/nanocurrency/nano-node/pull/2283\n\t```\n\t{ // Limit scope\n\tauto transaction = store->tx_begin_write ();\n\tblock_put (store.tx_begin_write (), block);\n\t}\n\t…\n\tauto transaction = store->tx_begin_write ();\n\t```\n\tor if it’s a single write can create a temporary just for that use:\n\t`block_put (store.tx_begin_write (), block);`\n\tBe cautious with callback lifetimes with asynchronous callbacks, such as the worker, alarm and asio. The following issue was because of them:\n\t```\n\tint x = 4;\n\tworker.push_back ([&x]() { \n\t  std::cout << x; // x might not be valid by the time this is called, should have been a copy.\n\t});\n\t```\n \n- Currently (as of V25) using C++20 with Boost 1.81.\n- There are known exceptions triggered when `consume_future` is called do not be alarmed when seeing this.\n\n## Areas of future improvement\n\n- A lot of tests still use legacy blocks, any new ones should use state blocks.\n- Minimise heap allocation. This can lead to fragmentation which affects long running processes.\n- `slow_test` is not run as part of CI\n\n## FAQs\n\n- Where are blocks added to the ledger? `nano::ledger::process ()`\n\n- Where are rpc calls handled? `nano/node/json_handler.cpp`\n\n- Where is the genesis block created? `nano::blockstore_partial::init ()`  \n\n- How to stop the node effectively? `rpc->stop ();`\n\n- How to use RocksDB in tests? Set the environment variable: `TEST_USE_ROCKSDB=1`\n"
  },
  {
    "path": "docs/glossary.md",
    "content": "title: Glossary\ndescription: A glossary of common terms used within the nano documentation and network\n\n# Glossary\n\n#### account\nRefers to an address (starts with `xrb_` or `nano_` which are interchangeable) that you control the private keys of. An address is a reinterpretation of the 256-bit public key using BASE32 encoding and a checksum. Previously supported `xrb-` or `nano-` prefixes are deprecated.\n\n#### active transaction\nA newly downloaded block to the node which enters into the voting process.\n\n#### ad hoc accounts\nAccounts not derived from a private seed which can be held in the node wallet through the wallet ID. These accounts are only recommended for use with advanced systems.\n\n#### announcement rounds\nA repeating half-second cycle on the node during which votes are collected for active transactions in attempt to reach quorum.\n\n#### Block\nA single Nano transaction. All new transactions (e.g. sends, receives, representative changes, etc) on the Nano Protocol are communicated via state blocks (since node V11). The account's entire state, including the balance after each transaction, is recorded in each block. Transaction amounts are interpreted as the difference in balance between consecutive blocks. Before V11, each transaction type (open, send, receive, change) had its own legacy block type.\n\n#### block hash\nA 64 character, uppercase hexadecimal string (0-9A-F) value representing a unique block on an account.\n\n#### Block height\nA local integer value that represents the order of a block in an account chain. For example, the 15th block in an account would have a block height of 15. Related to (but different from) [confirmation height](#confirmation-height).\n\n#### Block Lattice\nThe Block Lattice is a data-structure in which individual accounts control their own blockchain. This allows transactions to be added quickly without conflict and sent to the network for confirmation.\n\n#### Blocks Per Second (BPS)\nThe transmission rate of [unconfirmed](#confirmation) blocks (transactions) on the network. \n\n#### bootstrap network\nA sub-network established between peers via Transmission Control Protocol (TCP) for managing bulk transmission of blocks. This is used on initial bootstrapping of peers and when out-of-sync peers attempt to fill large gaps in their ledgers. This is available within all Nano networks (main, beta and test networks).\n\n#### bootstrapping\nDuring initial sync, the nano\\_node requests old transactions to independently verify and populate its local ledger database. Bootstrapping will also occur when the nano\\_node becomes out of sync with the network.\n\n#### burn\nWhen a 'burn' takes place, funds are sent to a specifc address that no one can access. Because no one can ever access funds sent to a burn address, it reduces the [circulating supply](#circulating-supply).\n\n#### circulating supply\n133,248,297.920938463463374607431768211455 Nano. This is the supply that resulted after [burns](#burn) were made from the [genesis](#genesis) account, landing account and faucet account, following original distribution. Actual circulating supply is lower due to lost keys and sends to burn accounts. The original supply minus any amounts sent to the burn account can be found using the [available_supply](/commands/rpc-protocol/#available_supply) RPC.\n\n#### Cementing\nWhen a specific node marks a [confirmed](#confirmation) transaction as locally irreversible by setting the [account's](#account) [confirmation height](#confirmation-height) (in the node database) to the now higher [block height](#block-height) of the confirmed transaction. Cementing is a node-level operation.\n\n#### Confirmation\nWhen a block (transaction) gathers enough votes from the network to pass [quorum](#quorum). Note that confirmed sends are irreversible (i.e. fully-settled), but the receiver must publish a corresponding receive block before they will be able to spend the [receivable](#receivable) funds. Confirmation is a network-level decision.\n\n#### Confirmation Height\nA number stored in the local node database that represents the highest (most recent) [confirmed](#confirmation) block in an account chain. Related to (but different from) [block height](#block-height).\n\n#### Confirmations Per Second (CPS)\nThe rate of [confirmed](#confirmation) [blocks](#blocks).\n\n#### election\n\n#### frontier\nThe most recent block added to the account chain. Also called the head block. Can be either confirmed or unconfirmed.\n\n#### genesis\nThe first [account](#account) to be created, containing the maximum amount of Nano to ever exist. From here the funds were sent to other wallets; for distribution or to be [burned](#burn).\n\n#### head block\nSee [frontier](#frontier).\n\n#### inbound send\nA block with funds being transferred to an [account](#account) owned by a [wallet](#wallet) on your node.\n\n#### legacy blocks\nBlocks on an account chain before the first v1 block (which is often the v1 epoch block but can be other types). The first v1 block and all subsequent blocks are stateful blocks.\n\n#### live network\nA sub-network established between peers via Transmission Control Protocol (TCP) for communicating newly published blocks, votes and other non-bootstrap related traffic. This is available within all Nano networks (main, beta and test networks). In versions prior to V19, this was done via User Datagram Protocol (UDP). UDP was retained as a fallback for peer connection for versions 19 and 20. In V21 it was deprecated, and in V25 it was fully removed.\n\n#### node version\nThe version used to identify a unique release build of the node. Each node version is tied to a single [protocol version](#protocol-version), but they are updated independently.\n\n#### online voting weight\nAlso called online stake, it is a trended value. The node samples online representative weights every 5 minutes across a rolling 2 week period. The online voting weight value is the median of those samples.\n\n#### peers\nNodes connected over the public internet to share Nano network data.\n\n#### pending\nSee [receivable](#receivable)\n\n#### Private Key\nSee [wallet](#wallet).\n\n#### Public Key\nA public key is derived from a [private key](#private-key) using the ED25519 elliptic curve algorithm. An address is a representation of the public key, see [account](#account) for more info.\n\n#### Open Representative Voting (ORV)\nA consensus mechanism unique to Nano which involves accounts delegating their balance as [voting weight](#voting-weight) to [Representatives](#representative). The Representatives [vote](#voting) themselves on the validity of transactions published to the network using the voting weight delegated to them. These votes are shared with their directly connected peers and they also rebroadcast votes seen from [Principal Representatives](#principal-representative). Votes are tallied and once [quorum](#quorum) is reached on a published block, it is considered confirmed by the network.\n\n#### Proof-of-Work (PoW)\nA Proof-of-Work is a piece of data which satisfies certain requirements and is difficult (costly, time-consuming) to produce, but easy for others to verify. In some systems this data is a central part of the security model used to protect against double-spends and other types of attacks, but with Nano it is only used to increase economic costs of spamming the network.\n\n#### Principal Representative\nA Nano account with >= 0.1% of the [online voting weight](#online-voting-weight) delegated to it. When configured on a node which is voting, the votes it produces will be rebroadcasted by other nodes to who receive them, helping the network reach consensus more quickly.\n\n#### protocol version\nThe version used to identify the set of protocol rules nodes are required to follow in order to properly communicate with peers. Nodes running older protocol versions are periodically de-peered on the network to keep communication efficient - see [Active Releases](/releases/node-releases/#active-releases) and [Inactive Releases](/releases/node-releases/#inactive-releases) for the latest versions allowed to peer with one another.\n\n#### qualified root\nThe concatenation of the root and previous attributes of a block. For the first block on an account, this would be is the account public key following by 32 zero bytes. For the second or higher block on an account, this would be the previous field repeated twice (root + previous, where root == previous).\n\n#### quorum\nWhen the delta between the two successive blocks of a root is > 67% of the online voting weight.\n\n#### receivable\nA transaction state where a block sending funds was published and confirmed by the network, but a matching block receiving those funds has not yet been confirmed.\n\n#### Representative\nA Nano account with > 0 voting weight, but < 0.1% of the [online voting weight](#online-voting-weight), delegated to it. Unlike [Principal Representatives](#principal-representative), when configured on a node which is voting, the votes it produces and sends to directly connected peers won't be rebroadcasted by those peers.\n\n#### root\nIf the block is the first block on the account, the root is the account public key. Otherwise it is the previous hash included in the block. The root of a block can never be zero.\n\n#### seed\nA 256-bit random value usually represented to the user as a 64 character hexidecimal (0-9 and A-F) value. Private keys are derived from a seed.\n\n#### Transactions Per Second (TPS)\nHistorically, TPS was a per-node measurement that represented a node's perception of the rate of transactions on the network ([BPS](#blocks-per-second-bps)). This measurement was found to be inaccurate due to peering and propagation differences between nodes, so [CPS](#confirmations-per-second-cps) is now the preferred term for describing overall Nano network scalability. It's also important to note that while Nano sends do not require a corresponding receive to be [confirmed](#confirmation), a receive block must be confirmed before received funds can be sent again (see [receivable](#receivable)).\n\n#### unchecked (blocks)\nBlocks (transactions) that have been downloaded but not yet processed by the Nano node. The node software downloads all blocks from other nodes as unchecked, processes them and adds to block count, confirms the [frontier](#frontier) blocks for each account, and then marks them as [cemented](#cementing).\n\n#### unopened account\nAn account address that does not have a first block on it (which must be a block to receive Nano sent from another account, cannot be a block only changing the Representative).\n\n#### unpocketed\nSee [receivable](#receivable).\n\n#### vote-by-hash\nAllows representatives to only include the hash of a block in each vote to save bandwidth. Before vote-by-hash was activated the entire block contents were required.\n\n#### voting\nEach node configured with a [Representative](#representative) votes on every block by appending their Representative signature and a sequence number to the hash. These will be sent out to directly connected peers and if the vote originates from a [Principal Representative](#principal-representative), it will subsequently be rebroadcasted by nodes to their peers.\n\n#### voting weight\nThe amount of weight delegated to a [Representative](#representative).\n\n#### wallet\nA wallet is an organizational object in a nano\\_node that holds a single seed from which multiple accounts are deterministically derived via a 32-bit unsigned integer index starting at 0. Private keys are derived from the seed and index as follows: (`||` means concatenation; `blake2b` is a [highly optimized cryptographic hash function](/protocol-design/signing-hashing-and-key-derivation/#hashing-algorithm-blake2))\n\n$$\nk_{private} = blake2b(\\text{seed} || \\text{index})\n$$\n\n#### WALLET_ID\nA 256-bit random value name/identifier for a specific wallet in the local nano\\_node database. The WALLET\\_ID **is not** stored anywhere in the network and is only used in the local nano\\_node. Even though a WALLET\\_ID looks identical to a seed, do not confuse the WALLET\\_ID with a seed; funds cannot be restored with a WALLET\\_ID. Do not backup the WALLET\\_ID as a means to backup funds.\n\n#### work peers\nNode peers which are configured to generate work for transactions at the originating nodes request.\n"
  },
  {
    "path": "docs/index.md",
    "content": "---\r\ntitle: Home\r\ndescription: Explore the design, features, releases and other related resources for the nano protocol and node implementation.\r\nhide:\r\n  - navigation\r\n  - toc\r\n---\r\n\r\n# Nano Node and Protocol Documentation\r\nWelcome! This documentation is focused on helping developers understand Nano, including setup, maintenance, and building on top of the Nano node. Details of how this documentation has been arranged are below:\r\n\r\n| Section | Details | Audience |\r\n| | | |\r\n|<span class=\"no-break\">**[What is Nano?](what-is-nano/overview.md)**</span>|Take a high-level tour - this is a great place to learn about how Nano is uniquely suited to being a global digital currency.|Everyone|\r\n|<span class=\"no-break\">**[Running a Node](running-a-node/overview.md)**</span>| Set up a Nano node to manage the ledger, create and publish blocks and participate in consensus. | Node operators, developers  |\r\n|<span class=\"no-break\">**[Integration Guides](integration-guides/the-basics.md)**</span>| Learn practical concepts, structures and features for building wallets, payment systems and other services on the Nano network. | Developers  |\r\n|<span class=\"no-break\">**[Living Whitepaper](living-whitepaper/index.md)**</span>| Dive into the details of why Nano was created & how it's designed. Split into two sub-sections: [Protocol Design](protocol-design/introduction.md) & [Node Implementation](node-implementation/introduction.md).  | Developers |\r\n|<span class=\"no-break\">**[Protocol Design](protocol-design/introduction.md)**</span>| Dig deeper into the design and behaviors driving the protocol, including the election process, peering mechanics and more. | Developers |\r\n|<span class=\"no-break\">**[Node Implementation](node-implementation/introduction.md)**</span>| Details of the Nano Foundation managed node implementation of the protocol. | Developers |\r\n|<span class=\"no-break\">**[Core Development](core-development/overview.md)**</span>| Interested in contributing to the core Nano code or protocol? Here's how to get started. | Developers |\r\n|<span class=\"no-break\">**[Commands](commands/rpc-protocol.md)**</span>|  Explore an exhaustive list of interaction methods for the node via RPC and CLI. | Node operators, developers |\r\n|<span class=\"no-break\">**[Releases](releases/node-releases.md)**</span>| Review past node releases and get details about the features coming soon in new releases.  | Everyone  |\r\n|<span class=\"no-break\">**[Glossary](glossary.md)**</span>| Commonly used terms throughout the documentation and Nano ecosystem.  | Everyone  |\r\n\r\n**Join the Community**\r\n\r\nIf you are looking for other details about Nano, links to wallets, discussions about the network and more, check out our community:\r\n\r\n--8<-- \"community-links.md\"\r\n\r\n[Change cookie settings](#__consent)\r\n"
  },
  {
    "path": "docs/integration-guides/advanced.md",
    "content": "title: Advanced Integration Guide\ndescription: More advanced guides to integrating with nano including cold wallets, private key management and more\n\n# Advanced Integrations\n\n## Cold Wallets\n\nWhen security of funds is critical, it is a best practice to split your balance between multiple wallets:\n\n1. One or more **hot wallets** to handle daily user deposits/withdraws.\n2. One or more **cold wallets** to securely store Nano in an offline environment.\n\n!!! warning \"Important\"\n\tA cold wallet manages private keys that have **never** been on a network-enabled computer.\n\nThis guide extends the concepts covered in [External Private Key Management](/integration-guides/key-management/).  It is advised that you read that section before continuing.\n\n!!! note\n\tOperations done on the hot, online, insecure computer will be prefaced with `(HOT)`. Operations done on the cold, offline, secure computer will be prefaced with `(COLD)`.\n\t\n\tBoth the hot and cold computers need to have the nano\\_node software installed. The hot nano\\_node needs to be synced with the network; the cold nano\\_node by definition should not be synced as it **never connects to the internet**.\n\n---\n\n!!! info \"Cold Wallet Workflow\"\n\tThe typical work flow for a cold wallet is as follows:\n\n\t1. `(HOT)` Gather account and transaction data.\n\t1. Transfer this data using an offline method (e.g. via USB stick) to the `(COLD)` secure offline computer.\n\t1. `(COLD)` Verify Head Block hash.\n\t1. `(COLD)` Generate and Sign new transaction data.\n\t1. Transfer the signed transaction back to the `(HOT)` insecure online-computer.\n\t1. `(HOT)` Publish the signed transaction to the Nano Network.\n\n\n<div class=\"mermaid-wrapper\">\n\n```mermaid\nsequenceDiagram\n  participant Network\n  participant HOT\n  participant COLD\n  HOT->>Network: Get Data\n  Network->>HOT: Data Response\n  HOT-->>COLD: Offline Transfer\n  COLD-->>COLD: Verify\n  COLD-->>COLD: Generate & Sign\n  COLD-->>HOT: Return Signed\n  HOT->>Network: Publish Signed\n  Note over COLD,HOT: Cold/Hot Wallet transfers are done <br />offline using USB Stick or similar.\n```\n\n</div>\n\n---\n\n### Private Key Management\n\nThe process for external private key management in a cold wallet is very similar to external private key management for a hot wallet. The primary difference is that all signing commands (and thus information containing your private key) are isolated to a clean computer with no network connection.\n\n#### (HOT) Account Information\n\nGet account information by the [`account_info`](/commands/rpc-protocol#account_info) RPC Command:\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"account_info\",\n  \"representative\": \"true\",\n  \"account\": \"nano_3qb1qckpady6njewfotrdrcgakrgbfh7ytqfrd9r8txsx7d91b9pu6z1ixrg\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"frontier\": \"DC8EC06D1F32F97BD69BF59E3297563BD23779F72176A4FF553CFF52309C337E\",\n  \"open_block\": \"2E1F5AD4BD2C840FD9DC3929ECE9EE6D0B4A8C870E45EDA11048DE91EC409165\",\n  \"representative_block\": \"DC8EC06D1F32F97BD69BF59E3297563BD23779F72176A4FF553CFF52309C337E\",\n  \"balance\": \"8900000000000000000000000\",\n  \"modified_timestamp\": \"1524812177\",\n  \"block_count\": \"105\",\n  \"representative\": \"nano_3rropjiqfxpmrrkooej4qtmm1pueu36f9ghinpho4esfdor8785a455d16nf\"\n}\n```\n\n---\n\n#### (HOT) Balance Validation (Part 1)\n\nWe should always assume the `(HOT)` computer has been compromised, so cannot trust the balance returned by [`account_info`](/commands/rpc-protocol#account_info). We must obtain the headblock's transaction data and independently confirm the block's hash on our `(COLD)` offline computer. On the `(HOT)` online computer, this information can be obtained by the [`block_info`](/commands/rpc-protocol#block_info) RPC Command.\n\n##### Request Format\n\n```bash\ncurl -d '{\n  \"action\": \"block_info\",\n  \"hash\": \"{{HEADBLOCK}}\"\n}' http://127.0.0.1:7076\n```\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"block_info\",\n  \"hash\": \"DC8EC06D1F32F97BD69BF59E3297563BD23779F72176A4FF553CFF52309C337E\"\n}' http://127.0.0.1:7076\n```\n\n###### Success Response\n\n```json\n{\n    \"block_account\": \"nano_3qb1qckpady6njewfotrdrcgakrgbfh7ytqfrd9r8txsx7d91b9pu6z1ixrg\",\n    \"amount\": \"100000000000000000000000\",\n    \"balance\": \"8900000000000000000000000\",\n    \"height\": \"105\",\n    \"local_timestamp\": \"0\",\n    \"contents\": \"{\\n\n      \\\"type\\\": \\\"state\\\",\\n\n      \\\"account\\\": \\\"nano_3qb1qckpady6njewfotrdrcgakrgbfh7ytqfrd9r8txsx7d91b9pu6z1ixrg\\\",\\n\n      \\\"previous\\\": \\\"829C33C4E1F41F24F50AB6AF8D0893F484E7078F0FA05F8F56CB69223E8EEE77\\\",\\n\n      \\\"representative\\\": \\\"nano_3rropjiqfxpmrrkooej4qtmm1pueu36f9ghinpho4esfdor8785a455d16nf\\\",\\n\n      \\\"balance\\\": \\\"8900000000000000000000000\\\",\\n\n      \\\"link\\\": \\\"616349D5A5EBA49A73324EF29044B65E13644EC182FFC1ACA4371F897EFF22AA\\\",\\n\n      \\\"link_as_account\\\": \\\"nano_1rd5b9ctdtx6mbsm6mqkk34deqimej9e51qzr8pcafrzj7zhyaockuye93sk\\\",\\n\n      \\\"signature\\\": \\\"5058A5A1D371CE367D88DB232D398B33DF15FF95D84206986848F4165FFD9FB009B99D9DC6E90D2A3D96C639C7772497C6D6FFB8A67143AE9BB07DC49EB72401\\\",\\n\n      \\\"work\\\": \\\"5621a5a58ef8964a\\\"\\n\n    }\\n\"\n}\n```\n\n!!! info\n\tBelow are a few important points to remember:\n\n\t* Contents are returned as a stringified JSON object.\n\t* The type of the block is `\"state\"`. This guide only covers on how to trustlessly process `\"state\"` blocks on an offline computer.\n\nTransfer the response over to the `(COLD)` computer.\n\n---\n\n#### (COLD) Balance Validation (Part 2)\n\nOn the `(COLD)` computer, we need to verify the block hash using the [`block_hash`](/commands/rpc-protocol#block_hash) RPC Command.. This allows us to create a safe transaction referencing the reported head block's balance.\n\n##### Request Format\n\n```bash\ncurl -d '{\n  \"action\": \"block_hash\",\n  \"block\": \"<CONTENTS>\"\n}' http://127.0.0.1:7076\n```\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"block_hash\", \"block\": \"{\\n\n    \\\"type\\\": \\\"state\\\",\\n\n    \\\"account\\\": \\\"nano_3qb1qckpady6njewfotrdrcgakrgbfh7ytqfrd9r8txsx7d91b9pu6z1ixrg\\\",\\n\n    \\\"previous\\\": \\\"829C33C4E1F41F24F50AB6AF8D0893F484E7078F0FA05F8F56CB69223E8EEE77\\\",\\n\n    \\\"representative\\\": \\\"nano_3rropjiqfxpmrrkooej4qtmm1pueu36f9ghinpho4esfdor8785a455d16nf\\\",\\n\n    \\\"balance\\\": \\\"8900000000000000000000000\\\",\\n\n    \\\"link\\\": \\\"616349D5A5EBA49A73324EF29044B65E13644EC182FFC1ACA4371F897EFF22AA\\\",\\n\n    \\\"link_as_account\\\": \\\"nano_1rd5b9ctdtx6mbsm6mqkk34deqimej9e51qzr8pcafrzj7zhyaockuye93sk\\\",\\n\n    \\\"signature\\\": \\\"5058A5A1D371CE367D88DB232D398B33DF15FF95D84206986848F4165FFD9FB009B99D9DC6E90D2A3D96C639C7772497C6D6FFB8A67143AE9BB07DC49EB72401\\\",\\n\n    \\\"work\\\": \\\"5621a5a58ef8964a\\\"\\n\n  }\\n\"\n}' http://127.0.0.1:7076\n```\n\n###### Success Response\n\n```json\n{ \n  \"hash\": \"DC8EC06D1F32F97BD69BF59E3297563BD23779F72176A4FF553CFF52309C337E\"\n}\n```\n\nUsing the responded hash on the `(COLD)` computer guarentees that the transaction we are about to create on the `(COLD)` computer will have a safe, expected outcome.\n\n!!! warning \"Important\"\n\tLets consider the following scenarios where malicious software on the `(HOT)` computer modifies data:\n\n\t* You are creating a send transaction.\n\t* Malicious software alters the `balance` field of the head block to be lower than it actually is in an attempt to get you to send too much Nano to the destination address.\n\t* This alters the block's hash, but the malicious software could report the honest headblock's hash.\n\n\tBy independently computing the headblock's hash on the `(COLD)` computer, the generated transaction would be rejected by the network since the `previous` field references a non-existent block which is certainly not the headblock of your account.\n\nUse the responded hash for the `previous` field in your new transaction. When computing final account balance, compute it relative to the `balance` field of the headblock on the `(COLD)` computer. Complete the rest of the [block creation as described in section External Private Key Management](/integration-guides/key-management/#send-transaction).\n\nOnce the block is created and signed on the `(COLD)` computer, transfer the contents over to the `(HOT)` computer. From the `(HOT)` computer, run the [`process`](/commands/rpc-protocol#process) RPC command to broadcast the signed transaction to the network.\n\n---\n\n## HTTP callback\n\n!!! info \"WebSockets recommended\"\n    The node supports [WebSockets](websockets.md) and these are recommended over the HTTP callbacks whenever possible.\n\nSend JSON POST requests with every confirmed block to callback server configured for the node.\n\n--8<-- \"warning-multiple-confirmation-notifications.md\"\n\n**Configuration**\n\nFor details on configuring the HTTP callback within a node, see the [HTTP callback section of Running a Node Configuration](/running-a-node/configuration#http-callback).\n\n**Example Callback**\n\n```json\n{  \n    \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",  \n    \"hash\": \"B785D56473DE6330AC9A2071F19BD44BCAF1DE5C200A826B4BBCC85E588620FB\",  \n    \"block\": \"{\\n    \n             \\\"type\\\": \\\"state\\\",\\n\n             \\\"account\\\": \\\"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\\\",\\n    \n             \\\"previous\\\": \\\"82D68AE43E3E04CBBF9ED150999A347C2ABBE74B38D6E506C18DF7B1994E06C2\\\",\\n    \n             \\\"representative\\\": \\\"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\\\",\\n    \n             \\\"balance\\\": \\\"5256159500000000000000000000000000000\\\",\\n    \n             \\\"link\\\": \\\"8B95FEB05496327471F4729F0B0919E1994F9116FD213F44C76F696B7ECD386A\\\",\\n    \n             \\\"link_as_account\\\": \\\"nano_34woztr7b7jkgjrzawnz3e6jmresbyajfzb39x4eguubffzetg5c96f3s16p\\\",\\n    \n             \\\"signature\\\": \\\"FBE5CC5491B54FE9CD8C48312A7A6D3945835FD97F4526571E9BED50E407A27ED8FB0E4AA0BF67E2831B8DB32A74E686A62BF4EC162E8FBB6E665196135C050B\\\",\\n    \n            \\\"work\\\": \\\"824ca671ce7067ac\\\"\\n    \n         }\\n\",  \n    \"amount\": \"2500000000000000000000000000000\"  \n}\n```\n\nSend state blocks have special fields \"is_send\" & \"subtype\"   \n```json\n{  \n    \"account\": \"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\",  \n    \"hash\": \"82D68AE43E3E04CBBF9ED150999A347C2ABBE74B38D6E506C18DF7B1994E06C2\",  \n    \"block\": \"{\\n    \n             \\\"type\\\": \\\"state\\\",\\n\n             \\\"account\\\": \\\"nano_1ipx847tk8o46pwxt5qjdbncjqcbwcc1rrmqnkztrfjy5k7z4imsrata9est\\\",\\n    \n             \\\"previous\\\": \\\"BE716FE4E21E0DC923ED67543601090A17547474CBA6D6F4B3FD6C113775860F\\\",\\n    \n             \\\"representative\\\": \\\"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\\\",\\n    \n             \\\"balance\\\": \\\"5256157000000000000000000000000000000\\\",\\n    \n             \\\"link\\\": \\\"5D1AA8A45F8736519D707FCB375976A7F9AF795091021D7E9C7548D6F45DD8D5\\\",\\n    \n             \\\"link_as_account\\\": \\\"nano_1qato4k7z3spc8gq1zyd8xeqfbzsoxwo36a45ozbrxcatut7up8ohyardu1z\\\",\\n    \n             \\\"signature\\\": \\\"5AF10D3DDD0E3D7A0EF18670560D194C35A519943150650BBBE0CBDB2A47A1E41817DA69112F996A9898E11F1D79EF51C041BD57C1686B81E7F9DFCCFFBAB000\\\",\\n    \n            \\\"work\\\": \\\"13ae0ea3e2af9004\\\"\\n    \n         }\\n\",  \n    \"amount\": \"90000000000000000000000000000000000\",   \n    \"is_send\": \"true\",  \n    \"subtype\": \"send\"  \n}\n```  \n\n\n!!! warning\n    It is recommended to fetch the block using the hash provided in the callback rather than trust this data is valid, and check that data instead, since a malicious 3rd party can also make a fake callback request to your endpoint.\n\n---\n\n## Running Nano as a service\n\nThere are 3 different ways to enable RPC for the node:\n\n**In process**\n\n* `rpc.enable` = **true**\n* `rpc.child_process.enable` = **false** (default, V19.0+)\n\n**Child process**  \n*V19.0+ only*\n\n* `rpc.enable` = **true**\n* `rpc.child_process.enable` = **true**\n* `rpc.child_process.rpc_path` = [path to nano_rpc]\n* `ipc.tcp.enable` = **true**\n* `ipc.tcp.port` = `process.ipc_port` of `config-rpc.toml`\n\n**Out of node process**  \n*V19.0+ only*\n\n* `rpc.enable` = **false**\n* `rpc.child_process.enable` = **false**\n* `node.ipc.tcp.enable` = **true**\n* `node.ipc.tcp.port` == `process.ipc_port` of `config-rpc.toml`\n\nThe choice depends on the setup and security that you want. The easiest way is to use RPC *in_process* according to [configuration](/running-a-node/configuration)\n\n**Launch nano_node in test mode**   \n\n    ./nano_node --daemon --network=test\n\n**Check if RPC is enabled with curl (use different terminal or session)**   \n\n```bash\ncurl -d '{\n  \"action\": \"block_count\"\n}' http://127.0.0.1:7076\n```\n\n--8<-- \"docker-ipv6-tip.md\"\n\n**To stop node, use**   \n\n```bash\ncurl -d '{\n  \"action\": \"stop\"\n}' http://127.0.0.1:7076\n```\n\n**Launch nano_node as a service with systemd**   \n\n    sudo touch /etc/systemd/system/nano_node.service   \n    sudo chmod 664 /etc/systemd/system/nano_node.service   \n    sudo nano /etc/systemd/system/nano_node.service   \n\n**Paste your specific user, group, path settings (example)**  \n    \n    [Unit]\n    Description=Nano node service\n    After=network.target\n    \n    [Service]\n    ExecStart=/path_to_nano_node/nano_node --daemon\n    Restart=on-failure\n    User=username\n    Group=groupname\n\n    [Install]\n    WantedBy=multi-user.target\n\n**Start nano_node service**\n\n    sudo service nano_node start\n\n**Enable at startup**    \n\n    sudo systemctl enable nano_node\n    \n    \n!!! tip\n    To manage node, use [RPC commands](/commands/rpc-protocol) or [CLI](/commands/command-line-interface)\n\n### Known issues  \n\n**Error initiating bootstrap ... Too many open files**\n\nThis issue has been seen on some versions of macOS and Linux. The node will detect when the file descriptor limit is considered too low and log a warning similar to:\n\n```\nWARNING: The file descriptor limit on this system may be too low (512) \nand should be increased to at least 16384.\n```\n\nTo resolve this on Linux increase max open files limit by editing `/etc/security/limits.conf` and adding or updating:    \n```\n    *               soft    nofile          65535    \n    *               hard    nofile          65535    \n    root            soft    nofile          65535    \n    root            hard    nofile          65535    \n```\nThen restart session & `nano_node` service. Check changes with `ulimit -n`.\n\nFor macOS the version impacts the steps necessary, but some people had success with the recipe in [https://superuser.com/a/1171028](https://superuser.com/a/1171028).\n\n**Increasing max open file descriptors on a Droplet w/Ubuntu**\n\nAdd `session required pam_limits.so` to these two files:\n\n```\n/etc/pam.d/common-session\n/etc/pam.d/common-session-noninteractive\n```\n\nNext, edit\n`/etc/security/limits.conf`\n\n... and add the following lines:\n\n```\n* soft nofile 20000\n* hard nofile 30000\nroot hard nofile 16384\nroot soft nofile 16384\n```\n\nThe last two lines can be skipped if you're not running the node as root.\n\nLog out and back in or reboot and see if `ulimit -n` picked it up\n\nOn some systems, you may need to change systemd files, etc.\n\n**Docker**\n\nOnce the host is updated, pass `--ulimit nofile=16384:16384`\n"
  },
  {
    "path": "docs/integration-guides/block-confirmation-tracking.md",
    "content": "title: Block Confirmation Tracking\ndescription: Guide detailing best practices for block confirmation tracking from the nano node\n\n# Block Confirmation Tracking\n\n!!! tip \"Guide based on node V19.0\"\n\tThe recommendations below are based on node V19.0 and node versions earlier may not have all these options available. All integrations should upgrade their nodes to make use of easier block confirmation procedures detailed here.\n\nA primary function of any integration is to track confirmation of blocks on the network and the node provides both proactive notifications and options to request confirmation status on individual blocks. This combination allows building of robust systems for monitoring the status of any blocks of interest. \n\n!!! tip \"Notifications and fallback requests both recommended\"\n\tDue to notification methods not guaranteeing delivery of every block confirmed, it is recommended that manual requests for confirmation status be implemented as a fallback option. Both these types of methods are outlined below.\n\n### Receiving notifications of confirmation\n\nThe recommended method for receiving notifications is via [WebSockets](/integration-guides/websockets) through the confirmation `topic`. This method involves sending a subscribe command to start receiving notifications every time a block is confirmed by the network. It is recommended that the `confirmation_type` filtering options are not used for this purpose, to make it less likely to miss a notification.\n\n**Setup process**\n\n1. Update your [WebSocket configuration](/running-a-node/configuration/#nodewebsocket)\n1. Connect to the WebSocket at the configured endpoint\n1. Send a [subscription request for all confirmations](/integration-guides/websockets#confirmations) including the ack option and validate the subscription request was successful\n1. Listen for block confirmation notifications from the WebSocket\n\nAs confirmations are received they can be parsed and handled as necessary. All operations handling notifications from the node on block confirmation should be idempotent as multiple notifications for the same block hash can occur.\n\n--8<-- \"warning-multiple-confirmation-notifications.md\"\n\n### Requesting block confirmation status\n\nIn the event confirmation notifications are not received from the WebSocket in an expected timeframe, the [block_info](/commands/rpc-protocol#block_info) RPC can be called on a specific block hash. The `confirmed` field will indicate whether the block has been confirmed. Typical confirmation times on the main network during low-traffic periods are within a few seconds, so a delay of 5 seconds before requesting block information is recommended.\n\nIf confirmation has still not been seen on the block, the [block_confirm](/commands/rpc-protocol#block_confirm) RPC can be called. This will cause the following:\n\n* If the block is confirmed, it will trigger a notification through the WebSocket and HTTP Callbacks, and the block hash will also appear in the [confirmation_history](/commands/rpc-protocol/#confirmation_history) RPC (recommended for debug purposes only).\n* If the block is not in active elections, it will start an election which should result in confirmation and related notifications.\n* If the block is already in active elections, it will not have an effect and confirmation should eventually occur along with related notifications.\n\nOnce [block_confirm](/commands/rpc-protocol#block_confirm) is called, a notification of confirmation through the WebSocket should be expected and if not received, then calling [block_info](/commands/rpc-protocol#block_info) RPC to check for confirmation again can be done. Escalation of potential delays in confirmation can be done after this point in external systems as necessary.\n\n### Account frontier confirmation status\n\nFor some systems the starting point for checking block status may be the account, such as when a user views their account. The following process is recommended when the account is known and the confirmation status of the frontier block is desired.\n\n1. Call [account_info](/commands/rpc-protocol/#account_info) RPC to get current frontier hash\n1. Call [block_info](/commands/rpc-protocol#block_info) for the frontier hash and check if `confirmed` = `true`\n\nIf the block is not confirmed, you can follow a similar process outlined in the [Requesting block confirmation status](#requesting-block-confirmation-status) section above for requesting block confirmation and re-checking confirmation status before escalating in external systems."
  },
  {
    "path": "docs/integration-guides/build-options.md",
    "content": "title: Build Options\ndescription: Instructions for manually building the Nano node for a variety of operating systems\n\n# Build Options\n\n--8<-- \"warning-only-official-builds-supported.md\"\n\n## Official release builds\n \nThroughout the development cycle and after releases official builds of the node for Docker, Linux, macOS and Windows are generated and published for test, beta and main networks.\n\n=== \"Main network\"\n\n    --8<-- \"current-build-links-main.md\"\n\n=== \"Test network\"\n\n    --8<-- \"current-build-links-test.md\"\n\n=== \"Beta network\"\n\n    --8<-- \"current-build-links-beta.md\"\n\n## Nano Directory\n\n### Contents\n\n--8<-- \"directory-contents.md\"\n\n### Locations\n\n=== \"Main network\"\n\n    --8<-- \"directory-locations-main.md\"\n\n=== \"Test network\"\n\n    --8<-- \"directory-locations-test.md\"\n\n=== \"Beta network\"\n\n    --8<-- \"directory-locations-beta.md\"\n\n??? tip \"Moving directory locations\"\n    Some users desire to change the blockchain download location. A solution is available for the no gui nano_node (see https://github.com/nanocurrency/nano-node/issues/79), but no concrete solution is available for the GUI client. However, a workaround can be acheived via the use of symbolic links. Below is a short tutorial for Windows builds:\n\n    1. Rename/delete the Nano directory in your `appdata` Local directory (if you haven't run the wallet yet, skip this step). This is necessary because the command to create a symbolic link in windows will fail if the the input directory already exists.\n    1. Decide on where you want to store the blockchain and create a symbolic link. The command is (in an administrative command-prompt): `mklink /d \"C:\\Users\\<user>\\AppData\\Local\\Nano\\\" \"E:\\Some\\Other\\Directory\"`. This command creates a symbolic link for a directory (`/d`) that 'redirects' all requests for files/directories in the `Local\\Nano` directory to the `Other\\Directory`. This means that a file created in the input directory will actually be in the output directory (on the other disk).\n    1. Verify it works. Create a file in your Nano directory in your appdata, and you should see it appear in the directory you linked it to (and vice-versa). If you have old wallets or a partially-downloaded blockchain, copy them back into the local directory. Start the wallet.\n\n---\n\n## Requirements & setup\n\n--8<-- \"warning-unsupported-configuration.md\"\n\n!!! tip \"Alternate Windows setup\"\n    Some users have trouble using the command line approach below for getting setup to build on Windows. An alternative setup is available further down for [Windows 10 & Visual Studio 2019](#windows-10-visual-studio-2019). Variations on these instructions with different versions of Windows, Visual Studio, Cmake, etc. may work as well, but may require adjustments.\n\n### Boost (before V25.0)\n\nIf you are building a version before V25.0, the node build commands further down include bootstrapping Boost, but [pre-built binaries](https://sourceforge.net/projects/boost/files/boost-binaries/) can be used for Windows as well, or you can optionally build from the downloaded source instead as follows:\n\n* Download [Boost 1.81+](https://www.boost.org/users/history/version_1_81_0.html)\n* Extract to \\[boost.src\\]\n* From inside [boost.src] run:\n\n=== \"*nix\"\n    ```bash\n    ./bootstrap.sh --with-libraries=context,coroutine,filesystem,log,program_options,system,thread\n    ./b2 --prefix=[boost] --build-dir=[boost.build] link=static install\n    ```\n\n=== \"macOS\"\n    ```bash\n    ./bootstrap.sh --with-libraries=context,coroutine,filesystem,log,program_options,system,thread\n    ./b2 --prefix=[boost] --build-dir=[boost.build] link=static install\n    ```\n\n=== \"Windows\"\n    ```bash\n    ./bootstrap.sh --with-libraries=context,coroutine,filesystem,log,program_options,system,thread\n    ./b2 --prefix=[boost] --build-dir=[boost.build] address-model=64 link=static install\n    ```\n\nIf using this option, remove `bash util/build_prep/bootstrap_boost.sh -m` from the [build command](#build-commands) below.\n\n### Qt wallet\n\nIf building the Qt-based `nano_wallet`, first download [Qt 5.15.2+ open source edition](https://www.qt.io/download) and extract to [qt.src]. In [qt.build] execute:\n\n=== \"*nix\"\n    ```bash\n    [qt.src]/configure -shared -opensource -nomake examples -nomake tests -confirm-license  -prefix [qt]\n    make\n    make install\n    ```\n\n=== \"macOS\"\n    ```bash\n    [qt.src]/configure -shared -opensource -nomake examples -nomake tests -confirm-license  -prefix [qt]\n    make\n    make install\n    ```\n\n=== \"Windows\"\n    ```bash\n    [qt.src]/configure -shared -opensource -nomake examples -nomake tests -confirm-license  -prefix [qt]\n    nmake\n    nmake install\n    ```\n\n### Node\n\n=== \"*nix\"\n    **Required build tools**\n\n    * CMake >= 3.8\n    * Clang >= 11 or GCC >= 11.3\n\n    === \"Debian\"\n        **Version**\n\n        * Debian 11 Bullseye (requires Clang 11)\n\n        **Install dependencies**\n\n        ```bash\n        sudo apt-get update && sudo apt-get upgrade\n        sudo apt-get install git cmake build-essential libc++-dev libc++abi-dev clang clang++11 curl wget\n        sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools\n        ```\n    \n        **Qt wallet dependencies**\n\n        ```bash\n        sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools\n        ```\n\n        **Before build**\n\n        ```bash\n        export CC=/usr/bin/clang-11\n        export CXX=/usr/bin/clang++-11\n        cmake ...\n        ```\n\n    === \"Ubuntu\"\n        **Version**\n        \n        * Ubuntu 22.04 LTS Server\n        * Ubuntu 22.10+\n\n        **Install dependencies**\n\n        ```bash\n        sudo apt-get update && sudo apt-get upgrade\n        sudo apt-get install git cmake g++ curl wget\n        ```\n\n        **Qt wallet dependencies**\n\n        ```bash\n        sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools\n        ```\n\n    === \"Rocky Linux\"\n        **Version**\n        \n        * Rocky Linux 8\n\n        **Install dependencies**\n\n        ```bash\n        sudo yum check-update\n        sudo yum install git curl wget cmake\n        ```\n\n        **Configure repository with modern GCC**\n        ```bash\n        sudo yum install gcc-toolset-12\n        scl enable gcc-toolset-12 bash\n        ```\n\n    === \"Arch Linux\"\n\n        **Install dependencies**\n\n        ```bash\n        pacman -Syu\n        pacman -S base-devel git gcc cmake curl wget\n        ```\n\n=== \"macOS\"\n    **Required build tools**\n    \n    * CMake >= 3.8\n    * XCode >= 13.1\n\n=== \"Windows\"\n    **Required build tools**\n\n    * CMake >= 3.8\n    * NSIS package builder\n    * [Visual Studio 2019 Community](https://my.visualstudio.com/Downloads?q=visual%20studio%202019&wt.mc_id=o~msft~vscom~older-downloads) (or higher edition, if you have a valid license. eg. Professional or Enterprise)\n        * Select **Desktop development with C++**\n        * Select the latest Windows 10 SDK\n\n---\n\n## Build commands\n\n### Node\n\nThe process below will create a release build of the node for the main network. See [network options](#network-options) below for details on building for the test or beta networks.\n\n=== \"*nix\"\n    ```bash\n    git clone --branch V25.0 --recursive https://github.com/nanocurrency/nano-node.git nano_build\n    cd nano_build\n    # Boost is not required for building V25.0 or earlier versions\n    # export BOOST_ROOT=`pwd`/../boost_build\n    # bash util/build_prep/bootstrap_boost.sh -m\n    cmake -G \"Unix Makefiles\" .\n    make nano_node\n    cp nano_node ../nano_node && cd .. && ./nano_node --diagnostics\n    ```\n\n=== \"macOS\"\n    ```bash\n    git clone --branch V25.0 --recursive https://github.com/nanocurrency/nano-node.git nano_build\n    cd nano_build\n    # Boost is not required for building V25.0 or earlier versions\n    # export BOOST_ROOT=`pwd`/../boost_build\n    # bash util/build_prep/bootstrap_boost.sh -m\n    cmake -G \"Unix Makefiles\" .\n    make nano_node\n    cp nano_node ../nano_node && cd .. && ./nano_node --diagnostics\n    ```\n\n=== \"Windows\"\n\n    **Setup**\n\n    *Download Source*\n\n    Using git_bash:\n    ```bash\n    git clone --branch V25.0 --recursive https://github.com/nanocurrency/nano-node\n    cd nano-node\n    ```\n\n    *Create a `build` directory inside nano-node (makes for easier cleaning of build)*\n\n    Using git_bash:\n    ```bash\n    mkdir build\n    cd build\n    ``` \n    * **Note:** all subsequent commands should be run within this \"build\" directory.\n\n    *Get redistributables*\n\n    Using Powershell:\n    ```bash\n    Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vc_redist.x64.exe -OutFile .\\vc_redist.x64.exe\n    ```\n\n    *Generate the build configuration.*\n\n    Using 64 Native Tools Command Prompt:\n\n    * Ensure the Qt, Boost (if < V25.0), and Windows SDK paths match your installation.\n\n    ```bash\n    cmake -DNANO_GUI=ON -DQt5_DIR=\"C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5\" -DNANO_SIMD_OPTIMIZATIONS=TRUE -DBoost_COMPILER=\"-vc141\" -DBOOST_ROOT=\"C:/local/boost_1_70_0\" -DBOOST_LIBRARYDIR=\"C:/local/boost_1_70_0/lib64-msvc-14.1\" -G \"Visual Studio 16 2019\" -DIPHLPAPI_LIBRARY=\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64/iphlpapi.lib\" -DWINSOCK2_LIBRARY=\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64/WS2_32.lib\" ..\\.\n    ```\n    \n    * If you are building V25.0 or any earlier version, you do not need to specify the Boost library.\n\n    ```bash\n    cmake -DNANO_GUI=ON -DQt5_DIR=\"C:\\Qt\\5.15.2\\msvc2019_64\\lib\\cmake\\Qt5\" -DNANO_SIMD_OPTIMIZATIONS=TRUE -G \"Visual Studio 16 2019\" -DIPHLPAPI_LIBRARY=\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64/iphlpapi.lib\" -DWINSOCK2_LIBRARY=\"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64/WS2_32.lib\" ..\\.\n    ```\n\n    **Build**\n    \t\n    * Open `nano-node.sln` in Visual Studio\n    * Build the configuration specified in the previous step\n    * Alternative using 64 Native Tools Command Prompt:\n\n    ```bash \n    cmake --build . --target ALL_BUILD --config %CONFIGURATION% -- /m:%NUMBER_OF_PROCESSORS%\n    ```\n\n    **Package up binaries**\n\n    Using 64 Native Tools Command Prompt:\n\n    * Replace **%CONFIGURATION%** with the build configuration specified in previous step\n    * Replace **%GENERATOR%** with NSIS (if installed) or ZIP\n\n    ```bash \n    cpack -G %GENERATOR% -C %CONFIGURATION%\n    ```\n\n### Qt wallet\n\nThis is only required when the Qt wallet with GUI is needed.\n\n`make nano_wallet`\n\n### RPC server\n\nThis is only required for when the RPC server is being [run as a child process or outside the node process completely](advanced.md#running-nano-as-a-service).\n\n`make nano_rpc`\n\n---\n\n## Windows & Visual Studio\n\nAn alternative node building process using Windows and Visual Studio can be found below. As this uses GUI options, some of the steps and images may vary if using versions other than those indicated.\n\n**Windows**\n\nEnsure Windows 10 or Windows 11 is running and the latest updates have been completed, restart Windows.\n\n**Visual Studio**\n\nUse Visual Studio 2019 or 2022\nVisual Studio Community 2019 https://visualstudio.microsoft.com/vs/older-downloads/ \nVisual Studio Community 2022 https://visualstudio.microsoft.com/vs/community/ \nRun the installer and make sure to tick `Desktop development with C++` and leave everything else at default.\n\n![Visual Studio 2019 Install](../images/windows-10-build-instructions/visual-studio-install.jpg)\n\n**Boost** (Only needed when building versions before V25.0)\n\nInstall Boost 1.81.0 binaries for msvc 14.2. Use default settings during install \nhttps://sourceforge.net/projects/boost/files/boost-binaries/1.81.0/boost_1_81_0-msvc-14.2-64.exe/download\n\n**CMake**\n\nInstall Cmake windows installer, Latest Release\nhttps://cmake.org/download/.\n\nCheck the option `Add cmake to system path for all users`\n\n**Git**\nDownload a git tool of choice such as Github desktop https://desktop.github.com/. Clone the nano node develop branch from Github\nfrom URL https://github.com/nanocurrency/nano-node to your preferred path, such as: `C:\\Users\\YourUser\\Documents\\GitHub\\nano-node`.\n\n**Restart Windows**\n\n**Setting up the solution**\n\nRun CMake GUI\n\n- Set `Where is the source code` to your preferred path: `C:\\Users\\YourUser\\Documents\\GitHub\\nano-node`\n- Create a directory for the destination files such as: `C:\\Users\\YourUser\\Documents\\NanoSolution` and set in `Where to build the binaries`\n- Click `Configure` and select `Visual Studio 16 2019` as the generator for the project\n- Set any necessary [CMake variables](#cmake-variables) you need, such as the `ACTIVE_NETWORK` but leave `NANO_GUI` off because this requires QT to be installed\n- Click `Generate` and close Cmake\n\n![CMake Generator](../images/windows-10-build-instructions/cmake-generator.jpg)\n\n\n**Visual studio**\n\n- Open project solution file in `C:\\Users\\YourUser\\Documents\\NanoSolution\\nano-node-beta.sln`\n- At the top of the screen select the build type and architecture. `Release` and `x64` are recommended settings\n\n![Build type and architecture](../images/windows-10-build-instructions/debug-arch.jpg)\n\n- Go to the build menu and select `Build`\n- When build has finished you will find the compiled files at `C:\\Users\\YourUser\\Documents\\NanoBinaries\\` \n\n**Optional: Setup debugging**\n\nYou can setup the node to stop at code breakpoints and then inspect values during runtime.\n\nFind the nano_node project in the solution explorer on the right pane. Then right click it and select `Set as startup project`\n\n![Set as startup project](../images/windows-10-build-instructions/startup-project.jpg)\n\nRight click the nano_node project again and click `Properties`\nGo to `Configuration Properties` > `Debugging` and set the `Command Arguments` to `--daemon`, click OK\n\n![Set properties](../images/windows-10-build-instructions/set-properties.jpg)\n\nFrom Visual Studio hit `F5` to start debugging. When a breakpoint is hit, Visual Studio will halt the code and take focus.\n\n---\n\n## Additional build details\n\n### Node\n\n#### CMake variables\n\nFormat: `cmake -D VARNAME=VARVALUE`\n\n* `BOOST_ROOT=\\[boost\\]` (`/usr/local/boost/` if bootstrapped)\n* `CMAKE_BUILD_TYPE=Release` (default)\n* `ACTIVE_NETWORK=nano_live_network` (default)\n* `Qt5_DIR=[qt]lib/cmake/Qt5` (to build GUI wallet)\n* `NANO_GUI=ON` (to build GUI wallet)\n* `ENABLE_AVX2=ON`, *optional* `PERMUTE_WITH_GATHER=ON`, *optional* `PERMUTE_WITH_SHUFFLES=ON` (for CPU with AXV2 support, choose fastest method for your CPU with https://github.com/sneves/blake2-avx2/)\n* `CRYPTOPP_CUSTOM=ON` (more conservative building of Crypto++ for wider range of systems)\n* `NANO_SIMD_OPTIMIZATIONS=OFF` (Enable CPU-specific SIMD optimization: SSE/AVX or NEON, e.g.)\n* `NANO_SECURE_RPC=ON` (to build node with TLS)\n* `NANO_WARN_TO_ERR=ON` (*v20.0+* turn compiler warnings into errors on Linux/Mac) \n* `NANO_TIMED_LOCKS=50` (*v20.0+* when the number of milliseconds a mutex is held is equal or greater than this output a stacktrace, 0 disables.)\n* `NANO_STACKTRACE_BACKTRACE=ON` (*v20.0+* use a different configuration of Boost backtrace in stacktraces, attempting to display filenames, function names and line numbers. Needs `libbacktrace` to be installed. Some [workarounds](https://www.boost.org/doc/libs/develop/doc/html/stacktrace/configuration_and_build.html#stacktrace.configuration_and_build.f3) may be necessary depending on system and configuration. Use CLI [`--debug_stacktrace`](/commands/command-line-interface#-debug_stacktrace) to get an example output.)\n* `CI_BUILD=TRUE` (*v20.0+* if enabled, uses environment variable `TRAVIS_TAG` (required) to modify the locally reported node version; example `TRAVIS_TAG=\"My Nano Node v20\"`)\n* `NANO_ASIO_HANDLER_TRACKING=10` (Output asio diagnostics for any completion handlers which have taken longer than this in milliseconds. For more information see the description of the PR [#2681](https://github.com/nanocurrency/nano-node/pull/2681))\n* `NANO_FUZZER_TEST=ON` (Build the fuzz tests, not available on Windows)\n\n#### Building a package\n\n=== \"*nix\"\n    `cpack -G \"TBZ2\"`\n\n=== \"macOS\"\n    `cpack -G \"DragNDrop\"`\n\n=== \"Windows\"\n    `cpack -G \"NSIS\"`\n\n#### Network options\n\n**Main network**\n\nThe default build network is the main network. No option needs to be specified.\n\n**Test Network**\n\n* To run a node on the test network, set CMake variable: `-DACTIVE_NETWORK=nano_test_network`\n* More information can be found on the [Test Network page](../running-a-node/test-network.md)\n\n**Beta Network**\n\n* To run a node on the beta network, set CMake variable: `-DACTIVE_NETWORK=nano_beta_network`\n* More information can be found on the [Beta Network page](../running-a-node/beta-network.md)\n\n## Testing\n\nA number of tests binaries can be built when the CMake variable `-DNANO_TEST=ON`. With this variable set, `make` will also build test files, and will produce `core_test`, `rpc_test`, `load_test` and `slow_test` binaries, which can be executed:\n\n* `core_test` - Tests the majority of protocol, node and network functionality.\n* `slow_test` - Tests which operate on a large amount of data and may take a while. Not currently tested by CI.\n* `rpc_test` - Tests all RPC commands\n* `load_test` - Launches many nodes and RPC servers, checking sending/receiving blocks with simultaneous calls. Use `./load_test --help` to see the available options\n\n### Running Tests\n\nTo run all tests in a binary just launch it:\n```bash\n./core_test\n```\n\nTo check a specific subset of tests, gtest filtering can be used (with optional wildcards):\n```bash\n./core_test --gtest_filter=confirmation_height.single\n./rpc_test --gtest_filter=rpc.*\n```\n\nTo run tests multiple times:\n```bash\n./core_test --gtest_repeat=10\n```\n\nIf running on a debugger, add the argument `--gtest_break_on_failure` break at the moment a test fails.\n\n### Environment variables to customize tests\n\n* `TEST_KEEP_TMPDIRS=1` - Setting this to anything will prevent the tests deleting any files it creates, useful for debugging log files. \n* `TEST_USE_ROCKSDB=1` - Use the RocksDB ledger backend for the tests instead of LMDB. The tests must be built with [RocksDB](/running-a-node/rocksdb-ledger-backend/#rocksdb-ledger-backend) support.\n* `TEST_BASE_PORT=26000` - The base port used in tests, the range of ports used in this case would be 26000 - 26199. This is useful if wanting to run multiple tests at once without port conflicts, the default base port used is 24000. \n* `NANO_DEFAULT_PEER=peering.nano.org` - Setting this adds its variable contents to `preconfigured_peers` from config-node.toml, & allows manually setting initial peering DNS. Setting it to an unresolvable address will prevent the node from contacting peers (after wiping peer table).\n\n### Sanitizers\n\n3 different CMake sanitizer options are supported: `NANO_ASAN_INT`, `NANO_TSAN` and `NANO_ASAN`. They cannot be used in conjunction with each other.\n\n#### Thread Sanitizer\nUse `-DNANO_TSAN=ON` as an extra CMake option. The following environment variable should also be set:\n\n`export TSAN_OPTIONS=\"suppressions=../tsan_suppressions\"`\n\n`tsan_suppressions` should be a path to the file in the root nano directory. This suppresses many errors relating to the mdb and rocksdb libraries.\n\n#### Address Sanitizer\nUse the CMake variable `-DNANO_ASAN=ON` or `-DNANO_ASAN_INT=ON` before running an executable.\n\n### Valgrind\n\nValgrind can be used to find other issues such as memory leaks. A valgrind suppressions file is provided to remove some warnings. Valgrind can be run as follows (there are many options available):\n\n```bash\nvalgrind --leak-check=full --track-origins=yes --suppressions=../valgrind.supp ./core_test\n```\n"
  },
  {
    "path": "docs/integration-guides/index.md",
    "content": "title: Get started integrating Nano\ndescription: An introduction to the process of starting a Nano integration\n\n# Integrating with Nano\n\nIf you're looking for details about how to integrate your application or service with Nano, you've come to the right place! There are a variety of ways to do integrations and this documentation is focused on situations requiring custom development. If you are looking for a more plug-and-play option to accept Nano payments or donations, we recommend heading to https://nano.org/accept-nano for some simpler options.\n\n## What is needed to integrate?\n\nThe most basic integration with Nano will require:\n\n1. Access to make RPC calls to a Nano node\n1. A method of doing work generation for any blocks created\n1. Some form of a wallet to manage the private/public keys for your accounts\n\nBut before jumping in to setup, there are a few best practices and concepts you should be familiar with first:\n\n### How transactions work and block specs\n\nTransactions function differently in Nano compared to other blockchains due to the block lattice design. The [What is Nano?](../what-is-nano/overview.md) page gives a quick explanation on how send and receive transactions are related in Nano. As you get into your integration, it is best to be familiar with the [block specifications](the-basics.md#blocks-specifications) in order to understand how different block subtypes are built and relate to each other.\n\n### Account, Key, Seed and Wallet IDs\n\nKnowing how private and public keys are related to seeds and accounts is critical to building a safe and secure integration. With the internal node wallet, there is also a unique wallet ID that adds further security and must be considered if using that wallet for development/testing (see the wallets section below for details). Review the [Account, Key, Seed and Wallet IDs](the-basics.md#account-key-seed-and-wallet-ids) section for some additional details.\n\nIf you need to generate or manage seeds or mnemonic phrases, see the [seeds](key-management.md#seeds) section for some key information about options as they may differ from other existing projects and standards.\n\n### Units\n\nThere are two main units used: nano and raw. The ratio is:\n$$\n1 nano = 10^{30} raw\n$$\n\nAll [QR code](the-basics.md#uri-and-qr-code-standards) setups and RPC calls use raw for the amounts, while any human interaction with units is done at the Nano level.\n\n### Other concepts\n\nThe above concepts capture a minimum understanding to begin your integration journey, and although additional resources will be called out further in the various guides, don't be afraid to check out other resources throughout the documentation here.\n\n---\n\n## Accessing RPC calls\n\nMost integrations send and receive funds by making RPC calls to a Nano node. This requires either access to a public API or running your own node on one of the available networks. Depending on your goals, both are valid approaches with many options and levels of engagement.\n\n### Running your own node\n\nRunning a node involves installing, configuring and maintaining software on a server, preferably on a stable cloud service for the best performance and uptime. This approach gives you more control at the cost of additional effort.\n\nIf going this route, we encourage use of the existing test network for initial integrations. Head over to the [Running a node](../running-a-node/overview.md) guide and make your way through the overview and security pages before stepping through the node setup guide. Make sure you have \"Test network\" selected in all the example commands.\n\n!!! info \"Production integration node should be non-voting\"\n\tWhen moving to production with a node on the main network, we recommend running dedicated, non-voting node for your integration. If you are interested in running a representative node to help further decentralize the network consensus, please setup a separate node for this purpose to ensure both operate as effectively as possible. See the [Voting as a Representative guide](../running-a-node/voting-as-a-representative.md) for further details.\n\n### Public APIs\n\nAccess to public APIs for the main network is also available via third-party vendors and community members. These are only available for the main network and are great for quickly testing out a proof-of-concept or prototype using small amounts. If using for production applications caution should be taken when evaluating SLAs and uptime in general.\n\n- Community supported public APIs list available at [publicnodes.somenano.com](https://publicnodes.somenano.com/)\n- [NOWNodes](https://nownodes.io/) offers free and paid access to Nano node RPC calls (does not include work generation) with some [service quality standards](https://nownodes.io/service-quality-standards)\n\n---\n\n## Wallet\n\nIn order to manage private and public keys, accounts, seeds, etc. you will need wallet software. A few potential options are included below, with more user-focused and backend options listed at [nanowallets.guide](https://nanowallets.guide).\n\n### Node internal wallet\n\n--8<-- \"warning-node-wallet-not-for-prod-use.md\"\n\nThe official binaries, builds and Docker containers for the Nano node published by the Nano Foundation have an internal wallet available for use in development and testing. This is Qt based wallet with both a GUI and related [RPC commands](../commands/rpc-protocol.md#wallet-rpcs). The following features are available via the GUI:\n\n- Import wallet and adhoc keys\n- Export seed (automatically generated on startup)\n- Change representatives\n- Send and automatically receive\n- Automatic work generation for transactions (via CPU by default)\n- Manual options for block creation, block processing and initiation of bootstrapping\n- Various advanced options for viewing the ledger, peers, blocks, accounts and statistics\n\nThis wallet requires running the node, so after getting your [node setup](../running-a-node/node-setup.md) you can follow the [wallet setup guide](/running-a-node/wallet-setup.md) to get started. If building the node yourself, see the Qt wallet notes on the [build options guide](../integration-guides/build-options.md) for how to build the `nano_wallet` binary in addition to the node.\n\n### Pippin\n\nThis community built wallet is a production-ready, high performance developer wallet that is setup to be a drop-in replacement for the internal node wallet. Built in Python and optimized for fast response times, this is a good option to explore for any integration. With an open source license, you are encouraged to contribute to its development as well.\n\n[![Pippin](https://opengraph.githubassets.com/38565027a4d84e26310588fd4712b3cf836745cbe2b4a20ac44590225da01765/appditto/pippin_nano_wallet){width=50%}](https://github.com/appditto/pippin_nano_wallet)\n\n\n### Nault\n\nThis community built wallet is more end-user focused with a robust GUI full of various options. It can be useful in development and testing as it supports setting the custom backend to your own node and can function as a basic account/block explorer. If you use this wallet, it also has an open source license so contributions are encouraged.\n\n\n[![Nault](https://repository-images.githubusercontent.com/274627453/14c0c180-bc4a-11ea-82e9-cc23b8b5a718){width=50%}](https://github.com/Nault/Nault)\n\n---\n\n## Additional tools\n\nThere are plenty of additional libraries and tools worth exploring to help with your integration. Head over the the [Developer Tools page on nano.org](https://nano.org/tools) for a list of commonly used options. Other resources can be explored at the community built [nanolinks.info](https://nanolinks.info/) site.\n\n---\n\n## Next steps\n\nIf you've made it this far you may have a node running with a wallet setup and have started playing around on the test network. The next steps from here are understanding more about how to handle the various operations most integration require, such as:\n\n- Managing public and private keys: see [Key Management](key-management.md), sending and receiving transactions and handling work generation.\n- Creating and sending transactions:\n  - External wallet (such as Pippin): see [External Management - Creating transactions](key-management.md#creating-transactions)\n  - Internal node wallet: see [Internal Management](key-management.md#internal-management)\n- Tracking block confirmations: see [Block Confirmation Tracking guide](block-confirmation-tracking.md)\n- Performing efficient work generation: see [Work Generation guide](work-generation.md)\n- Optional WebSocket integration: see [WebSockets guide](websockets.md)\n\n"
  },
  {
    "path": "docs/integration-guides/ipc-integration.md",
    "content": "title: IPC Integration Guide\ndescription: Learn how to integrate with the nano node using the Interprocess Communication (IPC) interface\n\n# IPC Integration\n\nThe node manages communications using an IPC interface with v1 introduced in V18 (see [IPC v1 Details](#ipc-v1-details)) and upgraded to v2 in V21 to include more robust options. This latest version supports the original RPC v1 endpoint and introduces RPC v2 for completion in future release, along with an authentication system for more granular control of permissioned calls.\n\n**Configuration**\n\nThese configuration options are set in the [`config-node.toml` file](../running-a-node/configuration.md#configuration-file-locations).\n\nIPC is configured in the `node.ipc.tcp` and `node.ipc.local` sections:\n\n```toml\n[node.ipc.local]\n\n# If enabled, certain unsafe RPCs can be used. Not recommended for production systems.\n# type:bool\n#allow_unsafe = false\n\n# Enable or disable IPC via local domain socket.\n# type:bool\n#enable = false\n\n# Timeout for requests.\n# type:seconds\n#io_timeout = 15\n\n# Path to the local domain socket.\n# type:string\n#path = \"/tmp/nano\"\n\n[node.ipc.tcp]\n\n# Enable or disable IPC via TCP server.\n# type:bool\n#enable = false\n\n# Timeout for requests.\n# type:seconds\n#io_timeout = 15\n\n# Server listening port.\n# type:uint16\n#port = 7077\n```\n\n## IPC request/response format\n\nA client must make requests using the following framing format:\n\n```\nREQUEST  ::= HEADER PAYLOAD\nHEADER   ::= u8('N') ENCODING u8(0) u8(0)\nENCODING ::= u8(1)\nPAYLOAD  ::= <encoding specific>\n```\n\nFour encodings currently exist:\n\n* 1: legacy RPC [_since v18.0_]\n* 2: legacy RPC allowing unsafe operations if node is configured so [_since v19.0_]\n* 3: flatbuffers [_since v21.0_]\n* 4: json over flatbuffers [_since v21.0_]\n\nThe encoding is followed by two reserved zero-bytes. These allow for future extensions, such as versioning and extended headers.\n\nNote that the framing format does not include a length field - this is optionally placed in the respective payloads. The reason is that some encodings might want to be \"streamy\", sending responses in chunks, or end with a sentinel.\n\n```\nLEGACY_RPC_PAYLOAD  ::= be32(length) JSON request\nLEGACY_RPC_RESPONSE ::= be32(length) JSON response\n```\n\nIn short, JSON requests and responses are 32-bit big-endian length-prefixed.\n\n## RPC Gateway\n\nThe RPC gateway automatically translates between Flatbuffers and JSON messages over HTTP. The request and response is standard JSON.\n\n!!! info \"Examples require TLS support\" \n\tThe examples below assumes the node is compiled with TLS support. If not, replace https with http. If using TLS with a self-signed certificate, add --insecure to curl commands.\n\n### Making calls without a message envelope\nA message envelope is a way to tell the server which message type is sent, as well as other information such as credentials.\n\nFor HTTP clients, it's convenient to send messages _without_ an envelope. They do so by appending the message name (using uppercase CamelCase) to the path:\n\n`POST` to https://www.example.com:7076/api/v2/AccountWeight\n```\n{\n    \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n}\n```\n\nThe RPC 1.0 `action` field is thus not necessary.\n\nThe response message is always wrapped in an envelope. JSON clients use the `message` property to access the message:\n\n```json\n{\n    \"time\": 1579736914615,\n    \"message_type\": \"AccountWeightResponse\",\n    \"message\": {\n        \"voting_weight\": \"668657804547735335568510480612620716\"\n    }\n}\n```\n\nThe `message_type` is always Error if a call fails:\n\n```json\n{\n    \"time\": 1579737134595,\n    \"message_type\": \"Error\",\n    \"message\": {\n        \"code\": 3,\n        \"message\": \"Access denied\"\n    }\n}\n```\n\nThe `time` property is milliseconds since unix epoch when the message was produced on the server.\n\n**Relation to the WebSocket response structure**\n\nThe `message` and `time` properties of the response envelope is exactly the same as in [WebSockets](/integration-guides/websockets). Instead of `message_type`, WebSockets use `topic`. This structure should help simplify clients using both HTTP and WebSockets.\n\n**Headers**\n\nWhen calling without an envelope, credentials and a correlation id can still be set using an HTTP header:\n\n`curl --header \"Nano-Api-Key:mywalletuser\" ...`\n\nThe correlation header is Nano-Correlation-Id, which can be an arbitrary string. This is usually not useful for request/response JSON clients, but may be valuable if responses from RPCs and WebSocket subscriptions are dealt with in a common message handler on the client.\n\n### Making calls with message envelopes\n\nIf the message name is missing from the path, an envelope will be expected which tells the node about the message type.\n\n`POST` to https://www.example.com:7076/api/v2\n```json\n{ \n    \"message_type\" : \"AccountWeight\", \n    \"message\": {\n        \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n    }\n}\n```\n\nThe above is similar to using the \"action\" property in RPC 1.0. The main difference is that the message itself is always placed in a \"message\" property.\n\nThe envelope allows additional information to be sent, such as credentials:\n\n`POST` to https://www.example.com:7076/api/v2\n\n```json\n{ \n    \"credentials\": \"mywalletuser\",  \n    \"message_type\" : \"AccountWeight\", \n    \"message\": {\n        \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"\n    }\n}\n```\n\n**Large requests**\nWhile somewhat less convenient, the envelope approach is desirable for very large requests, because the node doesn't need to copy the message into an envelope.\n\n---\n\n### Flatbuffers mapping\n\nHere's the corresponding [message definitions](https://github.com/nanocurrency/nano-node/blob/master/api/flatbuffers/nanoapi.fbs) for the AccountWeight request and response types:\n\n```\n/** Returns the voting weight for the given account */\ntable AccountWeight {\n    /** A nano_ address */\n    account: string (required);\n}\n\n/** Response to AccountWeight */\ntable AccountWeightResponse {\n    /** Voting weight as a decimal number*/\n    voting_weight: string (required);\n}\n```\n\n---\n\n### Parsing errors\n\nAny problems with the JSON request will be reported with error details:\n\n```json\n{\n    \"message_type\": \"Error\",\n    \"message\": {\n        \"code\": 1,\n        \"message\": \"Invalid message format: 3: 2: error: required field is missing: account in AccountWeight\"\n    }\n}\n```\n\n---\n\n## IPC Authorization\n\n!!! warning \"Work in progress\"\n    Permission settings is a work in progress, and their exact definition and defaults will be part of RPC 2.0 in a future node release.\n\nWith IPC 2.0, the Nano node offers an authorization system.\n\nThe configuration is done in `config-access.toml` by defining users and optional roles. Permissions are then assigned to these. The node only checks for permissions, never roles. This way, you can freely structure roles and users the way that suits your situation.\n\nThere is also a default user with limited default permissions, currently only allowed to use the `AccountWeight` and `IsAlive` calls. This is used when no credentials are given. The permissions of the default user can also be changed in the configuration file.\n\nCredentials:\n\n* IPC clients set the credentials in the message envelope \n* HTTP(S) clients either use a message envelope or the HTTP Header `Nano-Api-Key`\n\n!!! tip \"Layered security highly recommended\"\n\tWhile permissions enable node operators to pick what functionality to expose to which users, it is still highly recommended that layered security is used. For instance, a wallet backend should expose only required functionality to clients. The backend can then communicate with the node with credentials for additional security.\n\n### Call example\n\n```bash\ncurl --header \"Nano-Api-Key:mywalletuser\" --insecure -d \\\n   '{ \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\"}' \\\n   https://www.example.com:7076/api/v2/AccountWeight\n```\nThis uses HTTPS (which the node supports through a build option), and the `--insecure` is there because the node's certificate in this example is self-signed.\n\nUsing an envelope instead of the `AccountWeight` endpoint:\n\n```json\n{ \n   \"credentials\": \"mywalletuser\",\n   \"message_type\" : \"AccountWeight\", \n   \"message\": \n   {\n       \"account\": \"nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3\" \n   }\n} \n```\n\n`POST` the above to https://www.example.com:7076/api/v2\n\n### Configuration examples\n\nFor testing IPC without caring about permissions, this gives access to everything:\n\n```toml\n[[user]]\nallow = \"unrestricted\"\n```\n\nA more elaborate sample:\n\n!!! warning \"Work in progress\"\n    Permission settings is a work in progress, and their exact definition and defaults will be part of RPC 2.0 in a future node release.\n\n```toml\n[[role]]\nid = \"service_admin\"\nallow = \"api_service_register, api_service_stop\"\n\n[[user]]\n# User id's are typically randomly generated strings which\n# matches the credentials in API requests.\nid = \"user-2bb818ee-6424-4750-8bdb-db23bab7bc57\"\n\n# Inherit all the permissions from these roles\nroles = \"service_admin\"\n\n# Add additional permissions for this specific user\nallow = \"wallet_seed_change, api_topic_confirmation\"\n\n# A list of specific permissions can be denied as well\ndeny = \"api_account_weight\"\n\n[[user]]\nid = \"history-viewer-e3cf8a09-bd74-4ef2-9b84-e14f3db2bb4b\"\n\n# Add specific permission for this user\nallow = \"api_account_info, api_account_history\"\n\n# Do not inherit any default permissions. This is useful\n# for making users with a explicit set of minimum permissions.\n# The default user can also be set to bare. That way, a node can be\n# exposed with a limited set of default permissions.\nbare = true\n```\n\n### Reload config\n\nThe access file can be reloaded without restarting the node or wallet. For the node:\n\n`killall -SIGHUP nano_node`\n\n(actual syntax depends on OS)\n\n---\n\n## IPC V1 Details\n\nAs of v18, the Nano node exposes a low level IPC interface over which multiple future APIs can be marshalled. Currently, the IPC interface supports the legacy RPC JSON format. The HTTP based RPC server is still available. Because the only IPC encoding is currently \"legacy RPC\", RPC config options like \"enable_control\" still apply.\n\n**Transports**\n\nTCP and unix domain sockets are supported. Named pipes and shared memory may be supported in future releases.\n\n**IPC clients**\n\nA NodeJS client is available at https://github.com/meltingice/nano-ipc-js\n\nA Python client is being developed at https://github.com/guilhermelawless/nano-ipc-py\n"
  },
  {
    "path": "docs/integration-guides/key-management.md",
    "content": "title: Key Management Guide\ndescription: Learn best practices for private key management for the nano protocol\n\n# Key Management\n\n## Seeds\n\n### Hex Seed\nNano's private key(s) have been traditionally derived from a 64 character, uppercase hexadecimal string (0-9A-F). This is currently the more popular form of seed supported by a variety of services and wallets. Additional details available in [The Basics guide](/integration-guides/the-basics/#seed).\n\n### Mnemonic Seed\nWallets that provide mnemonic seeds should use the [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) standard word list and methods for generating the seed. When BIP32 master keys are generated from the seed, the HMAC hash key variation \"ed25519 seed\" should be used due to nano using [ed25519 for the signing algorithm](../protocol-design/signing-hashing-and-key-derivation.md#signing-algorithm-ed25519) (see [SLIP-0010](https://github.com/satoshilabs/slips/blob/master/slip-0010.md)).\n\nA non-standard derivation path is used for nano in the [Ledger Nano implementation](https://github.com/LedgerHQ/app-nano), as well as other popular wallets. With a coin-type of `165'` (`0x800000a5`), this is a partial BIP44 path of `m/44'/165'/[address index]`. Only hardened paths are defined.\n\n`m/44'/165'/0'` derives the first private key, `m/44'/165'/1'` derives the second private key, and so on.\n\nThe partial derivation path is hard-coded in the common verification tool by Ian Coleman: https://iancoleman.io/bip39/ . If using this tool to verify, note that regardless of custom settings on the BIP32 or BIP44 tabs for address generation, the resulting addresses in the table at the bottom will follow `m/44'/165'/[address index]`, even if the path in that table indicates otherwise. To see accurate paths in the Derived Addresses table, on the BIP32 tab set the BIP32 Derivation Path to `m/44'/165'`.\n\n#### Demo Examples\n\n--8<-- \"warning-external-libraries.md\"\n\nhttps://github.com/roosmaa/nano-bip39-demo\n\nhttps://github.com/joltwallet/bip-mnemonic\n\n#### Implementations\n\nhttps://github.com/numsu/nanocurrency-web-js\n\n#### Test Vectors\n\n**24-Word Mnemonic**\n\n```\nedge defense waste choose enrich upon flee junk siren film clown finish luggage leader kid quick brick print evidence swap drill paddle truly occur\n```\nGiven Passphrase:\n```\nsome password\n```\nDerived BIP39 Seed:\n```\n0dc285fde768f7ff29b66ce7252d56ed92fe003b605907f7a4f683c3dc8586d34a914d3c71fc099bb38ee4a59e5b081a3497b7a323e90cc68f67b5837690310c\n```\n\n??? success \"Index 0 (`44'/165'/0'`)\"\n\n    Derived Private Key:\n    ```\n    3be4fc2ef3f3b7374e6fc4fb6e7bb153f8a2998b3b3dab50853eabe128024143\n    ```\n    Derived Public key:\n    ```\n    5b65b0e8173ee0802c2c3e6c9080d1a16b06de1176c938a924f58670904e82c4\n    ```\n    Derived Address:\n    ```\n    nano_1pu7p5n3ghq1i1p4rhmek41f5add1uh34xpb94nkbxe8g4a6x1p69emk8y1d\n    ```\n\n??? success \"Index 1 (`44'/165'/1'`)\"\n\n    Derived Private Key:\n    ```\n    ce7e429e683d652446261c17a96da9ed1897aea96c8046f2b8036f6b05cb1a83\n    ```\n    Derived Public key:\n    ```\n    d9f7762e9cd4e7ed632481308cdb8f54abf0241332c0a8641f61e92e2fb03c12\n    ```\n    Derived Address:\n    ```\n    nano_3phqgrqbso99xojkb1bijmfryo7dy1k38ep1o3k3yrhb7rqu1h1k47yu78gz\n    ```\n\n??? success \"Index 2 (`44'/165'/2'`)\"\n\n    Derived Private Key:\n    ```\n    1257df74609b9c6461a3f4e7fd6e3278f2ddcf2562694f2c3aa0515af4f09e38\n    ```\n    Derived Public key:\n    ```\n    a46da51986e25a14d82e32d765dcee69b9eeccd4405411430d91ddb61b717566\n    ```\n    Derived Address:\n    ```\n    nano_3b5fnnerfrkt4me4wepqeqggwtfsxu8fai4n473iu6gxprfq4xd8pk9gh1dg\n    ```\n\n**12-Word Mnemonic**\n\n```\ncompany public remove bread fashion tortoise ahead shrimp onion prefer waste blade\n```\n\nNo Passphrase\n\nDerived BIP39 Seed:\n```\n924a962cae64448812be28a514093ebfeeed537d61a44318eb35f902961d21b2fccd30008d33c8d1d5327a34b9b73281c4b27a0a3d004c1c2e85e8dbb234cba8\n```\n\n??? success \"Index 0 (`44'/165'/0'`)\"\n\n    Derived Private Key:\n    ```\n    6f73d61ca0b56fcdb79d69d437f102348ad75ca971433eb92b2b003f8c99b48d\n    ```\n    Derived Public key:\n    ```\n    134d938215f68bcaa3a0e574fde325fc4b1abad9bd3d698bfef95633b54ffb57\n    ```\n    Derived Address:\n    ```\n    nano_16tfkg33dxndscjt3sdnzqjkdz4d5cxfmhbxf87zxycp8gtnzytqmcosi3zr\n    ```\n\n??? success \"Index 1 (`44'/165'/1'`)\"\n\n    Derived Private Key:\n    ```\n    7e104389811a0967ef574af1f3f423f23cbf7b614be17844f67fb6fd315f9a7e\n    ```\n    Derived Public key:\n    ```\n    71e6caac915affe836c3e822be6a5b3464f40c74bd2e5459d4e74205c6a7c0df\n    ```\n    Derived Address:\n    ```\n    nano_1wh8scpb4pqzx1ue9t34qso7pf56yi89bhbgcjexbst41q5chi8zqtwb74ih\n    ```\n\n??? success \"Index 2 (`44'/165'/2'`)\"\n\n    Derived Private Key:\n    ```\n    8b7250869207a277ac37068dbe32782c2ab9fc6a5342f0deabbfdfae1285196a\n    ```\n    Derived Public key:\n    ```\n    fcebc6554853ed01c242817abf1b5050b887002f8de8f55d00c7c6b5fe01075d\n    ```\n    Derived Address:\n    ```\n    nano_3z9drscninzf193671dtqwfo1n7riw14z5hayogi3jy8pqz143txaghe4gbk\n    ```\n\n\n## External Management\n\nFor larger, more robust systems, external private key management is recommended. In this setup, the node operator generates and stores private keys in an external database and only queries the nano\\_node to:\n\n1. Find receivable blocks for an account\n2. Sign transactions given a private key. More advanced systems may choose to implement signing themselves.\n3. Broadcast the signed transaction to the network.\n\n!!! note\n    [WALLET\\_IDs](/integration-guides/the-basics/#wallet-id) are not used for External Private Key Management since private keys are not stored in the nano\\_node. Much of this section builds off of the [Blocks Specifications](/integration-guides/the-basics/#blocks-specifications) documentation.\n\n---\n### External accounting systems\n\nIn order to properly implement accounting systems external to the Nano node the following best practices should be put into place, which ensure only fully confirmed blocks are used for external tracking of credits, debits, etc.\n\n!!! tip \"Confirmation and idempotency\"\n    The details below expand on this, but the two most important pieces of any integration are:\n\n    1. **Always confirm blocks** - make sure to follow the block confirmation tracking recommendations so you are always taking action from confirmed blocks\n    1. **Guarantee idempotency** - whenever you take action from a block confirmation, it must be idempotent so you don't take the action again if the same block hash is seen through confirmation tracking\n\n#### Block confirmation procedures\n\nBefore crediting funds to an account internally based on a deposit on the network, the block sending the funds must be confirmed. This is done by verifying the network has reached quorum on the block. Details of the recommended verification process can be found in the [block confirmation tracking guide](/integration-guides/block-confirmation-tracking).\n\n\n#### Tracking confirmed balances\n\nExternal accounting systems that track balances arriving to the node must track hashes of blocks that have been received in order to guarantee idempotency. Once confirmation of a block has been validated, the block hash should be recorded for the account along with any credits, debits or other related information. Any attempts to credit or debit accounts external to the node should check that no previous conflicting or duplicate activity was already recorded for that same block hash.\n\n#### Transaction order and correctness\n\nIf you are creating a batch of transactions for a single account, which can be a mix of sending and receiving funds, there is no need to wait for the confirmation of blocks **in that account** to create the next transaction. As long as a transaction is valid, it will be confirmed by the network. The transactions that follow it can only be confirmed if the previous transactions are valid.\n\nHowever, you must always wait for the confirmation of **receivable blocks** before creating the corresponding receive transaction, to ensure it will be confirmed. Always wait for confirmation of transactions that you did not create yourself.\n\n---\n\n### Expanding Private Keys\n\nA Nano private key is a 256-bit piece of data produced from a cryptographically secure random number generator.\n\n!!! danger \"Secure Private Keys\" \n    * Generating private keys from an insecure source may result in loss of funds.\n    * Be sure to backup any generated private key; if lost the funds in the account will become inaccessible.\n\n!!! example \"Step 1: Generate secure private key\"\n    The bash command below generates a valid private key from a cryptographically secure random number generator. **Always use a cryptographically secure processes for generating any private keys.**\n\n##### Command Example\n\n```bash\ncat /dev/urandom | tr -dc '0-9A-F' | head -c${1:-64}\n```\n\n##### Success Result\n\n```\n781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\n```\n\n!!! example \"Step 2: Expand private key\"\n    From the private key, a public key can be derived, and the public key can be translated into a Nano Address using the [`key_expand`](/commands/rpc-protocol#key_expand) RPC command.\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"key_expand\",\n  \"key\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"private\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\",\n  \"public\": \"3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}\n```\n\n---\n\n### Creating Transactions\n\nUsing external keys, transactions are generated in two steps: creation and broadcast. This section will be more heavy on example rather than precise specifications.\n\n#### Send Transaction\n\n!!! example \"Step 1: Get Account Info\"\n    To send funds to an account, first call the [`account_info`](/commands/rpc-protocol#account_info) RPC command to gather necessary account information to craft your transaction. Setting `\"representative\": \"true\"` makes the nano\\_node also return the account's representative address, a necessary piece of data for creating a transaction.\n    \n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"account_info\",\n  \"representative\": \"true\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"frontier\": \"92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D\",\n  \"open_block\": \"B292BFFAAE9013BE630B31144EF15205E986940080687C0441CCFE6EAB67FE53\",\n  \"representative_block\": \"B292BFFAAE9013BE630B31144EF15205E986940080687C0441CCFE6EAB67FE53\",\n  \"balance\": \"4618869000000000000000000000000\",\n  \"modified_timestamp\": \"1524626644\",\n  \"block_count\": \"4\",\n  \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\"\n}\n```\n\n!!! example \"Step 2: Build `block_create` request\"\n    Using details from the `account_info` call response, along with other information, we can create the [`block_create`](/commands/rpc-protocol#block_create) RPC request.\n\n    For more details on values, see the [Blocks Specifications](/integration-guides/the-basics/#blocks-specifications) documentation.\n\n    | Field              | Value |\n    |                    |       |\n    | `\"json_block\"`     | always `\"true\"`, so that the output is JSON-formatted |\n    | `\"type\"`           | always the constant `\"state\"` |\n    | `\"previous\"`       | `\"frontier\"` from `account_info` response |\n    | `\"account\"`        | `\"account\"` address used in the `account_info` call above that the block will be created for |\n    | `\"representative\"` | `\"representative\"` address returned in the `account_info` call |\n    | `\"balance\"`        | balance of the account in $raw$ **after** this transaction is completed (decreased if sending, increased if receiving). In this example, we will send 1 $nano$ ($10^{30} raw$) to address `nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p`. |\n    | `\"link\"`           | destination address the funds will move between |\n    | `\"key\"`            | account's private key |\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"block_create\",\n  \"json_block\": \"true\",\n  \"type\": \"state\",\n  \"previous\": \"92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\",\n  \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n  \"balance\": \"3618869000000000000000000000000\",\n  \"link\": \"nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p\",\n  \"key\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"hash\": \"BB569136FA05F8CBF65CEF2EDE368475B289C4477342976556BA4C0DDF216E45\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\",\n    \"previous\": \"92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D\",\n    \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n    \"balance\": \"3618869000000000000000000000000\",\n    \"link\": \"5C2FBB148E006A8E8BA7A75DD86C9FE00C83F5FFDBFD76EAA09531071436B6AF\",\n    \"link_as_account\": \"nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p\",\n    \"signature\": \"74BCC59DBA39A1E34A5F75F96D6DE9154E3477AAD7DE30EA563DFCFE501A804228008F98DDF4A15FD35705102785C50EF76732C3A74B0FEC5B0DD67B574A5900\",\n    \"work\": \"fbffed7c73b61367\"\n  }\n}\n```\n\n!!! info \"Additional details\"\n    * The option `json_block`, available since V19.0, makes the RPC call return a non-stringified version of the block, which is easier to parse and always recommended.\n    * [`block_create`](/commands/rpc-protocol#block_create) RPC commands generally take longer than other RPC commands because the nano\\_node has to generate the [Proof-of-Work](/integration-guides/the-basics/#proof-of-work) for the transaction. The response block data is already properly formatted to include in the [`process`](/commands/rpc-protocol#process) RPC command.\n    * The nano\\_node creating and signing this transaction has no concept of what the transaction amount is, nor network state; all the nano\\_node knows is that it is creating a block whose previous block on the account chain has hash `92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D` results in the account having a balance of `3618869000000000000000000000000`.\n    * If the account's balance at block hash `92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D` was actually `5618869000000000000000000000000`, then 2 $nano$ would have been sent to `nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p`.\n\n!!! question \"What if I receive funds on my account and then broadcast the above crafted send? Would this result in me sending excess funds to the recipient?\"\n    If you followed this guide, then the answer is \"no\". When you issued the [`account_info`](/commands/rpc-protocol#account_info) RPC command, you received the account's balance at a specific blockhash on its account-chain. In your crafted transaction, you specify that hash in the `\"previous\"` field. If funds were signed into your account, the headblock on your account-chain would change. Since your send no longer refers to the headblock on your account-chain when broadcasted, the network would reject your transaction.\n\n!!! warning\n    Since only the resulting balance is recorded, the transaction amount is interpreted as the difference in balance from the previous block on the account-chain and the newly created block. For this reason, it is crucial that you obtain the current account balance and headblock in the same atomic [`account_info`](/commands/rpc-protocol#account_info) RPC command.\n\n    When not following this guide closely, the following **inappropriate sequence of events could lead to erroneous amounts sent** to a recipient.\n\n    1. An account's balance, say 5 $nano$, was obtained using the [`account_balance`](/commands/rpc-protocol#account_balance). This balance is valid as of hypothetical **BLOCK_A**.\n    1. By another process you control, a receive (**BLOCK_B**) was signed and broadcasted into your account-chain (race-condition).\n    * Lets say this `receive` increased the funds on the account chain by 10 $nano$, resulting in a final balance 15 $nano$.\n    1. The account's frontier block is obtained by the [`accounts_frontiers`](/commands/rpc-protocol#accounts_frontiers) RPC command, returning the hash of **BLOCK_B**. Other transaction metadata is obtained by other RPC commands.\n    1. With the collected data, if a send transaction was created for 3 $nano$, the final balance would be computed as $5 - 3$, or 2 $nano$.\n    1. When this is broadcasted, since it is referring to the current head block on the account, **BLOCK_B**, the network would accept it. But, because the balance as of **BLOCK_B** was actually 15 $nano$, this would result in 12 $nano$ being sent to the recipient.\n\n    For this reason, **only populate transaction data source from a single [`account_info`](/commands/rpc-protocol#account_info) RPC call**.\n\n!!! example \"Step 3: Broadcast the transaction\"\n    As a result of the command above, the nano\\_node will return a signed, but not yet broadcasted transaction. Broadcasting of the signed transaction is covered in the [Broadcasting Transactions](#broadcasting-transactions) section.\n\n---\n\n#### Receive Transaction\n\n!!! info \"Manually receiving first block\"\n    The very first transaction on an account-chain, which is always a receive, is slightly special and deserves its own section [First Receive Transaction](#first-receive-transaction).\n\n!!! example \"Step 1: Get Account Info\"\n    Receiving funds is very similar to sending funds outlined in the previous section, starting with calling `account_info` to get block details for the account frontier. The scenario below pretends that our previous example of a send transaction was **not** broadcast and confirmed on the network because the starting `account_info` details are identical.\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"account_info\",\n  \"representative\": \"true\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"frontier\": \"92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D\",\n  \"open_block\": \"B292BFFAAE9013BE630B31144EF15205E986940080687C0441CCFE6EAB67FE53\",\n  \"representative_block\": \"B292BFFAAE9013BE630B31144EF15205E986940080687C0441CCFE6EAB67FE53\",\n  \"balance\": \"4618869000000000000000000000000\",\n  \"modified_timestamp\": \"1524626644\",\n  \"block_count\": \"4\",\n  \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\"\n}\n```\n\n!!! example \"Step 2: Build `block_create` request\"\n    Using details from the `account_info` call response, along with other information, we can create the [`block_create`](/commands/rpc-protocol#block_create) RPC request. The two differences between the send transaction are the `\"link\"` and `\"balance\"` fields.\n\n    For more details on values, see the [Blocks Specifications](/integration-guides/the-basics/#blocks-specifications) documentation.\n\n    | Field              | Value |\n    |                    |       |\n    | `\"json_block\"`     | always `\"true\"`, so that the output is JSON-formatted |\n    | `\"type\"`           | always the constant `\"state\"` |\n    | `\"previous\"`       | `\"frontier\"` from `account_info` response, or `0` if first block on new account |\n    | `\"account\"`        | `\"account\"` address used in the `account_info` call above that the block will be created for |\n    | `\"representative\"` | `\"representative\"` address returned in the `account_info` call |\n    | `\"balance\"`        | balance of the account in $raw$ **after** this transaction is completed (decreased if sending, increased if receiving). In this example, we will receive 7 $nano$ ($7 \\times 10^{30} raw$) based on the assumed details of the block the `\"link\"` hash refers to (block contents not shown in this example). |\n    | `\"link\"`           | block hash of its paired send transaction, assumed to be a 7 $nano$ send from block hash `CBC911F57B6827649423C92C88C0C56637A4274FF019E77E24D61D12B5338783` |\n    | `\"key\"`            | account's private key |\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"block_create\",\n  \"json_block\": \"true\",\n  \"type\": \"state\",\n  \"previous\": \"92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D\",\n  \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\",\n  \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n  \"balance\": \"11618869000000000000000000000000\",\n  \"link\": \"CBC911F57B6827649423C92C88C0C56637A4274FF019E77E24D61D12B5338783\",\n  \"key\": \"781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"hash\": \"350D145570578A36D3D5ADE58DC7465F4CAAF257DD55BD93055FF826057E2CDD\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1e5aqegc1jb7qe964u4adzmcezyo6o146zb8hm6dft8tkp79za3sxwjym5rx\",\n    \"previous\": \"92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D\",\n    \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n    \"balance\": \"11618869000000000000000000000000\",\n    \"link\": \"CBC911F57B6827649423C92C88C0C56637A4274FF019E77E24D61D12B5338783\",\n    \"link_as_account\": \"nano_3kyb49tqpt39ekc49kbej51ecsjqnimnzw1swxz4boix4ctm93w517umuiw8\",\n    \"signature\": \"EEFFE1EFCCC8F2F6F2F1B79B80ABE855939DD9D6341323186494ADEE775DAADB3B6A6A07A85511F2185F6E739C4A54F1454436E22255A542ED879FD04FEED001\",\n    \"work\": \"c5cf86de24b24419\"\n  }\n}\n```\n\n!!! info \"Additional details\"\n    Here the follow scenario occurs:\n\n    * Previous balance was 4618869000000000000000000000000 $raw$\n    * Increased our balance by 7000000000000000000000000000000 $raw$\n    * Final balance becomes 11618869000000000000000000000000 $raw$\n\n!!! example \"Step 3: Broadcast the transaction\"\n    As a result of the command above, the nano\\_node will return a signed, but not yet broadcasted transaction. Broadcasting of the signed transaction is covered in the [Broadcasting Transactions](#broadcasting-transactions) section.\n\n---\n\n#### First Receive Transaction\n\nThe first transaction of an account is crafted in a slightly different way. To open an account, you must have sent some funds to it with a [Send Transaction](#send-transaction) from another account. The funds will be **receivable** on the receiving account. If you already know the hash of the receivable transaction, you can skip Step 1.\n\n!!! example \"Step 1: Obtain the receivable transaction block hash\"\n\n    Start with obtaining a list of receivable transactions in your unopened account. Limit the response to the highest value transaction by using a combination of `sorting` and `count`.\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"receivable\",\n  \"account\": \"nano_1rawdji18mmcu9psd6h87qath4ta7iqfy8i4rqi89sfdwtbcxn57jm9k3q11\",\n  \"count\": \"1\",\n  \"sorting\": \"true\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n    \"blocks\": {\n        \"5B2DA492506339C0459867AA1DA1E7EDAAC4344342FAB0848F43B46D248C8E99\": \"100\"\n    }\n}\n```\n\n!!! example \"Step 2: Build `block_create` request\"\n    Using the block hash and raw transaction amount from the `receivable` call response, along with other information, we can create the [`block_create`](/commands/rpc-protocol#block_create) RPC request. The only difference between the normal receive transactions is the `\"previous\"` field.\n\n    For more details on values, see the [Blocks Specifications](/integration-guides/the-basics/#blocks-specifications) documentation.\n\n    | Field              | Value |\n    |                    |       |\n    | `\"json_block\"`     | always `\"true\"`, so that the output is JSON-formatted |\n    | `\"type\"`           | always the constant `\"state\"` |\n    | `\"previous\"`       | always the constant \"0\" as this request is for the first block of the account |\n    | `\"account\"`        | `\"account\"` address used in the `account_info` call above that the block will be created for |\n    | `\"representative\"` | `\"representative\"` the account address to use as [representative](/integration-guides/the-basics#representatives) for your account. Choose a reliable, trustworthy representative. |\n    | `\"balance\"`        | balance of the account in $raw$ **after** this transaction is completed. In this example, we will receive $100\\ raw$, based on the assumed details from the `\"receivable\"` response above. |\n    | `\"link\"`           | block hash of its paired send transaction, in this case assumed to be the block `5B2DA492506339C0459867AA1DA1E7EDAAC4344342FAB0848F43B46D248C8E99` |\n    | `\"key\"`            | account's private key |\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"block_create\",\n  \"json_block\": \"true\",\n  \"type\": \"state\",\n  \"previous\": \"0\",\n  \"account\": \"nano_1rawdji18mmcu9psd6h87qath4ta7iqfy8i4rqi89sfdwtbcxn57jm9k3q11\",\n  \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n  \"balance\": \"100\",\n  \"link\": \"5B2DA492506339C0459867AA1DA1E7EDAAC4344342FAB0848F43B46D248C8E99\",\n  \"key\": \"0ED82E6990A16E7AD2375AB5D54BEAABF6C676D09BEC74D9295FCAE35439F694\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"hash\": \"ED3BE5340CC9D62964B5A5F84375A06078CBEDC45FB5FA2926985D6E27D803BB\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1rawdji18mmcu9psd6h87qath4ta7iqfy8i4rqi89sfdwtbcxn57jm9k3q11\",\n    \"previous\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n    \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n    \"balance\": \"100\",\n    \"link\": \"5B2DA492506339C0459867AA1DA1E7EDAAC4344342FAB0848F43B46D248C8E99\",\n    \"link_as_account\": \"nano_1psfnkb71rssr34sisxc5piyhufcrit68iqtp44ayixnfnkas5nsiuy58za7\",\n    \"signature\": \"903991714A55954D15C91DB75CAE2FBF1DD1A2D6DA5524AA2870F76B50A8FE8B4E3FBB53E46B9E82638104AAB3CFA71CFC36B7D676B3D6CAE84725D04E4C360F\",\n    \"work\": \"08d09dc3405d9441\"\n  }\n}\n```\n\n!!! example \"Step 3: Broadcast the transaction\"\n    As a result of the command above, the nano\\_node will return a signed, but not yet broadcasted transaction. Broadcasting of the signed transaction is covered in the [Broadcasting Transactions](#broadcasting-transactions) section.\n\n---\n\n### Broadcasting Transactions\n\n!!! example \"Broadcast using [`process`](/commands/rpc-protocol/#process) RPC command\"\n    Common to all of these transactions is the need to broadcast the completed block to the network. This is achieved by the [`process`](/commands/rpc-protocol#process) RPC command which accepts the block as stringified JSON data. If you followed the previous examples, you used the option `json_block` for RPC [`block_create`](/commands/rpc-protocol#block_create), which allows you use the non-stringified version, as long as you include the same option in this RPC call.  \n    A successful broadcast will return the broadcasted block's hash.\n\n--8<-- \"warning-process-sub-type-recommended.md\"\n\n##### Request Example\n```bash\ncurl -d '{\n  \"action\": \"process\",\n  \"json_block\": \"true\",\n  \"subtype\": \"open\",\n  \"block\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1rawdji18mmcu9psd6h87qath4ta7iqfy8i4rqi89sfdwtbcxn57jm9k3q11\",\n    \"previous\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n    \"representative\": \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n    \"balance\": \"100\",\n    \"link\": \"5B2DA492506339C0459867AA1DA1E7EDAAC4344342FAB0848F43B46D248C8E99\",\n    \"link_as_account\": \"nano_1psfnkb71rssr34sisxc5piyhufcrit68iqtp44ayixnfnkas5nsiuy58za7\",\n    \"signature\": \"903991714A55954D15C91DB75CAE2FBF1DD1A2D6DA5524AA2870F76B50A8FE8B4E3FBB53E46B9E82638104AAB3CFA71CFC36B7D676B3D6CAE84725D04E4C360F\",\n    \"work\": \"08d09dc3405d9441\"\n  }\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n```json\n{ \n  \"hash\": \"42A723D2B60462BF7C9A003FE9A70057D3A6355CA5F1D0A57581000000000000\"\n}\n```\n\n!!! tip \"Block watching and re-work\"\n    Since V20.0, blocks processed using [`process`](/commands/rpc-protocol/#process) are placed under observation by the node for re-broadcasting and re-generation of work under certain conditions. If you wish to disable this feature, add `\"watch_work\": \"false\"` to the process RPC command.\n\n    * If a block is not confirmed within a certain amount of time (configuration option `work_watcher_period`, default 5 seconds), an **automatic re-generation of a higher difficulty proof-of-work** may take place.\n    * Re-generation only takes place when the network is unable to confirm transactions quickly (commonly referred as the network being *saturated*) and the higher difficulty proof-of-work is used to help prioritize the block higher in the processing queue of other nodes.\n    * Configuration option `max_work_generate_multiplier` can be used to limit how much effort should be spent in re-generating the proof-of-work.\n    * The target proof-of-work difficulty threshold is obtained internally as the minimum between [`active_difficulty`](/commands/rpc-protocol/#active_difficulty) and `max_work_generate_multiplier` (converted to difficulty).\n    * With a new, [higher difficulty](/integration-guides/the-basics/#difficulty-multiplier) proof-of-work, the block will get higher confirmation priority across the network.\n\n\n!!! info \"When a transaction does not confirm\"\n    * If a transaction is taking too long to confirm, you may call the [`process`](/commands/rpc-protocol#process) RPC command with the same block data with no risk.\n    * If for some reason a transaction fails to properly broadcast, subsequent transactions on the account-chain after that transaction will not be accepted by the network since the `\"previous\"` field in the transaction data refers to a non-existant block.\n    * If this situation occurs, rebroadcasting the missing transaction(s) will make the subsequent blocks valid in the network's ledger.\n\n---\n\n!!! example \"Rebroadcasting blocks for an account-chain\"\n    The following command rebroadcasts all hashes on an account-chain **starting** at block hash provided:\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"republish\",\n  \"hash\": \"48006BF3146C18CAD3A53A957BF64EF7C57820B21FCCE373FA637559DA260358\"\n}' http://127.0.0.1:7076\n```\n\n---\n\n## Internal Management\n\nThe nano\\_node software has a built-in private-key manager that is suitable for smaller operations (<1000 accounts). [External Key Management](/integration-guides/key-management/#external-management) allows more powerful and robust systems at the cost of additional complexity. External Key Management is recommended for larger operations.\n\n### Creating a Wallet\n\nTo create an account, you first must create a wallet to hold the seed that will subsequently create the account.\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"wallet_create\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{ \n  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n}\n```\n\nThe nano\\_node responds with the WALLET\\_ID. If you lose your WALLET\\_ID, it can only be recovered via a CLI command. To reiterate, the **WALLET_ID is not a seed**. The seed can be extracted for backup in [Backing Up Seed](#backing-up-seed). Many of the RPC commands in this guide require the WALLET\\_ID.\n\n---\n\n### Recovering WALLET_ID\n\nIf you lose your WALLET\\_ID, you can print out all your WALLET\\_IDs and public addresses in those wallets with the [`--wallet_list`](/commands/command-line-interface#-wallet_list) CLI command as follows:\n\n##### Command Format\n\n```bash\ndocker exec ${NANO_NAME} nano_node --wallet_list\n```\n\n##### Success Response\n\n```yaml\nWallet_ID: E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\nnano_16odwi933gpzmkgdcy9tt5zef5ka3jcfubc97fwypsokg7sji4mb9n6qtbme\nWallet_ID: DB0711484E35A4C75230D898853A86BFAFE9F87FCE99C83A4C2668C39607DD4B\n```\n\nIn this example, the nano\\_node's internal private-key management system contains two wallets, each with a different 256-bit seed. The first wallet has a single account and the second wallet has zero accounts. Account creation will be covered later.\n\n---\n\n### Backing Up Seed\n\nThe following command will print the seed for a given wallet to stdout. Replace `${WALLET_ID}` with the WALLET\\_ID that you would like to display the seed of.\n\n##### Command Format\n\n```bash\ndocker exec ${NANO_NAME:-nano_node_1} nano_node --wallet_decrypt_unsafe --wallet ${WALLET_ID}\n```\n\n##### Success Response\n\n```yaml\nSeed: D56143E7561D71C1AF4D563C6AF79EECE93E82479818AD8ED88BED1AAE8BE4E5\nPub: nano_16odwi933gpzmkgdcy9tt5zef5ka3jcfubc97fwypsokg7sji4mb9n6qtbme\nPrv: 1F6FEB5D1E05C10B904E1112F430C3FA93ACC7067206B63AD155199501794E3E\n```\n\n!!! info\n    The nano\\_node responds with three pieces of information:\n    \n    1. The seed of the wallet (back this up).\n    1. The pairing public address\n    1. The private key (deterministically derived from seed) of accounts within the wallet.\n\n    Additional notes:\n\n    * If you change the seed in a wallet, future created accounts will be derived from that seed.\n    * Changing seeds on a wallet that already has accounts can cause accidental loss of funds from improper seed or private key backup.\n    * It is recommended to always create a new wallet when restoring a seed.\n\n##### Error Response\n\n```\nWallet doesn't exist\n```\n\n!!! warning\n    If anyone has access to the seed, they can freely access funds, so keep this very secure. Since the above command prints to stdout, it is recommended to wipe stdout afterwards using:\n\n    ```bash\n    clear && printf '\\e[3J'\n    ```\n\n---\n\n### Restoring/Changing Seed\n\n!!! warning\n    Only change the seed of a wallet that contains no accounts. Changing the seed of a wallet that already has accounts may lead to a false sense of security: accounts are generated by the seed that is currently in the wallet. Generating accounts, then switching the seed and backing up the new seed does **not** backup the previously generated accounts.\n\n##### Request Format\n\n```bash\ncurl -d '{\n  \"action\": \"wallet_change_seed\",\n  \"wallet\": \"<WALLET_ID>\",\n  \"seed\": \"<SEED>\"\n}' http://127.0.0.1:7076\n```\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\":\"wallet_change_seed\",\n  \"wallet\":\"DB0711484E35A4C75230D898853A86BFAFE9F87FCE99C83A4C2668C39607DD4B\",\n  \"seed\":\"D56143E7561D71C1AF4D563C6AF79EECE93E82479818AD8ED88BED1AAE8BE4E5\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"success\": \"\"\n}\n```\n\n##### Error Response\n\nResponse if the wallet_id isn't found in nano\\_node:\n```json\n{\n  \"error\": \"Wallet not found\"\n}\n```\n\nResponse if the seed field contains non-hexidecimal values or is too long:\n```json\n{ \n  \"error\": \"Bad seed\"\n}\n```\n\n!!! warning\n    If the hexidecimal seed represents less than 256 bits, the seed will be 0-padded on the left to become 256 bits.\n\n---\n\n### Account Create\n\nAfter creating a wallet, it's corresponding WALLET\\_ID, and **backing up the seed (not the wallet\\_id)**, the wallet can be populated with accounts. To create a new account in a wallet use the [`account_create`](/commands/rpc-protocol#account_create) RPC command:\n\n##### Request Format\n\n```bash\ncurl -d '{\n  \"action\": \"account_create\",\n  \"wallet\": \"<WALLET_ID>\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{ \n  \"account\": \"nano_16odwi933gpzmkgdcy9tt5zef5ka3jcfubc97fwypsokg7sji4mb9n6qtbme\"\n}\n```\n\n##### Error Response\n\n```json\n{\n  \"error\": \"Wallet not found\"\n}\n```\n\n---\n\n### Bulk Account Create\n\nTo generate many accounts in bulk, it is more efficient to create them all at once using the [`accounts_create`](/commands/rpc-protocol#accounts_create) RPC command:\n\n##### Request Format\n\n```bash\ncurl -d '{\n    \"action\": \"accounts_create\",\n    \"wallet\": \"<WALLET_ID>\",\n    \"count\": \"<NUM_ACCOUNTS>\"\n}' http://127.0.0.1:7076\n```\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"accounts_create\",\n  \"wallet\": \"DB0711484E35A4C75230D898853A86BFAFE9F87FCE99C83A4C2668C39607DD4B\",\n  \"count\":\"5\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"accounts\": [\n    \"nano_35kgi43t5hgi64715qnppmz1yb6re1igfcrkfx4ppirkqpfmecnpd1mdmafu\",\n    \"nano_3t13y6b7h93yn9hehn8p6yqx1yqzrxxs33drhzep8huhymwxamn15pba75oj\",\n    \"nano_11exxzfoosai96w7gnrjrn7m6i8bodch37ib8jgxsm5k96na6e1wda8np881\",\n    \"nano_3xbsso8pkemwatwdnkcyn1bfcmrb8dpcg3pit9zqxj9mkxa6ifiankff6m9x\",\n    \"nano_1q5gpy46moe1csj8md8oq3x57sxqmwskk8mmr7c63q1yebnjcsxg1yib19kn\"\n  ]\n}\n```\n\n---\n\n### Receiving Funds\n\nAs long as the nano\\_node is synced and the node wallet is unlocked (node wallet locking is not covered in this guide), nano\\_node automatically creates and signs receive transactions for all accounts in the wallet's internal private-key management system.\n\n!!! tip\n    In the event that a receive is not automatically generated, it can be manually generated using the [`receive`](/commands/rpc-protocol#receive) RPC command.\n\n#### Semi-Manual Receiving Funds\n\nIf the nano\\_node does not automatically sign in a receivable transaction, transactions can be manually signed in. The easiest way is to explicitly command the nano\\_node to check all of the accounts in all of its wallets for receivable blocks.\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"search_receivable_all\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"success\": \"\"\n}\n```\n\n!!! note\n    As the number of accounts in a nano\\_node grows, this command becomes increasingly computationally expensive.\n\n---\n\n### Sending funds\n\nThe [`send`](/commands/rpc-protocol#send) RPC command sends funds from an account in the specified wallet to a destination address.\n\n##### Request Format\n\n```bash\ncurl -d '{\n  \"action\": \"send\",\n  \"wallet\": \"<WALLET_ID>\",\n  \"source\": \"<SOURCE_ADDRESS>\",\n  \"destination\": \"<DESTINATION_ADDRESS>\",\n  \"amount\": \"1000000\",\n  \"id\": \"7081e2b8fec9146e\"\n}' http://127.0.0.1:7076\n```\n\n| Field       | Description |\n|             |             |\n| wallet      | WALLET_ID containing the source address |\n| source      | Address you control starting with \"nano_\" |\n| destination | Destination address starting with \"nano_\" |\n| amount      | Amount to send in raw |\n| id          | Any string |\n\n---\n\n!!! warning \"Important\"\n    The `\"id\"` field is a safety mechanism that prevents issuing a transaction multiple times by repeating the RPC command.\n\n    * If a transaction is successful, any subsequent [`send`](/commands/rpc-protocol#send) RPC commands with the same identifier will be ignored by the nano\\_node.\n    * If the request times out, then the send may or may not have gone through.\n    * Most exchange \"double withdraw\" issues are caused by naive error-handling routines which re-issue the send request without the `\"id\"` parameter.\n    * The `\"id\"` field is local to your nano\\_node instance and does not offer protection when sent to different instances of nano\\_node that manage the same seed.\n    * As previously mentioned, having a seed loaded in multiple online nano_node is strongly discouraged.\n    * If managing more than 1000 accounts, building a separate system for managing keys and accounts externally is recommended\n\n---\n\nBelow is a sample command to send 1 $nano$ from `nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000` to `nano_16odwi933gpzmkgdcy9tt5zef5ka3jcfubc97fwypsokg7sji4mb9n6qtbme`.\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"send\",\n  \"wallet\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\",\n  \"source\": \"nano_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000\",\n  \"destination\": \"nano_16odwi933gpzmkgdcy9tt5zef5ka3jcfubc97fwypsokg7sji4mb9n6qtbme\",\n  \"amount\": \"1000000000000000000000000000000\",\n  \"id\": \"7081e2b8fec9146e\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{ \n  \"block\": \"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F\"\n}\n```\n\nOn success, the nano\\_node returns the hash of the transaction's block.\n\n---\n\n### Republishing Transactions\n\nIt may take a few seconds for the transaction to appear on the Nano Network. If the transaction fails to appear, you may call the [`republish`](/commands/rpc-protocol#republish) RPC command with the oldest missing transaction's hash. Account-chains must be **continuous and unbroken**. If for some reason a transaction fails to properly broadcast, subsequent transactions on the account-chain will not be accepted by the network since the `\"previous\"` field in the transaction data refers to a block  unknown to to other nodes on the network.\n\n!!! tip\n    Republishing the missing transaction(s) will make all the subsequent blocks valid in the network's ledger. Republishing does not create new transactions.\n\nThe following command rebroadcasts all hashes on an acccount-chain starting at block with hash `${BLOCK_HASH}`:\n\n##### Request Example\n\n```bash\ncurl -d '{\n  \"action\": \"republish\",\n  \"hash\": \"AF9C1D46AAE66CC8F827904ED02D4B3D95AA98B1FF058352BA6B670BEFD40231\"\n}' http://127.0.0.1:7076\n```\n\n##### Success Response\n\n```json\n{\n  \"success\": \"\",\n  \"blocks\": [\n    \"AF9C1D46AAE66CC8F827904ED02D4B3D95AA98B1FF058352BA6B670BEFD40231\",\n    \"C9A111580A21F3E63F2283DAF6450D5178BFAC2A6C38E09B76EEA9CE37EC9CE0\"\n  ]\n}\n```\nOn success, the nano\\_node returns the hashes of all republished blocks.\n"
  },
  {
    "path": "docs/integration-guides/the-basics.md",
    "content": "title: Integration Basics Guide\ndescription: Understand some of the core details of the nano protocol including block specifications, accounts, keys, and more\n\n# The Basics\n\n## Block Lattice Design\n\nNano's ledger is built on a data-structure called a \"Block Lattice.\" Every account (private/public key pair) has their own blockchain (account-chain). Only the holder of the private key may sign and publish blocks to their own account-chain.  Each block represents a transaction.\n\nAction  | Description\n--------|----------\nSend    | Send funds from users account to another account\nReceive | Receive funds from a given \"Send\" transaction\n\n\nThe system is akin to writing (send) and cashing (receive) a Cashier's Check.  There are a few things to consider about transactions:\n\n* The receiving account does not have to be online during the Send transaction.\n* The transaction will stay as receivable indefinitely until a Receive transaction is created.\n* Once funds are sent, they cannot be revoked by the sender.\n\n---\n\n## Representatives\n\nThe Nano Network achieves consensus using the unique [Open Representative Voting (ORV)](/what-is-nano/overview/#representatives-and-voting) model. In this setup, representatives (accounts where nano\\_node with the private keys are running 24/7) vote on transactions.\n\n!!! info\n    Below are some helpful things to remember about Nano's representatives and consensus:\n\n    * A representative's voting power is directly proportional to the amount of funds delegated to that account by other users of the protocol.\n    * An account's representative has no bearing on its transactions or nano\\_node operation.\n    * Choosing a representative with good uptime that is also a unique entity (to prevent sybil attacks) helps maintain high Nano network security.\n    * If an account's representative goes offline, the account's funds are no longer used to help secure the network; however, the account is unaffected.\n    * Anyone that runs a full-time node may be a representative and be delegated voting weight from other users of the protocol.\n    * An account can freely change its representative anytime within any transaction or explicitly by publishing [a block which only changes the representative](#change) (sends no funds), which most wallets support.\n\n---\n\n## Account, Key, Seed and Wallet IDs\n\nWhen dealing with the various IDs in the node it is important to understand the function and implication of each one.\n\n!!! danger \"Similar IDs, Different Functions\"\n    There are several things that can have a similar form but may have very different functions, and mixing them up can result in loss of funds. Use caution when handling them.\n\n### Wallet ID\nThis is a series of 32 random bytes of data and is **not the seed**. It is used in several RPC actions and command line options for the node. It is a **purely local** UUID that is a reference to a block of data about a specific wallet (set of seed/private keys/info about them) in your node's local database file.\n\nThe reason this is necessary is because we want to store information about each account in a wallet: whether it's been used, what its account is so we don't have to generate it every time, its balance, etc. Also, so we can hold ad hoc accounts, which are accounts that are not derived from the seed. This identifier is only useful in conjunction with your node's database file and **it will not recover funds if that database is lost or corrupted**. \n\nThis is the value that you get back when using the `wallet_create` etc RPC commands, and what the node expects for RPC commands with a `\"wallet\"` field as input.\n\n### Seed\nThis is a series of 32 random bytes of data, usually represented as a 64 character, uppercase hexadecimal string (0-9A-F). This value is used to derive **account private keys** for accounts by combining it with an index and then putting that into the following hash function where `||` means concatenation and `i` is a 32-bit big-endian unsigned integer: `PrivK[i] = blake2b(outLen = 32, input = seed || i)`\n\nPrivate keys are derived **deterministically** from the seed, which means that as long as you put the same seed and index into the derivation function, you will get the same resulting private key every time. Therefore, knowing just the seed allows you to be able to access all the derived private keys from index 0 to $2^{32} - 1$ (because the index value is a unsigned 32-bit integer).\n\nWallet implementations will commonly start from index 0 and increment it by 1 each time you create a new account so that recovering accounts is as easy as importing the seed and then repeating this account creation process.\n\nIt should be noted that Nano reference wallet is using described Blake2b private keys derivation path. However some implementations can use BIP44 deterministic wallets and [mnemonic seed](/integration-guides/key-management/#mnemonic-seed) producing different private keys for given seed and indices. Additionally 24-word mnemonic can be derived from a Nano 64 length hex seed as entropy with clear notice for users that this is not BIP44 seed/entropy.\n\n**Code samples**\n\n=== \"Python\"\n\t\n\tGenerates a deterministic key:\n\n\t```python\n\timport hashlib\n\tseed = b\"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01\" # \"0000000000000000000000000000000000000000000000000000000000000001\"\n\tindex = 0x00000001.to_bytes(4, 'big') # 1\n\tblake2b_state = hashlib.blake2b(digest_size=32)\n\tblake2b_state.update(seed+index)\n\t# where `+` means concatenation, not sum: https://docs.python.org/3/library/hashlib.html#hashlib.hash.update\n\t# code line above is equal to `blake2b_state.update(seed); blake2b_state.update(index)`\n\tPrivK = blake2b_state.digest()\n\tprint(blake2b_state.hexdigest().upper()) # \"1495F2D49159CC2EAAAA97EBB42346418E1268AFF16D7FCA90E6BAD6D0965520\"\n\t```\n\n=== \"Bitcoinjs\"\n\n\tMnemonic words for Blake2b Nano seed using [Bitcoinjs](https://github.com/bitcoinjs/bip39):\n\t```js\n\tconst bip39 = require('bip39')\n\t\n\tconst mnemonic = bip39.entropyToMnemonic('0000000000000000000000000000000000000000000000000000000000000001')\n\t// => abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon diesel\n\t\n\tbip39.mnemonicToEntropy(mnemonic)\n\t// => '0000000000000000000000000000000000000000000000000000000000000001'\n\t```\n\n\n### Account private key\nThis is also a 32 byte value, usually represented as a 64 character, uppercase hexadecimal string(0-9A-F). It can either be random (an *ad-hoc key*) or derived from a seed, as described above. This is what represents control of a specific account on the ledger. If you know or can know the private key of someone's account, you can transact as if you own that account.\n\n### Account public key\nThis is also a 32 byte value, usually represented as a 64 character, uppercase hexadecimal string (0-9A-F). It is derived from an *account private key* by using the ED25519 curve using Blake2b-512 as the hash function (instead of SHA-512). Usually account public keys will not be passed around in this form, rather the below address is used.\n\n### Account public address\nThis is what you think of as someone's Nano address: it's a string that starts with `nano_` (previously `xrb_`), then has 52 characters which are the *account public key* but encoded with a specific base32 encoding algorithm to prevent human transcription errors by limiting ambiguity between different characters (no `O` and `0` for example). Then the final 8 characters are Blake2b-40 checksum of the account public key to aid in discovering typos, also encoded with the same base32 scheme (5 bytes).\n\nSo for address `nano_1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjtwnqposrs`:\n\n| Prefix  | Encoded Account Public Key                             | Checksum   |\n|         |                                                        |            |\n| `nano_` | `1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjt` | `wnqposrs` |\n\nFor basic address validation, the following regular expression can be used: `^(nano|xrb)_[13]{1}[13456789abcdefghijkmnopqrstuwxyz]{59}$`. Validation of the checksum is also recommended, depending on the integration.\n\n!!! question \"Prefixes: nano_ vs. xrb_\"\n    As of V19.0 **the Nano node only returns `nano_` addresses in all actions**, but prior versions returned `xrb_` addresses. These prefixes are interchangeable — everything after the `_` remains the same. If you have an issue using one or the other prefix with any exchange or service, you can safely switch between `nano_` and `xrb_` prefixes as needed — they both represent the same account owned by your private key or seed.\n\n---\n\n## Units\n\nNano can be represented using more than one unit of measurement. While the most common unit is the $nano$, the smallest unit is the $raw$. Below is the formula for converting between $raw$ and $nano$.\n\n$$\n1 nano = 10^{30} raw\n$$\n\n!!! warning \"Important\"\n    \n    * All RPC commands expect units to be represented as $raw$. \n    * Always keep units in integer $raw$ amounts to prevent any floating-point error or unit confusion.\n    * Depending on your implementation language, you may require a big number library to perform arithmetic directly on $raw$.\n    * See [Distribution and Units](/protocol-design/distribution-and-units/) page for more details on units.\n    * Because final balances are recorded rather than transaction amounts, API calls must be done carefully to avoid loss of funds. Incorrect arithmetic or use of fields may change an intended receive to a send to a non-existent address.\n\n---\n\n## Blocks Specifications\n\nAll new transactions on the Nano Protocol are communicated via blocks. The account's entire state, including the balance after each transaction, is recorded in every block. Transaction amounts are interpreted as the difference in balance between consecutive blocks.\n\nIf an account balance decreases, the transaction that caused the decrease is considered a send. Similarly, if an account balance increases, the transaction that caused the increase is considered a receive.\n\n!!! warning \"Important\"\n    Because final balances are recorded rather than transaction amounts, API calls must be done carefully to avoid sending erroneous amounts.\n\n### Block Format\nBecause each block contains the current state of the account, the `\"type\"` of the block is always `\"state\"`. The following table presents the anatomy of a block, along with the format used within RPC calls for building blocks, and the serialized, binary representation:\n\n| Key            | RPC Format              | Serialized | Description |\n|                |                         |            |             |\n| type           | string                  | -          | \"state\" |\n| account        | string                  | 32 bytes   | This account's nano_ address |\n| previous       | 64 hex-char string      | 32 bytes   | Previous head block on account; 0 if *open* block |\n| representative | string                  | 32 bytes   | Representative nano_ address |\n| balance        | decimal string          | 16 bytes   | Resulting balance (in [raw](#units)) |\n| link           | (see link table below)  | 32 bytes   | Multipurpose field - see link table below |\n| signature      | 128 hex-char string     | 64 bytes   | ED25519+Blake2b 512-bit signature |\n| work           | 16 hex-char string      | 8 bytes    | [Proof of Work](../glossary.md#proof-of-work-pow) Nonce |\n\nDepending on the action each transaction intends to perform, the `\"link\"` field will have a different value:\n\n| Action  | RPC Format         | Description                                |\n|         |                    |                                            |\n| Change  | decimal string     | Must be \"0\"                                |\n| Send    | 64 hex-char string | Public key for destination account         |\n| Receive | 64 hex-char string | Pairing block's hash (block sending funds) |\n\n If using the [block_create](/commands/rpc-protocol#block_create) RPC command the optional fields `\"source\"` (with the block hash to be received) and `\"destination\"` (with the target `nano_` address) fields can be used instead of directly defining the `\"link\"` field.\n\n!!! note\n    * Any transaction may also simultaneously change the representative. The above description of the \"Change\" action is for creating a block with an explicit representative change where no funds are transferred (balance is not changed).\n    * In the completed, signed transaction json, the `\"link\"` field is **always** hexadecimal.\n    * The first block on an account must be receiving funds (cannot be an explicit representative change). The first block is often referred to as \"opening the account\".\n\n### Self-Signed Blocks\n\nIf you choose to implement your own signing, the order of data (in bytes) to hash prior to signing is as follows.\n\n* All values are binary representations\n* No ASCII/UTF-8 strings.\n\nOrder of data:\n\n1. block preamble (32-Bytes, value ``0x6``)\n2. account (32-Bytes)\n3. previous (32-Bytes)\n4. representative (32-Bytes)\n5. balance (16-Bytes)\n6. link (32-Bytes)\n\n!!! question \"What is the preamble?\"\n    As of v15.0 **the Nano node only supports state blocks**, but prior versions used block types to distinguish different kinds of transactions. The preamble is a relic of those blocks, and now it is a constant value since all blocks are the same `state` type.\n\nThe digital signing algorithm (which internally applies another Blake2b hashing) is applied on the resulting digest.\n\n!!! warning \"Private/public key usage\"\n    Make sure that your private key uses the correct partnering public key while signing as using an incorrect public key may leak information about your private key.\n\n### Creating Blocks\n\nFor details on how to create individual blocks for sending from, receiving to, opening or changing representatives for an account, please see the [Creating Transactions](/integration-guides/key-management/#creating-transactions) section.\n\n---\n\n## URI and QR Code Standards\n\nNote: `amount` values should always be in RAW.\n\nNote: Please use `nano://` for deep links \n\n### Send to an address\n\n    nano:nano_<encoded address>[?][amount=<raw amount>][&][label=<label>][&][message=<message>]\n\nJust the address\n\n    nano:nano_3wm37qz19zhei7nzscjcopbrbnnachs4p1gnwo5oroi3qonw6inwgoeuufdp\n\nAddress and an amount (as RAW)\n\n    nano:nano_3wm37qz19zhei7nzscjcopbrbnnachs4p1gnwo5oroi3qonw6inwgoeuufdp?amount=1000\n\nAddress and a label\n\n    nano:nano_3wm37qz19zhei7nzscjcopbrbnnachs4p1gnwo5oroi3qonw6inwgoeuufdp?label=Developers%20Fund%20Address\n\nSend to an address with amount, label and message\n\n    nano:nano_3wm37qz19zhei7nzscjcopbrbnnachs4p1gnwo5oroi3qonw6inwgoeuufdp?amount=10&label=Developers%20Fund&message=Donate%20Now\n\n### Representative change\n\n    nanorep:nano_<encoded address>[?][label=<label>][&][message=<message>]\n\nChange to representative with label and message\n\n    nanorep:nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou?label=Official%20Rep%202&message=Thank%20you%20for%20changing%20your%20representative%21\n\n### Private Key Import\n\n    nanokey:<encoded private key>[?][label=<label>][&][message=<message>]\n\n### Seed Import\n\n    nanoseed:<encoded seed>[?][label=<label>][&][message=<message>][&][lastindex=<index>]\n\n### Process a JSON blob block\n(to be sent as the `block` argument to the RPC call `process`)\n\n    nanoblock:<blob>\n"
  },
  {
    "path": "docs/integration-guides/websockets.md",
    "content": "title: WebSockets Integration Guide\ndescription: Details for how to integrate with WebSockets for getting notifications from the nano node\n\n# WebSockets\n\n!!! note \"\"\n    Available in version 19.0+ only. When upgrading from version 18 or earlier, the node performs a confirmation height upgrade. During this process, the WebSocket notifications may include confirmations for old blocks. Services must handle duplicate notifications, as well as missed blocks as WebSockets do not provide guaranteed delivery. Reasons for missed blocks include intermittent network issues and internal containers (in the node or clients) reaching capacity.\n\n--8<-- \"warning-multiple-confirmation-notifications.md\"\n\nThe Nano node offers notification of confirmed blocks over WebSockets. This offers higher throughput over the HTTP callback, and uses a single ingoing connection instead of an outgoing connection for every block.\n\nThe HTTP callback is still available and both mechanisms can be used at the same time.\n\n## Example clients\n\nSample clients are available:\n\n* Node.js: https://github.com/cryptocode/nano-websocket-sample-nodejs\n* Python: https://github.com/guilhermelawless/nano-websocket-sample-py\n\n## Configuration\n\nThese configuration options are set in the [`config-node.toml` file](../running-a-node/configuration.md#configuration-file-locations).\n\n```toml\n[node.websocket]\n\n# WebSocket server bind address.\n# type:string,ip\naddress = \"::1\"\n\n# Enable or disable WebSocket server.\n# type:bool\nenable = true\n\n# WebSocket server listening port.\n# type:uint16\nport = 7078\n```\n\nWith the above configuration, localhost clients should connect to `ws://[::1]:7078`.\n\n!!! note \"Configuration for use with Docker\"\n    Set the WebSocket server bind `address` to `::ffff:0.0.0.0` instead, and configure the container to map port 7078 accordingly. **Review [Managing the Container](../running-a-node/docker-management.md#managing-the-container) to ensure the websocket is not exposed externally.**\n\n### Secure WebSockets\n\nSupport for `wss://` is deprecated from V27.\nSecure websockets can be achieved by using a reverse proxy.\n\n## Acknowledgement\n\nAll WebSocket actions can optionally request an acknowledgement. The following is an example for the *subscribe* action.\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\",\n  \"ack\": true,\n  \"id\": \"<optional unique id>\"\n}\n```\n\nIf the action succeeds, the following message will be sent back (note that no message ordering is guaranteed):\n\n```json\n{\n  \"ack\": \"subscribe\",\n  \"time\": \"<milliseconds since epoch>\",\n  \"id\": \"<optional unique id>\"\n}\n```\n\n## Update\n\nSome subscriptions can be updated without requiring unsubscribing and re-subscribing to the same topic. A typical message is the following:\n\n```json\n{\n  \"action\": \"update\",\n  \"topic\": \"confirmation\",\n  \"options\": {\n    ...\n  }\n}\n```\n\nUpdatable filter options are mentioned in the examples below.\n\n## Keepalive\n\nThis action is available since _v20.0_\n\nKeepalive allows checking the liveliness of the websocket without refreshing it or changing a subscription. Use the format:\n\n```json\n{\n  \"action\": \"ping\"\n}\n```\n\nThe expected response is:\n\n```json\n{\n  \"ack\": \"pong\",\n  \"time\": \"<milliseconds since epoch>\"\n}\n```\n\n## Subscribe/Unsubscribe\n\nTo receive notifications through the websocket you must subscribe to the specific topic and a standard subscription without filters looks like this:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\"\n}\n```\n\nUnsubscribing also has the format:\n\nTo unsubscribe:\n```json\n{\n  \"action\": \"unsubscribe\",\n  \"topic\": \"confirmation\"\n}\n```\n\n**Optional Filters**\n\nSome topics support filters as well. Details of the subscription filter options for each topic are included in examples below.\n\n!!! note\n    Note that, if **empty** `options` are supplied (see examples below), an empty filter will be used and nothing will be broadcasted.\n\n---\n\n## Available Topics\n\n### Confirmations\n\n--8<-- \"warning-multiple-confirmation-notifications.md\"\n\n##### Subscribing\n\nTo subscribe to all confirmed blocks:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\"\n}\n```\n\n##### Filtering options\n\n###### Confirmation types\n\nThe node classifies block confirmations into the following categories:\n\n* **Active quorum**: a block is confirmed through voting (including `block_confirm` RPC if block is previously unconfirmed)\n* **Active confirmation height**: a block which is confirmed as a dependent election from a successor through voting (or by `block_confirm` RPC if the block is already confirmed)\n* **Inactive**: a block that is not in active elections is implicitly confirmed by a successor.\n\nBy default, the node emits **all** confirmations to WebSocket clients. However, the following filtering option is available:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\",\n  \"options\": {\n    \"confirmation_type\": \"<type>\"\n  }\n}\n```\n\nThe most common values for `confirmation_type` are `all` (default), `active` and `inactive`.\n\nIf more fine-grained filtering is needed, `active` can be replaced with `active_quorum` or `active_confirmation_height` per the definitions above.\n\n###### Accounts\n\nFilters for **confirmation** can be used to subscribe only to selected accounts. Once filters are given, blocks from accounts that do not match the options are not broadcasted.\n\n!!! warning \"Legacy blocks never broadcasted\"\n    Note that [legacy blocks](/glossary#legacy-blocks) are never broadcasted if filters are given, even if they match the accounts.\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\",\n  \"options\": {\n    \"all_local_accounts\": true,\n    \"accounts\": [\n      \"nano_16c4ush661bbn2hxc6iqrunwoyqt95in4hmw6uw7tk37yfyi77s7dyxaw8ce\",\n      \"nano_3dmtrrws3pocycmbqwawk6xs7446qxa36fcncush4s1pejk16ksbmakis32c\"\n    ]\n  }\n}\n```\n\n* When `all_local_accounts` is set to **`true`**, blocks that mention accounts in any wallet will be broadcasted.\n* `accounts` is a list of additional accounts to subscribe to. Both prefixes are supported.\n\n!!! tip \"Updating the list of accounts\"\n    _version 21.0+_  \n    The list of `accounts` for which blocks are broadcasted can be updated (see [Update](#update)):\n    ```json\n    {\n      \"action\": \"update\",\n      \"topic\": \"confirmation\",\n      \"options\": {\n        \"accounts_add\": [\n          ... // additional accounts to track\n        ],\n        \"accounts_del\": [\n          ... // accounts to remove from tracking\n        ]\n      }\n    }\n    ```\n    Note that this can result in an empty filter.\n\n##### Response Options\n\n###### Type field\n\nConfirmations sent through WebSockets, whether filtering is used or not, contains a `confirmation_type` field with values `active_quorum`, `active_confirmation_height` or `inactive`.\n\n###### Block content inclusion\n\nBy setting `include_block` to `false`, the block content will not be present. Default is `true`.\nBecause account filtering needs block content to function, setting this flag to false is currently incompatible with account filtering. This restriction may be lifted in future releases.\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\",\n  \"options\": {\n    \"include_block\": \"false\",\n  }\n}\n```\n\n###### Election info\n\nDetails about the election leading to the confirmation can be obtained by setting the `include_election_info` option to true:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\",\n  \"options\": {\n    \"include_election_info\": \"true\"\n  }\n}\n```\n\nIncluding the election info option results in the following fields being included:\n\n* election `duration` in milliseconds\n* end of election `time` as milliseconds since epoch\n* weight `tally` in raw unit\n* the confirmation `request_count` (_version 20.0+_)\n* number of blocks and voters (_version 21.0+_)\n\n###### Sideband info\n\nSince version 24.0 the sideband details for the confirmed blocks can be obtained by setting the `\"include_sideband_info\"` option to true:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"confirmation\",\n  \"options\": {\n    \"include_sideband_info\": \"true\"\n  }\n}\n```\n\nThe sideband fields when its option is set to true are:\n\n* `height` is the block height\n* `local_timestamp` is the local time the block was inserted in to the ledger \n\n##### Sample Results\n\n!!! note \"Differences from the HTTP callback\"\n    * The \"block\" contains JSON instead of an escaped string. This makes parsing easier.\n    * The JSON received by the client contains a topic, event time (milliseconds since epoch) and the message itself.\n    * Subtype is part of block (if it's a state block)\n    * There is no \"is_send\" property since \"subtype\" signifies the intent for state blocks.\n    * A confirmation type is added, which can be filtered.\n\n```json\n{\n  \"topic\": \"confirmation\",\n  \"time\": \"1564935350664\",\n  \"message\": {\n    \"account\": \"nano_1tgkjkq9r96zd3pkr7edj8e4qbu3wr3ps6ettzse8hmoa37nurua7faupjhc\",\n    \"amount\": \"15621963968634827029081574961\",\n    \"hash\": \"0E889F83E28152A70E87B92D846CA3D8966F3AEEC65E11B25F7B4E6760C57CA3\",\n    \"confirmation_type\": \"active_quorum\",\n    \"election_info\": {\n      \"duration\": \"546\",\n      \"time\": \"1564935348219\",\n      \"tally\": \"42535295865117307936387010521258262528\",\n      \"request_count\": \"1\", // since V20.0\n      \"blocks\": \"1\", // since V21.0\n      \"voters\": \"52\" // since V21.0\n    },\n    \"block\": {\n      \"type\": \"state\",\n      \"account\": \"nano_1tgkjkq9r96zd3pkr7edj8e4qbu3wr3ps6ettzse8hmoa37nurua7faupjhc\",\n      \"previous\": \"4E9003ABD469D1F58A70518234016797FA654B494A2627B8583052629A91689E\",\n      \"representative\": \"nano_3rw4un6ys57hrb39sy1qx8qy5wukst1iiponztrz9qiz6qqa55kxzx4491or\",\n      \"balance\": \"0\",\n      \"link\": \"3098F4C0D1D8BD889AF078CDFF81E982B8EFA6D6D8FAE954CF0CDC7A256C3F8B\",\n      \"link_as_account\": \"nano_1e6rym1f5p7xj4fh1y8fzy1ym1orxymffp9tx7cey58whakprhwdzuk533th\",\n      \"signature\": \"D5C332587B1A4DEA35B6F03B0A9BEB45C5BBE582060B0252C313CF411F72478721F8E7DA83A779BA5006D571266F32BDE34C1447247F417F8F12101D3ADAF705\",\n      \"work\": \"c950fc037d61e372\",\n      \"subtype\": \"send\"\n    }\n  }\n}\n```\n\n---\n\n### Votes\n\n!!! warning \"Experimental, unfinished\"\n    This subscription is experimental and not all votes are broadcasted. The message format might change in the future.\n\n##### Subscribing\n\nTo subscribe to all votes notifications:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"vote\"\n}\n```\n\n##### Filtering options\n\nThe following filtering options can be combined.\n\n###### Representatives\n\nUsed to subscribe only to votes from selected representatives. Once filters are given, votes from representatives that do not match the options are not broadcasted. If the result is an empty filter (for example, all given accounts are invalid), then the filter is not used. A message is logged in the node logs when this happens.\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"vote\",\n  \"options\": {\n    \"representatives\": [\n      \"nano_16c4ush661bbn2hxc6iqrunwoyqt95in4hmw6uw7tk37yfyi77s7dyxaw8ce\",\n      \"nano_3dmtrrws3pocycmbqwawk6xs7446qxa36fcncush4s1pejk16ksbmakis32c\"\n    ]\n  }\n}\n```\n\n###### Vote type\n\nVotes are one of three types:\n\n- `replay` , if this exact vote had been seen before\n- `vote`, if it is the first time the vote has been seen\n- `indeterminate`, when it cannot be determined due to a lack of an associated election\n\nBy default only `vote` type votes are broadcasted, and the others are filtered. To disable these filters set `include_replays` to `true` and/or `include_indeterminate` to `true`.\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"vote\",\n  \"options\": {\n    \"include_replays\": \"true\",\n    \"include_indeterminate\": \"true\"\n  }\n}\n```\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"vote\",\n  \"time\": \"1554995525343\",\n  \"message\": {\n    \"account\": \"nano_1n5aisgwmq1oibg8c7aerrubboccp3mfcjgm8jaas1fwhxmcndaf4jrt75fy\",\n    \"signature\": \"1950700796914893705657789944906107642480343124305202910152471520450456881722545967829502369630995363643731706156278026749554294222131169148120786048025353\",\n    \"sequence\": \"855471574\",\n    \"timestamp\": \"1554995525138\",\n    \"blocks\": [\n      \"6FB9DE5D7908DEB8A2EA391AEA95041587CBF3420EF8A606F1489FECEE75C869\"\n    ],\n    \"type\": \"replay\" // since V21.0, can be vote/replay/indeterminate\n  }\n}\n```\n\n**NOTE:** The `timestamp` field is a Unix timestamp in milliseconds for non-final votes, and the maximum integer value for the field (`18446744073709551615`) indicates it is a [final vote](https://docs.nano.org/node-implementation/voting/#final-votes).\n\n---\n\n### Stopped elections\n\nIf an election is stopped for any reason, the corresponding block hash is sent on the `\"stopped_election\"` topic. Reasons for stopping elections include low priority elections being dropped due to processing queue capacity being reached, and forced processing via [`process`](/commands/rpc-protocol/#process) RPC when there's a fork.\n\n##### Subscribing\n\nTo subscribe to all stopped elections notifications:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"stopped_election\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `stopped_election` topic.\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"stopped_election\",\n  \"time\": \"1560437195533\",\n  \"message\": {\n    \"hash\": \"FA6D344ECAB2C5E1C04E62B2BC6EE072938DD47530AB26E0D5A9A384302FBEB3\"\n  }\n}\n```\n\n---\n\n### Started elections\n\nWhen an election is started, the corresponding block hash is sent on the `\"started_election\"` topic.\n\n##### Subscribing\n\nTo subscribe to all started elections notifications:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"started_election\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `started_election` topic.\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"started_election\",\n  \"time\": \"1674765709226\",\n  \"message\": {\n    \"hash\": \"FD8639F0AD19895B1A3A430DD5B4DCA5A2F713E7DD1CC8DCD5E90D5AE2BCA835\"\n  }\n}\n```\n\n---\n\n### Proof of work\n\nThis subscription is available since _v20.0_\n\n##### Subscribing\n\nTo subscribe to PoW generation notifications:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"work\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `work` topic.\n\n##### Sample Results\n\nSuccessful work generation:\n\n```json\n{\n  \"success\": \"true\",\n  \"reason\": \"\",\n  \"duration\": \"306\",\n  \"request\": {\n    \"hash\": \"3ECE2684044C0EAF2CA6B1C72F11AFC5B5A75C00CFF993FB17B6E75F78ABF175\",\n    \"difficulty\": \"ffffff999999999a\",\n    \"multiplier\": \"10.000000000009095\",\n    \"version\": \"work_1\" // since V21.0\n  },\n  \"result\": {\n    \"source\": \"192.168.1.101:7000\",\n    \"work\": \"4352c6e222703c57\",\n    \"difficulty\": \"ffffffd2ca03b921\",\n    \"multiplier\": \"22.649415016750655\"\n  },\n  \"bad_peers\": \"\"\n}\n```\n\nWork generation cancelled with one bad peer (unresponsive or provided invalid work):\n\n```json\n{\n  \"success\": \"false\",\n  \"reason\": \"cancelled\",\n  \"duration\": \"539\",\n  \"request\": {\n    \"hash\": \"3ECE2684044C0EAF2CA6B1C72F11AFC5B5A75C00CFF993FB17B6E75F78ABF175\",\n    \"difficulty\": \"ffffff999999999a\",\n    \"multiplier\": \"10.000000000009095\"\n  },\n  \"bad_peers\": [\n    \"192.168.1.101:7000\"\n  ]\n}\n```\n\nNotes:\n\n- The duration is in milliseconds\n- If work generation fails, the notification is similar to the work cancelled notification, except `\"reason\": \"failure\"`\n- When work generation is done locally it will show `\"source\": \"local\"`\n\n---\n\n### Node telemetry\n\nThis subscription is available since _v21.0_\n\n##### Subscribing\n\nTo subscribe to telemetry response notifications from **other nodes on the network**:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"telemetry\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `telemetry` topic.\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"telemetry\",\n  \"time\": \"1594654710305\",\n  \"message\": {\n    \"block_count\": \"51571901\",\n    \"cemented_count\": \"51571901\",\n    \"unchecked_count\": \"0\",\n    \"account_count\": \"1376750\",\n    \"bandwidth_cap\": \"10485760\",\n    \"peer_count\": \"261\",\n    \"protocol_version\": \"18\",\n    \"uptime\": \"1223618\",\n    \"genesis_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n    \"major_version\": \"21\",\n    \"minor_version\": \"0\",\n    \"patch_version\": \"0\",\n    \"pre_release_version\": \"0\",\n    \"maker\": \"0\",\n    \"timestamp\": \"1594654710521\",\n    \"active_difficulty\": \"ffffffc000000000\",\n    \"database_backend\": \"lmdb\",\n    \"confirmation_latency_ms_p50\": \"254\",\n    \"confirmation_latency_ms_p90\": \"510\",\n    \"confirmation_latency_ms_p99\": \"1205\",\n    \"bootstrap_status\": \"idle\",\n    \"node_id\": \"node_3cczh431wuh5gg64jen6a658xewpx7eiyfqn7f8gpdcfp786s7xdb51kr1rp\",\n    \"signature\": \"C9429FBC069F15E9AE552FB80500B4BA0F0CF2E25DD6C6D2018FA1D96DC4353A75E4A86872E54E7B2BFF06526719076E792DA3C83F1B2FD40244804EAC324C00\",\n    \"address\": \"::ffff:139.180.168.194\",\n    \"port\": \"7075\"\n  }\n}\n```\nSee the [telemetry](../commands/rpc-protocol.md#telemetry) RPC command which gives more information about the message response.  \n\n\n### New unconfirmed blocks\n\nThis subscription is available since _v21.0_\n\n!!! danger \"These blocks are not confirmed\"\n    Blocks received through this websocket should **not** be used for tracking confirmations, as they are unconfirmed and could be replaced by a conflicting block. Read the [confirmation tracking guide](/integration-guides/block-confirmation-tracking/) for more details.\n\n##### Subscribing\n\nTo subscribe to node telemetry response notifications:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"new_unconfirmed_block\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `new_unconfirmed_block` topic.\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"new_unconfirmed_block\",\n  \"time\": \"1766522219507\",\n  \"hash\": \"8FFD259D1C512D950EE6478C80EF01BE72DCF6AABAE3CFAECAE69BCF40BB4C02\",\n  \"message\": {\n    \"type\": \"state\",\n    \"account\": \"nano_1tipnanogsu7q59pnie3qfc4w378wm43fg4ksqc8wmnnfnizrq1xrpt5geho\",\n    \"previous\": \"C05B995C518530876CF8AB876FD93577955A51D05971A19CDE243514B5A25F47\",\n    \"representative\": \"nano_1tipnanogsu7q59pnie3qfc4w378wm43fg4ksqc8wmnnfnizrq1xrpt5geho\",\n    \"balance\": \"117650323123112288832984294209891\",\n    \"link\": \"B5BE5A8ECFA6B37EF72B871A78522C7D70AB1163CC21818C017FB8FDC1C8181A\",\n    \"link_as_account\": \"nano_3ffydc9ezbomhuukq3rth3b4rzdioeap9m33i8814zxrzq1wi81t5zjighc1\",\n    \"signature\": \"1908E09F34F5132442761E02A2FBB52516881DD3063434327DE5C1C78ECD2E50DBD83B7DE029D72330E32E0DA4D468E66B12788E773EE1B85199A02B5E996009\",\n    \"work\": \"64277ffb135de20c\",\n    \"subtype\": \"send\"\n  }\n}\n```\n\n---\n\n### Bootstrap\n\nThis subscription is available since _v21.0_\n\n##### Subscribing\n\nTo subscribe to bootstrap attempts start/exit notifications:\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"bootstrap\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `bootstrap` topic.\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"bootstrap\",\n  \"time\": \"1561661740065\",\n  \"message\": {\n    \"reason\": \"started\",\n    \"id\": \"C9FF2347C4DF512A7F6B514CC4A0F79A\",\n    \"mode\": \"legacy\"\n  }\n}\n```\n\n```json\n{\n  \"topic\": \"bootstrap\",\n  \"time\": \"1561661740565\",\n  \"message\": {\n    \"reason\": \"exited\",\n    \"id\": \"C9FF2347C4DF512A7F6B514CC4A0F79A\",\n    \"mode\": \"legacy\",\n    \"total_blocks\": \"1000000\",\n    \"duration\": \"500\"\n  }\n}\n```\n\nNotes:\n\n- The duration is in seconds\n\n---\n\n## Removed Topics\n\n### Active difficulty\n_removed in version 22.0_\n\n##### Subscribing\n\nTo subscribe to all active difficulty notifications:\n\n```json\n{\n  \"action\": \"subscribe\",\n  \"topic\": \"active_difficulty\"\n}\n```\n\n##### Filtering options\n\nNo filters are currently available for the `active_difficulty` topic.\n\n##### Sample Results\n\n```json\n{\n  \"topic\": \"active_difficulty\",\n  \"time\": \"1561661736065\",\n  \"message\": {\n    \"multiplier\": \"1.5\",\n    \"network_current\": \"fffffffaaaaaaaab\",\n    \"network_minimum\": \"fffffff800000000\",\n    \"network_receive_current\": \"fffffff07c1f07c2\", // since V21.2\n    \"network_receive_minimum\": \"fffffe0000000000\" // since V21.2\n  }\n}\n```\n"
  },
  {
    "path": "docs/integration-guides/work-generation.md",
    "content": "title: Work Generation Guide\ndescription: Understand the best configurations for work generation on the nano network\n\n!!!tip \"Some sections of this page target node version 21 or higher\"\n\nEvery block published to the network, whether a send, receive or representative change block, requires a small, valid [Proof-of-Work](../glossary.md#proof-of-work-pow) to be completed above a minimum difficulty floor (threshold). As of V21 this threshold is different for different block types: send and change blocks require a higher threshold, while receive blocks are lower.\n\nThis work value is not used in consensus, but instead is one of the first pieces of data used to validate blocks on the network and is a key component of maintaining consistent quality of service on the network.\n\n## System considerations\n\nThe following configuration options should be taken into careful consideration when planning work generation resources for services integrating with Nano. These options should be combined to provide the best separation of resources between node participation on network vs. work generation needs.\n\n!!! warning \"Representatives should avoid heavy RPC use and work generation\"\n    Supporting the network by running a representative is recommended for many services, however it is not recommended that voting nodes are used for heavy RPC or work generation activities. Wherever possible, integrations should utilize separate machines for their integration nodes and consensus-producing, voting nodes.\n\n### CPU vs. GPU\n\nAs GPUs provide faster and more energy efficient work generation than CPUs, and reduce RPC delays during heavy usage periods, they are preferred for any setups able to utilize them. In cases where the node is running on the same machine where work generation is done, GPUs are highly recommended to avoid performance impacts to the node that relying CPU cores can cause.\n\n### Choosing a machine\n\nUsing a separate machine to manage work generation is recommended where possible. The machine running the node should have a minimum of dedicated resources to keep in sync with the network and any potential interruption due to work generation activities should be avoided. Note that this separation introduces latency, so efforts should be done to keep that to a minimum including running machines in the same region or cluster, avoiding routing work requests through external edge networks, etc.\n\n### Software for work generation\n\nAlthough the node can be configured to generate work directly, there are plans to separate work generation from the node into its own application and process. To help prepare for this future architecturs the preferred setup today is to use the [Nano Work Server](https://github.com/nanocurrency/nano-work-server) for work generation.\n\n### Number of work peers\n\nTo provide a more robust and redundant work generation setup, multiple [work peers](#nodework_peers) can be used. Any node configured with multiple peers will make requests serially from the list of work peers until a successful response is received.\n\n!!! tip \"Disable local CPU work generation\"\n\tSince using the same CPU resources the node relies on for work generation can cause performance issues, local CPU work generation should be turned off by setting [`node.work_threads`](#nodework_threads) = `0` when using work peers.\n\n## Recommended configurations\n\nBelow are common, recommended configurations for planning work generation needs. Based on the considerations outlined above, the following general rules apply when planning resources:\n\n- GPU-based work generation is recommended wherever reasonable\n- Running the [Nano Work Server](https://github.com/nanocurrency/nano-work-server) is preferred, regardless of machine or CPU/GPU decisions\n- CPU-based work generation on the same machine the node is running is not recommended\n\n### Heavy RPC, regular work generation\n\nServices with heavy RPC calls and work generation can benefit from ensuring dedicated resources exist for each process separately. To maximize performance a separate machine running the [Nano Work Server](https://github.com/nanocurrency/nano-work-server) with a GPU attached is recommended:\n\n1. Setup a machine separate from the node with GPU attached\n1. Install the [Nano Work Server](https://github.com/nanocurrency/nano-work-server/blob/master/README.md#installation)\n1. Setup a service to start and monitor the work server process using the GPU option `--gpu <PLATFORM:DEVICE>` and run `nano-work-server --help` for additional options and details\n1. Configure the machine running the node to allow traffic over TCP from the work generation machine's IP address\n1. Add the work machine IP address as a [work peer](#nodework_peers) in the node's `config-node.toml` file\n\n!!! info \"CPU for lower generation levels\"\n\tFor services with heavier RPC usage but less work generation needs excluding the GPU in the above example and relying on the CPU resources of the separate machine is also an option. This can be done by setting [`node.work_threads`](#nodework_threads) to the appropriate thread count for your needs.\n\n\tMake sure to benchmark the machine performance to plan for any potential spikes, as CPU generation is slower.\n\n### Light RPC, regular work generation\n\nServices where RPC usage is lighter but regular work generation is needed could move work generation to the same machine if a GPU is used:\n\n1. Install the [Nano Work Server](https://github.com/nanocurrency/nano-work-server/blob/master/README.md#installation) on the same machine as the node\n1. Setup a service to start and monitor the work server process with options for using the GPU - `--gpu <PLATFORM:DEVICE:THREADS>` is required, run `nano-work-server --help` for additional options and details\n1. Configure the node to prevent local CPU work generation by setting [`node.work_threads`](#nodework_threads) = `0`\n\n!!! info \"Node work generation option\"\n\tA less preferred alternative to setting up, running and monitoring the Nano Work Server is to use the node itself to generate work. This should only be done with an attached GPU by setting up and enabling OpenCL with [`opencl.enable`](#openclenable) = `true` and adusting `opencl.device` and `opencl.platform` to match your setup.\n\n---\n\n## Practical guides\n\n### Work generated using the node, incl. work peers\n\n<div class=\"mermaid-wrapper\">\n\n``` mermaid\ngraph TD\n    A{Block signing<br> location?}\n    A -->|in the node| B[<a href='/commands/rpc-protocol/#block_create'><b>RPC block_create</b></a><br>no <i>&quotwork&quot</i>]\n    A -->|not in the node| C_1(Create and sign <b>block</b>)\n    B -->block((block))\n    C_1 -->|block| C_2[<a href='/commands/rpc-protocol/#work_generate'><b>RPC work_generate</b></a><br><i>&quotblock&quot: </i><b>block</b>]\n    C_2 -->|work| C_3(Use <b>work</b> in <b>block</b>)\n    C_3 -->block\n    block -->D[<a href='/commands/rpc-protocol/#process'><b>RPC process</b></a>]\n```\n\n</div>\n\n### Work generated without using the node\n\n<div class=\"mermaid-wrapper\">\n\n``` mermaid\ngraph TD\n    P_1(Generate work at<br><b><a href='#difficulty-thresholds'>default difficulty thresholds</a></b>)\n    P_1 -->|work| P_2(Use <b>work</b> in block)\n    P_2 -->P_3((block))\n    P_3 -->P_4[<a href='/commands/rpc-protocol/#process'><b>RPC process</b></a>]\n    P_4 -->P_5(<a href='/integration-guides/block-confirmation-tracking/'>Track block confirmation</a>)\n```\n\n</div>\n\n---\n\n## Node Configuration\n\nThe following configuration options can be changed in `config-node.toml`. For more information on the location of this file, and general information on the configuration of the node, see the [Configuration](../running-a-node/configuration.md) page.\n\n### opencl.enable\n\n!!!success \"When GPU acceleration is enabled, the CPU is also used by default\"\n\tMake sure to set `node.work_threads` to `0` when using the GPU\n\nTo enable GPU acceleration for work generation, set this option to `true`. The `opencl.platform` and `opencl.device` values may need to be changed if you have multiple OpenCL-enabled devices.\n\n### node.work_threads\n\n!!!tip \"Recommended value: `node.work_threads = 0`\"\n\nDetermines the number of local CPU threads to used for work generation. **While enabled by default, it is [recommended](#recommended-configurations) to turn off local CPU work generation.**\n\nSet to `0` to turn off local CPU work generation.\n\n### node.work_peers\nUsed when offloading work generation to another node or service. Format must be ipv6, preceded by `::ffff:` if ipv4. Hostnames are supported since v21. Calls are made to the address:port designated using the standard RPC format [work_generate](../commands/rpc-protocol.md#work_generate). Example:\n\n```toml\n[node]\nwork_peers = [\n    \"example.work-peer.org:7000\",\n    \"::ffff:192.168.1.25:7076\"\n]\n```\n\n### node.max_work_generate_multiplier\n\nSets a limit on the generation difficulty. Multiplier is based off the [base difficulty threshold](#difficulty-thresholds). If the node is setup as a work peer itself, requests for work higher than this limit are ignored. Default value is `64`.\n\n---\n\n## Benchmarks\n\n### Benchmark commands\n\n\n**Nano PoW Benchmarking tool**\n\nThe [Nano PoW Benchmark](https://github.com/koczadly/nano-pow-benchmark) tool is the preferred approach for benchmarking OpenCL-enabled hardware such as GPUs.\n\nNote that the system must have Java 8 (or above) installed, and that only OpenCL devices are supported by this tool. For testing unsupported processors such as CPUs, consider using the _Nano Work Server_ listed below.\n\n**Nano Work Server**\n\nThe [Nano Work Server](https://github.com/nanocurrency/nano-work-server) also offers built-in support for benchmarking, as shown in [this example](https://github.com/nanocurrency/nano-work-server#benchmarking).\n\n**Node RPC**\n\n1. Setup and run a node with RPC enabled, control enabled, and the desired configuration including work peers.\n1. Use the script from [blake2b-pow-bench](https://github.com/guilhermelawless/blake2b-pow-bench).\n\n**Node local work generation**\n\nNote that these commands do not use the configuration of the node. Prefer using the alternative above for that purpose, such as changing the number of threads for CPU work generation, or using work peers.\n\n[CPU](../commands/command-line-interface.md#-debug_profile_generate) with all available threads: `nano_node --debug_profile_generate [--difficulty fffffff800000000] [--multiplier 1.0]`\n\n[GPU](../commands/command-line-interface.md#-debug_opencl) acceleration: `nano_node --debug_opencl --platform=0 --device=0 [--difficulty fffffff800000000] [--multiplier 1.0]`\n\nThe command will trigger continual work generation, so let it run until a sufficient sample size of times are generated (at least 100 instances). Compute the average of these times which are the number of microseconds it took to generate each sample.\n\n### Example benchmarks\n\nBelow are work generation benchmarks from a variety of consumer-grade CPUs and GPUs. All values are presented in **# work/second generated**. See the [difficulty thresholds section](#difficulty-thresholds) below for details about values required for different epoch versions and block types.\n\n| **Device** | **Epoch v1**<br />All Blocks | **Epoch v2**<br />Send/Change Blocks | **Epoch v2**<br />Receive Blocks |\n|--------|-|-|-|\n| Nvidia GTX 1080 | 26.24 | 3.32 | 203.42 |\n| Nvidia Tesla P100 (Google Cloud) | 29.28 | 3.63 | 220.35 |\n| Nvidia RTX 2080 Ti | 47.27 | 5.48 | 357.23 |\n| Nvidia Tesla V100 (Google Cloud) | 57.48 | 7.25 | 420.33 |\n| AMD R9 290 | 14.57 | 1.92 | 94.47 |\n| AMD RX Vega 64 | 30.77 | 3.79 | 232.56 |\n| AMD Vega 8 @1750MHz | 3.45 | 0.55 | 23.81 |\n| AMD R7-4800U @2.8GHz AVX2 | 0.64 | 0.06 | 3.70 |\n| AMD R5-3600 @4.07GHz | 0.59 | 0.09 | 3.51 |\n| AMD R9-3900X @3.97GHz AVX2 | 1.97 | 0.26 | 15.64 |\n| Intel Core i7 6700 @3.7GHz AVX2 | 0.65 | 0.07 | 5.25 |\n| Intel HD Graphics 530 @1.25GHz | 0.47 | 0.06 | 3.72 |\n\n---\n\n## Work calculation details\n\n### Work equation\n\nThe `\"work\"` field in transactions contains a 64-bit [nonce](https://en.wikipedia.org/wiki/Cryptographic_nonce) found using the [blake2b hash function](https://blake2.net/).  The nonce satisfies the following equations depending on block height:\n\n**Block Height 1**\n\nThe first block on an account-chain doesn't have a previous (head) block, so the account public key is used (`||` means concatenation):\n\n$$\nblake2b(\\text{nonce} || \\text{public_key}) \\ge \\text{threshold}\n$$\n\n**Block Height 2 and up**\n\nOnce an account has an existing block the previous block hash is used for all blocks going forward:\n\n$$\nblake2b(\\text{nonce} || \\text{prev_block_hash}) \\ge \\text{threshold}\n$$\n\n### Difficulty thresholds\n\nThe mainnet's base difficulty threshold is currently `fffffff800000000` for all subtype send or change blocks and `fffffe0000000000` for all receive, open or epoch blocks. These split difficulties were set as part of the [network upgrade to increase difficulty](../releases/network-upgrades.md#increased-work-difficulty) completed at the end of August 2020.\n\nPrevious difficulty levels are outlined below as well for historical reference, but currently the epoch v2 thresholds are required when publishing new blocks to the network:\n\n| Epoch version | Block Subtype          | Difficulty Threshold |\n|               |                        |                      |\n| 1             | All                    | `ffffffc000000000`   |\n| 2             | Send or change         | `fffffff800000000`   |\n| 2             | Receive, open or epoch | `fffffe0000000000`   |\n\n**Note:** A block is only considered a subtype `change` block if the only action it takes is changing the representative field (no balance change). So `receive` subtype blocks with a representative change will still have the lower `receive` difficulty threshold applied.\n\nFor a block to be valid, its work field must satisfy the above work equations using this value for threshold.\n\n**Development node wallet behavior**\n\nThe developer wallet included with the node is configured to pre-cache work at the base threshold.\n\n**Difficulty management for external integrations**\n\nFor services aiming to ensure the highest priority on their transactions, the confirmation of published blocks should be monitored by their integration and work levels compared against active difficulty in a similar fashion to the development wallet mentioned above. If work is left at base difficulty there could be delays in the transactions being processed during heavy network usage times.\n\n### Pre-caching\n\nWork for an account can be pre-cached and saved for immediate use on an account as long as it was based on the current frontier block at the time of use. Although this customization must be made externally to the node, it can help level out potential spikes in work generation, especially useful with wallet implementations.\n\nTo accomplish this, after a block is published for an account (whatever type of block), note the _**hash**_ of that block and use it in a RPC [work_generate](../commands/rpc-protocol.md#work_generate) call. Note that you may require setting `“use_peers”: “true”`.\n\nUpon receiving a response, store its value in your database for later use for that account. Note that after a new block is published for the account, that value will no longer be a valid work value.\n\n**Pre-caching when next block type is unknown**\n\nWith V21+ the work difficulty thresholds were split by block type. For many integrations, such as wallet providers, the context of what type of block will be generated next for an account is unknown. The recommendation for these cases is to generate difficulty at the higher threshold of a send/change block to ensure delays are avoided and the best user experience is available when using wallets.\n\n**Utilizing lower work when batching**\n\nFor services that process receiving their pending transactions in bulk the lower work threshold of receive blocks can be taken advantage of. In doing so, the difficulty is 64x lower than a send/change block.\n\n### Difficulty multiplier\n\n!!! info \"Work difficulty no longer used for prioritization\"\n    Due to changes in prioritization in V22.0 the relative difficulty of work values is no longer used to prioritize the order of transactions. The below details describe how to calculate this relative difficulty for reference, but it is no longer used by the node.\n\nRelative difficulty, or difficulty multiplier, describes how much more value a PoW has compared to another. This can be obtained with the following expression:\n\n$$\n\\frac{(2^{64} - \\text{base_difficulty})}{(2^{64} - \\text{work_difficulty})}\n$$\n\nIn the inverse direction, in order to get the equivalent difficulty for a certain multiplier, the following expression can be used.\n\n$$\n2^{64} - \\frac{2^{64} - \\text{base_difficulty}}{\\text{multiplier}}\n$$\n\n??? example \"Code Snippets\"\n    === \"Python\"\n        ```python\n        def to_multiplier(difficulty: int, base_difficulty) -> float:\n          return float((1 << 64) - base_difficulty) / float((1 << 64) - difficulty)\n\n        def from_multiplier(multiplier: float, base_difficulty: int = NANO_DIFFICULTY) -> int:\n          return int((1 << 64) - ((1 << 64) - base_difficulty) / multiplier)\n        ```\n\n    === \"Rust\"\n        ```rust\n        fn to_multiplier(difficulty: u64, base_difficulty: u64) -> f64 {\n          (base_difficulty.wrapping_neg() as f64) / (difficulty.wrapping_neg() as f64)\n        }\n\n        fn from_multiplier(multiplier: f64, base_difficulty: u64) -> u64 {\n          (((base_difficulty.wrapping_neg() as f64) / multiplier) as u64).wrapping_neg()\n        }\n        ```\n\n    === \"C++\"\n        ```cpp\n        double to_multiplier(uint64_t const difficulty, uint64_t const base_difficulty) {\n          return static_cast<double>(-base_difficulty) / (-difficulty);\n        }\n\n        uint64_t from_multiplier(double const multiplier, uint64_t const base_difficulty) {\n          return (-static_cast<uint64_t>((-base_difficulty) / multiplier));\n        }\n        ```\n"
  },
  {
    "path": "docs/javascript/mermaid-loose-security.js",
    "content": "var mermaid_config = {\n\tstartOnLoad:true,\n\tsecurityLevel:'loose',\n};\n\nmermaid.initialize(mermaid_config);"
  },
  {
    "path": "docs/living-whitepaper/index.md",
    "content": "title: Living Whitepaper\ndescription: Overview of the living whitepaper on the Nano protocol and existing node implementation\n\n# Nano - Digital money for the modern world\n\n--8<-- \"wip-living-whitepaper.md\"\n\n--8<-- \"contributing-code.md\"\n\nThe original whitepaper for Nano was last updated in November 2017, and since then, many improvements to the protocol have been made. The current node implementation has received updates every few months on average since 2018.[^1] As these updates continue to make the network stronger over time, the static nature of a traditional whitepaper required too much effort to continually update and publish. To ensure information about Nano is kept as up-to-date as possible, a new \"Living Whitepaper\" is being managed through the existing documentation website, which is easier to update and is open source.[^2]\n\n## Protocol vs. Node\n\nThe two main sections of the Living Whitepaper are the [Protocol Design](../protocol-design/introduction.md) and [Node Implementation](../node-implementation/introduction.md). Although they were structured to split the required elements to conform to the protocol (Protocol Design) away from optional improvements built into the current node (Node Implementation), there is some overlap between them. Where possible, these overlaps have been highlighted; however, those interested in [contributing to the development of the protocol](../core-development/overview.md) or building another node implementation should analyze more closely the differences between these to ensure the necessary rules are followed.\n\n### [Protocol Design](../protocol-design/introduction.md)\n\nThis section contains details of the different messages shared between nodes and common data structures, which allow data to be stored and communicated consistently across the network. Because Nano is decentralized and uses network-wide consensus to validate transactions, participating on the network requires following the message and data designs, otherwise attempts at transacting will be ignored or not properly confirmed by the network.\n\nMany changes done to elements outlined here require a change in the [protocol version](../glossary.md#protocol-version) in addition to the [node version](../glossary.md#node-version).\n\n### [Node Implementation](../node-implementation/introduction.md)\n\nThis section expands into methods and mechanisms built into the current node software that aren't required for compliance with protocol rules, but help provide better efficiency and performance for nodes running on the network. These details could be ignored or implemented in different ways by different types or versions of node software, while still maintaining compatibility with other nodes.\n\n---\n\nExisting whitepaper sections related to this page: \n\n* [Introduction](../whitepaper/english.md#introduction)\n* [Background](../whitepaper/english.md#background)\n\nOther existing content related to this page:\n\n* [Nano Overview](../what-is-nano/overview.md)\n* [Representatives and Voting](../what-is-nano/overview.md#representatives-and-voting)\n* [Incentives to run a node](https://medium.com/nanocurrency/the-incentives-to-run-a-node-ccc3510c2562)\n\n[^1]: Node Releases: https://docs.nano.org/releases/node-releases/\n[^2]: Nano Documentation Repository: https://github.com/nanocurrency/nano-docs/\n"
  },
  {
    "path": "docs/node-implementation/blocks.md",
    "content": "title: Node Implementation - Blocks\ndescription: Review of block handling in the current nano node implementation\n\n# Node Implementation - Blocks\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Block publishing and propagation\nNodes use a modified gossip protocol for message distribution that enables quick distribution of blocks and votes across the network while distributing the load required to propagate messages across multiple nodes rather than each node having to respond to requests from every other node.  Prioritization of messages are focused on the Principal Representative nodes that make up the core consensus mechanism where they receive blocks and votes directly from other nodes and then messages are spread to the rest of the network via gossiping.\n\nBlocks are initially broadcast and propagated across the network to different types of nodes based on the blocks status. Some basic rules are listed below:\n\n- Nodes initially publish new blocks on the live network to **all Principal Representatives they can connect to** and a subset of Non Principal Representative nodes.\n- When a node processes a new block that is not a known fork, or is a known fork and the block becomes the new winner on an election, nodes will republish that block to `sqrt(peers)`.\n\nOn average, this gossiping results in blocks arriving multiple times at each node. To help reduce node resource usage, there are duplicate block filters in place to prevent reprocessing of the same blocks.\n"
  },
  {
    "path": "docs/node-implementation/components.md",
    "content": "title: Node Implementation - Components\ndescription: A breakdown of the various components making up the nano node implementation\n\n# Node Implementation - Components\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Overview (diagram)\n\n---\n\n## Node\n\n### Ledger\n\n---\n\n## Node wallet (dev only)\n\n---\n\n## Work generation\n\n---\n\n## Communications\n\n### RPC server\n\n### IPC\n\n### CLI\n\n### WebSockets\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Implementation](/whitepaper/english/#implementation)"
  },
  {
    "path": "docs/node-implementation/database.md",
    "content": "title: Node Implementation - Database\ndescription: Learn how the ledger is managed in the various tables and backend database options on the nano node\n\n# Node Implementation - Database\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Ledger\n\n### Blocks\n\n### Pending blocks\n\n### Accounts\n\n### Caching\n\n---\n\n## Block cementing\n\n---\n\n## Database backends\n\n### LMDB\n\n### RocksDB\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Implementation](/whitepaper/english/#implementation)\n\nOther content related to this page:\n\n* [Ledger Management guide](../running-a-node/ledger-management.md)"
  },
  {
    "path": "docs/node-implementation/introduction.md",
    "content": "title: Node Implementation - Introduction\ndescription: An overview of the nano node implementation being developed by the Nano Foundation and broader Nano community\n\n# Node Implementation - Introduction\n\n--8<-- \"wip-living-whitepaper.md\"\n\nMethods and mechanisms built into the current node software that aren't required for compliance with protocol rules, but help provide better efficiency and performance for nodes running on the network. These details could be ignored or implemented in different ways by other versions of node software.\n\n## Context and scope\n\n---\n\n## Efficiency and security\n\n---\n\n## Determinism\n\n---\n\n## Choice of language and framework\n\n---\n\n## Github links\n\n### Contributing\n\n---\n\n| Section | Description |\n|---------|-------------|\n| [Components](components.md) | Breakdown of separate functional areas of the node | \n| [Database](database.md) | Storage and cementing mechanisms, backend database options | \n| [Voting](voting.md) | Vote handling and voting weight management | \n| [Work](work.md) | Kernel designs, prioritization processes and rework mechanisms | \n| [Contributing](/node-implementation/contributing/) | How to contribute to the Nano protocol directly | \n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Implementation](/whitepaper/english/#implementation)"
  },
  {
    "path": "docs/node-implementation/networking.md",
    "content": "title: Node Implementation - Networking\ndescription: Details of networking setup design for the nano node\n\n# Node Implementation - Networking\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Peering process\n\nInitial peering pulls the IP addresses and domains from the `node.preconfigured_peers` setting in `config-node.toml` file. The default domain of `peering.nano.org` is included, which contains a list of known nodes of high trust, availability and performance - mostly nodes maintained by the Nano Foundation. Due to the [peering process defined by the protocol](../protocol-design/networking.md#peering-process), this initial list is quickly expanded to discovery of the full network via random peer IP sharing on keepalives."
  },
  {
    "path": "docs/node-implementation/voting.md",
    "content": "title: Node Implementation - Voting\ndescription: Review the various aspects of voting and vote management in the nano node implementation\n\n# Node Implementation - Voting\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Vote rebroadcasting\n\nWhen a block is processed, Principal Representatives evaluate whether they can generate a vote for the block (dependent blocks already confirmed, etc.). If they can, they generate the vote and publish to all other PRs they are aware of in addition to `2*sqrt(peers)` of non-PR nodes.  To reduce the load on PRs nodes, they do not republish incoming votes - only Non-PR nodes republish other votes to `1/2*sqrt(peers)` to ensure enough coverage across the rest of the network.\n\nDue to the direct 1:1 relationship between PR nodes, their latency is mostly geographic/network based. For Non-PRs, there is some gossiping via the random distribution, so the number of hops required is what makes up a majority of the latency and the geographic and network latency is less of a factor.\n\n---\n\n## Final votes\n\nNodes will treat votes differently depending on the value of their timestamp field, which results in two phases of voting. These votes can be considered non-final votes and final votes.\n\nNon-final votes are generated when a node is ready to vote on a block and it has not seen enough vote weight to reach quorum. This non-final vote will have the current Unix time stamp in seconds in the timestamp field.\n\nOnce quorum is reached from votes received, the node will then generate a new final vote for the same block where the timestamps field contains the maximum value possible: `18446744073709551615`.\n\nIn the above cases when evaluating quorum for generating a final vote, both non-final votes and final votes can be included. But a node will only consider a block confirmed when quorum is reached with all final votes. At that point the triggering of confirmation notifications, updating of confirmation heights, etc. occurs.\n\n---\n\n## Rep crawler\n\nThe rep crawler is a repeating process to help track the online (actively voting) status of representatives. Although typical network activity highly propagates votes to many nodes on the network, there is no guarantee that a given node will receive a recent vote from a particular representative.\n\nTo help fill these potential gaps in online status, the rep crawler pulls a set of random representatives from its peers list - either 15 entries if the weight of peers is higher than quorum delta, otherwise 50 entries - and sends confirmation requests to them for a randomly chosen block in the local ledger.\n\nIf the confirmation acknowledgement is returned for those peers they will be considered online and actively voting. This ongoing crawl happens every 7 seconds on the live, beta and test networks, and every 0.1 seconds on the dev network for unit test purposes.\n\n---\n\n## Online weight calculator\n\nWhenever a vote signed by a particular representative is processed by the node, it will consider that representative to be online and included in the online weight calculations. This online status will remain for a period of 5 minutes after the vote processing and the clock will reset back to 5 minutess when additional voting is seen.\n\nThis online status is counted regardless of where the vote originated from - the [rep crawler](#rep-crawler), live voting activity, etc.\n\n---\n\n## Active transactions loop\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Implementation](/whitepaper/english/#implementation)\n\nOther content related to this page:\n\n* [Voting as a Representative guide](../running-a-node/voting-as-a-representative.md)\n"
  },
  {
    "path": "docs/node-implementation/work.md",
    "content": "title: Node Implementation - Work\ndescription: Explore how work generation and management has been implemented in the nano node implementation\n\n# Node Implementation - Work\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## OpenCL implementation\n\n---\n\n## Prioritization\n\n---\n\n## Work re-generation\n\n---\n\n\nExisting whitepaper sections related to this page:\n\n* [Implementation](../whitepaper/english.md#implementation)\n\nOther content related to this page:\n\n* [Work Generation guide](../integration-guides/work-generation.md)"
  },
  {
    "path": "docs/protocol-design/attack-vectors.md",
    "content": "title: Protocol Design - Attack Vectors\ndescription: Understand the different attack vectors on the nano network and the mitigations in place to limit them\n\n# Protocol Design - Attack Vectors\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Block gap synchronization\n| | |\n|----------------|-------------\n| **Risk**        | Low risk\n| **Impacts**     | Network amplify, denial of service\n| **Description** | Each block has a link to its previous block.  If a new block arrives where we can't find the previous block, this leaves the node deciding whether it's out of sync or if someone is sending junk data.  If a node is out of sync, synchronizing involves a TCP connection to a node that offers bootstrapping which is much more traffic than sending a single UDP packet containing a block; this is a network amplification attack.\n| **Defense**     | For blocks with no previous link, nodes will wait until a certain threshold of votes have been observed before initiating a connection to a bootstrap node to synchronize.  If a block doesn't receive enough votes it can be assumed to be junk data. \n\n## Transaction flooding\n\n| | |\n|----------------|-------------\n|**Risk** | Moderate\n|**Impacts** | High I/O\n|**Description** | Transaction flooding is simply sending as many valid transactions as possible in order to saturate the network.  Usually an attacker will send transactions to other accounts they control so it can be continued indefinitely.  \n|**Defense** | Each block has a small amount of work associated with it, around 5 seconds to generate and 1 microsecond to validate.  This work difference causes an attacker to dedicate a large amount to sustain an attack while wasting a small amount of resources by everyone else.  Nodes that are not full historical nodes are able to prune old transactions from their chain, this clamps the storage usage from this type of attack for almost all users.  \n\n## Sybil attack to change ledger entries\n\n| | |\n|----------------|-------------\n|**Risk** | None\n|**Impacts** | Completely destructive\n|**Description** | A Sybil attack is a person creating a lot of nodes on the network, possibly thousands on a single machine, in order to get a disproportionate vote on networks where each node gets an equal vote.  \n|**Defense** | The Nano voting system is weighted based on account balance.  Adding extra nodes in to the network will not gain an attacker extra votes.  \n\n## Penny-spend attack\n\n| | |\n|----------------|-------------\n|**Risk** | Moderate\n|**Impacts** | Ledger bloat\n|**Description** | A penny-spend attack is where an attacker spends infinitesimal quantities to a large number of accounts in order to waste the storage resources of nodes.    \n|**Defense** | Blocks publishing is rate-limited by work so this limits accounts to a certain extent.  Nodes that are not full historical nodes can prune accounts below a statistical metric where the account is probably not a valid account.  Finally, Nano is tuned to use minimal permanent storage space so space required to store one additional account is proportional to the size of one block + indexing ~ 96b + 32b ~ 128b.  This equates to 1GB being able to store 8 million penny-spend account.  If nodes want to be aggressive, they can calculate a distribution based on access frequency and delegate infrequently used accounts to slower storage.  \n\n## >50% attack\n\n| | |\n|----------------|-------------\n|**Risk** | Low\n|**Impacts** | Completely destructive\n|**Description** | The metric of consensus for Nano is a balance weighted voting system.  If an attacker is able to gain over 50% of the voting strength, they can cause the network to oscillate their decisions rendering the system useless.  An attacker must have at least some value tied up in the network as a balance which they're willing to forfeit as an expense to performing this type of attack since this attack ruins the integrity of the system.  An attacker is able to lower the amount of balance they must forfeit by preventing good nodes from voting through a network DDOS.  \n|**Defense** | There are multiple levels of defense against this type of attack:</br><ul><li>*Primary defense*: voting weight being tied to investment in the system; attempting to flip the ledger would be destructive to the system as a whole which would destroy their investment.</li><li>*Secondary defense*: cost of this attack is proportional to the market cap of all of Nano.  In proof of work systems, technology can be invented that gives disproportionate control compared to monetary investment and if the attack is successful, this technology could be repurposed after the attack is complete.  With Nano the cost of attacking the system scales with the system and if an attack were to be successful the cost of the attack can't be recovered.</li><li>*Tertiary defense*: In order to maintain the maximum quorum of voters, the next line of defense is representative voting.  Account holders who are unable to reliably participate in voting for connectivity reasons can name a representative who can vote with the weight of their balance.</li><li>Forks in Nano are never accidental so nodes can make policy decisions on how to interact with forked blocks.  The only time non-attacker accounts are vulnerable to block forks is if they receive a balance from an attacking account.  Accounts wanting to be secure from block forks can wait a little or a lot longer before receiving from an account who generated forks or opt to never receive at all.  Receivers could also generate separate accounts for receiving from dubious accounts in order to protect the rest of their balance.</li><li>A final line of defense is block cementing.  As blocks are confirmed in V19.0+, the node marks the height of the last block confirmed for every account and will refuse the replacement of an already confirmed block. Attempts to fork after previous confirmation of a block will immediately fail.</li><br />The most sophisticated version of a >50% attack is detailed in the diagram below.  \"Offline\" is the percentage of representatives who have been named but are not online to vote.  \"Stake\" is the amount of investment the attacker is voting with and will be lost if they successfully attack the system.  \"Active\" are representatives that are online and voting according to the protocol.  An attacker can offset the amount of stake they must forfeit by knocking other voters offline via a network denial of service attack.  If this attack can be sustained, the representatives being attacked will become unsynchronized and this is demonstrated by \"Unsynced\".  Finally, an attacker can gain a short burst in relative voting strength by switching their denial of service attack to a new set of representatives while the old set is resynchronizing their ledger, this is demonstrated by \"Attacked\".<br /><br />![Voting attack](https://raw.githubusercontent.com/nanocurrency/nano-node/master/images/attack.png)<br /><br />If an attacker is able to cause Stake > Active by a combination of these circumstances, they would be able to successfully flip votes on the ledger at the expense of their stake.  We can estimate how much this type of attack could cost by examining the market cap of other systems.  If we estimate 33% of representatives are offline or attacked via denial of service, an attacker would need to purchase 33% of the market cap in order to attack the system via voting.<br />Voting attack cost:<br /><ul><li>Euro - M1 in 2014 \\~6 trillion, attack amount 2 trillion</li><li>USD - M0 in 2014 \\~4 trillion, attack amount 1.2 trillion</li><li>UK pound sterling - M0 in 2007 \\~1.5 trillion, attack amount 500 billion</li><li>Bitcoin - Market cap 2014 \\~3 billion, attack amount 1 billion</li>\n\n## Bootstrap poisoning\n\n| | |\n|----------------|-------------\n|**Risk** | Low\n|**Impacts** | New-user denial of service\n|**Description** | The longer an attacker is able to hold an old private key with a balance, the higher the probability of balances that existed at that time no longer having representatives that are participating in voting because their balances or representatives have transferred to new people.  This means if a node is bootstrapped to an old representation of the network where the attacker has a quorum of voting stake compare to representatives at that point in time, they would be able to oscillate voting decisions to that node.  If this new user wanted to interact with anyone besides the attacking node all of their transactions would be denied since they have different head blocks.  The net result is nodes can waste the time of new nodes in the network by feeding them bad information.    \n|**Defense** | Nodes can be paired with an initial database of accounts and known-good block heads; this is a replacement for downloading the database all the way back to the genesis block.  The closer the download is to be current, the higher the probability of accurately defending against this attack.  In the end this attack is probably no worse than feeding junk data to nodes while bootstrapping since they wouldn't be able to transact with anyone who has a contemporary database.  \n\n## Other attacks\n\n* [Network Attacks Part 2](https://github.com/georgehara/nano/wiki/unofficial) - Additional deep-dive into potential attack vectors & mitigations\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Attack Vectors](/whitepaper/english/#attack-vectors)\n"
  },
  {
    "path": "docs/protocol-design/blocks.md",
    "content": "title: Protocol Design - Blocks\ndescription: Tour the unique design and structure of blocks in the nano protocol\n\n# Protocol Design - Blocks\n\n--8<-- \"wip-living-whitepaper.md\"\n\n!!! info \"Key terms in this section\"\n\t--8<-- \"terms-block-transaction-transfer.md\"\n\n## State Blocks\n\nAll new transactions on the Nano Protocol are communicated via blocks. The account's entire state, including the balance after each transaction, is recorded in every block. Transaction amounts are interpreted as the difference in balance between consecutive blocks.\n\n| Key            | RPC Format          | Serialized | Description |\n|                |                     |            |             |\n| type           | string              | -          | \"state\" |\n| account        | string              | 32 bytes   | This account's nano_ address |\n| previous       | 64 hex-char string  | 32 bytes   | Previous head block on account; 0 if *open* block |\n| representative | string              | 32 bytes   | Representative nano_ address |\n| balance        | decimal string      | 16 bytes   | Resulting balance (in [raw](#units)) |\n| link           | -                   | 32 bytes   | Multipurpose field - see link table below |\n| signature      | 128 hex-char string | 64 bytes   | ED25519+Blake2b 512-bit signature |\n| work           | 16 hex-char string  | 8 bytes    | [Proof of Work](../glossary.md#proof-of-work-pow) Nonce |\n\nDepending on the action each transaction intends to perform, the `\"link\"` field will have a different value for [block_create](/commands/rpc-protocol#block_create) RPC command:\n\n| Action  | RPC Format         | Description                                |\n|         |                    |                                            |\n| Change  | string             | Must be \"0\"                                |\n| Send    | string             | Destination \"nano_\" address                |\n| Receive | 64 hex-char string | Pairing block's hash (block sending funds) |\n\n\nAn example of a Nano block:\n```\n\"block\": {\n  \"type\": \"state\",\n  \"account\": \"nano_3qgmh14nwztqw4wmcdzy4xpqeejey68chx6nciczwn9abji7ihhum9qtpmdr\",\n  \"previous\": \"F47B23107E5F34B2CE06F562B5C435DF72A533251CB414C51B2B62A8F63A00E4\",\n  \"representative\": \"nano_1hza3f7wiiqa7ig3jczyxj5yo86yegcmqk3criaz838j91sxcckpfhbhhra1\",\n  \"balance\": \"1000000000000000000000\",\n  \"link\": \"19D3D919475DEED4696B5D13018151D1AF88B2BD3BCFF048B45031C1F36D1858\",\n  \"link_as_account\": \"nano_18gmu6engqhgtjnppqam181o5nfhj4sdtgyhy36dan3jr9spt84rzwmktafc\",\n  \"signature\": \"3BFBA64A775550E6D49DF1EB8EEC2136DCD74F090E2ED658FBD9E80F17CB1C9F9F7BDE2B93D95558EC2F277FFF15FD11E6E2162A1714731B743D1E941FA4560A\",\n  \"work\": \"cab7404f0b5449d0\"\n}\n```\nNote that there is an open [proposal](https://github.com/nanocurrency/nano-node/issues/2864) to update the state block with version, block height, and subtype fields.\n\n### Account balance\n\nIf an account balance decreases, the transaction that caused the decrease is considered a send. Similarly, if an account balance increases, the transaction that caused the increase is considered a receive.\n\n### Block vs. transaction\n\nIn traditional blockchain-based cryptocurrencies like Bitcoin, a block is a group of transactions. In Nano, a block is a single transaction, so the term “block” and “transaction” are often used interchangeably. \"Transaction\" specifically refers to the action, while block refers to the digital encoding of the transaction. Transactions are signed by the private-key belonging to the account on which the transaction is performed. \n\n---\n\n## Creating transactions\n\n### Open (Receive)\n\nTo create an account, an open transaction must be issued first. This is always the first transaction (block height 1) of every account-chain and can be created upon the first receipt of funds. To open an account, you must have sent some funds to it with a send transaction from another account. The funds will be pending on the receiving account. The account field stores the public-key (address) derived from the private-key that is used for signing. The link field contains the hash of the transaction that sent the funds. On account creation, a representative must be chosen to vote on your behalf; this can be changed later. The account can declare itself as its own representative. \n\n\n### Send\n\nA send transaction is one that decreases the sender's account balance by the amount they intend to send. To send from an address, the address must already have been opened with an open (receive) block and therefore will have a balance. The previous field contains the hash of the previous block in the account-chain. The link field contains the account for funds to be sent to. A send block is immutable once confirmed by the network. This means the funds are deducted from the balance of the sender's account and wait as pending until the receiving party signs a block to accept these funds. Pending funds should not be considered awaiting confirmation, as they are as good as spent from the senders account and the sender cannot revoke the transaction.\n\n### Receive\n\nA receive block is very similar to the send block mentioned above, except the account balance is increasing and the link field contains the send block's hash. To complete a transaction, the recipient of sent funds must create a receive block on their own account-chain. The source field references the hash of the associated send transaction. Once this block is created and broadcasted, the account's balance is updated and the funds have officially moved into their account.\n\n### Change rep\n\nNano account holders have the ability to choose a representative to vote on their behalf. This can be done any time (i.e. in an open, send, or receive transaction) by changing the representative field. In conventional PoS systems, the account owner’s node must be  continuosly running to participate in voting. This is impractical for many users, so to remove this requirement Nano was designed to give a representative the power to vote on an account’s behalf. A change transaction is what changes the representative of an account by subtracting the vote weight from the old representative and adding the weight to the new representative. No funds are moved in this transaction, and the representative does not have spending power of the account’s funds.\n\n---\n\n## Epoch blocks\n\nSince all accounts on the Nano network are asynchronous, an asynchronous form of chain upgrades is needed. Unlike Bitcoin and other traditional blockchains, Nano is not able to say “upgrade at block X”, so Epoch blocks were one of the approaches developed to solve this problem. \n\nEpoch blocks are a special block type that can only be generated using a pre-determined private key currently owned by the [Nano Foundation](https://nano.org/foundation). These blocks will be accepted by nodes and be attached as the frontier blocks on each account-chain on the network. This feature was built to allow very limited controls using these blocks: they cannot change account balances or representatives, only upgrade the account versions to allow new block structures. Furthermore, if the majority of the network does not upgrade to a new node version that enables a particular epoch block, then the epoch block will have minimal or no effect. \n\nAs an account-chain upgrade, Epoch blocks move accounts on the network from Epoch X to Epoch X+1. Any future transactions from an upgraded account will have a minimum version of X+1, which cannot be received by previous node versions.\n\nEpoch blocks are unable to change any balances or representatives on accounts. If an epoch block did attempt to change the balance of an account, the node would reject it because the signature would be incorrect, as only the account-chain holder can sign blocks which change balances or representatives.\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Nano Components](/whitepaper/english/#raiblocks-components)\n* [System Overview](/whitepaper/english/#system-overview)\n\nExisting content:\n\n* [Athena and Epoch v2 Blocks Explained](https://medium.com/nanocurrency/athena-and-epoch-v2-blocks-explained-de0a3dd37c39)\n* [Blocks specifications](/integration-guides/the-basics/#blocks-specifications)\n* [Creating transactions](/integration-guides/key-management/#creating-transactions)\n* [Nano 101: Epoch Blocks](https://medium.com/nanocurrency/an-epoch-blocks-explainer-aa22905b28db)\n* [Nano How 2: Blocks and Lattices](https://medium.com/nano-education/nano-how-2-blocks-and-lattices-c0ccd417bd5a)\n* [Network Upgrades details on epoch blocks](../releases/network-upgrades.md#epoch-blocks)\n"
  },
  {
    "path": "docs/protocol-design/distribution-and-units.md",
    "content": "title: Protocol Design - Distribution and Units\ndescription: Review the breakdown of divisibility, distribution and units within the nano protocol\n\n# Protocol Design - Distribution and Units\n\n!!! warning \"Page may be migrating\"\n\tThis page may be migrated into another page or section - TBD.\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Divisibility\nThere are three important aspects of divisibility of the supply which are satisfied by the final distributed amount:\n\n- The supply needs to be able to be divided up amongst a large number of users with users possibly wanting several accounts.\n- Each account needs to be able to represent an adequate dynamic range of value.\n- The supply should be able to deal with deflation over time as accounts are abandoned.\n\n## Distribution\nThe distribution of Nano (formerly RaiBlocks) was performed through solving manual captchas starting in late 2015 and ending in October 2017. Distribution stopped after \\~39% of the [Genesis](/glossary#genesis) amount was distributed and the rest of the supply was burnt.[^1]\n\n!!! info \"Distribution Accounts\"\n\t* **Genesis**: `nano_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3` \n\t* **Landing**: `nano_13ezf4od79h1tgj9aiu4djzcmmguendtjfuhwfukhuucboua8cpoihmh8byo`\n\t* **Faucet**: `nano_35jjmmmh81kydepzeuf9oec8hzkay7msr6yxagzxpcht7thwa5bus5tomgz9`\n\t* **Burn**: `nano_1111111111111111111111111111111111111111111111111111hifc8npp`\n\nDuring distribution the Genesis seed was kept in cold storage and funds were moved to the Landing account once per week to minimize the number of live, undistributed blocks. These were subsequently moved into the Faucet account for distribution until the faucet was closed and remaining funds sent to the Burn account.\n\n!!! info \"Total Supply\"\n\tWith $2^{128} - 1$ raw (i.e. `FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF` HEX raw) in the original Genesis account, upon closing of the faucet and burning of the remaining funds, the total supply which is 100% in circulation ended at **~133,248,297 nano** (or more precisely 133248297920938463463374607431768211455 raw). Since then, additional funds have been sent to the known burn address slightly lowering the amount in circulation as a result. This amount can be found using the [available_supply](/commands/rpc-protocol/#available_supply) RPC.\n\n## Unit Dividers\nA 128 bit integer is used to represent account balances. The reference wallet uses nano as a divider.\n\n| Name              | Integer                            | Power    | Previous              |\n|-------------------|------------------------------------|----------|-----------------------|\n| nano (NANO/Nano)  | 1000000000000000000000000000000    | $10^{30}$| Mnano                 |\n| raw               | 1                                  | $10^{0}$ | raw                   |\n\n\n**NOTE:** 1 raw is the smallest possible division and is used in QR codes as `amount`, while nano is the current standard division used for human readable elements in most wallets, on exchanges, etc.\n\nA set of SI prefixes[^2] from the base nano has been previously used to make the numbers more accessible and avoid confusion in certain scenarios, but this approach is not common (e.g., micronano or μnano for $10^{24}$).\n\n[^1]:https://medium.com/nanocurrency/the-nano-faucet-c99e18ae1202\n[^2]:The SI prefixes are metric prefixes that were standardized for use in the International System of Units (SI) by the International Bureau of Weights and Measures (BIPM). https://www.bipm.org/en/measurement-units/si-prefixes\n"
  },
  {
    "path": "docs/protocol-design/introduction.md",
    "content": "title: Protocol Design Introduction\ndescription: As the beginning of the living whitepaper, get details and background of the problems nano aims to solve that other digital money hasn't been able to\n\n# Protocol Design - Introduction\n\n--8<-- \"wip-living-whitepaper.md\"\n\n!!! tip \"Contributing to the protocol\"\n\tIf you are interested in helping develop the Nano protocol check out our details on [contributing code to the Nano node](../core-development/overview.md) as a starting point to understanding the current implementation contributions, as these are often tightly coupled with protocol-related changes.\n\n---\n\n## Living Whitepaper Information \n\nThe following sections of the [Living Whitepaper](../living-whitepaper/index.md) outline the design of the Nano protocol. The focus here is providing details of the blueprints for the different messages shared between nodes which allow data to be stored and communicated consistently across the network. The following Protocol Design sections are largely required to participate on the network, while the [Node Implementation](../node-implementation/introduction.md) sections primarily cover functionality that improves performance and security through a specific node design.\n\n## Abstract\n\nSince Bitcoin's release in 2009, there has been a growing shift away from traditional, government-backed currencies and financial systems towards modern payments systems based on cryptography, which offer the ability to store and transfer funds in a trustless and secure manner [^1]. In order to function effectively, a currency must be easily transferable, non-reversible, and have limited or no fees. Unfortunately, increased transaction times, high fees, limited network scalability, and high energy consumption have raised questions about the practicality of Bitcoin as an everyday currency.  Here we introduce Nano, a cryptocurrency with a novel block-lattice architecture where each account has its own blockchain, enabling near instant confirmation, feeless transactions, and scalability that is not artificially limited by protocol-side variables like block sizes or block times. \n\n## Introduction\n\nNano is a low-latency, feeless, scalable, and environmentally friendly cryptocurrency that improves on many of Bitcoin's core properties via unique design decisions. For example, each Nano user has their own blockchain, allowing them to update their chain asynchronously vs other transactions on the network, resulting in fast transactions with minimal overhead. Transactions keep track of account balances rather than transaction amounts, allowing aggressive database pruning without compromising security. Consensus is maintained by [Open Representative Voting (ORV)](../protocol-design/orv-consensus.md), which facilitates irreversible finality (full-settlement). User-selected representative nodes vote on each transaction, and every node independently [cements](../glossary.md#cementing) each transaction after seeing enough representative votes to achieve [quorum](../glossary.md#quorum).\n\nTo date, the Nano network has processed more than 118 million transactions with an unpruned ledger size of only 68GB. Average transaction confirmation time during typical network conditions is 0.2 seconds [^2]. The production network has seen traffic as high as 161 CPS (80.5-161 TPS), while the beta network has achieved >1800 CPS (900-1800 TPS) [^3]. Nano’s feeless, split-second transactions make it an ideal cryptocurrency for consumer transactions, while also maintaining decentralization, censorship-resistance, and self-sovereignty.\n\n## Background\n\nIn 2008, an anonymous individual under the pseudonym Satoshi Nakamoto published a whitepaper outlining the world’s first decentralized cryptocurrency, Bitcoin [^1]. A key innovation brought about by Bitcoin was the blockchain, a public, immutable and decentralized data-structure which is used as a ledger for the currency’s transactions. Unfortunately, as Bitcoin matured, several issues in the protocol made Bitcoin prohibitive for many applications: \n\n1. Poor scalability: Each block in the blockchain can store a limited amount of data, which means the system can only process so many transactions per second, making\nspots in a block a commodity. Median transaction fees fluctuate between a few cents and as high as \\$34 (currently ~\\$2.98 as of August 26, 2020) [^4].\n\n2. High latency: Average confirmation times fluctuate between 10 and 300 minutes [^5]. In addition, most Bitcoin services require more than one confirmation before considering a transaction fully-settled [^6], which adds additional latency for end users.\n\n3. Power inefficient: The Bitcoin network consumes an estimated 67.26TWh per year (comparable to the power consumption of the Czech Republic), using an average of 570kWh per transaction [^7].\n\nBitcoin, and other cryptocurrencies, function by achieving consensus on their global ledgers in order to verify legitimate transactions while resisting malicious actors. Bitcoin achieves consensus via an economic measure called Proof of Work (PoW). In a PoW system participants compete to compute a number, called a nonce, such that the hash of the entire block is in a target range. This valid range is inversely proportional to the cumulative computation power of the entire Bitcoin network in order to maintain a consistent average time taken to find a valid nonce. The finder of a valid nonce is then allowed to add the block to the blockchain; therefore, those who exhaust more computational resources to compute a nonce play a greater role in the state of the blockchain. PoW provides resistance against a Sybil attack, where an entity behaves as multiple entities to gain additional power in a decentralized system, and also greatly reduces race conditions that inherently exist while accessing a global data-structure. \n\nAn alternative consensus protocol, Proof of Stake (PoS), was first introduced by Peercoin in 2012 [^8]. In a PoS system, participants vote with a weight equivalent to the amount of wealth they possess in a given cryptocurrency. With this arrangement, those who have a greater financial investment are given more power and are inherently incentivized to maintain the honesty of the system or risk losing their investment. PoS does away with the wasteful computation power competition, only requiring light-weight software running on low power hardware. \n\nWhile Nano uses a weighted-voting system that can be compared to PoS, it differs significantly from traditional PoS. See the [Open Representative Voting (ORV)](../protocol-design/orv-consensus.md) page for more details.\n\nThe original Nano (RaiBlocks) paper and first beta implementation were published in December, 2014, making it one of the first Directed Acyclic Graph (DAG) based cryptocurrencies [^9]. Soon after, other DAG cryptocurrencies began to develop, most notably DagCoin, Obyte (formerly Byteball) and IOTA [^10], [^11], [^12]. These DAG-based cryptocurrencies broke the blockchain mold, improving system performance and security. Obyte achieves consensus by relying on a “main-chain” comprised of honest, reputable and user-trusted “witnesses”, while IOTA achieves consensus via the cumulative PoW of stacked transactions. Nano achieves consensus via a balance-weighted vote on conflicting transactions. This consensus system provides quicker, more deterministic transactions while still maintaining a strong, decentralized system. Nano continues this development and has positioned itself as one of the highest performing cryptocurrencies.\n\n[^1]: S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” 2008. [Online]. Available: http://bitcoin.org/bitcoin.pdf\n[^2]: \"Block Confirmation Times\", 2021. [Online]. Available: https://nanoticker.info\n[^3]: \"Nano Stress Tests - Measuring BPS, CPS, & TPS in the real world\", 2020. [Online]. Available: https://forum.nano.org/t/nano-stress-tests-measuring-bps-cps-tps-in-the-real-world/436\n[^4]: “Bitcoin median transaction fee historical chart.” [Online]. Available: https://bitinfocharts.com/comparison/bitcoin-median-transaction-fee.html\n[^5]: “Bitcoin average confirmation time.” [Online]. Available: https://www.blockchain.com/charts/avg-confirmation-time\n[^6]: \"Irreversible Transactions - How many confirmation are required\", 2020. [Online]. Available: https://en.bitcoin.it/wiki/Irreversible_Transactions#How_many_confirmations_are_required\n[^7]: \"Bitcoin Energy Consumption Index\", 2020. [Online]. Available: https://digiconomist.net/bitcoin-energy-consumption/\n[^8]: S. King and S. Nadal, “Ppcoin: Peer-to-peer crypto-currency withproof-of-stake”, 2012. [Online]. Available: https://decred.org/research/king2012.pdf\n[^9]: C. LeMahieu, “Raiblocks distributed ledger network”, 2014. https://content.nano.org/whitepaper/Nano_Whitepaper_en.pdf\n[^10]: S. D. Lerner, “DagCoin Draft”, 2015. Available: https://bitslog.files.wordpress.com/2015/09/dagcoin-v41.pdf\n[^11]: A. Churyumov, “Byteball: A Decentralized System for Storage and Transfer of Value”, 2016. Available: https://obyte.org/Byteball.pdf\n[^12]: S. Popov, “The tangle”, 2016. Available: https://assets.ctfassets.net/r1dr6vzfxhev/2t4uxvsIqk0EUau6g2sw0g/45eae33637ca92f85dd9f4a3a218e1ec/iota1_4_3.pdf\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Introduction](../whitepaper/english.md#introduction)\n* [Background](../whitepaper/english.md#background)\n\nOther existing content related to this page:\n\n* [Nano Overview](../what-is-nano/overview.md)\n* [Representatives and Voting](/what-is-nano/overview/#representatives-and-voting)\n* [Incentives to run a node](https://medium.com/nanocurrency/the-incentives-to-run-a-node-ccc3510c2562)\n"
  },
  {
    "path": "docs/protocol-design/ledger.md",
    "content": "title: Protocol Design - Ledger\ndescription: Explore the structure of the ledger in nano including accounts, blocks and how they can be managed\n\n# Protocol Design - Ledger\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Ledger design\n\nThe Nano ledger is the global set of accounts where each account has its own chain of transactions (<a href=\"#account-chains-diagram\">Figure 1</a>). This is a key design component that falls under the category of replacing a run-time agreement with a design-time agreement - everyone agrees via signature checking that only an account owner can modify the balance and representative on their own chain. This converts a seemingly shared data structure (a global blockchain) into a set of non-shared ones (individual account-chains).\n\nEach Nano node determines for itself whether or not to add a valid transaction to its local ledger. This means that there is no waiting for leader-selection as there is in single-blockchain cryptocurrencies like Bitcoin, where a single miner or staker extends the global blockchain with a new block (group of transactions) after solving a Proof-of-Work or being chosen through random selection. The block lattice ledger design removes this bottleneck, drastically decreasing transaction latency, improving decentralization, and simplifying transaction validation. Nano has no concept of block sizes or block times that arbitrarily limit the number of transactions that can be processed - the network will confirm as many transactions as current network conditions allow.\n\n<span id=\"account-chains-diagram\"></span>\n\n![account-chains](/diagrams/account-chains.svg)\n\n*Figure 1.  Each account has its own blockchain containing the account’s balance history. Block 1 must be a receive transaction with it's `previous` field as constant `0`.*\n\n### Accounts\n\nAn account is the public-key portion of a digital signature key-pair. The public-key, also referred to as the address, is shared with other network participants while the private-key is kept secret. A digitally signed packet of data ensures that the contents were approved by the private-key holder. One user may control many accounts, but only one public address may exist per account.\n\nAlthough a special private key can be used to publish epoch transactions to all accounts, the only changes allowed for this special type of transaction are related to upgrading the account version. This means that account owners are the only ones who can modify the balance and representative on their own account chains and thus contention only happens on a per-account basis or in relation to epoch distributions[^1].\n\nFor example, if account A attempts a double spend that must be resolved by the network, account B can still make transactions as normal. Transactions are processed independently and asynchronously.\n\n### Blocks\n\nIn traditional blockchain-based cryptocurrencies like Bitcoin, a block is a group of transactions. In Nano, a block contains the details of a single transaction. There are four different transaction types in Nano (send, receive, change representative and epoch) and in order to transfer funds, two transactions are required - a send transaction and a receive transaction. \n\nThis difference in transaction structures means the terminology used can have different meanings, so it is worth defining these more explicitly:\n\n* **block** is the digital encoding of the transaction details ([Figure 2](#block-diagram)).\n\n* **transaction** is the action of creating and publishing a block to the network. Depending on the type of transaction, the block will have different requirements.\n\n* **transfer** is the completion of both a send transaction and the corresponding receive transaction, representing the movement of funds which can be sent again by the recipient.\n\n<span id=\"block-diagram\"></span>\n\n```\n\"block\": {\n  \"type\": \"state\",\n  \"account\": \"nano_3qgmh14nwztqw4wmcdzy4xpqeejey68chx6nciczwn9abji7ihhum9qtpmdr\",\n  \"previous\": \"F47B23107E5F34B2CE06F562B5C435DF72A533251CB414C51B2B62A8F63A00E4\",\n  \"representative\": \"nano_1hza3f7wiiqa7ig3jczyxj5yo86yegcmqk3criaz838j91sxcckpfhbhhra1\",\n  \"balance\": \"1000000000000000000000\",\n  \"link\": \"19D3D919475DEED4696B5D13018151D1AF88B2BD3BCFF048B45031C1F36D1858\",\n  \"link_as_account\": \"nano_18gmu6engqhgtjnppqam181o5nfhj4sdtgyhy36dan3jr9spt84rzwmktafc\",\n  \"signature\": \"3BFBA64A775550E6D49DF1EB8EEC2136DCD74F090E2ED658FBD9E80F17CB1C9F9F7BDE2B93D95558EC2F277FFF15FD11E6E2162A1714731B743D1E941FA4560A\",\n  \"work\": \"cab7404f0b5449d0\"\n}\n```\n_Figure 2 - An example Nano block with all required fields_\n\nNote that there is an open [proposal](https://github.com/nanocurrency/nano-node/issues/2864) to update the state block with version, block height, and subtype fields.\n\n#### Why require two transactions to transfer\n\nAlthough send transactions confirmed by the network are irreversible, in order for the recipient to send those funds again they first must complete a receive transaction on their account. This receiving requirement to complete a transfer of funds provides a few benefits:\n\n* Sending of funds can be performed while the receiver is offline\n* Account owners are the only ones who are allowed to modify the balance and representative on their accounts\n* Allows account owners to ignore transactions, which prevents continuous sending of tiny amounts in an attempt to prevent use of the account\n\n### Block lattice\n\nThe lattice structure of the ledger arises from blocks connecting across account-chains. All block types use the `previous` field to vertically extend the account-chain. In addition, send and receive blocks also use the `link` field to connect across account-chains. [Figure 3](#block-lattice-diagram) below illustrates the lattice structure at a high level with additional details about blocks available on the [blocks](blocks.md) page.\n\n<span id=\"block-lattice-diagram\"></span>\n\n![block-lattice](/diagrams/block-lattice.svg)\n\nAs illustrated above, the ledger was initiated with a genesis account containing the genesis balance. The genesis balance was a fixed quantity and can never be increased. The genesis balance was divided across various accounts via send transactions registered on the genesis account-chain. The sum of the balances of all accounts in the ledger will never exceed the initial genesis balance, which gives the system an upper bound on quantity and no ability to increase it.\n\n---\n\n## Ledger pruning\n\nSince every transaction in Nano includes a block with the complete current state of an account, the ledger can be significantly pruned. While there are a few exceptions (e.g. pending transactions), Nano's ledger design could be pruned down to one block per account (plus pending), regardless of how many transactions the account has sent or received. Note that pruning is not implemented yet, and exact implementation details are still being tested and discussed. \n\nSee the official [forum](https://forum.nano.org/t/ledger-pruning/114) or [GitHub](https://github.com/nanocurrency/nano-node/issues/1094) discussions for more detail.\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Nano Components](/whitepaper/english/#raiblocks-components)\n\nOther existing content related to this page:\n\n* [Block Lattice design](/integration-guides/the-basics/#block-lattice-design)\n* [Accounts, Keys, Seeds, etc.](/integration-guides/the-basics/#account-key-seed-and-wallet-ids)\n* [Looking up to Confirmation Height](https://medium.com/nanocurrency/looking-up-to-confirmation-height-69f0cd2a85bc)\n* [Ledger Management guide](../running-a-node/ledger-management.md)\n\n[^1]: Epoch blocks details, Network Upgrades documentation: https://docs.nano.org/releases/network-upgrades/#epoch-blocks\n"
  },
  {
    "path": "docs/protocol-design/networking.md",
    "content": "title: Protocol Design - Networking\ndescription: Details of networking setup design for nano protocol\n\n# Protocol Design - Networking\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## TCP messages\nTCP is used for traffic on the [live network](/glossary#live-network) and for bulk data transfer on the [bootstrap network](/glossary#bootstrap-network).\n\n--8<-- \"network-details.md\"\n\n## IPV4/IPV6 addressing\nThe system is built to only operate on IPv6 and uses IPv4-mapped IPv6 addresses to connect to IPv4 hosts.\n\n## Node telemetry\nIn _v21_ node telemetry was added to node. This allows peers to communicate telemetry metrics to each other. For specific details on the message format see `telemetry_ack` in the [protocol specification](https://github.com/nanocurrency/protocol/tree/master/reference).\n\nThe nodes are designed to reply to `telemetry_req` messages. They avoid replying if messages are received from the same peer in quick succession; the minimum time until another reply is 60 seconds on the main network, 15 seconds on beta. This is done to reduce bandwidth.\n\nTelemetry messages bypass the node's bandwidth limiter so that services monitoring the network can still do so during when the network is heavily used. Sending `telemetry_req` frequently within this exclusion zone could see your ip blacklisted by other peers. The node safely handles this for you by doing ongoing requests periodically and only sent when valid to do so.\n\n### Signing\n`Telemetry_ack` messages are signed using [ED25519](/protocol-design/signing-hashing-and-key-derivation/#signing-algorithm-ed25519) as follows:\n\n```\nED25519(key = node id public key, message = \"node id || block count || cemented count|| unchecked count || account count || bandwidth capacity || peer count || protocol version || uptime || genesis block hash || major version || minor version || patch version || pre-release version || maker || timestamp since UTC epoch || active difficulty\")\n```\n\nThe node id used in the initial handshake is used for signing. The genesis block hash should be in big endian.\nThe data is signed so that it cannot be forged by a Man In The Middle (MITM) attack.\n\n!!! warning \"Peer disconnections\"\n    Sending incorrectly signed telemetry data to peers will result in being blacklisted as it is seen as malicious, make sure the signing is correct! Verify signatures against known signing done by node by testing [local telemetry](../commands/rpc-protocol.md#telemetry). Nodes with a different genesis block hash will also be disconnected.\n\n## Peering process\n\nInitial identification of peers is a [node implementation detail](../node-implementation/networking.md#peering-process), but once a node successfully connects with another using the protocol handshake, the keepalive messages each node sends will include a random selection of the IP addresses of 8 of their peers. Any new IP addresses will be included in the list of potential peers the node will attempt to connect with during bootstrapping, vote request, telemetry and other activities.\n\n---\n\n## Live traffic\n\n---\n\n## Bootstrap traffic\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [Networking](/protocol-design/networking/)\n"
  },
  {
    "path": "docs/protocol-design/orv-consensus.md",
    "content": "title: Protocol Design - ORV Consensus\ndescription: Take a deep dive into the unique, gossip-based algorithm used by nano to generate global consensus across all nodes on the network\n\n# Protocol Design - ORV Consensus\n\n--8<-- \"wip-living-whitepaper.md\"\n\nExisting whitepaper sections: [System Overview](/whitepaper/english/#system-overview), [Implementation](/whitepaper/english/#implementation)\n\nExisting content:\n\n* [Representatives and voting](/what-is-nano/overview/#representatives-and-voting)\n* [Representatives](/integration-guides/the-basics/#representatives)\n* [PoW for Receive block](https://github.com/nanocurrency/nano-node/issues/464#issuecomment-356467448)\n\n---\n\n## Overview\n\nIn order to protect against [double spending](attack-vectors.md#50-attack) and [Sybil attacks](attack-vectors.md#sybil-attack-to-change-ledger-entries), Nano uses a unique consensus mechanism called Open Representative Voting (ORV). In ORV, user-selected representative nodes vote on each transaction, and every node (representative or not) independently [cements](../glossary.md#cementing) each transaction after seeing enough representative votes to achieve [quorum](#quorum). Since Nano transactions are processed individually and asynchronously, deterministic finality (irreversible, full-settlement) is achieved in a short period of time, typically less than 1 second [^1].\n\nDue to Nano's [block-lattice ledger design](ledger.md), only account owners have the ability to sign blocks into their account-chains, so all forks must be the result of poor programming or malicious intent (double-spend) by the account owner, which means that nodes can easily make policy decisions on how to handle forks without affecting legitimate transactions.\n\nBecause Nano accounts can freely delegate their voting weight to representatives at any time, the users have more control over who has power with consensus and how decentralized the network is. Also note that delegation of voting weight does not mean staking of any funds - the account delegating can still spend all their available funds at any time without restrictions. This is a key advantage to the design of [Open Representative Voting (ORV)](/glossary/#open-representative-voting-orv). With no direct monetary incentive for nodes, this removes emergent centralization forces for longer-term trending toward decentralization of the network.[^2]\n\n### Open Representative Voting (ORV) vs Proof of Stake (PoS)\n\nWhile Nano uses a weighted-voting system ([ORV](/protocol-design#orv-consensus)) that can be compared to PoS, it differs from traditional PoS because:\n\n- There is not one monolithic blockchain that requires leader selection (i.e. a staker or a miner) to extend\n\n- Representatives do not create or produce shared blocks (groups of transactions)\n\n- Each Nano account has its own blockchain that only the owner can modify (representatives can only modify their own blockchain)\n\n- In Nano, a block is a single transaction (not a group of transactions). Transactions are evaluated individually and asynchronously\n\n- Users can remotely re-delegate their voting weight to anyone at any time\n\n- Anyone can be a representative\n\n- No funds are staked or locked up\n\n- Representatives do not earn transaction fees\n\n- Representatives cannot reverse transactions that nodes have locally confirmed (due to [block cementing](/glossary#cementing)).\n\n### Confirmation Speed\n\nNano's <1 second average transaction confirmation time often leads to questions about how finality can be achieved so quickly vs alternatives like Bitcoin. There are a few factors that contribute to this difference:\n\n- The block-lattice ledger design replaces a run-time agreement with a design-time agreement\n\n- A Nano block is a single transaction that can be processed individually and asynchronously vs other transactions\n\n- Lightweight Open Representative voting (ORV) and contention minimization\n\nOnly account owners have the ability to sign blocks into their account-chains, so all forks must be the result of poor programming or malicious intent (double-spend) by the account owner, which means that nodes can easily make policy decisions on how to handle forks without affecting legitimate transactions. \n\nA Bitcoin block is a group of transactions (~1 Megabyte per block) that has to be propagated and processed together, while a Nano [block](blocks.md) is a single transaction (~200 bytes) that is almost 5000 times smaller than a Bitcoin block. To make a Nano transaction, a node publishes a block to all the Nano [Principal Representatives (PRs)](#principal-representatives-vs-non-principal-representatives) [^3] at the speed of internet latency (20-100ms typically, depending on location), and those PRs then generate their vote (another small network packet) and publish it to each other and a subset of non-PR peers (who then publish to a subset of their peers). This pattern of communication is known as gossip-about-gossip.\n\nOnce a node sees enough PR vote responses to cross its local vote weight threshold for confirmation (>67% of online vote weight by default), it considers the transaction to be confirmed and then cements it as irreversible. Since the vast majority of transactions are not forks (no extra voting for fork resolution required), average Nano confirmation times are comparable to typical request-response internet latency.\n\n### Principal Representatives vs Non-Principal Representatives\n\nThere are two types of representatives in Nano: Principal Representatives (PR) and non-principal ones. To become a Principal Representative (PR), a Nano account must have at least 0.1% of [online voting weight](../glossary.md#online-voting-weight) delegated to it, but the only operational difference between the two representative types is that PR votes are rebroadcasted by other nodes who receive the votes, helping the network reach consensus more quickly. \n\nThis implementation decision was made in part because of the exponential bandwidth cost of allowing every Nano node (potentially thousands) to send a vote to every other Nano node. Outside of PRs, the vast majority of nodes would not be able to meaningfully contribute to consensus due to their low vote weight delegation. The delegated vote weight for most nodes might only be a millionth of a percent vs total online vote weight, while >67% online vote weight is required for a transaction to achieve confirmation. A 0.1% minimum was thus chosen as a compromise.\n\n---\n\n## Incentives for participating in consensus\n[Incentives to run a node](https://medium.com/nanocurrency/the-incentives-to-run-a-node-ccc3510c2562)\n\n---\n\n## Block validation\n\n---\n\n## Voting\n\n### Vote contents\n\n### Vote-by-hash\n\n---\n\n## Fork handling\n\n### Fork resolution\n\n#### Simple\n\n#### Complex\n\n### Why PoW for receive blocks\n\n---\n\n## Quorum\n\n[^1]: \"Block Confirmation Times\", 2021. [Online]. Available: https://nanoticker.info \n[^2]: C. LeMahieu, \"Emergent centralization due to economies of scale\", 2020. [Online]. Available: https://medium.com/@clemahieu/emergent-centralization-due-to-economies-of-scale-83cc85a7cbef\n[^3]: Srayman, \"Community Blog: Proposal for Nano Node Network Optimizations\", 2020. [Online]. Available: https://medium.com/nanocurrency/proposal-for-nano-node-network-optimizations-21003e79cdba\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [System Overview](/whitepaper/english/#system-overview)\n* [Implementation](/whitepaper/english/#implementation)\n\nExisting content related to this page:\n\n* [Representatives and voting](/what-is-nano/overview/#representatives-and-voting)\n* [Representatives](/integration-guides/the-basics/#representatives)\n* [PoW for Receive block](https://github.com/nanocurrency/nano-node/issues/464#issuecomment-356467448)\n"
  },
  {
    "path": "docs/protocol-design/resource-usage.md",
    "content": "title: Protocol Design - Resource Usage\ndescription: Find out the expected resource usage for the nano procotol across network, disk, compute and memory resources\n\n# Protocol Design - Resource Usage\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Network\n\n### Principal Representatives (Voting)\n\n### Representatives (Voting)\n\n### Observer (Non-voting)\n\n---\n\n## Disk I/O\n\n---\n\n## Disk Capacity\n\n### Historical\n\n### Pruned\n\n---\n\n## CPU/GPU\n\n### Work Generation\n\n### Principal Representative\n\n### Representative\n\n### Observer\n\n---\n\nExisting whitepaper sectionsrelated to this page:\n\n* [Resource Usage](/whitepaper/english/#resource-usage)\n\nExisting content related to this page:\n\n* [Representatives and voting](/what-is-nano/overview/#representatives-and-voting)\n* [Representatives](/integration-guides/the-basics/#representatives)"
  },
  {
    "path": "docs/protocol-design/signing-hashing-and-key-derivation.md",
    "content": "title: Protocol Design - Signing, Hashing and Key Derivation\ndescription: All about the methods for signing messages, hashing data and deriving keys on the nano protocol\n\n# Protocol Design - Signing, Hashing and Key Derivation\n\n--8<-- \"wip-living-whitepaper.md\"\n\n### Signing algorithm: ED25519\n\nED25519 is an elliptic curve algorithm developed in an academic setting with a focus on security from side channel attack, performance, and fixing a lot of the little annoyances in most elliptic curve systems[^1]. However, it should be noted that instead of using SHA-512 in the key derivation function, Nano uses Blake2b-512.\n\n!!! failure \"Incorrect, SHA-512 has been used\"\n  ```\n  0000000000000000000000000000000000000000000000000000000000000000 ->\n  3B6A27BCCEB6A42D62A3A8D02A6F0D73653215771DE243A63AC048A18B59DA29\n  ```\n\n!!! success \"Correct, Blake2b-512 digested the seed\"\n  ```\n  0000000000000000000000000000000000000000000000000000000000000000 ->\n  19D3D919475DEED4696B5D13018151D1AF88B2BD3BCFF048B45031C1F36D1858\n  ```\n\n### Hashing algorithm: Blake2\n\nCompared to existing cryptocurrencies, the hash algorithm chosen is much less important since it's not being used in a [Proof-of-Work](/glossary#proof-of-work-pow) context.  In Nano hashing is used purely as a digest algorithm against block contents.  Blake2b-256 is a highly optimized cryptographic hash function whose predecessor was a SHA3 finalist.[^2]\n\n### Key derivation function: Argon2\n\nThe key derivation function of Argon2d version 1.0 is used for securing the account keys in the reference wallet. [^3]\n\n[^1]:http://ed25519.cr.yp.to/\n[^2]:https://blake2.net/\n[^3]:https://en.wikipedia.org/wiki/Argon2"
  },
  {
    "path": "docs/protocol-design/spam-work-and-prioritization.md",
    "content": "title: Protocol Design - Spam, Work, & Prioritization\ndescription: Learn how Nano fights spam using balance-bucket transaction prioritization & proof-of-work\n\n# Protocol Design - Spam, Work, & Prioritization\n\n--8<-- \"wip-living-whitepaper.md\"\n\n## Spam resistance\n\nA spam transaction is loosely defined as a block broadcasted with the intent to saturate the network, reduce network availability, or increase the size of the ledger. In order to make spam more costly, each valid block in Nano requires a proof-of-work (PoW) solution to be attached to it - similar to the original Hashcash proposition[^1]. Participants can compute the required work in a few seconds, and verification time for this work is negligible (to prevent invalid blocks, large work, and/or invalid work from becoming a denial-of-service attack vector). The cost of spamming the network then increases linearly with the number of spam transactions, reducing the impact of spam from theoretically infinite to a manageable amount.\n\nIn addition to proof-of-work, another key component of Nano's defense against spam is transaction prioritization using a round-robin balance-bucket system, combined with least-recently-used (LRU) prioritization within those buckets. This system ensures that spam does not prevent legitimate users from making transactions & achieving fast confirmation, which in turn removes some of the incentives to spam (e.g. network disruption). See the [prioritization details](#prioritization-details) & [prioritization buckets](#prioritization-buckets) sections below for more information. While prioritization can be considered a \"Node Implementation\" topic, it's included in this \"Protocol Design\" discussion due to its relevance to spam resistance.\n\n## Spam resistance features\n\nBelow is a list of some of Nano's key spam mitigation features.\n\n| **Feature** | **Description** | **Version** |\n| - | - | - |\n| [bandwidth_limit](https://github.com/nanocurrency/nano-node/pull/2035) | Restricts outbound bandwidth to a user-configurable limit. 10 MB/s by default. | V19+ |\n| [Balance tiers (buckets)](https://github.com/nanocurrency/nano-node/pull/3208) | As of V27, there are 63 balance tiers (buckets) that nodes rotate through in a round-robin manner. Spamming a single bucket (e.g. Ӿ0.0001) has minimal impact on accounts in other buckets (e.g. Ӿ1, Ӿ5, etc). See [prioritization details](#prioritization-details) below. | V22+ |\n| [Bootstrap limits](https://github.com/nanocurrency/nano-node/pull/4158) | Configurable ascended bootstrapper limits via requests_limit, database_requests_limit, pull_count, timeout, [bootstrap_bandwidth_limit](https://github.com/nanocurrency/nano-node/blob/develop/nano/node/nodeconfig.hpp#L129-L130), [bootstrap_connections_max](https://github.com/nanocurrency/nano-node/blob/develop/nano/node/nodeconfig.hpp#L100-L101), etc. Default outbound bootstrap traffic limit is 5MB/s. Default max incoming bootstrap connections count is 64 (lower values save IOPs & bandwidth). | V25+ |\n| [Bounded active election buckets](https://github.com/nanocurrency/nano-node/pull/4626) | Limits election bucket size and allows for dynamically dropping and scheduling higher priority elections. Buckets can be configured to opportunistically use more available space if AEC is underutilized. | V27+ |\n| [Bounded block backlog](https://github.com/nanocurrency/nano-node/pull/4787) | Implements limits on unconfirmed transaction storage and processing, which helps ensure consistent confirmation rates during high network load and prevents resource exhaustion attacks. | V28+ |\n| [Bounded unchecked memory table](https://github.com/nanocurrency/nano-node/pull/3835) | Add a memory container for unchecked blocks once the initial bootstrap threshold is reached, with blocks pruned in FIFO order. Limited to two items per dependency. | V23.3+ |\n| [Fair queueing](https://github.com/nanocurrency/nano-node/pull/4476) | Each peer (node) & each component (e.g. [block processor](https://github.com/nanocurrency/nano-node/pull/4476), [vote processor](https://github.com/nanocurrency/nano-node/pull/4536), [bootstrap server](https://github.com/nanocurrency/nano-node/pull/4584), [request aggregator](https://github.com/nanocurrency/nano-node/pull/4598), etc) gets its own small queue with a configurable size & priority. Nodes process these queues in a (weighted) round robin manner. This ensures that even when network is under stress, data coming from well-behaved peers is ingested quickly. | V27+ |\n| [Final vote replies](https://github.com/nanocurrency/nano-node/pull/4648) | For blocks that are marked as final or confirmed, nodes will only respond with final votes (not non-final votes). This signficantly reduces network (specifically voting) traffic. | V27+ |\n| [Hinted elections](https://github.com/nanocurrency/nano-node/pull/3944) | A percentage of election slots are reserved for hinted elections, meaning that nodes start elections for transactions with a high vote weight, regardless of individual node priority. This allows the network to progress forward on confirmations, keeping the network in sync. | V24+ |\n| [Hinted elections for dependencies](https://github.com/nanocurrency/nano-node/pull/4312) | The hinted election scheduler now detects cases when the node falls behind the network and is missing confirmations for block dependencies, and then activates elections for the blocks that were missed. | V26+ |\n| [is_originator flag](https://github.com/nanocurrency/nano-node/pull/4654) | Adds a flag to publish messages that identifies if a block is from a node that performed the initial flooding. Helps ensure original blocks get priority over republished blocks. | V27+ |\n| [Lazy bootstrapping](https://github.com/nanocurrency/nano-node/pull/1332) | Similar to optimistic elections, but for bootstrapping. Passively listens for votes on the real-time network, and confirms block dependencies if the (more recent) block is confirmed. | V17+ |\n| [Least-Recently Used (LRU) Prioritization](https://github.com/nanocurrency/nano-node/pull/3208) | Within a given balance tier (bucket), the least-recently-used account has the highest priority. | V22+ |\n| [Local block broadcaster](https://github.com/nanocurrency/nano-node/pull/4454) | Only rebroadcast blocks during active elections. Move initial block gossip responsibility to the block originator. | V27+ |\n| [message_deserializer checks](https://github.com/nanocurrency/nano-node/blob/develop/nano/node/transport/message_deserializer.cpp) | Check for correct message formats before full processing (valid work, valid header, valid message type, valid version, valid network bytes (magic bytes), etc). | All |\n| [Optimistic elections](https://github.com/nanocurrency/nano-node/pull/4111) | If a more recent block is confirmed, all of its dependencies are also confirmed. | V25+ |\n| [Prevent requeuing of blocks with invalid signatures](https://github.com/nanocurrency/nano-node/pull/4130) | Requeueing of blocks with invalid signatures during lazy bootstrapping is not needed, since an invalid signature will always be invalid and doesn't need to be bootstrapped again. | V25+ |\n| [Proof-of-Work](https://github.com/nanocurrency/nano-node/blob/develop/nano/lib/work.cpp) | Each Nano transaction requires a small Proof-of-Work. | All\n| [Rep crawler overhaul](https://github.com/nanocurrency/nano-node/pull/4449#issuecomment-1968919321) | Consistently find representatives, even when vote requests are unreliable | V27+ |\n| [Traffic Shaping](https://github.com/nanocurrency/nano-node/pull/4786) | Enables more equal distribution of network resources among peers & proactively manages network traffic to help prevent congestion. | V28+ |\n| [Vote by hash](https://github.com/nanocurrency/nano-node/pull/1025) | Instead of voting with a full block (256 bytes), representatives vote with block hashes (32 bytes), and batch these hashes. As of V27, nodes can vote for up to [255 hashes](https://github.com/nanocurrency/nano-node/pull/4683) in a single vote. | V15+ |\n| [Vote Distribution Optimization](https://github.com/nanocurrency/nano-node/pull/4766) | Separate vote flooding patterns for PRs and non-PRs, to ensure votes are distributed more efficiently. | V28+ |\n| [Vote Filtering](https://github.com/nanocurrency/nano-node/pull/4735) | Filters out vote duplicates early on during packet processing. | V28+ |\n| [Vote Rebroadcaster Filtering](https://github.com/nanocurrency/nano-node/pull/4849) | An index that tracks and filters vote rebroadcasts. Includes: tracking the top 100 reps by weight, per-rep history of recent votes & block hashes, deduplicating by vote hash, minimum time interval between rebroadcasts of the same hash from the same rep. | V28+ |\n| [(Future) Additional improvements](https://github.com/nanocurrency/nano-node/issues/4262) | See list of potential future improvements that have been noted for additional research. | Future |\n  \n## Work algorithm details\n\nEvery [block](../blocks) includes a work field that must be correctly populated. Valid work is obtained by randomly guessing a nonce such that:\n\n$$\nH(\\text{nonce} || \\text{x}) \\ge \\text{threshold}\n$$\n\nwhere $H$ is an algorithm, usually in the form of a hash function, $||$ is the concatenation operator, $threshold$ is a parameter of the network that relates to the resources spent to obtain a valid work, and $x$ is either:\n\n- The account's public key, in the case of the first block on the account, or\n- The previous block's hash\n\nThe following image illustrates the process by which valid work is obtained for **Block 2**.\n\n![generate-work](../images/whitepaper/generate-work.svg)\n\nThe work field is not used when signing a block. This design has two consequences:\n\n1. A block can be securely signed locally, while the work is requested from a remote server, with larger resources. This is especially important for devices with low resources.\n\n2. Since all inputs are known before generating a block, a user can **precompute** the work for the next block, eliminating any time between creating and broadcasting a block. After a block is created, the next block's work can be computed immediately, using the last block's hash as input. \n\n## Choosing an algorithm\n\nWhile the specific algorithm used is an implementation decision, there is a minimal set of requirements that must be met for compatibility with the Nano protocol.\n\n1. Asymmetry. Verifying work should take the least amount of resources (including time) as possible.\n1. Small proof size. Work should take a minimal amount of a block's size compared to the resources required to generate it, in order to reduce overhead and maximize throughput.\n1. Amortization-free. The cost of obtaining work for multiple blocks should scale linearly with the number of blocks. This ensures fairness for all participants.\n1. Progress-free. Any attempt at obtaining work should follow a stochastic process, with no dependence on previous attempts.\n\nAdditional requirements of parameter flexibility, constrained parallelism, and being optimization-free, are desired but not required [^2].\n\n## Prioritization details\n\nAs of V27, Nano representatives rotate (round-robin) through 63 balance-based buckets when voting on transactions, and the least-recently-used (LRU) accounts in each bucket have the most priority (within their bucket). For example, if an account with 1 XNO and another account with 5 XNO both make two transactions, Nano representatives will vote on one transaction from the 1 XNO bucket, and one transaction from the 5 XNO bucket, before voting on a second transaction from the same bucket. Furthermore, the least-recently-used account within a bucket has the most priority (in that bucket), so after an account makes a transaction it gets moved to the back of the line behind everyone else (in that bucket). This means that if an attacker tries to send thousands of transactions from an account that only has 0.00001 Nano (for example), other accounts in the 0.00001 bucket that don't make frequent transactions will have priority over the spam, and the 0.00001 bucket spam will have no impact on accounts in other balance-buckets (e.g. 1 XNO).\n\n!!! info \"Balance-based Buckets\"\n\tPrioritization buckets are split by _account balances_, not transaction amounts\n\nPrior to V24, there were 129 balance buckets[^4], with the majority (89) of those buckets being for balances under 0.0003. Since most legitimate users tend to have larger balances, most of these 89 balance buckets were minimally used. In V24 this was updated to 62 balance buckets[^3][^5], & account balances under 0.0003 shared the same bucket. This created more buckets around typical real-world account balances, helping prioritize legitimate transactions over spam. V27 added an additional bucket (Ӿ0.000001 to Ӿ0.0003) to account for common wallet and faucet minimums[^6].\n\nThe following image illustrates the balance bucket & least-recently-used prioritization process:\n\n![balance-lru-prio](../images/whitepaper/balance-lru-prio.png)\n\n## Prioritization buckets\n\nHere are the 63 balance buckets in the reference node implementation, based on the V27 source code[^6]. Table values truncated for readability:\n\n| **Bucket Number** | **Bucket Region (uint128)** | **Bucket Range (Nano)** | **Bucket Range (Raw)** |\n|:-:|:-:| - | - |\n| 0 | 0 - 2^79 | 0.0000000000000 - 0.0000006044629 | 0 - 604462909807314587353088 |\n| 1 | 2^79 - 2^88 | 0.0000006044629 - 0.0003094850098 | 604462909807314587353088 - 309485009821345068724781056 |\n| 2 | 2^88 - 2^92 | 0.0003094850098 - 0.0026306225834 | 309485009821345068724781056 - 2630622583481433084160638976 |\n| 3 | 2^88 - 2^92 | 0.0026306225834 - 0.0049517601571 | 2630622583481433084160638976 - 4951760157141521099596496896 |\n| 4 | 2^92 - 2^96 | 0.0049517601571 - 0.0235208607464 | 4951760157141521099596496896 - 23520860746422225223083360256 |\n| 5 | 2^92 - 2^96 | 0.0235208607464 - 0.0420899613357 | 23520860746422225223083360256 - 42089961335702929346570223616 |\n| 6 | 2^92 - 2^96 | 0.0420899613357 - 0.0606590619249 | 42089961335702929346570223616 - 60659061924983633470057086976 |\n| 7 | 2^92 - 2^96 | 0.0606590619249 - 0.0792281625142 | 60659061924983633470057086976 - 79228162514264337593543950336 |\n| 8 | 2^96 - 2^100 | 0.0792281625142 - 0.2277809672285 | 79228162514264337593543950336 - 227780967228509970581438857216  |\n| 9 | 2^96 - 2^100 | 0.2277809672285 - 0.3763337719427 | 227780967228509970581438857216 - 376333771942755603569333764096 |\n| 10 | 2^96 - 2^100 | 0.3763337719427 - 0.5248865766570 | 376333771942755603569333764096 - 524886576657001236557228670976 |\n| 11 | 2^96 - 2^100 | 0.5248865766570 - 0.6734393813712 | 524886576657001236557228670976 - 673439381371246869545123577856 |\n| 12 | 2^96 - 2^100 | 0.6734393813712 - 0.8219921860854 | 673439381371246869545123577856 - 821992186085492502533018484736 |\n| 13 | 2^96 - 2^100 | 0.8219921860854 - 0.9705449907997 | 821992186085492502533018484736 - 970544990799738135520913391616 |\n| 14 | 2^96 - 2^100 | 0.9705449907997 - 1.1190977955139 | 970544990799738135520913391616 - 1119097795513983768508808298496 |\n| 15 | 2^96 - 2^100 | 1.1190977955139 - 1.2676506002282 | 1119097795513983768508808298496 - 1267650600228229401496703205376 |\n| 16 | 2^100 - 2^104 | 1.2676506002282 - 2.4560730379421 | 1267650600228229401496703205376 - 2456073037942194465399862460416 |\n| 17 | 2^100 - 2^104 | 2.4560730379421 - 3.6444954756561 | 2456073037942194465399862460416 - 3644495475656159529303021715456 |\n| 18 | 2^100 - 2^104 | 3.6444954756561 - 4.8329179133701 | 3644495475656159529303021715456 - 4832917913370124593206180970496 |\n| 19 | 2^100 - 2^104 | 4.8329179133701 - 6.0213403510840 | 4832917913370124593206180970496 - 6021340351084089657109340225536 |\n| 20 | 2^100 - 2^104 | 6.0213403510840 - 7.2097627887980 | 6021340351084089657109340225536 - 7209762788798054721012499480576 |\n| 21 | 2^100 - 2^104 | 7.2097627887980 - 8.3981852265120 | 7209762788798054721012499480576 - 8398185226512019784915658735616 |\n| 22 | 2^100 - 2^104 | 8.3981852265120 - 9.5866076642259 | 8398185226512019784915658735616 - 9586607664225984848818817990656 |\n| 23 | 2^100 - 2^104 | 9.5866076642259 - 10.775030101939 | 9586607664225984848818817990656 - 10775030101939949912721977245696 |\n| 24 | 2^100 - 2^104 | 10.775030101939 - 11.963452539653 | 10775030101939949912721977245696 - 11963452539653914976625136500736 |\n| 25 | 2^100 - 2^104 | 11.963452539653 - 13.151874977367 | 11963452539653914976625136500736 - 13151874977367880040528295755776 |\n| 26 | 2^100 - 2^104 | 13.151874977367 - 14.340297415081 | 13151874977367880040528295755776 - 14340297415081845104431455010816 |\n| 27 | 2^100 - 2^104 | 14.340297415081 - 15.528719852795 | 14340297415081845104431455010816 - 15528719852795810168334614265856 |\n| 28 | 2^100 - 2^104 | 15.528719852795 - 16.717142290509 | 15528719852795810168334614265856 - 16717142290509775232237773520896 |\n| 29 | 2^100 - 2^104 | 16.717142290509 - 17.905564728223 | 16717142290509775232237773520896 - 17905564728223740296140932775936 |\n| 30 | 2^100 - 2^104 | 17.905564728223 - 19.093987165937 | 17905564728223740296140932775936 - 19093987165937705360044092030976 |\n| 31 | 2^100 - 2^104 | 19.093987165937 - 20.282409603651 | 19093987165937705360044092030976 - 20282409603651670423947251286016 |\n| 32 | 2^104 - 2^108 | 20.282409603651 - 39.297168607075 | 20282409603651670423947251286016 - 39297168607075111446397799366656 |\n| 33 | 2^104 - 2^108 | 39.297168607075 - 58.311927610498 | 39297168607075111446397799366656 - 58311927610498552468848347447296 |\n| 34 | 2^104 - 2^108 | 58.311927610498 - 77.326686613921 | 58311927610498552468848347447296 - 77326686613921993491298895527936 |\n| 35 | 2^104 - 2^108 | 77.326686613921 - 96.341445617345 | 77326686613921993491298895527936 - 96341445617345434513749443608576 |\n| 36 | 2^104 - 2^108 | 96.341445617345 - 115.35620462076 | 96341445617345434513749443608576 - 115356204620768875536199991689216 |\n| 37 | 2^104 - 2^108 | 115.35620462076 - 134.37096362419 | 115356204620768875536199991689216 - 134370963624192316558650539769856 |\n| 38 | 2^104 - 2^108 | 134.37096362419 - 153.38572262761 | 134370963624192316558650539769856 - 153385722627615757581101087850496 |\n| 39 | 2^104 - 2^108 | 153.38572262761 - 172.40048163103 | 153385722627615757581101087850496 - 172400481631039198603551635931136 |\n| 40 | 2^104 - 2^108 | 172.40048163103 - 191.41524063446 | 172400481631039198603551635931136 - 191415240634462639626002184011776 |\n| 41 | 2^104 - 2^108 | 191.41524063446 - 210.42999963788 | 191415240634462639626002184011776 - 210429999637886080648452732092416 |\n| 42 | 2^104 - 2^108 | 210.42999963788 - 229.44475864130 | 210429999637886080648452732092416 - 229444758641309521670903280173056 |\n| 43 | 2^104 - 2^108 | 229.44475864130 - 248.45951764473 | 229444758641309521670903280173056 - 248459517644732962693353828253696 |\n| 44 | 2^104 - 2^108 | 248.45951764473 - 267.47427664815 | 248459517644732962693353828253696 - 267474276648156403715804376334336 |\n| 45 | 2^104 - 2^108 | 267.47427664815 - 286.48903565157 | 267474276648156403715804376334336 - 286489035651579844738254924414976 |\n| 46 | 2^104 - 2^108 | 286.48903565157 - 305.50379465500 | 286489035651579844738254924414976 - 305503794655003285760705472495616 |\n| 47 | 2^104 - 2^108 | 305.50379465500 - 324.51855365842 | 305503794655003285760705472495616 - 324518553658426726783156020576256 |\n| 48 | 2^108 - 2^112 | 324.51855365842 - 932.99084176797 | 324518553658426726783156020576256 - 932990841767976839501573559156736 |\n| 49 | 2^108 - 2^112 | 932.99084176797 - 1,541.463129877 | 932990841767976839501573559156736 - 1541463129877526952219991097737216 |\n| 50 | 2^108 - 2^112 | 1,541.463129877 - 2,149.935417987 | 1541463129877526952219991097737216 - 2149935417987077064938408636317696 |\n| 51 | 2^108 - 2^112 | 2,149.935417987 - 2,758.407706096 | 2149935417987077064938408636317696 - 2758407706096627177656826174898176 |\n| 52 | 2^108 - 2^112 | 2,758.407706096 - 3,366.879994206 | 2758407706096627177656826174898176 - 3366879994206177290375243713478656 |\n| 53 | 2^108 - 2^112 | 3,366.879994206 - 3,975.352282315 | 3366879994206177290375243713478656 - 3975352282315727403093661252059136 |\n| 54 | 2^108 - 2^112 | 3,975.352282315 - 4,583.824570425 | 3975352282315727403093661252059136 - 4583824570425277515812078790639616 |\n| 55 | 2^108 - 2^112 | 4,583.824570425 - 5,192.296858534 | 4583824570425277515812078790639616 - 5192296858534827628530496329220096 |\n| 56 | 2^112 - 2^116 | 5,192.296858534 - 24,663.41007804 | 5192296858534827628530496329220096 - 24663410078040431235519857563795456 |\n| 57 | 2^112 - 2^116 | 24,663.41007804 - 44,134.52329754 | 24663410078040431235519857563795456 - 44134523297546034842509218798370816 |\n| 58 | 2^112 - 2^116 | 44,134.52329754 - 63,605.63651705 | 44134523297546034842509218798370816 - 63605636517051638449498580032946176 |\n| 59 | 2^112 - 2^116 | 63,605.63651705 - 83,076.74973655 | 63605636517051638449498580032946176 - 83076749736557242056487941267521536 |\n| 60 | 2^116 - 2^120 | 83,076.74973655 - 706,152.3727607 | 83076749736557242056487941267521536 - 706152372760736557480147500773933056 |\n| 61 | 2^116 - 2^120 | 706,152.3727607 - 1,329,227.99578 | 706152372760736557480147500773933056 - 1329227995784915872903807060280344576 |\n| 62 | 2^120 - 2^128 | 1,329,227.99578 - 340,282,366.920 | 1329227995784915872903807060280344576 - 340282366920938463463374607431768211456 |\n\n---\n\nExisting whitepaper sections related to this page:\n\n* [System Overview](/whitepaper/english/#system-overview)\n\nExisting content related to this page:\n\n* [Basics - PoW](/integration-guides/the-basics/#proof-of-work)\n* [Dynamic PoW & Prioritization](https://medium.com/nanocurrency/dynamic-proof-of-work-prioritization-4618b78c5be9)\n* [Nano How 4: Proof of Work](https://medium.com/nano-education/nano-how-4-proof-of-work-474bf20fc7d)\n* [Work Generation guide](../integration-guides/work-generation.md)\n\n[^1]: A. Back, “Hashcash - a denial of service counter-measure,” 2002. [Online]. Available: http://www.hashcash.org/papers/hashcash.pdf\n[^2]: For more details on these requirements, refer to A. Biryukov, \"Equihash: Asymmetric Proof-of-Work Based on the Generalized Birthday Problem\" 2017. [Online]. Available: https://doi.org/10.5195/ledger.2017.48\n[^3]: C. LeMahieu et al, \"Nanocurrency/Nano-Node - Prioritization.cpp\". [Online]. Available: https://github.com/clemahieu/nano-node/blob/releases/v24/nano/node/prioritization.cpp#L46-L73\n[^4]: A. Titan, \"All 129 prioritization buckets in Nano\", 2021. [Online]. Available: https://www.reddit.com/r/nanocurrency/comments/myf9c2/all_129_prioritization_buckets_in_nano/\n[^5]: P. Luberus, \"Visualizing the updated V24 balance buckets (62 prioritization buckets)\", 2022. [Online]. Available: https://www.reddit.com/r/nanocurrency/comments/zydm1w/visualizing_the_updated_v24_balance_buckets_62/\n[^6]: Bob, \"Add New Bucket for Specific Amount Range\", 2024. [Online]. Available: https://github.com/nanocurrency/nano-node/pull/4661\n"
  },
  {
    "path": "docs/releases/network-upgrades.md",
    "content": "title: Network Upgrades\ndescription: Check out the various types of network upgrades available on the nano network and explore their previous and future planned uses\n\n# Network Upgrades\n\nFor details on why and how network upgrades happen, along with explanations of the various types, please see the [Upgrades overview](#upgrades-overview) and [Upgrade methods](#upgrade-methods) sections further down.\n\n--8<-- \"join-technical-mailing-list.md\"\n\n---\n\n## Planned upgrades\n\n**No planned network upgrades**\n\n---\n\n## Future upgrades\n\n### New PoW algorithm\n\n**Purpose**\n\nTo help ensure Quality of Service on the network by providing the ability to generate and validate PoW using a new algorithm. This algorithm will be more memory-hard causing the resources required for generating transactions to shift accordingly.\n\n**Transition details**\n\n| Date | Type | Description |\n|------|------|-------------|\n| <span class=\"no-break\">2019-11-21</span>  | Node release | Nano node V20.0 released to include a new PoW server and epoch block support. These are only foundational updates and will not be configured for activation in this release. |\n| <span class=\"no-break\">2020-08-29</span> | Epoch blocks | Following the [postponing of the Nano PoW algorithm](https://medium.com/nanocurrency/nano-pow-v20-update-e2197ff52941) in favor or research towards other options, the original epoch v2 blocks intended for the PoW algorithm update were modified for increasing work difficulty using the existing algorithm in V21.0 and [subsequently distributed in August 2020](#increased-work-difficulty). Any future PoW algorithm updates will require a different epoch block version. |\n| TBD  | Node release | Nano node VXX.X released to include new PoW algorithm in PoW server and final changes allowing transition via epoch blocks. |\n| TBD | <span class=\"no-break\">Epoch blocks start</span> | Distribution of epoch blocks to each account which upgrades them to use the new PoW algorithm.  Once an account is upgraded nodes will only validate work made using the new PoW algorithm for that account. |\n| TBD | Epoch blocks end | Distribution of epoch blocks ends after all accounts are upgraded. |\n\n**Transition Explanation**\n\nIn the above transition plan a phased node upgrade was used to provide support for some foundational elements of the new PoW algorithm while further details of the design are worked out. The epoch block distribution in this transition represents a clean switch from one PoW algorithm to the other - no block in the ledger is allowed to have work generated by either PoW, instead older block versions must use the existing PoW and new block versions must use the newer PoW.\n\nThis clean switch comes with benefits including reduction in code complexity related to handling two types of PoW generation and validation for the same block versions, and the setting of a clear point in the ledger for each account where work values changed - potentially useful for future snapshoting.\n\nTo mitigate the impacts of this approach the Nano Foundation will be communicating regularly about progress and monitoring closely the activity on the network to ensure proper conditions exist to finalize the transition.\n\n---\n\n## Past upgrades\n\n### Final votes\n\n**Purpose**\n\nTo enable the [final votes](https://github.com/nanocurrency/nano-node/pull/3134) feature which will add a second round of voting to the consensus process as follows: once initial voting weight for an unconfirmed block has reached [quorum](../glossary.md#quorum), nodes will issue final votes by setting the timestamp to the maximum integer possible for that field (18446744073709551615). These final votes will then be required to confirm the block and increase the related accounts confirmation height in the ledger.\n\nBecause this is a consensus change, a network upgrade is required to activate. As noted above, this will be done using a canary block once at least 80% of voting weight on the network has been upgraded. After the canary block is distributed by the Nano Foundation, the final votes will be used for confirmation going forward.\n\n**Transition details**\n\n| Date | Type | Description |\n|------|------|-------------|\n| <span class=\"no-break\">2021-05-14</span>  | Node release | Nano node V22.0 released with final votes functionality and hardcoded with the block hash for the canary to activate the behavior. |\n| <span class=\"no-break\">2021-06-03</span> | Canary block | Canary block hash `B0AA9D2D10837ABD6E96DD9ECD9409F5D6F5B982D26D0E395FF3ECFBC2D139A0` distributed to the network which forced nodes upgraded to V22.0+ to only confirm blocks using final votes. Non-final votes reaching quorum are used to trigger when final votes are generated, not used for confirmation.  |\n\n### Increased work difficulty\n\n**Purpose**\n\nTo help ensure Quality of Service on the network by increasing the difficulty required for send and change blocks to be considered valid by the network (8x compared to current). To help offset the difficulty increase and add incentive to receive blocks so ledger pruning can be done more broadly in the future, the difficulty for receive blocks will simultaneously be reduced (1/8 compared to current).\n\n**Transition details**\n\nThis upgrade is sometimes referenced as the epoch v2 upgrade and the relate events to complete are as follows:\n\n| Date | Type | Description |\n|------|------|-------------|\n| <span class=\"no-break\">2020-06-16</span>  | Node release | Nano node V21.0 released which includes changes necessary for supporting new difficulty validation and generation |\n| <span class=\"no-break\">2020-08-18</span> | <span class=\"no-break\">v2 epoch blocks distribution start</span> | Distribution of v2 epoch blocks to all accounts to mark in the ledger the point at which the new work difficulty levels will be required. The start of this distribution process will occur once key services and over 90% of voting weight on the network has upraded. |\n| <span class=\"no-break\">2020-08-29</span> | <span class=\"no-break\">v2 epoch blocks distribution end</span> | Distribution of epoch blocks ends after all accounts are upgraded. |\n\n!!! warning \"Nodes de-peered with epoch blocks\"\n\tDue to the nature of the work difficulty changes, any nodes not updated to V21.0+ at the time of epoch block distribution will be de-peered from the network.\n\n**Transition Explanation**\n\nWhen changing the work difficulty requirements it is necessary to mark a point in each account where the difficulty requirements change so bootstrapping and other behaviors can accurately validate historical blocks. For this reason the epoch blocks are being distributed to act as the marker in the ledger.\n\nOnce epoch block distribution is started the ability to validate the new work difficulty levels is required. Since node versions before V21.0 do not have the ability to do this, they will be immediately de-peered from the network and cannot participate with the current network until upgraded.\n\nTo mitigate the impacts of this approach the Nano Foundation will be communicating regularly about progress and monitoring closely the activity on the network. Once acceptable conditions exist to finalize the transition, the distribution will begin. The current plan is to start once over 90% of voting weight has been upgraded, along with all the key services on the network.\n\n??? info \"Recommended preparations\"\n\n\tIn order to best prepare for the transition to new thresholds, the following items should be considered:\n\n\t**Work generation guide**  \n\tThe new [Work Generation guide](../integration-guides/work-generation.md) was written to help users and integrations leverage their work generation at all times.\n\n\t**Work validation**  \n\tThe [`work_validate`](../commands/rpc-protocol.md#work_validate) RPC has multiple changes to the response, one which will break most existing integrations when upgrading to V21, two others that will become useful after upgrade:\n\n\t* If `difficulty` parameter is not explicitly passed in the request, the existing `valid` field will not be returned (**breaking**)\n\t* `valid_all` is a new return field, `true` if the work is valid at the current default difficulty (will go up after epoch upgrade)\n\t* `valid_receive` is a new return field, `true` if the work is valid at the lower epoch_2 receive difficulty (only useful after the epoch upgrade is finished)\n\t* **If possible, it is best to avoid using this RPC until the epoch upgrade is completed**\n\n\t**External work generation**  \n\t[nano-work-server](https://github.com/nanocurrency/nano-work-server) has been updated to use the higher threshold (`fffffff800000000`) by default when not given an explicit `difficulty`. The `work_validate` response has the same breaking changes as above.\n\n\t* Prefer directly using the server as a [work peer](../integration-guides/work-generation.md#nodework_peers) as outlined in the [guide](../integration-guides/work-generation.md#work-generated-using-the-node-incl-work-peers). The node always requests the appropriate difficulty threshold when using RPC [block_create](../commands/rpc-protocol.md#block_create), or [work_generate](../commands/rpc-protocol.md#work_generate) with the optional `block`.\n\t* In cases where requesting directly from a node is not possible, avoid using the lower threshold for receive blocks (`fffffe0000000000`) until the epoch upgrade is fully complete.\n\n\t**Work generation performance**  \n\tTesting out work generation capabilities on a machine is recommended. Details for how to accomplish this can be found in the [Benchmark section of the Work Generation guide](../integration-guides/work-generation.md#benchmarks).\n\n\t**Active difficulty changes**  \n\tThe active difficulty [RPC command](../commands/rpc-protocol.md#active_difficulty) and [WebSocket topic](../integration-guides/websockets.md#active-difficulty) allow programatically retrieving the current difficulty from the `network_minimum` field in the response. When this field changes from `ffffffc000000000` (pre-epoch v2 difficulty) to `fffffff800000000` (8x higher epoch v2 difficulty), it indicates the epoch upgrade has begun.\n\n\t??? info \"Post-distribution changes\"\n\t\tAccounts that have already been upgraded can optionally use `fffffe0000000000` as the lower threshold for **receive blocks** going forward.  \n\t\tThe current epoch version of an opened account can be obtained using the [`account_info`](../commands/rpc-protocol.md#account_info) RPC, field `account_version`. Once that field has the value `\"2\"`, the lower threshold may be used.\n\n\t**Other integration considerations**  \n\tAlthough it is already recommended as best practice, any integrations not already calling for the frontier block when constructing a transaction should do so. If hashes are being internally tracked and frontier is not requested, the integration could unintentionally cause a fork on the account with distribution of epoch blocks.\n\n\tSee [Step 1: Get Account Info](../integration-guides/key-management.md#send-transaction) for the [`account_info`](../commands/rpc-protocol.md#account_info) RPC recommendation when creating transactions.\n\n### State blocks\n\n**Purpose**\n\nThe upgrade to [state blocks](/integration-guides/the-basics/#blocks-specifications) involved multiple node releases and three different actions on the network including distribution of two canary blocks and the first epoch blocks.\n\n**Transition Details**\n\n| Date | Type | Description |\n|------|------|-------------|\n| <span class=\"no-break\">2018-03-23</span> | Node release | Nano node V11.0 released with support for state blocks built-in but not yet activated. |\n| 2018-04-11 | Canary block | Parse canary block distributed which enabled parsing of state blocks by nodes so manual generation of that block type would be accepted on the network going forward. This action was performed after a majority of the network upgraded to the required V11.0 to allow confirmations to occur on this new block type. |\n| 2018-05-20 | Canary block | Generation canary block distributed which forced the generation of state blocks by nodes going forward. At this point both state and legacy type (open, send, receive, change) blocks remain valid on the network. |\n| 2018-08-20 | Node release | Nano node V15.0 released with support for epoch blocks built-in and away distribution. |\n| 2018-10-25 | <span class=\"no-break\">Epoch v1 block</span> <span class=\"no-break\">distribution start</span> | Distribution of epoch v1 blocks begins. |\n| 2019-05-24 | Epoch v1 block distribution end | Distribution of epoch v1 blocks is finished. All accounts, opened and unopened, are now capped and can no longer attempt inserting legacy style blocks. |\n\n### Vote-by-Hash\n\n**Purpose**\n\nThe upgrade to include the [vote-by-hash](../glossary.md#vote-by-hash) feature was based on a hardcoded timestamp in the node. After this time nodes began voting using this new feature.\n\n**Transition Details**\n\n| Date | Type | Description |\n|------|------|-------------|\n| 2018-08-22 | Node release | Nano node V15.2 release with support for vote-by-hash but not yet activated. |\n| 2018-09-01<br /><span class=\"no-break\">00:00:00 UTC</span> | Hardcoded date | Nodes upgraded to V15.2 began voting using the vote-by-hash method. Nodes not yet upgraded would fail to properly interpret votes so were no longer compatible with the network.\n\n---\n\n## Upgrades overview\n\nNano is a protocol, an agreed upon standard that allows computers to communicate with each other and agree on data. Because of these communication standards, having mechanisms that force all nodes to upgrade certain behaviors at the same time is critical to the consensus and consistency in the network.\n\nIn most blockchain networks these upgrades can be scheduled to take effect once a particular block height is hit because all nodes operate off a single, synchronous chain. Due to the Nano network being asynchronous this method doesn’t work, so instead we need methods for upgrading accounts asynchronously.\n\nThere are a couple different options for handling these upgrades and the process is currently managed primarily by the Nano Foundation. The upgrades are tested on the beta network to ensure all components are behaving as expecting before being considered for updating on the main network. If the behavior being changed involves consensus, any manual upgrade actions are triggered once a large majority of nodes and major services have upgraded. \n\nOf course many features, including protocol changes, can be activated immediately with a new node release, so these network upgrade scenarios are only reserved for certain cases. Options for providing better agreement on capabilities between nodes has been discussed in [this GitHub issue](https://github.com/nanocurrency/nano-node/issues/1308). There is also a discussion around how to potentially automate network upgrade processes in this forum topic: https://forum.nano.org/t/automated-network-upgrades/113.\n\n---\n\n## Upgrade methods\nThere are various methods used to upgrade and a brief overview of each, along with benefits and drawbacks, are included below. Upgrades for behaviors contained and activated with a single node release are not included as they are the foundation on top of which these other methods are made capable.\n\n### Phased node upgrades\nA feature is introduced in a node release but not activated for use across the network until a subsequent node release. See [State block upgrade](#state-blocks) details for an example.\n\n| Trigger | Uses blocks | Benefits | Drawbacks |\n|---------|-------------|----------|-----------|\n| Multiple node upgrades | No | <ul><li>No manual intervention or automated process needed</li><li>Uses already established upgrade process node operators are used to</li></ul> | <ul><li>Longer time period to get feature activated</li><li>Cannot be used to perform upgrades needed simultaneously across the network</li></ul> |\n\n### Hardcoded date\nA date is hardcoded into the node release to activate a feature or behavior at a specific time in the future. See [Vote-by-Hash upgrade](#vote-by-hash) details for an example.\n\n| Trigger | Uses blocks | Benefits | Drawbacks |\n|---------|-------------|----------|-----------|\n| Node upgrade + specific date | No | <ul><li><span class=\"no-break\">Simple to implement</span></li><li>No manual activity required</li></ul> | <ul><li>Inability to adjust timing without rushing new release out</li></ul> |\n\n### Canary block(s)\nThe hash of a block is hardcoded in the node such that once that hash is seen by the node, it will activate a feature or behavior. Multiple block hashes can be used to perform different phases of a transition. See [State blocks upgrade](#state-blocks) details for an example. \n\n| Trigger | Uses blocks | Benefits | Drawbacks |\n|---------|-------------|----------|-----------|\n| Node upgrade + distribution of one block per transition phase | Yes | <ul><li>Can be used for multi-phase upgrades, including in combination with other options</li><li>Timing flexible</li></ul> | <ul><li>Requires manual intervention</li><li>Adds additional code complexity</li><li>Can cause unchecked table to fill during transition</li></ul> |\n\n### Epoch blocks\nA special block type that can only be generated using a pre-determined private key. These will be accepted by nodes and be attached as the frontier blocks on each account-chain on the network. This feature was built to allow very limited controls using these blocks: they cannot change account balances or representatives, only upgrade the account versions to allow new block structures. See [State block upgrade](#state-blocks) details for an example.\n\n| Trigger | Uses blocks | Benefits | Drawbacks |\n|---------|-------------|----------|-----------|\n| Node upgrade + distribution of epoch blocks | Yes | <ul><li>Provides clean upgrade markers directly within the ledger on every account-chain</li><li>Timing flexible</li><li>Ability to asynchronously upgrade block versions even for inactive/unopened account chains</li></ul> | <ul><li>Requires manual intervention</li><li>Introduces ability for non-account owner to write to account chain in a highly restricted way</li><li>Adds additional code complexity</li><li>Requires large volume of blocks</li></ul> |\n\nThe following are the epoch versions and the related accounts which are used to distribute them to the network. For certain protocol implementations these epoch signers need to be included to efficiently determine whether incoming blocks are epoch blocks.\n\n| Version | Epoch signer account | Purpose |\n|---------|----------------------|-------|\n| 1 | `xrb_3t6k35gi95xu6tergt6p69ck76ogmitsa8mnijtpxm9fkcm736xtoncuohr3` (Genesis account) | See [State blocks](#state-blocks) |\n| 2 | `nano_3qb6o6i1tkzr6jwr5s7eehfxwg9x6eemitdinbpi7u8bjjwsgqfj4wzser3x` (Used for epoch 2 only) | See [Increased work difficulty](#increased-work-difficulty) |"
  },
  {
    "path": "docs/releases/node-releases.md",
    "content": "title: Node Releases\ndescription: Explore details of the current, next and past releases of the nano node, including protocol versions, release dates and supporting resources.\n\n# Node Releases\n\nUpdates to the Nano protocol are done through major node releases, occurring approximately every 1 to 4 months, and necessary patch releases in between. As changes are made to the protocol over time, newer node versions will stop peering with older versions. Details on which versions are actively peering, supported and being developed are included below.\n\n!!! info \"Nano Roadmap on GitHub\"\n\tHead over to the [Nano Roadmap GitHub Project](https://github.com/orgs/nanocurrency/projects/27) for a more dynamic and updated view of the upcoming features under research and implementation for the Nano node and protocol.\n\n## Current Release\nThe following release is the latest and only release actively supported by the Nano Foundation. This release and the [Active Releases](#active-releases) below represent the only node versions that will participate on the main network. More details can be found on the [Current Release Notes page](/releases/current-release-notes).\n\n--8<-- \"release-details-v28-2.md\"\n\n**Builds and Commands**\n\n--8<-- \"current-build-links-main.md\"\n\n---\n\n## Next Planned Release\nThe following release is currently under development. Details about potential features to be included can be found in the [Nano Roadmap GitHub Project](https://github.com/orgs/nanocurrency/projects/27).\n\n--8<-- \"release-details-v29-0.md\"\n\n--8<-- \"setup-beta-test-testing.md\"\n\n---\n\n## Active Releases\nThe following releases can still actively participate on the network by peering with other nodes of the same versions. Any nodes running versions earlier than these will no longer peer with the latest and fall out of sync with the network.\n\n--8<-- \"release-details-v28-2.md\"\n\n---\n\n--8<-- \"release-details-v28-1.md\"\n\n---\n\n--8<-- \"release-details-v28-0.md\"\n\n---\n\n--8<-- \"release-details-v27-1.md\"\n\n---\n\n--8<-- \"release-details-v27-0.md\"\n\n---\n\n--8<-- \"release-details-v26-1.md\"\n\n---\n\n--8<-- \"release-details-v26-0.md\"\n\n---\n\n## Inactive Releases\nThe following versions are no longer peered with by nodes running the active versions above and will not work properly communicate if run on the network. The details below are for historical purposes only.\n\n??? info \"Inactive Releases\"\n\n\t| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n\t|              |   |               |              |               |              |\n \t| 25.1 | 19 | 22 | 2023-06-02 | [V25.1](/releases/release-v25-1) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V25.1) - Milestone - [Changelog](https://github.com/nanocurrency/nano-node/compare/V25.0...V25.1) |\n \t| 25.0 | 19 | 22 | 2023-05-24 | [V25.0](/releases/release-v25-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V25.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/27) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V24.0...V25.0) |\n \t| 24.0 | 19 | 21 | 2023-01-19 | [V24.0](/releases/release-v24-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V24.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V23.3...V24.0) |\n  \t| 23.3 | 18 | 21 | 2022-06-13 | [V23.3](/releases/release-v23-3) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V23.3) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V23.1...V23.3) |\n   \t| 23.1 | 18 | 21 | 2022-05-19 | [V23.1](/releases/release-v23-1) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V23.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V23.0...V23.1) |\n   \t| 23.0 | 18 | 21 | 2022-01-17 | [V23.0](/releases/release-v23-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V23.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V22.1...V23.0) |\n   \t| 22.1 | 18 | 21 | 2021-06-11 | [V22.1](/releases/release-v22-1) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V22.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V22.0...V22.1) |\n   \t| 22.0 | 18 | 21 | 2021-05-14 | [V22.0](/releases/release-v22-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V22.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V21.3...V22.0) |\n   \t| 21.3 | 18 | 18 | 2021-03-18 | [V21.3](/releases/release-v21-3) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.3) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V21.2...V21.3) |\n\t| 21.2 | 18 | 18 | 2020-09-03 | [V21.2](/releases/release-v21-2) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.2) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V21.1...V21.2) |\n  \t| 21.1 | 18 | 18 | 2020-07-14 | [V21.1](/releases/release-v21-1) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V21.0...V21.1) |\n \t| 21.0 | 18 | 18 | 2020-06-16 | [V21.0](/releases/release-v21-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V22.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V20.0...V21.0) |\n\t| 20.0 | 17 | 15 | 2019-11-12 | [V20.0](/releases/release-v20-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V20.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V19.0...V20.0) |\n\t| 19.0 | 17 | 14 | 2019-07-11 | [V19.0](/releases/release-v19-0) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V19.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/9) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V18.0...V19.0) |\n\t| 18.0 | 16 | 13 | 2019-02-21 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V18.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/7) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V17.1...V18.0) |\n\t| 17.1 | 15 |  | 2018-12-21 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V17.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/17) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V17.0...V17.1) |\n\t| 17.0 | 15 |  | 2018-12-18 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V17.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/6) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V16.3...V17.0) |\n\t| 16.3 | 14 |  | 2018-11-20 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V16.3) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/14) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V16.2...V16.3) |\n\t| 16.2 | 14 |  | 2018-10-11 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V16.2) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/13) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V16.1...V16.2) |\n\t| 16.1 | 14 |  | 2018-09-29 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V16.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/11) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V16.0...V16.1) |\n\t| 16.0 | 14 |  | 2018-09-11 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V16.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/2) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V15.2...V16.0) |\n\t| 15.2 | 13 |  | 2018-08-22 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V15.2) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/8) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V15.1...V15.2) |\n\t| 15.1 | 13 |  | 2018-08-20 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V15.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/5) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V15.0...V15.1) |\n\t| 15.0 | 13 |  | 2018-08-20 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V15.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/1) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V14.2...V15.0) |\n\t| 14.2 | 11 |  | 2018-06-21 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V14.2) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V14.1...V14.2) |\n\t| 14.1 | 10 |  | 2018-06-11 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V14.1) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V14.0...V14.1) |\n\t| 14.0 | 10 |  | 2018-06-11 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V14.0) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V13.0...V14.0) |\n\t| 13.0 | 9  |  | 2018-05-10 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V13.0) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V12.1...V13.0) |\n\t| 12.1 | 8  |  | 2018-04-21 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V12.1) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V12.0...V12.1) |\n\t| 12.0 | 8  |  | 2018-04-18 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V12.0) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V11.2...V12.0) |\n\t| 11.2 | 7  |  | 2018-04-04 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V11.2) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V11.1...V11.2) |\n\t| 11.1 | 7  |  | 2018-03-29 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V11.1) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V11.0...V11.1) |\n\t| 11.0 | 7  |  | 2018-03-23 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V11.0) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V10.0...V11.0) |\n\t| 10.0 | 6  |  | 2018-02-15 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V10.0) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V9.0...V10.0) |\n\n\tDetails for versions older than 10.0 can be found in [tagged releases in Github](https://github.com/nanocurrency/nano-node/releases?after=V10.0).\n\n## Release Notes\n\nFor the latest release notes, see the [Current Release Notes page](/releases/current-release-notes). To reference release notes for older versions see the Previous Release Notes section in the table of contents.\n"
  },
  {
    "path": "docs/releases/release-v19-0.md",
    "content": "title: Release notes - V19.0 nano node\ndescription: Details of the V19.0 nano node release including upgrade notices, major features, API changes and more\n\n# V19.0\n\n--8<-- \"release-details-v19-0.md\"\n\n## Upgrade Notices\n\n### Version Limits\nUpgrades from versions V17.1 and to V19 will involve a sequential database upgrade and impact participation of the node on the network. RPC calls will be unavailable for a long period of time amongst other impacts.\n\n!!! warning \"Upgrading from V17.1 and earlier to V19.0 not recommended\"\n\tIt is highly recommended that nodes are upgraded to V18.0 first or a V18.0 ledger is acquired and used when upgrading to V19.0.\n\n### Confirmation tracking considerations\nThe addition of confirmation height to the database requires the node to validate that blocks are confirmed before the cementing can occur. This process can take up to 24 hours or longer to complete and will cause an increase in some resource usage, particularly CPU and network bandwidth increases, but won’t impact participation on the network. For integrations watching confirmations, the existing [HTTP callback](/integration-guides/advanced/#http-callback), [block_confirm](/commands/rpc-protocol/#block_confirm) RPC and [confirmation_history](/commands/rpc-protocol/#confirmation_history) RPC methods will continue to function as before.\n\n!!! warning \"Tracking confirmed block hashes required\"\n\tIt is required that tracking of confirmed block hashes outside the node is done to avoid potential duplicate notifications from causing issues. This was a requirement in previous versions and remains the same with V19.\n\nFor those looking to utilize the new WebSocket confirmation subscription or new `confirmed` field in [`block_info`](/commands/rpc-protocol/#block_info) RPC responses, special considerations should be taken if implementing before confirmation height updates are complete:\n\n* If the [websocket confirmation subscription](/integration-guides/websockets) is hooked up to receive all confirmations (default) then notifications for confirmations will come through during the cementing process on a new or upgrading ledger as the confirmation process will occur (it also fires for dependent confirmations)\n* Calls to [`block_info`](/commands/rpc-protocol/#block_info) for blocks in the ledger before the confirmation height upgrade process began may indicate `confirmed` as `false` despite their having been confirmed on the network before. This is expected behavior.\n* To validate that confirmation height upgrade is complete, note the `count` value from the [`block_count`](/commands/rpc-protocol/#block_count) RPC when the upgrade is started and once the `cemented` amount returned by this call (include the `include_cemented` option) is higher than that previous count, cementing is in sync.\n\n### Emitting nano_ prefixed addresses\nIn this and future versions, all addresses emitted from the node will use the `nano_` prefix. It will continue to support input for `xrb_` prefixed addresses, but all services must verify they are properly set up to handle the node outputting `nano_` prefixed addresses.\n\n### Live network over TCP\nLive network traffic over TCP is now available and operates on the same port (7075 for main network, 54000 for beta network) as the bootstrapping network that was already available over TCP. Because of this, existing network setups that are open inbound and outbound on port 7075 for TCP should function as expected with V19.0. For those running production services, it is still recommended to verify [network ports setup](/running-a-node/node-setup/#network-ports) and consider setting up a new node on internal networks to ensure it can connect and participate on the main network before production nodes are upgraded.\n\n* To check for proper connection via TCP, call the [`peers`](/commands/rpc-protocol/#peers) RPC with `peer_details` option and look for peers with `type` = `tcp`. This command can be used to search for these instances:\n\n```\ncurl -sd '{\"action\": \"peers\", \"peer_details\":\"true\"}' [::1]:7076 | grep \"\\\"type\\\": \\\"tcp\\\"\" | wc -l\n```\n\n---\n\n## Major Updates\n\n### Confirmation Height\nThis provides cementing of blocks by marking on an account the highest block height that has been confirmed for the account. A more detailed look at this feature can be found in the relatd Medium article: https://medium.com/nanocurrency/looking-up-to-confirmation-height-69f0cd2a85bc\n\n### TCP Network\nBlocks being published and voted on live are now supported via TCP, with UDP remaining as a fallback. See the TCP callouts in [Upgrade Notices](#upgrade-notices) above for information about verifying your network setup is ready for the upgrade.\n\n### Dynamic Proof-of-Work and Prioritization\nWith the ability to track work difficulty seen on the network and have the node wallet produce more difficult work for local blocks, this feature allows users to get their transactions prioritized for processing. More details about this feature can be found in the Medium article: https://medium.com/nanocurrency/dynamic-proof-of-work-prioritization-4618b78c5be9\n\n### RPC Process Options\nBy default the RPC server will run in the node process, but can be configured to run as a child process or completely out of process (currently limited to running on the same computer), depending on your needs. See [Running Nano as a service](/integration-guides/advanced/#running-nano-as-a-service) for more details.\n\n---\n\n## RPC/CLI Updates\n\n!!! success \"No Breaking Changes\"\n\tThere were no breaking changes made in V19 for any RPC or CLI commands. It is recommended any integrations run tests against V19 before upgrading production nodes, and also explore the various changes below to improve their setups.\n\n* **NEW** [`unopened`](/commands/rpc-protocol/#unopened) RPC provides the total pending balance for unopened accounts\n* **NEW** [`active_difficulty`](/commands/rpc-protocol/#active_difficulty) RPC allows tracking of the difficulty levels seen on the network which can be used to target higher levels of PoW to prioritize transactions\n* Using [`--diagnostics`](/commands/command-line-interface/#-diagnostics) CLI option now validates config and generates default one if it doesn’t exist\n* [`wallet_create`](/commands/rpc-protocol/#wallet_create) and [`wallet_change_seed`](/commands/rpc-protocol/#wallet_change_seed) RPCs accept seed and return restored accounts for easier seed management\n* The [`pending`](/commands/rpc-protocol/#pending) RPC can now optionally be using `sorting` by amount\n* Difficulty and multiplier options available in [`work_generate`](/commands/rpc-protocol/#work_generate) and [`work_validate`](/commands/rpc-protocol/#work_validate) RPCs for easier management of dynamic work levels on blocks\n* State blocks returned by [`block_info`](/commands/rpc-protocol/#block_info)/[`blocks_info`](/commands/rpc-protocol/#blocks_info) contain `subtype` for easier identification of block types\n* Json literals supported for block input ([`process`](/commands/rpc-protocol/#process), [`sign`](/commands/rpc-protocol/#sign), and [`block_hash`](/commands/rpc-protocol/#block_hash)) and output ([`block_create`](/commands/rpc-protocol/#block_create), [`block_info`](/commands/rpc-protocol/#block_info), [`blocks_info`](/commands/rpc-protocol/#blocks_info), [`confirmation_info`](/commands/rpc-protocol/#confirmation_info), [`unchecked_get`](/commands/rpc-protocol/#unchecked_get) and [`unchecked_keys`](/commands/rpc-protocol/#unchecked_keys)) on RPC calls\n* A new optional argument `include_not_found` in [`blocks_info`](/commands/rpc-protocol/#blocks_info) allows requests which contain invalid block hashes to get results that include an array of `blocks_not_found` instead of just an error\n* The [`account_history`](/commands/rpc-protocol/#account_history) RPC now:\n    * Accepts `account_filter` to allow filtering of results to a specific account or set of accounts\n\t* Allows `reverse` option to return details starting from the head block on the account\n\t* Block `height` on account chain now included in response\n* The [`accounts_pending`](/commands/rpc-protocol/#accounts_pending) RPC allows for sorting by amounts\n* For [`ledger`](/commands/rpc-protocol/#ledger) and [`unopened`](/commands/rpc-protocol/#unopened) RPCs a new optional threshold value can be used to limit results by balance\n* A new `include_cemented` option in [`block_count`](/commands/rpc-protocol/#block_count) RPC adds return of the cemented blocks in the ledger - cemented blocks are ones that have been confirmed and are at or below the confirmation height set on the account\n\n---\n\n## Node Configuration Updates\n\n**[Config.json](/running-a-node/configuration/#configjson)**  \n\n* New `active_elections_size` will limit the number of active elections allowed before dropping occurs. Default is 50,000 but higher settings are recommended for nodes provisioned with 8GB RAM or more\n* New `bandwidth_limit` will limit the outbound voting traffic to 5MB/s by default\n* New `confirmation_history_size` provides an adjustable limit on the batching of confirmations return in the [confirmation_history](/commands/rpc-protocol/#confirmation_history) RPC. Default 2048 which will support up to \\~56 confirmations/sec before confirmations may be missed. **The new [websocket setup](/integration-guides/websockets) with confirmation subscription is recommended over use of the [confirmation_history](/commands/rpc-protocol/#confirmation_history) RPC.**\n\n!!! tip \"Advanced Configuration\"\n\tNew `vote_generator_delay` allows for tuning performance of bundling votes by hash before sending.\n\n**[Rpc_config.json](/running-a-node/configuration/#rpc_configjson)**  \nThis new file was split out from the [config.json](/running-a-node/configuration/#configjson) file as the RPC server can now be run in its own process. Entries previously existing in [config.json](/running-a-node/configuration/#configjson) were migrated over and new values added. One setting to note: the `max_request_size` parameter is defaulted to 32MB - if your service is submitting data amounts larger than this you will need to adjust accordingly.\n\n**Automated config backups**  \nBackups of config files will be made prior to upgrades. During upgrades from V18 to V19 you will see a backup created even for the new [rpc_config.json](/running-a-node/configuration/#rpc_configjson) - this is expected behavior given the upgrade process.\n\n---\n\n## Developer/Debug Options\n\n* New launch flag for tuning block processor: [`--block_processor_batch_size`](/commands/command-line-interface/#-block_processor_batch_size), [`--block_processor_full_size`](/commands/command-line-interface/#-block_processor_full_size) and [`--block_processor_verification_size`](/commands/command-line-interface/#-block_processor_verification_size)\n* New [launch flags](/commands/command-line-interface/#launch-options) for disabling TCP real-time network and UDP for debugging connectivity\n* Expanded [`stats`](/commands/rpc-protocol/#stats) RPC contains additional values related to confirmation height\n\n---\n\n## Deprecations\n\nThe following RPC calls are being deprecated and will be removed in a future release:\n\n* [history](/commands/rpc-protocol/#history)\n* [payment_begin](/commands/rpc-protocol/#payment_begin)\n* [payment_end](/commands/rpc-protocol/#payment_end)\n* [payment_init](/commands/rpc-protocol/#payment_init)\n* [payment_wait](/commands/rpc-protocol/#payment_wait)\n\n---\n\n## Other Notices\n\n**New nanorep QR code standard**  \nA new nanorep [QR code standard](/integration-guides/the-basics/#uri-and-qr-code-standards) for easier management of representative changes was added for wallets and other services to consider supporting.\n\n**New recommended block explorer**  \nThe Nano Foundation supports a new recommended block explorer - [NanoCrawler](https://nanocrawler.cc). We encourage services and exchanges linking out to block explorers to consider using NanoCrawler going forward as it provides solid design and performance for referencing blocks, accounts and more."
  },
  {
    "path": "docs/releases/release-v20-0.md",
    "content": "title: Release notes - V20.0 nano node\ndescription: Details of the V20.0 nano node release including upgrade notices, major features, API changes and more\n\n# V20.0\n\n--8<-- \"release-details-v20-0.md\"\n\n## Upgrade Notices\n\n!!! warning \"Only node V18.0 and higher supported\"\n\tWith V20.0 only nodes V18.0 and higher will be peered with on the network (see [Active Releases](/releases/node-releases/#active-releases) above). This means any nodes running versions earlier than 18.0 will begin to lose peers and fall out of sync over time once upgrades to V20.0 begin.\n\n\t**If you are running a node version earlier than V18.0, please update as soon as possible to avoid disruption.**\n\n### Database upgrades\n\n!!! danger \"Upgrade requires downtime, read carefully\"\n\tPlease review the following details carefully as the automatic database upgrade process will cause downtime for the node.\nThis version brings some new optimizations to the ledger which require database upgrades to be performed. Due to the nature of upgrades, the following impacts will occur:\n\n* Upgrade times depend on specs of the node host but are expected to be between 5 and 15 minutes for most cases.\n* Upgrade activities are synchronous which means the node will not be participating on the network and RPC requests won’t be available during the upgrade process - **services requiring uptime should plan to swap out their ledger for one upgraded by a separate node or download from a trusted source.**\n* Ledger size will grow by up to 50% during this process - **please ensure you have free disk space of 3x the current ledger before starting the upgrade (currently ~16GB on the main network).**\n* A database vacuum will be automatically performed after the upgrade to reclaim disk space, which can be verified complete in the logs.\n* Doing proper ledger backups is recommended before starting this process. **Ensure you have enough disk space to allow for any ledger backups plus the additional disk space required for the database upgrade mentioned above.** A new config option in V20, `node.backup_before_upgrade`, will allow for automated ledger backups between future versions.\n\n### New .toml config files\nA new setup in V20.0 uses internal default config values, so config files are only needed for non-default settings. During upgrade new .toml format files will be created for the config.json and rpc_config.json files if they contain non-default values. Before migration `config_backup_toml_migration.json` and `rpc_config_backup_toml_migration.json` files will be created for backup.\n\nThe following commands can be used to generated commented out, complete config files for review:\n\n!!! warning \"Only set non-default values in .toml files\"\n\tIt is not recommended to uncomment all values in the .toml file output from commands below. Instead, only uncomment or insert non-default values to ensure any default value changes in future release are only overridden when needed.\n\n--8<-- \"toml-config-commands.md\"\n\nMore details on the new configuration setup can be found in the node [Configuration documentation](https://docs.nano.org/running-a-node/configuration/).\n\n### Networking changes\nImprovements to default network setup in this version requires less setup from node operators, specifically around port forwarding. Although new setups will immediately benefit, any existing systems that have already setup port forwarding may be impacted by these changes. For those systems, we recommend validating your network setup allows proper peering with a test V20.0 node prior to upgrading. If you run into issues, review the [Troubleshooting UPnP documentation](/running-a-node/troubleshooting/#troubleshooting-upnp) for assistance. Additional help can be sought in the [Node and Representative Management forum category](https://forum.nano.org/c/node-and-rep). \n\n### Proof-of-Work management\nA couple changes to PoW management that services should be aware of:\n\n* With OpenCL enabled, nodes will still use the local CPU for work generation by default. Setting `node.work_threads` to `0` will turn this off if required.\n* Regenerating PoW for delayed transactions during high network load will now happen by default through the [process RPC](https://docs.nano.org/commands/rpc-protocol/#process). If you wish to turn this off, setting `watch_work` to `false` is required.\n\n**Other updates to review**  \nImprovements to the [External Management](https://docs.nano.org/integration-guides/key-management/#external-management) and [Block Confirmation and Tracking](https://docs.nano.org/integration-guides/block-confirmation-tracking/) documentation should help clarify the recommended approaches to building integrations.\n\n\n---\n\n## Major Updates\n \n### Migration to .toml config files\nBetter legibility, support for comments, and no more having the node write to your config files are some of the benefits of this upgrade. Any non-default values captured in your existing .json files will be migrated and you can export a full list of configuration options for use with simple commands. See additional callouts in [Upgrade Notices](#upgrade-notices) above and in the node [Configuration documentation](https://docs.nano.org/running-a-node/configuration/).\n\n### Proof-of-Work regeneration outside development wallet\nAny requests to the [process RPC](https://docs.nano.org/commands/rpc-protocol/#process) will have the new `watch_work` option turned on by default, allowing the node to regenerate Proof-of-Work for blocks even if they are outside of the node’s development wallet. This makes Dynamic PoW and prioritization function more consistently across the network. If you have an external integration utilizing this RPC call, you will automatically start taking advantage of rework during confirmation delays on the network.\n\n### RocksDB experimental support\nWith better disk IO usage, RocksDB is being introduced in this version with experimental support. It is not recommended for use in production, but those interested in testing out a more performant database for the ledger should checkout [how to install RocksDB](https://docs.nano.org/running-a-node/rocksdb-ledger-backend/) and try it out on development and test systems. We also have a [related discussion in our forum](https://forum.nano.org/t/rocksdb-ledger-backend-testing/111/4) for those interested.\n\n### Active elections and other optimizations\nThanks to our excellent community testers putting effort into collecting and analyzing block, voting and confirmation data from the beta network, we’ve found various optimizations with the active elections process, confirmation request attempts and bootstrapping behaviors. Various changes have been implemented to help reduce resource usage on nodes in various areas and increase the available throughput on the network. This feature also enhances the effectiveness of prioritization and rework of PoW. No action is needed to take advantage of these great updates. \n\n### Infrastructure for PoW transition\nBack in September we [announced a new PoW algorithm design](https://medium.com/nanocurrency/v20-a-look-at-lydia-62bf6e1b24b) we had been working on which aimed to be memory hard. After open sourcing an implementation of the algorithm, an efficient low-memory solution was found and we subsequently [removed the algorithm implementation from V20](https://medium.com/nanocurrency/nano-pow-v20-update-e2197ff52941).\n\nAs part of the original implementation work we were able to setup infrastructure for moving PoW out of the node process in the future, and also added support for version 2 of epoch blocks, which will allow the [network upgrade](https://docs.nano.org/releases/network-upgrades/) later when a new PoW algorithm is ready. These updates will be included in Lydia but not be utilized until a future version. To follow along with node releases going forward, check out the [Upcoming Features](https://docs.nano.org/releases/upcoming-features/) page.\n\n\n---\n\n## RPC Updates\n\n* **BEHAVIOR CHANGE** [`process`](/commands/rpc-protocol/#process) now takes an optional flag `watch_work` (default `true`). Unless set to `false`, processed blocks can be subject to PoW rework\n* **BEHAVIOR CHANGE** [`bootstrap`](/commands/rpc-protocol/#bootstrap), [`bootstrap_any`](/commands/rpc-protocol/#bootstrap_any) and [`boostrap_lazy`](/commands/rpc-protocol/#bootstrap_lazy) will now throw errors when certain launch flags are used to disabled bootstrap methods - see each RPC page for details\n* **BEHAVIOR CHANGE** RPCs requiring work generation will now throw errors when work generation is disabled (no [work peers](/integration-guides/work-generation/#nodework_peers), no [OpenCL](/integration-guides/work-generation/#nodeopenclenable) and no work threads configured)\n* [`block_count`](/commands/rpc-protocol/#block_count) no longer requires config option `enable_control` to get the cemented block count\n* [`unchecked`](/commands/rpc-protocol/#unchecked) now takes an optional flag `json_block` to return blocks in JSON-format\n* [`version`](/commands/rpc-protocol/#version) now includes more fields - network label, identifier (hash of the genesis open block) and build information\n* [`peers`](/commands/rpc-protocol/#peers) and [`node_id`](/commands/rpc-protocol/#node_id) now return node IDs with a `node_` prefix\n* [work_generate](/commands/rpc-protocol/#work_generate) and [work_validate](/commands/rpc-protocol/#work_validate) can now take a multiplier (against base difficulty) to set a different difficulty threshold\n\n---\n\n## CLI Updates\n\n* **NEW** [`generate_config [node|rpc]`](/commands/command-line-interface/#-generate_config-noderpc) prints sample configuration files to _stdout_\n    * `use_defaults` additional argument to generate uncommented entries (not recommended)\n* **NEW** [`config`](/commands/command-line-interface/#-config-keyvalue) passes configuration arguments, alternative to setting in the config file\n\n---\n\n## Node Configuration Updates\n\n!!! info \"Support in Nano Forum\"\n\tFor node operators looking to upgrade to V20.0 or tune their configurations, the [Node and Representative Management category](https://forum.nano.org/c/node-and-rep) of the forum is a great resource to use.\n\n!!! tip \"Generate .toml config to see options\"\n\tAs noted in the [Upgrade Notices](#upgrade-notices) above, this version will migrate your existing .json files over to .toml files. Only non-default values for these fields will be added to the new .toml file. If you wish to adjust other options, use the [config generation commands](/running-a-node/configuration/#configuration-file-locations) to see all available options.\n\nThe following options are notable node configuration updates. Additional configuration changes have been included in this release and can be found when generating the config files.\n\n* `backup_before_upgrade` (default `false`) enables automatic backup of the ledger and wallet databases when updating to a new node version\n* `work_watcher_period` (default `5` seconds) controls how frequently the node should check the confirmation status of block in the work watcher, and re-generate higher difficulty work if unconfirmed\n* `max_work_generate_multiplier` (default `64.0`) previously `max_work_generate_difficulty`, now a multiplier for easier management, specifies the absolute maximum difficulty multiplier to be used for work generation\n\n---\n\n## Developer/Debug Options\n\n* New RPC [`epoch_upgrade`](/commands/rpc-protocol/#epoch_upgrade) allowing easier epoch distribution (**Note** - this epoch requires a special private key to be used, see the [Network Upgrades](/releases/network-upgrades/#epoch-blocks) page for information)\n* RPC [`bootstrap`](/commands/rpc-protocol/#bootstrap) has a new optional \"bypass_frontier_confirmation\"\n* RPC [`bootstrap_status`](/commands/rpc-protocol/#bootstrap_status) now displays more data about the current bootstrap attempt\n* New CLI [`debug_stacktrace`](/commands/command-line-interface/#-debug_stacktrace) displays an example stacktrace, simulating an unexpected program crash\n* New CLI [`debug_account_versions`](/commands/command-line-interface/#-debug_account_versions) displays the total number of accounts separated by version and opened/unopened\n* CLI [`debug_validate_blocks`](/commands/command-line-interface/#-debug_validate_blocks) updated to cover more cases\n* CLI `debug_profile_verify` renamed to [`debug_profile_validate`](/commands/command-line-interface/#-debug_profile_validate) and now provides simplified work validation profiling\n* New CMake build options:\n  * `NANO_ROCKSDB` enables use of the RocksDB database backend, experimental\n  * `NANO_WARN_TO_ERR` turns compiler warnings into errors on Linux/Mac\n  * `NANO_TIMED_LOCKS` provides information on mutexes held for a long time\n  * `NANO_STACKTRACE_BACKTRACE` uses `libbacktrace` to provide stacktraces\n  * `CI_BUILD` if set, uses the `TRAVIS_TAG` environment variable to modify the locally reported node version, to help with support tickets\n\n---\n\n## Deprecations\n\nThe following functionality is now deprecated and will be removed in a future release:\n\n* Addresses containing a dash (ex. `nano-` or `xrb-`) are being deprecated and will not longer be compatible with the node in a future release. Addresses using underscores will only be supported."
  },
  {
    "path": "docs/releases/release-v21-0.md",
    "content": "title: Release notes - V21.0 nano node\ndescription: Details of the V21.0 nano node release including upgrade notices, major features, API changes and more\n\n# V21.0\n\n--8<-- \"release-details-v21-0.md\"\n\n## Upgrade Notices\n\n!!! warning \"Upgrade notices for nodes upgrading below V21.0\"\n\tThese upgrade notices and other details are only for nodes upgrading from V20.0 and lower. For operators upgrading to the latest from V21.0 or higher there are no special considerations.\n\nThe following key upgrade details should be reviewed by all node operators to determine how they will impact plans for upgrading:\n\n### Database upgrades\nAn in-place database upgrade will occur with this release to accomodate epoch-related flags. Machines will need at least 30GB free disk space to accommodate the upgrade. During the upgrade process, which may take multiple hours to complete depending on the machine specs, the node will not participate on the network or respond to RPC calls.\n\nAs a result, **the recommended approach is to upgrade the ledger in a separate environment before replacing on production**. For detailed steps on this approach and other options, see the [Updating the node section](/running-a-node/ledger-management/#updating-the-node) of the Ledger Management page.\n\n### Minor RPC breaking changes\nAlthough breaking changes were kept to a minimum in this release, there are two RPC calls with such changes: `work_validate` and `bootstrap_status`. For integrations using them, carefully review the additional details on these changes included in the [RPC Updates](#rpc-updates) section below.\n\n### Upcoming v2 epoch upgrade\nAs outlined in the [February Development Update: V21 PoW Difficulty Increases](https://medium.com/nanocurrency/development-update-v21-pow-difficulty-increases-362b5d052c8e), an epoch block distribution must be done to complete the upgrade to the new work difficulty thresholds. **All integrations generating work are encouraged to review the details on the [Network Upgrades page under the Upcoming upgrades section](/releases/network-upgrades#increased-work-difficulty) ahead of the epoch V2 distribution.**\n\n!!! danger \"Only nodes V21.0+ will be active after epoch distribution\"\n\tNodes upgrading to V21.0+ will remain peered with nodes V19.0 and V20.0 on the network until the epoch v2 block distribution begins. **After the first epoch v2 block is distributed, all nodes not running V21.0+ will no longer be able to participate on the network.** This distribution will occur once 90% of voting weight and key services on the network have upgraded. Communications around the progress towards this goal will be sent following the release.\n\n\tMore details about this network upgrade can be found on the [Network Upgrades page under the Upcoming upgrades section](/releases/network-upgrades#increased-work-difficulty)\n\n\t**All network participants are encouraged to upgrade to V21.1 as soon as possible to avoid disruption.**\n\n### UDP disabled by default\nWith all active peers capable of communicating via TCP, the UDP connections will be disabled by default in this version. To avoid disruptions, all nodes should allow traffic on 7075 TCP (see [Network Ports](/running-a-node/node-setup/#network-ports) details) and once upgraded, the [`peers`](/commands/rpc-protocol/#peers) RPC call should return at least dozens of peers and the [`confirmation_quorum`](/commands/rpc-protocol/#confirmation_quorum) RPC call should have a `peers_stake_total` value in the high tens of millions of Nano.\n\nAlthough not recommended, if necessary the temporary use of UDP can be done with the new [`--enable_udp`](/commands/command-line-interface/#-enable_udp) flag.\n\n---\n\n## Major Updates\n \n### Work difficulty increase\nAs mentioned in the [Upgrade Notices](#upgrade-notices) section above, work difficulty changes were implemented in V21, but will not be activated until epoch v2 blocks are distributed at a future date. Please review the [Upcoming upgrades section](/releases/network-upgrades#increased-work-difficulty) of the Network Upgrades page for details.\n\nUpdates on the progress toward the epoch upgrade will be posted in our many social channels as well as sent through our technical updates mailing list which can be joined here: <a href=\"http://eepurl.com/gZucL1\" class=\"button\" target=\"_blank\" rel=\"noopener\">Join Mailing List</a>.\n\n### Node Telemetry\nTo allow better communication between nodes about various performance and other details, telemetry was added between peers. Various version details, account and block counts, active difficulty and more can be discovered from individual peers or summarized across them.\n\nDetails of what is shared and options for receiving them can be found in the [node telemetry WebSocket section](../integration-guides/websockets.md#node-telemetry) and [`node_telemetry`](/commands/rpc-protocol/#telemetry) RPC.  For protocol level details, see [Node Telemetry section](/protocol-design/networking/#node-telemetry) under Protocol Design > Networking.\n\n--8<-- \"warning-telemetry-can-be-forged.md\"\n\nContinued conversation around telemetry is happening through the [related forum discussion](https://forum.nano.org/t/node-telemetry-metrics/112/8).\n\n### IPC 2.0\nAs a key update towards the upcoming RPC 2.0 redesign, this background upgrade will provide more performant communication to the node, allow easier integration across various languages by supporting Flatbuffers and provide the foundation for [more granular authorization of specific calls](https://github.com/cryptocode/notes/wiki/IPC-Authorization).\n\n### Better election alignment and performance\nBehind the scenes many improvements were made to better streamline alignment of elections across the network and allow for better performance. Resource usage by nodes, particularly network bandwidth, will be reduced even further than previous levels. No action is needed to take advantage of this increase other than upgrading your node to V21 as soon as you can!\n\n---\n\n## Node Configuration and Management Updates\n\n!!! info \"Support in Nano Forum\"\n\tFor node operators looking to upgrade their node or tune their configurations, the [Node and Representative Management category](https://forum.nano.org/c/node-and-rep) of the forum is a great resource to use.\n\nThe following options are notable node configuration updates. Additional configuration changes have been included in this release and can be found when generating the config files.\n\n* The ability to enable a static log file name is available via the `node.logging.stable_log_filename` option. If update to `true`, a static log file of `log/node.log` will be written to and rotated to timestamped files once full. This option requires the node being built with Boost 1.70+ (default for Docker images and published binaries).\n* Nodes will now clear their peers lists and online weight if they are started after more than 1 week of being offline. This aims to improve re-peering in these situations, as well as provide more accurate online weight values as the node begins participating on the network again ([related PR](https://github.com/nanocurrency/nano-node/pull/2506)).\n* When `watch_work` is set to `false` in the [process](../commands/rpc-protocol.md#process) RPC, it is no longer required to have [`enable_control`](../running-a-node/configuration.md#enable_control) = `true` in the `config-rpc.toml` file.\n\n!!! note \"Log when voting, warn multiple accounts\"\n\tWhen the node is started there are new messages pushed to the logs which indicate when voting is enabled and how many representatives are configured to vote. A warning will be included in both the logs and `stdout` if multiple representatives are configured to be voting.\n\n---\n\n## RPC Updates\n\n* **BREAKING CHANGE** [`work_validate`](/commands/rpc-protocol/#work_validate) has multiple changes to the response, one which will break most existing integrations:\n    * If `difficulty` parameter is not explicitly passed in the request, the existing `valid` field will not be returned (**breaking**)\n    * `valid_all` is a new return field, `true` if the work is valid at the current default difficulty (will go up after epoch upgrade)\n    * `valid_receive` is a new return field, `true` if the work is valid at the lower epoch_2 receive difficulty (only useful after the epoch upgrade is finished)\n    * **To best understand how these and other epoch related changes will impact your integration, it is highly recommended that the [Upcoming upgrades > Increased work difficulty section](/releases/network-upgrades#increased-work-difficulty) of the Network Upgrades is carefully reviewed**\n* `active_difficulty` [RPC](/commands/rpc-protocol/#active_difficulty) and [WebSocket](/integration-guides/websockets/#active-difficulty) will automatically begin returning the higher difficulty threshold for send/change blocks in the `network_minimum` field once the epoch upgrade begins, otherwise the response formats will remain the same\n* **BREAKING CHANGE** [`bootstrap_status`](/commands/rpc-protocol/#bootstrap_status) responses now have `connections` field as an array of connection-related fields and adds an `attempts` field with an area of individual bootstrap attempt details, each including information such as a unique id, type of bootstrap (legacy, lazy) and various other granular information.\n* [`block_create`](/commands/rpc-protocol/#block_create) response now contains the `difficulty` value of the work included in the block for easy reference by integrations. When generating work for the created block, the node ledger data is used to estimate the required difficulty threshold.\n* [`work_generate`](/commands/rpc-protocol/#work_generate) request now accepts optional `block` (and corresponding boolean `json_block`), which is used to estimate the required difficulty threshold by using ledger data. Two common use-cases are generating work for blocks created elsewhere, and re-generating work for a previously published block.\n* [`account_info`](/commands/rpc-protocol/#account_info) responses now contain `confirmation_height_frontier` which is the hash of the last confirmed block.\n\n--8<-- \"warning-process-sub-type-recommended.md\"\n\n## CLI Updates\n\n* **NEW** [`--debug_generate_crash_report`](../commands/command-line-interface.md#-debug_generate_crash_report) greatly simplifies [troubleshooting when a node crashes in Linux](../running-a-node/troubleshooting.md#what-to-do-if-the-node-crashes-linux).\n* **NEW** [`--rebuild_database`](../commands/command-line-interface.md#-rebuild_database) provides a better compaction method for LMDB. **NOTE:** This requires approximately `data.ldb` file size * 2 in free space on disk.\n* **NEW** [`--compare_rep_weights`](../commands/command-line-interface.md#-compare_rep_weights) gives the ability to compare the current ledger voting weight distribution against the hard coded weights provided in the node on release. Useful when attempting to use a downloaded ledger. More details on use can be found on the [Ledger Management page](../running-a-node/ledger-management.md).\n* **NEW** [`--inactive_votes_cache_size`](../commands/command-line-interface.md#-inactive_votes_cache_size) allows adjusting of the cache that holds votes where the block does not have an action election, default is 16384 votes.\n\n---\n\n## WebSockets\n\n* Updates to WebSocket subscriptions are now allowed on the [`confirmation`](/integration-guides/websockets/#confirmations) topic. With `options` of `accounts_add` and `accounts_del` an existing subscription can now be more easily managed to avoid resubscribing with a large list of accounts or managing multiple subscriptions.\n* **NEW** [`bootstrap`](/integration-guides/websockets/#bootstrap) topic provides notifications about the starting and exiting of bootstrap attempts.\n* **NEW** [`new_unconfirmed_block`](/integration-guides/websockets/#new-unconfirmed-blocks) topic provides notifications about blocks which were just processed and are being seen by the node for the first time. This is useful for integrations that want to watch for blocks they didn't create themselves, but for which they want to update with new work (external work watcher).\n* WebSocket server is now enabled by default in V21+ Docker images to make it more consistent with RPC server setup and documented port mappings\n\n---\n\n## Developer/Debug Options\n\n* [`confirmation_active`](/commands/rpc-protocol/#confirmation_active) RPC response includes new `unconfirmed` and `confirmed` fields to help with more granular election tracking and monitoring\n* When the node is started there are new messages pushed to the logs which indicate when voting is enabled and how many representatives are configured to vote. A warning will be included in both the logs and `stdout` if multiple representatives are configured to be voting.\n* New [`--debug_generate_crash_report`](/commands/command-line-interface/#-debug_generate_crash_report) CLI command consumes the dump files to create a helpful crash report. See [What to do if the node crashes (Linux)](/running-a-node/troubleshooting/#what-to-do-if-the-node-crashes-linux) for more details on using this command.\n* New [`logging.log_rpc`](../running-a-node/configuration.md#logginglog_rpc) configuration can be optionally set to `false` to prevent explicit logging of RPC requests made to the node\n\n---\n\n## Deprecations\n\nThe following functionality is now deprecated and will be removed in a future release:\n\n* UDP is disabled by default in this version and will be removed in a future release. Launch flag [`--disable_udp`](/commands/command-line-interface/#deprecated-commands) is deprecated and temporary use of UDP can be done with the new [`--enable_udp`](/commands/command-line-interface/#-enable_udp) flag."
  },
  {
    "path": "docs/releases/release-v21-1.md",
    "content": "title: Release notes - V21.1 nano node\ndescription: Details of the V21.1 nano node release including upgrade notices, major features, API changes and more\n\n# V21.1\n\n--8<-- \"release-details-v21-1.md\"\n\n!!! success \"No special upgrade considerations\"\n\tV21.1 is a service release which doesn't require any special upgrade considerations when upgrading from V21.0."
  },
  {
    "path": "docs/releases/release-v21-2.md",
    "content": "title: Release notes - V21.2 nano node\ndescription: Details of the V21.2 nano node release including upgrade notices, major features, API changes and more\n\n# V21.2\n\n--8<-- \"release-details-v21-2.md\"\n\n!!! success \"No special upgrade considerations\"\n\tV21.2 is a service release which doesn't require any special upgrade considerations when upgrading from V21.0."
  },
  {
    "path": "docs/releases/release-v21-3.md",
    "content": "title: Release notes - V21.3 nano node\ndescription: Details of the V21.3 nano node release including upgrade notices, major features, API changes and more\n\n# V21.3\n\n\n--8<-- \"release-details-v21-3.md\"\n\n!!! success \"No special upgrade considerations\"\n\tV21.3 is a service release which doesn't require any special upgrade considerations when upgrading from V21.0 or higher. If upgrading from V20.0 or lower, please review the [V21.0 Release Notes](release-v21-0.md) for upgrade notices and other considerations.**"
  },
  {
    "path": "docs/releases/release-v22-0.md",
    "content": "title: Release notes - V22.0 nano node\ndescription: Details of the V22.0 nano node release including upgrade notices, major features, API changes and more\n\n# V22.0\n\n--8<-- \"release-details-v22-0.md\"\n\n## Upgrade notices\n\n### Database upgrades with increased disk requirements\n\n!!! warning \"Upgrade requires 150GB of free disk space\"\n\nThis version performs a database upgrade of the ledger format on disk. This process requires a large amount of disk space and due to the DoS attack on nano earlier in the year, the disk space requirements during upgrade require attention.\n\nUpgrading to V22.0 requires approximately 150GB of free disk space, however, the final upgraded ledger size is \\~50GB. The upgrade takes between 30 minutes and 4 hours on most machines, depending on the speed of the disk.\n\nDue to these impacts, [upgrading the database in a staging environment](../running-a-node/ledger-management.md#updating-the-node) is recommended where possible. For operators who are unable to perform this direct upgrade, you may [download a snapshot of an already upgraded ledger](../running-a-node/ledger-management.md#downloaded-ledger-files).\n\nWe are in the process of adding online upgrade support for future versions which will eliminate these upgrade disk requirements.\n\n### Docker tag `latest` removed\n\nAs a best security and node management practice, the `latest` tag for Docker containers has been removed from available tags at https://hub.docker.com/r/nanocurrency/nano. Going forward the only tags available for the live network will be explicit version tags, no dynamically updated tags will be maintained. For this upgrade, the tag `V22.0` will be required.\n\n### Upcoming canary block for final votes activation\n\nIn order for nodes to begin issuing [final votes](#final-votes) for unconfirmed blocks, and using those votes for cementing blocks, a [canary block](network-upgrades.md#canary-blocks) will need to be distributed to activate the feature. To ensure enough vote weight is prepared for the consensus change, the Nano Foundation will be monitoring upgrades on the network and will distribute the canary block once at least 80% of voting weight is on V22.0+.\n\nTo stay updated on progress towards the canary block distribution, please sign up for the [technical update mailing list](http://eepurl.com/gZucL1).\n\n### Remove election difficulty sorting\n\nHigher work difficulty on blocks will no longer result in increased election priority. Instead, a [new election prioritization and scheduling mechanism](https://forum.nano.org/t/election-scheduler-and-prioritization-revamp/1837) was designed with initial changes being made in this release. With these changes the work generation is still required for transactions to be valid, but higher difficulties are no longer part of prioritization. Instead, the balance of the account and the time it was last used will be used to determine when elections are started.\n\nFor nearly all services and integrations this will have no noticeable impact on how quickly voting will begin on a published transaction. As more improvements are added in V23, addition details will be available about the future of work generation and recommendations for optimizing this in the long term.\n\n### Node count limits per subnetwork\n\nThe current limits of 5 nodes per IPv4 address is being expanded to include /48 IPv6 subnetwork as well. In addition, a 20 node limit is being applied to the /24 IPv4 range and /32 IPv6 range.\n\n### Node V19.0 or later required\n\nUpgrades from versions below V19.0 have been removed from the code base. All nodes must be on at least V19.0 for the upgrade to V22.0 to work. Note that participation on the live network does require at [least V21.0 of the node](node-releases.md#active-releases).\n\n---\n\n## Major updates\n\n### Final votes\n\nTo help with handle specific fork situations, the [final votes](https://github.com/nanocurrency/nano-node/pull/3134) feature will add a second round of voting to the consensus process as follows: once initial voting weight for an unconfirmed block has reached [quorum](../glossary.md#quorum), nodes will issue final votes by setting the timestamp to the maximum integer possible for that field (`18446744073709551615`). These final votes will then be required to confirm and cement a block in the ledger.\n\nBecause this is a consensus change, a network upgrade is required to activate. As noted above, this will be done using a canary block once at least 80% of voting weight on the network has been upgraded. After the canary block is distributed by the Nano Foundation, the final votes will be used for cementing going forward.\n\n!!! info \"RocksDB remains experimental\"\n    Previous communications related to RocksDB being approved for production use should be ignored. The RocksDB should still be considered experimental and not recommended for production use.\n\n### Experimental ledger pruning\n\nAn initial, experimental version of a much requested feature is being made available in V22.0. This feature is NOT for production use. Many of the details can be found in the [related pull request](https://github.com/nanocurrency/nano-node/pull/2881), but the main goal is to reduce the disk space required for the ledger by removing blocks not near the frontiers or that are pending sends. Although the final ledger size will be significantly reduced, it does require first downloading the full ledger and then pruning, to ensure integrity of the data. It also is not available for voting nodes, only non-voting nodes will allow this feature.\n\n### Election scheduler and prioritization changes\n\nA [new election prioritization and scheduling mechanism](https://forum.nano.org/t/election-scheduler-and-prioritization-revamp/1837) was designed and the initial updates for this feature are included in this release. These changes will keep work generation as a requirement for transactions to be valid, but switch the [election scheduler](https://github.com/nanocurrency/nano-node/pull/3208) and [prioritization](https://github.com/nanocurrency/nano-node/pull/3190) behaviors to use a combination of balance and time since the account was last used. With this approach nodes across the network are expected to see improved performance in clearing the backlog of elections while the network is not actively under spam attack. Future changes in V23 will be targeting improved performance while the network is under load. \n\n---\n\n## Node configuration and management updates\n\n* **REMOVAL** The `online_weight_quorum` value, which was used in combination with online voting weight values to determine the voting weight necessary for confirming a block, has been [removed as a configuration option and hardcoded to 67% for all nodes](https://github.com/nanocurrency/nano-node/pull/3052). Any existing overrides for `online_weight_quorum` in the `config-node.toml` file can be removed.\n* The default value for `active_elections_size` in `config-node.toml` has been reduced from 50,000 to 5,000. This change was to help limit extra network traffic generated by large amounts of elections as behavior of the active elections container was modified for election scheduler and prioritization needs.\n\n\n---\n\n## RPC updates\n\n* **BREAKING CHANGE** All RPCs with the `include_only_confirmed` option available has that option set by default and setting it explicitly to `false` will be required to have unconfirmed blocks returned/counted in the response (such as `pending` amounts or `balance` amounts). These RPCs include:\n  * **NEW OPTION** [account_balance](../commands/rpc-protocol.md#account_balance)\n  * [accounts_pending](../commands/rpc-protocol.md#accounts_pending)\n  * [pending](../commands/rpc-protocol.md#pending)\n  * [pending_exists](../commands/rpc-protocol.md#pending_exists)\n  * [wallet_pending](../commands/rpc-protocol.md#wallet_pending)\n* Option to `include_only_confirmed` blocks for the returned `balance` and `pending` fields was added to [`account_balance`](../commands/rpc-protocol.md#account_balance) and `include_confirmed` option to provide extra `confirmed_balance` and `confirmed_height` fields for [`account_info`](../commands/rpc-protocol.md#account_info) also added (`confirmed_height` was only added for consistency in naming, as `confirmation_height` already existed and will be the same value). \n* **BREAKING CHANGE** `block_count_type` was removed after the database upgrade that merged blocks into the state block format was completed.\n* **BREAKING CHANGE** When both `count` and `sorting` options are included in the RPC [pending](../commands/rpc-protocol.md#pending), the result will now be done over all pending blocks before the subset is returned. Previously only a portion of the pending was scanned before returning the requested count.\n* RPC [`bootstrap_any`](../commands/rpc-protocol.md#bootstrap_any) now allows and optional `account` field for targeting specific account attempt\n* RPC [`bootstrap_lazy`](../commands/rpc-protocol.md#bootstrap_lazy) now returns more accurate status of whether the bootstrap was `started` and whether a new lazy `key_inserted`\n\n---\n\n## CLI updates\n\n* Passing values using the `--config` command no longer require escaping of quotes\n* **NEW** `--migrate_database_lmdb_to_rocksdb` does the necessary migration of an existing LMDB database over to RocksDB. Note that after migration the necessary [configuration changes to enabled RocksDB](../running-a-node/ledger-management.md#enable-rocksdb) must be done to use the new backend.\n\n---\n\n## WebSocket updates\n\n* Topic `confirmation` has new optional `include_election_info_with_votes` which will include the `representative`, `timestamp`, `sequence`, `hash`, and `weight` for each of the votes on the election.\n\n---\n\n## Developer/debug options\n\n* When a legacy bootstrap is returned from RPC [`bootstrap_status`](../commands/rpc-protocol.md#bootstrap_status), the `frontiers_age` and `last_account` will now be included\n* **NEW CLI** `--debug_unconfirmed_frontiers` outputs the frontier and confirmed (cemented) frontier for any accounts which are not yet fully cemented (warning: could output a lot if used on a ledger with large amount of uncemented blocks).\n* New `nano_test_network` added which is the basis for the new public test network for integration testing (test.nano.org) and allows [customizing of various core network parameters](https://github.com/nanocurrency/nano-node/pull/3037) to allow for custom test networks to be deployed from scratch.\n* C++17 support is now required\n* Block rollback messages in logs are no longer available by default to avoid excessive logs in certain scenarios (`node.logging.ledger_rollback` option to enable)\n* Signals available for config file reloading with initial support for `bandwidth_limit` and `bandwidth_limit_burst_ratio` options by calling `kill -SIGHUP [process #]`\n\n---\n\n## Deprecations/removals\n\n* All RPC `payment_*` removed (previously deprecated in V19.0)\n* RPC `active_difficuly` deprecated due to difficulty not longer being used for prioritization, only for checking validity of blocks\n* CLI commands `--batch_size` and `--debug_mass_activity` removed (previously deprecated in V21.0)\n"
  },
  {
    "path": "docs/releases/release-v22-1.md",
    "content": "title: Release notes - V22.1 nano node\ndescription: Details of the V22.1 nano node release including upgrade notices and major features.\n\n# V22.1\n\n--8<-- \"release-details-v22-1.md\"\n\n## Upgrade notices\nThere are no special considerations when upgrading from V22.0 to V22.1. There are no database upgrades or API changes.\n\n\n## Major updates\n\n* Fixes an issue where UPnP leases might be lost and port mappings might cease\n* Fixes an issue where manually started or hinted elections would be quickly removed from the election scheduler\n* Fixes an issue where new connections might not be able to be accepted\n* Doubles the length of the connection backlog\n\n## Developer/debug options\n\n* Elections dropped due to timeout/overflow have been separated in node statistics.\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v23-0.md",
    "content": "title: Release notes - V23.0 nano node\ndescription: Details of the V23.0 nano node release including upgrade notices, major features, API changes and more\n\n# V23.0\n\n--8<-- \"release-details-v23-0.md\"\n\n## Upgrade notices\n\nThere are no upgrade impacts to be considered with V23.0. However all exchanges, services and integrations are encouraged to test their implementations on the [test network](../running-a-node/test-network.md) (excluding load testing).\n\n---\n\n## Major updates\n\n### Refactoring and cleanup\n\nMany of the more than 150 pull requests closed for this release were part of efforts to refactor and cleanup many areas of the code. These updates are helping provide a foundation for better improvements in subsequent releases. More details can be found in the [V23.0 Follis — Development Update](https://blog.nano.org/v23-0-follis-development-update-55ef8c41cbb).\n\n### Unit tests and bug fixes\n\nAnother focus area was improving and cleaning up the unit tests, along with various minor bugs and fixes. Test runs are now more consistent and reliable with V23, and will continue to be improved on in the coming releases.\n\n### Naming conventions\n\nRecent updates to naming conventions are noteworthy:\n\n#### Receivable instead of pending\n\nAfter community discussions, a change from the term `pending` to `receivable`/`ready to be received` and similar was decided on and partially implemented in V23.0. These changes can be seen in various areas of the node wallet as well as across many RPC calls. \n\n!!! success \"\"\n    _There are no breaking changes with this update, but switching to `receivable` terms is advised._\n\nTo keep backwards compatibility:\n\n- The `pending` RPC call name is deprecated in favor of `receivable` (additional RPC call name changes to be completed in the next release)\n- All RPC responses containing a key of `pending` still include the key as deprecated, and an additional `receivable` key with the same value was added as the preferred option\n- Any RPC examples in the documentation have been updated to favor `receivable`\n\nThe aim of this change is to help reduce the confusion around send blocks that are confirmed, but a matching receive block has not yet been published for them. See [RPC updates](#pendingreceivable-term-rpc-updates) below for a list of impacted RPC calls.\n\n#### Unit name simplifications\n\nUpdates to simplify the unit names used within the node wallet and unit conversion RPCs were completed. This means previous unit conversion RPCs are now deprecated (see [Deprecations/removals](#deprecationsremovals) below) and the wallet uses the only remaining standard units of `raw` (10^0) and `nano` (10^30).\n\n---\n\n## RPC updates\n\n* [`account_history`](../commands/rpc-protocol.md#account_history) RPC now includes whether the block was `confirmed` in the response, allowing more efficient confirmation validation in some cases.\n* **NEW** [`accounts_representatives`](../commands/rpc-protocol.md#accounts_representatives) RPC allows requesting representatives from multiple accounts in a single call.\n* [`block_info`](../commands/rpc-protocol.md#block_info) and [`blocks_info`](../commands/rpc-protocol.md#blocks_info) RPCs now include the `successor` block hash in responses for easier ledger walking.\n* [`delegators`](../commands/rpc-protocol.md#delegators) now allows for optional parameters `count` (to limit number of returned accounts), `threshold` (to require a minimum balance for returned delegators) and `start` (to allow paging by providing account to start after).\n* [`wallet_info`](../commands/rpc-protocol.md#wallet_info) RPC return includes count of all blocks and confirmed blocks from all accounts in the given wallet.\n\n### Pending/Receivable term RPC updates\n\nThere are various changes related to the switch from `pending` to `receivable` in RPC calls as noted above. **Although all changes are backwards compatible, switching to the term `receivable` in these cases is advised**.\n\nThere are two main types of changes: RPC call name changes and updates to keys in the call requests and responses.\n\n**RPC call name changes**\n\n* [`pending`](../commands/rpc-protocol.md#pending) replaced by [`receivable`](../commands/rpc-protocol.md#receivable)\n* [`pending_exists`](../commands/rpc-protocol.md#pending_exists) replaced by [`receivable_exists`](../commands/rpc-protocol.md#receivable_exists)\n\n**Response/request key changes only**\n\n* [`account_balance`](../commands/rpc-protocol.md#account_balance)\n* [`account_info`](../commands/rpc-protocol.md#account_info)\n* [`accounts_balances`](../commands/rpc-protocol.md#accounts_balances)\n* [`blocks_info`](../commands/rpc-protocol.md#blocks_info)\n* [`ledger`](../commands/rpc-protocol.md#ledger)\n* [`wallet_balances`](../commands/rpc-protocol.md#wallet_balances)\n* [`wallet_info`](../commands/rpc-protocol.md#wallet_info)\n* [`wallet_ledger`](../commands/rpc-protocol.md#wallet_ledger)\n\n!!! success \"\"\n    _There are no breaking changes with this update, but switching to `receivable` terms is advised._\n\n---\n\n## WebSocket updates\n\nSupport added for `wss://` to allow secure WebSocket connections alongside existing TLS support for RPC. Further details and documentation is pending, with initial pull request available here: https://github.com/nanocurrency/nano-node/pull/3032.\n\n---\n\n## Developer/debug options\n\n* **NEW CONFIGURATION OPTION** `node.rep_crawler_weight_minimum` allows configuration of the minimum vote weight a node needs to qualify for the [rep crawler](../node-implementation/voting.md#rep-crawler) to solicit confirmations from them. By default the rep crawler only tracks Principal Representatives (all previous versions behave this way) but a lower value for this option can provide broader tracking for debugging purposes.\n* **NEW CLI COMMANDS**\n    * [`--disable_add_initial_peers`](../commands/command-line-interface.md#-disable_add_initial_peers)\n    * [`--debug_block_dump`](../commands/command-line-interface.md#-debug_block_dump)\n    * [`--initialize`](../commands/command-line-interface.md#-initialize)\n    * [`--disable_ongoing_bootstrap`](../commands/command-line-interface.md#-disable_ongoing_bootstrap)\n    * [`--disable_rep_crawler`](../commands/command-line-interface.md#-disable_rep_crawler)\n    * [`--disable_request_loop`](../commands/command-line-interface.md#-disable_request_loop)\n\n---\n\n## Deprecations/removals\n\n* Most unit conversion RPCs were deprecated, including `krai_from_raw`, `krai_to_raw`, `mrai_from_raw`, `mrai_to_raw`, `rai_from_raw`, `rai_to_raw`\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v23-1.md",
    "content": "title: Release notes - V23.1 nano node\ndescription: Details of the V23.1 nano node release including upgrade notices and major features.\n\n# V23.1\n\n--8<-- \"release-details-v23-1.md\"\n\n## Upgrade notices\nThere are no special considerations when upgrading from V22.X or V23.0 to V23.1. There are no database upgrades or API changes.\n\n## Fixes\n\n* Remove a message that is always logged during block processing that could be abused to fill log files\n* Clean up the node_id_handshake message handler which in some circumstances can fill memory\n* Bound the unchecked table size to ensure it cannot be abused to use up all available disk space\n* Limit entries into the unchecked table to two items per dependency\n* Add persistent node IDs to provide a method for removing spoof telemetry messages\n* Default to turn off inactive votes cache to avoid excessive vote relaying\n* Disable a vote processor flushing in the request loop which can block during heavy load\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v23-3.md",
    "content": "title: Release notes - V23.3 nano node\ndescription: Details of the V23.3 nano node release including upgrade notices and major features.\n\n# V23.3\n\n--8<-- \"release-details-v23-3.md\"\n\n## Upgrade notices\nThere are no special considerations when upgrading from V22.X or V23.X to V23.3. There are no database upgrades or API changes.\n\n## Fixes\n\n* Correctly check for the magic bytes and the network in the message header\n* Remove a debug assert that crashes the node on receipt of zero node ID\n* Improve the vote processor class and limit its flush operation, so it does not block for too long\n* Disable migrating of unchecked table from LMDB to RocksDB as this upgrade is not really needed\n* Convert functions on unchecked_map class that return iterators to use for_each with a functor to execute on each result\n* Reimplement nano::unchecked_store::get in terms of unchecked_store::for_each and remove backend-specific variants\n* Add a memory container for blocks once the initial bootstrap threshold is reached having the blocks pruned in FIFO order\n* Vote hinting re-enabled\n* Fix nano::json_handler::unchecked_get which did not get translated properly with the for_each conversion\n* Merge identical code branches for convenience at nano::unchecked_store_partial::put\n* Change the unchecked blocks to be put in to a memory container instead of disk when the initial bootstrap threshold is reached having the blocks removed from the container in FIFO order once the maximum of 256,000 blocks are reached\n* Change the active_transactions::cleanup_election to use shared pointer instead of an object reference\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v24-0.md",
    "content": "title: Release notes - V24.0 nano node\ndescription: Details of the V24.0 nano node release including upgrade notices, major features, API changes and more\n\n# V24.0\n\n--8<-- \"release-details-v24-0.md\"\n\n## Upgrade notices\n\nThere are no database migrations or other upgrade considerations for this release.\n\nExchanges who have not faced issues with their nano nodes are recommended to await the arrival of V25.0.\n\nIn general, exchanges, services and integrations are encouraged to join [the test network](../running-a-node/test-network.md) for performing integration testing. This network mimics the live network in work requirements but has a smaller number of nodes and a lower block count for easier setup.\n\n### Minor RPC breaking changes\nThere are three RPC calls with such changes: `accounts_balances`, `accounts_frontiers`, and `accounts_representatives`. For integrations using them, carefully review the additional details on these changes included in the [RPC Updates](#rpc-updates) section below.\n\n---\n\n## Major updates\n\n### Unit testing stability\n\nOne significant advancement for V24 is improved unit test stability and clarity. After older unit tests started failing intermittently, the node’s unit tests have been reviewed, documented and improved which has significantly aided subsequent development work.\n\n### Ascending bootstrap\n\nV24 brings three major changes designed to improve bootstrap reliability:\n\n* The ability for the bootstrap process to request blocks in ascending order. Doing this allows blocks to be inserted in their natural order, greatly decreasing reliance on the unchecked table.\n\n* A new set of stateless bootstrap messages which allows bootstrap query/response to be sent through the node’s real-time socket. This also means the node doesn’t need to open secondary sockets in order to perform bootstrapping. Not needing to open additional sockets also allows nodes behind strict inbound firewalls to participate in bootstrapping.\n\n* A new bootstrapping algorithm that is statistical and more randomised is being worked on, making use of the above improvements. This algorithm will run continuously in the background, adjusting speed depending on sync status and will eventually supersede the legacy bootstrap algorithm.\n\n### Rebalancing buckets\n\nIn V23, the election scheduler process was added and set out an initial schedule of “buckets” in which transactions get prioritised for confirmation. This initial schedule uses powers of 2 from 0 to 128 to specify the lower bound for each bucket. This was a simple way to initially balance buckets but it needed refining to operate in the range of natural transactions. An iterative improvement was made in this area, allowing our limited development resources to work on other advancements.\n\nIn addition to rebalancing the scheduler buckets, the scheduling algorithm was adjusted to consider both previous and subsequent balances. This addresses an issue with the scheduler where sending the full balance of an account would put the transaction in the lowest priority tier.\n\n### Hinted elections redesign\n\nDuring a heavy spam attack, it’s possible that different nodes will observe the same blocks arriving at different times (for example, due to slow/fast hardware, network connection). This could negatively impact synchronisation of the election scheduler. Hinted elections is a mechanism that helps the standard scheduler get back on track.\n\nA parallel election scheduling algorithm caches and looks at votes received from the network and starts elections for blocks that received the most voting weight and weren’t already prioritised by the standard election scheduler. The number of elections started via hinting is limited (by default 1000 vs 5000 for normal elections) and shouldn’t have an impact on normal elections, but helps the network stay in and get back to synchronised state faster.\n\n### Removal of UDP code\n\nThe nano protocol was originally written using UDP and later transitioned to TCP. The UDP server has been disabled for several versions however we still needed to maintain the UDP code because of its use in unit tests. Most of the unit tests have been rewritten and most of the UDP code removed.\n\n### Unit tests and bug fixes\n\nAnother focus area was improving and cleaning up the unit tests, along with various minor bugs and fixes. Test runs are now more consistent and reliable with V23, and will continue to be improved on in the coming releases.\n\nImproving and cleaning up the unit tests were still another focus area on V24, along with various minor bugs and fixes. Test runs are now more consistent and reliable, and will continue to be improved on in the coming releases.\n\n### Naming conventions\n\nRecent updates to naming conventions are noteworthy:\n\n#### Receivable instead of pending\n\nThere were more updates on switching from the old term `pending` to `receivable`. These updates are considered to be complete in V24.0. As stated for V23.0, these changes can be seen in various areas of the node as well across many RPC calls. The backward compatibility has not been changed.\n\n---\n\n## RPC updates\n\n* **NEW** `populate_backlog` is a RPC command for populating backlog. Populating backlog is a process in the node that scans all accounts, checks for unconfirmed blocks in that account's chain and queues those blocks for confirmation via election scheduler.\n* [`accounts_balances`](https://docs.nano.org/commands/rpc-protocol/#accounts_balances), [`accounts_frontiers`](https://docs.nano.org/commands/rpc-protocol/#accounts_frontiers), and [`accounts_representatives`](https://docs.nano.org/commands/rpc-protocol/#accounts_representatives) RPCs now return per account results making possible to them to retrieve partial data in case there is any error in one of the accounts. **NOTE:** There is a bug in the `accounts_balances` feature, where it does not return zero balance or zero receivable for accounts that are not found. Instead, it returns an error. Additionally, returning an error message instead of the account details may disrupt the JSON parsing. The `accounts_frontiers` and `accounts_representatives` contain the same bug by mixing error data with the details. This issue will be addressed in a future release.\n* [`blocks_info`](https://docs.nano.org/commands/rpc-protocol/#block_info) RPC now has a `receive_hash` option. This field facilitates retrieving the receive block of a specific send block.\n* [`receivable`](https://docs.nano.org/commands/rpc-protocol/#receivable) RPC now as an `offset` parameter that enables retrieving receivable blocks in chunks.\n \n### Pending/Receivable term RPC updates\n\nThere are various changes related to the switch from `pending` to `receivable` in RPC calls as noted above. **Although all changes are backwards compatible, switching to the term `receivable` in these cases is advised**.\n\nThere are two main types of changes: RPC call name changes and updates to keys in the call requests and responses.\n\n**RPC call name changes**\n\n* [`search_pending`](../commands/rpc-protocol.md#search_pending) replaced by [`search_receivable`](../commands/rpc-protocol.md#search_receivable)\n* [`search_pending_all`](../commands/rpc-protocol.md#search_pending_all) replaced by [`search_receivable_all`](../commands/rpc-protocol.md#search_receivable_all)\n* [`wallet_pending`](../commands/rpc-protocol.md#wallet_pending) replaced by [`wallet_receivable`](../commands/rpc-protocol.md#wallet_receivable)\n* [`accounts_pending`](../commands/rpc-protocol.md#accounts_pending) replaced by [`accounts_receivable`](../commands/rpc-protocol.md#accounts_receivable)\n\n**Response/request key changes only**\n\n* [`pending`](../commands/rpc-protocol.md#pending) and [`pending_exists`](../commands/rpc-protocol.md#pending_exists) now return `deprecated=true`\n* [`wallet_ledger`](../commands/rpc-protocol.md#wallet_ledger) now supports the `receivable` option\n* [`ledger`](../commands/rpc-protocol.md#ledger) now supports the `receivable` option\n* [`block_info`](../commands/rpc-protocol.md#block_info) now supports the `receivable` option\n* [`account_info`](../commands/rpc-protocol.md#account_info) replies the `confirmed_receivable` field when `include_confirmed` is set\n\n!!! success \"\"\n    _There are no breaking changes with this update, but switching to `receivable` terms is advised._\n\n---\n\n## WebSocket updates\n\n* [`confirmation`](../integration-guides/websockets.md#confirmations) topic now has a `sideband` info for confirmed blocks\n* **NEW** `started_elections` topic has been added. \n\n---\n\n## CLI updates \n\n* [`--confirmation_height_clear`](../commands/command-line-interface.md#--confirmationheightclear) now requires `'all'` to be specified by the `account` parameter to clear all the accounts\n* [`--help`](../commands/command-line-interface.md#--help) now displays the options in alphabetical order\n\n---\n\n## Deprecations/Removals\n\n* JSON serializing of config files are not supported anymore\n\n---\n\n## Developer Wallet\n\n* Updated to match `block_count` RPC\n* Fixed bugs related to the pruned count and the unchecked count\n* Updated to use the new Nano symbol\n\n---\n\n## Developer/Debug Options\n\n* Improves error logging for `open_burn_account` tentative\n* Added `collect_container_info` for `election_scheduler` and `prioritization` classes\n* Improved election result logging\n* Included `election.confirmed` outcome in log\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v25-0.md",
    "content": "title: Release notes - V25.0 nano node\ndescription: Details of the V25.0 nano node release including upgrade notices, major features, API changes and more\n\n# V25.0\n\n--8<-- \"release-details-v25-0.md\"\n\n## Upgrade notices\n\nAll nodes are encouraged to upgrade to V25.0 including exchanges.\n\nIn general, exchanges, services and integrations are encouraged to join [the test network](../running-a-node/test-network.md) for performing integration testing. This network mimics the live network in work requirements but has a smaller number of nodes and a lower block count for easier setup.\n\n### Database upgrade\n\nThis version no longer stores unchecked data in the database. The data is now held in memory, resulting in reduced storage access and mitigated database growth. As a result of this change, an upgrade will be performed on the database to eliminate the unchecked table. This upgrade is applicable to both database types, LMDB and RocksDB.\n\n### Minor RPC breaking changes\nThe following RPC calls have undergone minor breaking changes: `accounts_balances`, `accounts_frontiers`, and `accounts_representatives`. These changes address the issue where an error is returned for the entire response when at least one of the requested accounts results in an error.\n\nThe fix was initially introduced in [V24.0](release-v24-0.md#rpc-updates), but it inadvertently disrupted the `accounts_balances` RPC by breaking the default zero balance and zero receivable response when the account is not found in the ledger. Additionally, the absence of the error message within a specific entry disrupts the established JSON format.\n\nIf your integrations use these RPC calls, we strongly recommend carefully reviewing the additional details on these changes included in the [RPC Updates](#rpc-updates) section below. Please note that another disruption may occur: if all the requested account keys result in errors, there will be only the entry `errors`.\n\n### Minor breaking change for PoW\n\nThe Proof-of-Work (PoW) server is no longer bundled within the docker artifact.\n\n---\n\n## Major updates\n\n### Adding the ascending bootstrap client\nIn [V24](release-v24-0.md#ascending-bootstrap) the server components and network messages were added. In V25, the bootstrap client is added, enabling it to finally work on the nano node software. This leads to several improvements which reduce socket usage, lighten the burden on the unchecked table by pulling blocks in an ascending manner instead of descending, allows the unchecked table to exist entirely in memory, reduces bandwidth and isolates the bootstrapping logic from the rest of the node.\n\nThe client also uses a priority-weighted tracing algorithm to pull successive iterations of blocks from peers, which further improves the efficiency of the syncing process. Overall, these improvements significantly reduce the time it takes for a new node to sync with the rest of the network.\n\n### Optimistic elections\nThis is a major change that improves the efficiency and speed of the election process. When a node is starting up, it needs to confirm a large number of blocks, and this process can take a long time. Currently, the node confirms blocks one by one. The new feature randomly selects an account with unconfirmed blocks and confirms the latest unconfirmed block in the account chain, which speeds up the process. This feature is limited to 500 elections and does not replace the current method. It's a simple algorithm but makes a big difference in the efficiency of the process. This should significantly increase the speed of node syncing.\n\n### Complete removal of UDP channel implementation\nThe nano protocol was originally written using UDP and later transitioned to TCP. In the V24 release, most of the UDP protocol code was already removed. In V25, the remaining of it has been removed from the network channels, leaving the only implemented transport layer to be the TCP protocol. It enabled some other removals like the message buffer class and other code that was already unuseful since the UDP deprecation.\n\n### Bug fixes\nSeveral bugs were fixed, including issues with counting successes/failures, updating token buckets, and race conditions.\n\n### Enhancements\nSeveral enhancements were made to the Nano node software, including improved stat counters, refactoring of the election vote process, and cleaning up of stat counters for active transactions.\n\n### Build, Text, Automate, Cleanup & Chores\nThe V25 version of the Nano node software includes several updates related to build, test, automation, cleanup, and chores. These updates include improvements to the unit test chains setup, fixing sign comparison mismatches, removing unnecessary \"usings,\" disambiguating implemented locks, and more. Additionally, the minimum required OSX version has been increased to 10.15, and the IPv6 socket is now specified for IPv4 communication.\n\n---\n\n## RPC updates\n\n* The RPCs [`account_balances`](https://docs.nano.org/commands/rpc-protocol/#accounts_balances), [`accounts_frontiers`](https://docs.nano.org/commands/rpc-protocol/#accounts_frontiers), and [`accounts_representatives`](https://docs.nano.org/commands/rpc-protocol/#accounts_representatives) have been fixed to return errors within an `errors` entry. Additionally, the `accounts_balances` RPC has been updated to return zero balance and zero receivable when an account is not found in the ledger.\n\n---\n\n## Deprecations/Removals\n\n* JSON serializing of config files are not supported anymore\n* Removed some stat types related to UDP\n* Removed live updating bandwidth limits: this change was made to fix a thread safety issue. It may be reverted if config reloading gets fully implemented\n\n---\n\n## Ledger & Database\n* The unchecked table was removed from LMDB and RocksDB\n* RocksDB now supports database upgrades\n* RocksDB was updated to version 7.8.3\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v25-1.md",
    "content": "title: Release notes - V25.1 nano node\ndescription: Details of the V25.1 nano node release including upgrade notices.\n\n# V25.1\n\n--8<-- \"release-details-v25-1.md\"\n\n## Upgrade notices\n\nIf you are coming from V25.0, there are no special considerations when upgrading to V25.1. If you are upgrading from previous versions, please check for the possible RPC breaking changes on [V25.0](release-v25-0.md#minor-rpc-breaking-changes).\n\nAll nodes are encouraged to upgrade to V25.1, including exchanges.\n\n## Fixes\n\n* Fixes builds for Windows and RedHat Linux variants.\n* Fixes an issue with the “process” RPC which could hang in some circumstances.\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v26-0.md",
    "content": "title: Release notes - V26.0 nano node\ndescription: Details of the V26.0 nano node release.\n\n# V26.0\n\n--8<-- \"release-details-v26-0.md\"\n\n---\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v26-1.md",
    "content": "title: Release notes - V26.1 nano node\ndescription: Details of the V26.1 nano node.\n\n# V26.1\n\n--8<-- \"release-details-v26-1.md\"\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v27-0.md",
    "content": "title: Release notes - V27.0 nano node\ndescription: Details of the V27.0 nano node release.\n\n# V27.0\n\n--8<-- \"release-details-v27-0.md\"\n\n---\n\n## Upgrade notices\n\nAll nodes are encouraged to upgrade to V27.0, including exchanges.\n\nIn general, exchanges, services and integrations are encouraged to join [the test network](../running-a-node/test-network.md) for performing integration testing. This network mimics the live network in work requirements but has a smaller number of nodes and a lower block count for easier setup.\n\n### Database upgrade\n\nV27 includes a one-way database upgrade that takes a few minutes to run.\n\n### gcc-12 users\n\nIf your system uses gcc-12 there is a known bug in the compiler optimiser that has problems compiling c++20 code.\n\nIf you get a compiler error related to -Wrestrict, it's recomended to either downgrade to gcc-11 or upgrade to gcc-13 to compile the node. See more [detail here](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329). Debian 12 (bookworm) ships with gcc-12 by default, but has a package for gcc-11.\n\n### RPC changes\n\nV27 RPC changes are  minor and non-breaking.\n\n---\n\n## Major updates\n\n### Fair Queueing Enhancements\nDesigned by Piotr Wójcik, the fair queue has been integrated into the nano node, ensuring equal processing time for each network peer. The fair queue orders requests in a fair, round-robin fashion, which is needed by several components in the node, including block, network message, bootstrap request, and vote request processing. These fair queues help ensure that higher priority transactions are seen and prioritized more consistently, even during network congestion.\n\n### Network Handling Rewrite\nSignificant portions of the networking stack have been rewritten and simplified. Legacy code that handled half-duplex TCP channels has been removed and all TCP connections now operate full-duplex. Asynchronous callback-style code has been replaced with coroutines in several places simplifying code flow.\n\n### Network Flow Control Improvements\nThis suite of features optimises transaction processing, guards against spam and denial-of-service attacks, and ensures equitable resource distribution.\n\n### Up to 255 votes per message\nV27 allows voting messages to contain up to 255 votes per message, an increase from the previous limit of 12. This enhancement reduces voting traffic and network congestion, improving consensus efficiency and robustness. Note that this change de-peers nodes older than V26.0.\n\n### Additional prioritization bucket\nAn additional prioritization bucket for amounts between Ӿ0.000001 and Ӿ0.0003 has been added, for a total of 63. More precisely, amounts above Ӿ0.0000006 (2^79 raw) and below Ӿ0.000309 (2^88 raw) will fall in this new bucket. All existing buckets remain unchanged to minimize the impact of bucket reallocation. Many Nano faucets send amounts in this range to new users trying out nano for the first time, and many wallets use Ӿ0.000001 as the minimum amount for automatic receives. More details on buckets and bucket ranges [here](../protocol-design/spam-work-and-prioritization.md/#prioritization-details).  \n\n### Configurable Logging\nA new, highly configurable logging system allows node operators to tailor logging levels and outputs, enhancing debugging and health monitoring without excessive disk space use.\n\n### Bug fixes\nSeveral bugs were fixed, including race conditions, missing notifications, & dependency issues.\n\n---\n\n## Official V27 Blog Post\nSee [here](https://nano.org/en/blog/v27-denarius-preview--eb8bceac) for the official V27 blog post.\n\n---\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v27-1.md",
    "content": "title: Release notes - V27.1 nano node\ndescription: Details of the V27.1 nano node release.\n\n# V27.1\n\n--8<-- \"release-details-v27-1.md\"\n\n---\n\n## Upgrade notices\n\nAll nodes are encouraged to upgrade to V27.1, including exchanges.\n\nIn general, exchanges, services and integrations are encouraged to join [the test network](../running-a-node/test-network.md) for performing integration testing. This network mimics the live network in work requirements but has a smaller number of nodes and a lower block count for easier setup.\n\n### Database upgrade\n\nIf you are upgrading from previous versions (e.g. V26), V27 includes a one-way database upgrade that takes a few minutes to run.\n\nIf you are upgrading from V27.0, there is no additional database upgrade.\n\n### gcc-12 users\n\nIf your system uses gcc-12 there is a known bug in the compiler optimiser that has problems compiling c++20 code.\n\nIf you get a compiler error related to -Wrestrict, it's recomended to either downgrade to gcc-11 or upgrade to gcc-13 to compile the node. See more [detail here](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329). Debian 12 (bookworm) ships with gcc-12 by default, but has a package for gcc-11.\n\n---\n\n## Major updates\n\nSee the [V27.0 release notes](release-v27-0.md#major-updates) for the major updates list.\n\n---\n\n## Fixes \n\n* [Bounding the growth of the election_winner_details set](https://github.com/nanocurrency/nano-node/pull/4720)\n* [Cementing fixes](https://github.com/nanocurrency/nano-node/pull/4722)\n\n---\n\n## Builds and commands\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v28-0.md",
    "content": "title: Release notes - V28.0 nano node\ndescription: Details of the V28.0 nano node release.\n\n# V28.0\n\n--8<-- \"release-details-v28-0.md\"\n\n---\n\n## Major updates\n\n### Bounded Block Backlog\n\nThe Bounded Block Backlog (BBB) adds a maximum limit for unconfirmed transactions (currently 100,000), helping prevent resource exhaustion attacks & ensuring more consistent confirmation rates during high network load.\n\n### Traffic Shaping\n\nTraffic shaping complements the fair queuing system implemented in V27, by managing outbound network traffic more intelligently. This helps ensure more equal distribution of bandwidth between peers, reduces network congestion, & helps maintain performance during peak network usage.\n\n### RocksDB Optimizations\n\nNano's RocksDB implementation has been updated to V9.7.2, and the default configuration settings have been updated to match current best practices. Additionally, a range of improvements related to memory usage, thread handling, & lock management have been included, improving stability and performance for nodes using the RocksDB database backend.\n\n### Vote Generation Improvements\n\nThe vote generation system has been redesigned to be more resource-efficient, reducing CPU usage, improving priority vote processing, & bundling votes more intelligently. \n\n### Vote Filter Implementation\n\nA new vote filter implements sophisticated deduplication and relevancy checks, eliminating redudant votes, reducing bandwidth usage, lowering memory usage, & reducing overall network load. \n\n### Vote Rebroadcasting Overhaul\n\nThe vote_rebroadcaster component was overhauled, making vote rebroadcasting smarter & more efficient. Previously we used a simple queue with a naive filter which rebroadcasted all processed votes. Since a vote can contain up to 255 hashes and the same vote can be processed multiple times depending on the exact timing of election activation, this introduced a rather significant inefficiency where we could rebroadcast the same vote multiple times, wasting bandwidth. The vote rebroadcaster overhaul significantly improves this by improving tracking & filtering of vote rebroadcasts.\n\n### Bootstrap & Database Optimizations\n\nBulk frontier scanning has been added to the ascending bootstrapper, processing up to 1,000 accounts simultaneously. I/O overhead has also been reduced through smart caching and optimised database queries. Additionally, a new `fork_cache` & block bootstrapping improvements were added, speeding up fork resolution during certain bootstrap scenarios.\n\n### Legacy Code Removal\n\nThe legacy bootstrapper has been completely removed, simplifying the codebase & improving code maintability.\n\n### Bug fixes\n\nSeveral bugs were fixed, including race conditions, missing notifications, & dependency issues.\n\n---\n\n## Upgrade notices\n\n### RPC changes\n\n#### Bootstrap RPCs\n\nThe following bootstrap related RPC commands have been extended, modified, or added:\n\n* `bootstrap_status`: previously this returned the status of legacy bootstrap; modified to return the status of ascending bootstrap\n* `bootstrap_reset`: resets ascending bootstrap state, both priority and blocking sets are cleared\n* `bootstrap_priorities`: dumps info about priority and blocking sets to aid in debugging any potential problems\n\nPlease note that the above bootstrap RPC commands are internal/diagnostic RPCs, & may not be stable.\n\n#### Confirmation_info RPC\n\nThis is a backwards compatible change that updated the `confirmation_info` RPC call to include a list of `representatives_final` (representatives that have voted with final votes). Thanks to MajorChump for submitting this PR!\n\n#### Ratio & Conversion related RPCs\n\nXrb_ratio has been removed and replaced with nano_ratio:\n\n| Existing name | ratio | Value | New name |\n|---------------|-------|-------|----------|\n| Gxrb_ratio | 10^33 | 1000 nano | Knano_ratio |\n| Mxrb_ratio | 10^30 | 1 nano | nano_ratio |\n| kxrb_ratio | 10^27 | 0.001 nano | __removed__ |\n| xrb_ratio | 10^24 | 0.000001 | __removed__ |\n \nThe following deprecated RPC endpoints for conversion have been removed:\n* `krai_from_raw`\n* `krai_to_raw`\n* `mrai_from_raw`\n* `mrai_to_raw`\n* `rai_from_raw`\n* `rai_to_raw`\n\nFor alternatives, see [Unit Conversion RPCs](../commands/rpc-protocol.md#unit-conversion-rpcs)\n\n#### Other RPC Changes\n\nAn optional `include_linked_account` parameter was added to the `account_history`, `block_info`, and `blocks_info` RPC endpoints. When enabled, the response will include a new field `linked_account`, which returns the linked account associated with the block (or \"0\" if no linked account exists/was found e.g. due to pruning). Thanks to Exxenoz for submitting this PR!\n\n### Config changes\n\nWhile the previous toml for database backend configuration is still supported for now, it is being replaced by `database_backend = \"lmdb\"` or `database_backend = \"rocksdb\"` under `[node]`.\n\nConsider reviewing and updating your configuration files with the `--update_config` or `--generate_config` CLI parameters. Review the [toml config quick reference](../snippets/toml-config-commands.md), or the [CLI documentation](../commands/command-line-interface.md#nano_node-commands) for additional details.\n\n### Known Issues\n\n#### Pruned Bootstrap\n\nBootstrapping from scratch with pruning enabled causes the node to crash. As a potential workaround, node operators may be able to bootstrap with pruning disabled, and then enable pruning after bootstrapping is complete. A higher max_pruning_depth may also reduce the frequency of crashes. Pruning is considered experimental, so use it at your own risk - pruning is not currently recommended for important production services.\n\n#### Sideband Crashes\nSome nodes may experience occasional crashes due to missing sideband in election blocks. Please upgrade to v28.1 to resolve this issue.\n\n---\n\n## Official V28 Blog Post\nSee [here](https://nano.org/en/blog/v28-electrum-the-start-of-commercial-grade--1b8adb83) for the official V28 blog post.\n\n---\n\n## V28 GitHub Milestone\nSee [here](https://github.com/nanocurrency/nano-node/milestone/34?closed=1) for the V28 GitHub milestone.\n\n---\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v28-1.md",
    "content": "title: Release notes - V28.1 nano node\ndescription: Details of the V28.1 nano node release.\n\n# V28.1\n\n--8<-- \"release-details-v28-1.md\"\n\n---\n\n## Major updates\n\n### V28.0 Feature List\n\nSee the [V28.0 release notes](../releases/release-v28-0.md#major-updates) for the full feature list.\n\n### Bug fixes\n\nSome v28.0 users experienced occasional node crashes due to missing sideband in election blocks. This has been resolved in v28.1.\n\n\n---\n\n## Upgrade notices\n\n### Known Issues\n\nBootstrapping from scratch with pruning enabled causes the node to crash. As a potential workaround, node operators may be able to bootstrap with pruning disabled, and then enable pruning after bootstrapping is complete. A higher max_pruning_depth may also reduce the frequency of crashes. Pruning is considered experimental, so use it at your own risk - pruning is not currently recommended for important production services.\n\n---\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/release-v28-2.md",
    "content": "title: Release notes - V28.2 nano node\ndescription: Details of the V28.2 nano node release.\n\n# V28.2\n\n--8<-- \"release-details-v28-2.md\"\n\n---\n## Upgrade notice\n\nThis release introduces a ledger consistency check at startup.\nIf your ledger database is corrupted, the node will stop and require a full resync to restore a valid ledger.\nPreviously, such corruptions could go undetected.\n\n### Bug fixes\n\n* [Respect read only mode for lmdb databases](https://github.com/nanocurrency/nano-node/pull/4913)\n* [Bump max ledger notifications value](https://github.com/nanocurrency/nano-node/pull/4930)\n* [Fix online reps weight sampling](https://github.com/nanocurrency/nano-node/pull/4927)\n* [Bump max ledger notifications value](https://github.com/nanocurrency/nano-node/pull/4930)\n\n---\n\n### Features\n\n* [Verify ledger balance consistency on startup](https://github.com/nanocurrency/nano-node/pull/4916)\n* [Unlimited backlog when bootstrapping](https://github.com/nanocurrency/nano-node/pull/4922)\n\n### Known Issues\n\nBootstrapping from scratch with pruning enabled causes the node to crash. As a potential workaround, node operators may be able to bootstrap with pruning disabled, and then enable pruning after bootstrapping is complete. A higher max_pruning_depth may also reduce the frequency of crashes. Pruning is considered experimental, so use it at your own risk - pruning is not currently recommended for important production services.\n\n---\n\n--8<-- \"current-build-links-main.md\"\n"
  },
  {
    "path": "docs/releases/roadmap.md",
    "content": "title: Roadmap\ndescription: The Nano roadmap which is aimed at achieving the mission of allowing Nano to become a global currency.\n\n# Roadmap\n\n!!! info \"Nano Roadmap moved to GitHub\"\n\tHead over to the new [Nano Roadmap GitHub Project](https://github.com/orgs/nanocurrency/projects/27) for a more dynamic and updated view of the upcoming features under research and implementation on the Nano node and protocol.\n"
  },
  {
    "path": "docs/running-a-node/advanced-monitoring.md",
    "content": "title: Advanced Monitoring\ndescription: Learn how to install advanced monitoring to keep an eye on your nano node using a Prometheus-based agent\n\n# Advanced Monitoring\n\nFor keeping a closer watch on node performance a Prometheus-based exporter monitoring solution is available. It provides an easy way to automatically gather and export a multitude of stats and metrics from the node RPC, as well as from the machine running the exporter. For added security, the exporter doesn't require opening any additional inbound ports as the metrics are pushed out to a Prometheus push gateway, which can be hosted externally.\n\nPrometheus is an open-source systems monitoring and alerting toolkit. For a brief overview of everything it offers, see [What is Prometheus?](https://prometheus.io/docs/introduction/overview/)\n\n!!! tip \"Basic monitoring option\"\n\tFor a simpler monitoring setup that is maintained by the Nano community and provides a public website to view details on, see the [monitoring details on the Voting as a Representative page](voting-as-a-representative.md#setup-monitoring).\n\n## Recommended architecture\n\nThe diagram below illustrates a recommended architecture of components:\n\n![Nano node Prometheus exporter architecture](../images/nano-prometheus-exporter-architecture.png)\n\nThis configuration was recommended as it splits the concerns across two servers: one hosting the node and exporter, with another hosting the push gateway, Prometheus server and graphing/visualization tools. However, there are a variety of configuration options to allow separation of each component onto different servers, depending on the needs.\n\n## Installation\n\nThe following provides the basic details for installing and connecting the components outlined above.\n\n### Step 1: Setup and configure Nano node\n\nThese configuration options are set in the [`config-node.toml` file](../running-a-node/configuration.md#configuration-file-locations).\n\n* Get a [Nano node setup](node-setup.md) with Docker or binaries\n* Update config `node.rpc.enable` = `true`\n* If you want to gather [`nano_stats_objects*` metrics](https://github.com/nanocurrency/nano_prom_exporter#stats-exposed), update config `rpc.enable_control` = `true`\n* Restart the node for settings to take effect\n\n### Step 2: Install Prometheus push gateway\n\nFor the best security, it is recommended to run this on a separate server. By default this will need to accept incoming connections from the exporter on TCP port `9091`.\n\n* Requires [python 3.7+](https://www.python.org/)\n* Download and run the [prometheus-pushgateway](https://github.com/prometheus/pushgateway/blob/master/README.md#run-it)\n* Accept incoming TCP port `9091` connections from the node/exporter server\n\n### Step 3: Install and run the Nano node exporter\n\nTypical configurations will have the exporter running on the same server as the node. If so, `--rpchost` is local as noted below.\n\n**Install via pip**\n\n`pip install nano-prom-exporter`\n\n**Example run command**\n\n```shell\nnano-prom -h --rpchost ::1 \\\n             --rpcport 7076 \\\n             --datapath ~/Nano/Nano \\\n             --pushgateway your-exporter-and-node.server.org:9091 \\\n             --hostname MyNanoMetrics\n```\n\nSee the [README](https://github.com/nanocurrency/nano_prom_exporter) for more details on usage.\n\n### Step 4: View your metrics\n\nTo validate data is available from the exporter, the `/targets` endpoint on port `9090` at the URL of the push gateway will show job health: `http://your-new.monitor.org:9090/targets`. The endpoint pushing the data should have `State` = `UP` if everything is working well.\n\nThere is also a `/graph` endpoint to do some manual querying of available data: `http://your-new.monitor.org:9090/graph`\n\n### Step 5: Install Grafana\n\nOnce you've verified metrics are properly being captured, you can setup visualization amd analysis solutions. One popular option is Grafana, which can be installed from here: https://grafana.com/grafana/download.\n\nIf Grafana is being installed on a different server from the Promethus push gateway TCP port `9090` will need to be opened as well.\n\nOnce running, a sample file can be used from our repository to kickstart your dashboard setup: https://github.com/nanocurrency/nano_prom_exporter/blob/master/sample-grafana-dashboard.json.\n\nOther options can be explored in the [Visualization](https://prometheus.io/docs/visualization/browser/) section of the Prometheus site.\n\n## Connecting to other push gateways\n\nThe exporter supports sending metrics to multiple push gateways using a `config.ini` file and the `--config_path` option in the command to accept the location.  Within this file the authentication can be managed between different endpoints and support for selecting specific metrics per push gateway will added soon. See the [README](https://github.com/nanocurrency/nano_prom_exporter) for more details on usage.\n\nAlthough no public push gateways for node monitoring are available at this time, there may be opportunities in the future to share your node metrics with the community or other monitoring setups to provide a better view of network performance. Check back here and keep an eye out for these public gateways to become available.\n\nAnd if you know of any public push gateways available to send this useful node data to, [please let us know](https://nano.org/connect).\n"
  },
  {
    "path": "docs/running-a-node/beta-network.md",
    "content": "title: Beta Network\ndescription: Find out how to join the nano community in testing the latest nano node and protocol features on the beta network\n\n# Joining the beta network\n\nThe beta network exists for the purpose of conducting certain network-wide activites including load testing and [new node releases and features testing](#node-release-testing). These activities can cause the network to become unstable or inaccessible at times due to heavy traffic, occasional resetting of the genesis/ledger or the introduction of bugs due to new features. As a result, an alternative [test network](test-network.md) is also available which will be more stable and is a better fit for learning node setup and management, and testing out upgrades and other activities for Nano before moving to production.\n\nWith those things in consideration, if you are interested in helping with testing on the beta network we are excited to help you out - so keep reading!\n\n\n## Node release testing\nThe Nano Foundation maintains a few beta nodes on the network and various community members also setup nodes to help provide an environment more similar to the main network. During each development cycle Development Builds (DB) are prepared and shared in the Discord Beta Testing section of channels where early testing is coordinated. Once features are stabilized and included, release builds are published as Release Candidates (RC). Starting with RC1 and incrementing with each published build if needed (RC2, RC3, etc.). Final release of a version typically follows quickly once the RC is observed to be stable.\n\n!!! warning\n\tDevelopment Builds (DBs) are only recommended for use on the beta network, and Release Candidate builds (RCs) are only recommended for use on the test and beta networks\n\n## Running a beta node\n\nSetting up a node on the beta network is similar to the main network. To start you should [install docker](/running-a-node/node-setup/#installing-docker) and be familiar with the general setup and [Docker management](/running-a-node/docker-management/) processes.\n\n### Network ports\n\n--8<-- \"network-details-simple-beta.md\"\n\n___\n\n### Directory locations\n\n--8<-- \"directory-locations-beta.md\"\n\n---\n\n### Pulling the Docker image\n[![Docker Pulls](https://img.shields.io/docker/pulls/nanocurrency/nano.svg)](https://hub.docker.com/r/nanocurrency/nano-beta)\n\nPulls the latest release of the Nano Node:\n```bash\ndocker pull nanocurrency/nano-beta\n```\n\nPulls a specific version of the Nano node:\n```bash\ndocker pull nanocurrency/nano-beta:<tag>\n```\n\nA list of beta tags can be found at the official [Nano Currency Docker Hub](https://hub.docker.com/r/nanocurrency/nano-beta/tags)\n\n### Starting the Docker container\n\n--8<-- \"docker-run-command-beta.md\"\n\n!!! tip\n\t* For an explanation of the options included in the Docker `run` command, see [Starting the Container](/running-a-node/docker-management/#starting) details for the main network.\n\t* See [Docker management](/running-a-node/docker-management/) for other related commands\n\n!!! warning \"Separate host directories\"\n\tBe sure to use a different host directory for main network and beta network Docker node setups. Attempting to use the same directory will result in issues.\n\n## Additional beta resources\n\n| URL                                     | Description |\n|                                         |             |\t\n| https://beta.nanobrowse.com             | Beta Explorer |\n| https://nanoticker.bnano.info/          | Beta node details and stats |\n\n## Differences from the main network\n\n| Parameter | Main Network | Beta Network | Comment |\n|-----------|--------------|--------------|---------|\n| Epoch 1 difficulty threshold | `ffffffc000000000` | `fffff00000000000` | 64 times lower on the beta network |\n| Epoch 2 send/change threshold | `fffffff800000000` | `fffff00000000000` | Same as epoch 1 on the beta network |\n| Epoch 2 receive threshold | `fffffe0000000000` | `ffffe00000000000` | 2 times lower than epoch 1 |\n\n<span id=\"release-candidate-builds\"></span>\n<span id=\"development-builds\"></span>\n<span id=\"latest-beta-builds\"></span>\n## Testing Builds\n\nMost of the resources needed to participate on the beta network can be found within the `#beta-xxxxxxx` channels on our [Discord server](https://chat.nano.org). As much of the discussion, planning and engagement happens here, all participants are highly encouraged to join there.\n\n### Binaries\n\nIn addition to the Docker details above, the latest binary builds of the node for the beta network are shared in the `#beta-announcements` channel on our [Discord server](https://chat.nano.org). These assets are also available on the [GitHub repository Releases page](https://github.com/nanocurrency/nano-node/releases) under `RC#` and `DB#` tags, which can also be used to manually build if necessary.\n\n### Beta fund distribution\n\nThe funds used for testing transactions on the beta network are generated from a new genesis block and distributed in bulk to various testers running nodes on the network. For small amounts suitable for most basic integration, you can get beta Nano from the `#beta-faucet` channel on Discord. If you plan to consistently run a node on beta and want to participate in consensus as a Representative, please connect with `ThiagoSFS#1554` in the `#beta-net` channel on our [Discord server](https://chat.nano.org).\n\n### Beta ledger file\n\nTo help get beta nodes in sync more quickly it is recommended that an updated ledger file is downloaded and placed into the data directory. Often referred to as a \"fast sync\", more details around this approach can be found in the [Ledger Management guide](ledger-management.md#downloaded-ledger-files). Since the beta network contains no value, validating the blocks, voting weights and confirmation heights isn't necessary.\n\nThe following command will download and unzip a recent ledger snapshot. Any existing ledger files should be backed up elswhere as this will override them. From within the [data directory](#directory-locations) run:\n\n```\ncurl -O https://s3.us-east-2.amazonaws.com/beta-snapshot.nano.org/data.tar.gz; tar -xzvf data.tar.gz; rm -fr data.tar.gz\n```\n<span id=\"ongoing-test-cases\"></span>\n### Build contents and test cases\nWith each DB a GitHub Project board will be created in the [Nano GitHub Organization](https://github.com/orgs/nanocurrency/projects) containing all the Pull Requests newly added in the DB, changes from previous DBs that still need network testing, and issues with the various test cases that are targeted to be run with that build. For those looking to assist with these tests, we encourage connecting with the other beta network participants in the `#beta-net` channel on our [Discord server](https://chat.nano.org).\n"
  },
  {
    "path": "docs/running-a-node/beyond-the-node.md",
    "content": "title: Beyond the node\ndescription: Explore other tools, services, education and inspiration available after getting your nano node up and running\n\n# Beyond the Node\n\n## Building tools and services\n\nCongrats! Now that you understand more about how Nano works and setup your own node to participate on the network, the next step is building tools and services on the node. Our [Integration Guides](/integration-guides/the-basics/) are a great starting point to help you understand how you can leverage your node to create amazing applications that utilize the unique value transfer features of Nano.\n\n## Need some inspiration?\n\nA big part of the Nano community is [the Nano Center](https://nanocenter.org/). Run by a group of Nano enthusiasts, their website helps manage requests for assistance and funding for Nano-related projects. Check out the in progress and past funded projects for some great ideas and opportunities to join in building on top of Nano!\n\nFor even more details about the many projects that help make our ecosystem robust, head over to [Nano.org](https://nano.org) for examples of wallets, services and more that have integrated Nano.\n\n## Keep learning\n\nIf you're ready to keep building with Nano, head over to [The Basics](/integration-guides/the-basics/) of our Integration Guides."
  },
  {
    "path": "docs/running-a-node/configuration.md",
    "content": "title: Node Configuration\ndescription: Dig into the most popular configuration options to help your nano node work the best for your needs\n\n# Node Configuration\n\nThe Nano node software is designed to run with little or no configuration. All configuration options have defaults that can be changed using TOML configuration files, by passing configuration values via the command line, or a combination of the two methods.\n\n!!! success \"Automatic migration and backups of JSON files\"\n    Versions prior to 20 use JSON as the configuration file format, and these will be automatically migrated to TOML files on startup. Note that only non-default values are migrated.\n\n    In version 19.0 when the node is upgraded between releases, including any beta releases, all config files will be backed up prior to the upgrade in the same directory for easy recovery if needed.\n\n    As TOML files are never upgraded by the node, no backups are created for these.\n\n??? tip \"V19.0 and earlier config.json file\"\n\n\tBelow is a complete example of the config.json file used by V19.0 and earlier:\n\n\t```json\n\t{\n\t    \"version\": \"(int)\", // Wallet version\n\t    \"wallet\": \"(string)\", // Default wallet to load on boot (only for GUI wallet)\n\t    \"account\": \"(string)\", // Default account to load on boot (only for GUI wallet)\n\t    \"node\": {\n\t        \"version\": \"(int)\", // Node version\n\t        \"peering_port\": \"7075\", // Default node port\n\t        \"bootstrap_fraction_numerator\": \"1\",\n\t        \"enable_voting\": \"false\", // Enable or disable voting for blocks. If disabled, saves some resources\n\t        \"receive_minimum\": \"1000000000000000000000000\", // Minimum import receivable, default 1 Rai\n\t        \"logging\": {\n\t            \"ledger\": \"false\", // Track incoming blocks\n\t            \"ledger_duplicate\": \"false\",\n\t            \"network\": \"true\", // Track general network info like forks\n\t            \"network_timeout\": \"false\", // Track TCP socket disconnections due to timeout\n\t            \"network_message\": \"false\",\n\t            \"network_publish\": \"false\", // Track blocks you publish to\n\t            \"network_packet\": \"false\", // Track packets origin\n\t            \"network_keepalive\": \"false\", // Track keepalive messages\n\t            \"network_node_id_handshake\": \"false\", // Track node_id messages\n\t            \"node_lifetime_tracing\": \"false\",\n\t            \"insufficient_work\": \"true\",\n\t            \"bulk_pull\": \"false\", // Bootstrap related logging\n\t            \"work_generation_time\": \"true\",\n\t            \"log_to_cerr\": \"false\",\n\t            \"max_size\": \"16777216\", // Max size of logs before old files deletion. Default is 16MB\n\t            \"rotation_size\": \"4194304\", // Size of Log File before rotation in bytes, Default is 4MB\n\t            \"version\": \"(int)\", // Logging config version\n\t            \"vote\": \"false\", // Track voting activities\n\t            \"flush\": \"true\",  // Setting this to false gives better performance, but may lose entries on crashes.\n\t            \"upnp_details\": \"false\", // Determines if upnp discovery details are logged (default off to avoid sharing device info when shipping logs)\n\t            \"timing\": \"false\", // Logs durations of key functions, such as batch verification, etc.\n\t            \"log_ipc\": \"true\", // Logging of IPC related messages\n\t            \"min_time_between_output\": \"5\", // Minimum time between log calls, in ms\n\t            \"single_line_record\": \"false\" // Log each record in single line (including block content & election results with votes)\n\t        },\n\t        \"vote_minimum\": \"1000000000000000000000000000000000\",// Prevents voting if delegated weight is under this threshold\n\t        \"work_peers\": \"\", // Delegate a node your hash work, you need to get RPC access to that node\n\t        \"preconfigured_peers\": [ // List of defaults peers to connect on boot\n\t            \"peering.nano.org\",\n\t            \"::ffff:138.201.94.249\"\n\t        ],\n\t        \"preconfigured_representatives\": [ // List of defaults representatives, which you delegate voting weight, of your wallet\n\t            \"nano_3arg3asgtigae3xckabaaewkx3bzsh7nwz7jkmjos79ihyaxwphhm6qgjps4\",\n\t            \"nano_1stofnrxuz3cai7ze75o174bpm7scwj9jn3nxsn8ntzg784jf1gzn1jjdkou\",\n\t            \"nano_1q3hqecaw15cjt7thbtxu3pbzr1eihtzzpzxguoc37bj1wc5ffoh7w74gi6p\",\n\t            \"nano_3dmtrrws3pocycmbqwawk6xs7446qxa36fcncush4s1pejk16ksbmakis78m\",\n\t            \"nano_3hd4ezdgsp15iemx7h81in7xz5tpxi43b6b41zn3qmwiuypankocw3awes5k\",\n\t            \"nano_1awsn43we17c1oshdru4azeqjz9wii41dy8npubm4rg11so7dx3jtqgoeahy\",\n\t            \"nano_1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjtwnqposrs\",\n\t            \"nano_1hza3f7wiiqa7ig3jczyxj5yo86yegcmqk3criaz838j91sxcckpfhbhhra1\"\n\t        ],\n\t        \"online_weight_minimum\": \"60000000000000000000000000000000000000\", // Online weight minimum required to confirm block\n\t        \"online_weight_quorum\": \"50\", // Percentage of votes required to rollback blocks\n\t        \"password_fanout\": \"1024\",\n\t        \"io_threads\": \"4\",\n\t        \"work_threads\": \"4\", // PoW work threads. By default all available CPU threads, set lower value for 24/7 services\n\t        \"callback_address\": \"::ffff:127.0.0.1\", // Callback IP address, in sample IPv4 localhost\n\t        \"callback_port\": \"17076\", // Callback port\n\t        \"callback_target\": \"/\", // Callback target, in sample root of callback listening server\n\t        \"bootstrap_connections\": \"16\", // Multi-connection bootstrap. Should be a power of 2.\n\t        \"bootstrap_connections_max\": \"4\", // Allowed incoming bootstrap connections count. Lower value save IOPS & bandwidth. 64 recommended for high-end fast nodes, 0 for HDD home users,\n\t        \"lmdb_max_dbs\": \"128\", // Maximum open DBs (MAX_DBS https://lmdb.readthedocs.io/en/release/), increase default if more than 100 wallets required\n\t        \"block_processor_batch_max_time\": \"5000\", // Number of milliseconds the block processor works at a time\n\t        \"allow_local_peers\": \"false\", // To allow local host peering\n\t        \"signature_checker_threads\": \"1\", // Number of threads to use for verifying signatures\n\t        \"unchecked_cutoff_time\": \"14400\", // Number of seconds unchecked entry survives before being cleaned\n\t        \"tcp_io_timeout\": \"15\", // Timeout in seconds for TCP connect-, read- and write operations\n\t        \"pow_sleep_interval\": \"0\", // The amount to sleep after each batch of POW calculations. Reduces max CPU usage at the expensive of a longer workgeneration time.\n\t        \"external_address\": \"::\",\n\t        \"external_port\": \"0\",\n\t        \"tcp_incoming_connections_max\": \"1024\", // Allowed incoming TCP connections count\n\t        \"websocket\": {\n\t            \"enable\": \"false\",\n\t            \"address\": \"::1\", // Default IPv6 address to listen on. If using Docker, change address to ::ffff:0.0.0.0 to listen on all interfaces within the container.\n\t            \"port\": \"7078\"\n\t        },\n\t        \"ipc\": { // For more details about these options see the IPC section below\n\t            \"tcp\": {\n\t                \"enable\": \"false\",\n\t                \"port\": \"7077\",\n\t                \"io_timeout\": \"15\"\n\t            },\n\t            \"local\": {\n\t                \"version\": \"1\",\n\t                \"enable\": \"false\",\n\t                \"allow_unsafe\": \"false\",\n\t                \"path\": \"\\/tmp\\/nano\",\n\t                \"io_timeout\": \"15\"\n\t            }\n\t        },\n\t        \"diagnostics\": {\n\t                \"txn_tracking\": {\n\t                    \"enable\": \"false\", // Tracks lmdb transactions\n\t                    \"min_read_txn_time\": \"5000\", // Logs stacktrace when read transactions are held longer than this time (milliseconds)\n\t                    \"min_write_txn_time\": \"500\", // Logs stacktrace when write transactions are held longer than this time (milliseconds)\n\t                    \"ignore_writes_below_block_processor_max_time\": \"true\" // Ignore any block processor writes less than block_processor_max_time\n\t                }\n\t        },\n\t        \"use_memory_pools\": \"true\", // Improve performance by using memory pools (Note: Memory allocated will be reused but never reclaimed, if having memory issues then try turning this off)\n\t        \"confirmation_history_size\": \"2048\", // Controls confirmation history size, default setting preserves existing behavior\n\t        \"bandwidth_limit\": \"5242880\", // Outbound voting traffic limit in bytes/sec after which messages will be dropped\n\t        \"vote_generator_delay\": \"100\", // Delay in ms before votes are sent out to allow for better bundling of hashes in votes\n\t        \"vote_generator_threshold\": \"3\", // Defines the point at which the node will delay sending votes for another vote_generator_delay. Allows for more hashes to be bundled under load\n\t        \"active_elections_size\": \"50000\", // Limits number of active elections in container before dropping will be considered (other conditions must also be satisfied), minimum value allowed is 250.\n\t        \"conf_height_processor_batch_min_time\": \"50\", // Amount of time in ms to batch setting confirmation heights for accounts during high tps to reduce write I/O bottlenecks.\n\t        \"backup_before_upgrade\": \"false\", // Backup ledger & wallet databases before each upgrade\n\t        \"work_watcher_period\": \"5\", // Time between checks for confirmation and re-generating higher difficulty work if unconfirmed, for blocks in the work watcher\n\t        \"max_work_generate_multiplier\": \"256.0\", // Maximum allowed difficulty multiplier for work generation (double). Used for work_generate RPC requests & internal wallet work watcher\n\t        \"frontiers_confirmation\": \"auto\" // Mode for force frontiers confirmation. \"auto\" mode (default): If not Principal Representative, start frontier confirmation process every 15 minutes; if Principal Representative, start frontier confirmation process every 3 minutes. \"always\": Start frontier confirmation process every 3 minutes. \"disabled\": Do not start frontier confirmation process\n\t    },\n\t    \"rpc_enable\": \"true\", // Enable (in-process or child process) or disable RPC. Out of process rpc servers can still be used if launched manually.\n\t    \"rpc\": {\n\t        \"enable_sign_hash\": \"true\",\n\t        \"version\": \"1\",\n\t        \"child_process\": {\n\t            \"enable\": \"false\", // Whether the rpc server is run as a child process rather than in-process\n\t            \"rpc_path\": \"C:\\\\Users\\\\Wesley\\\\Documents\\\\raiblocks\\\\build\\\\Debug\\\\nano_rpc.exe\", // The nano_rpc executable to run if enabled (Windows example).\n\t        }\n\t    },\n\t    \"opencl_enable\": \"false\", // Enable GPU hashing\n\t    \"opencl\": {\n\t        \"platform\": \"0\", // Platform ID\n\t        \"device\": \"0\", // Device ID\n\t        \"threads\": \"1048576\"\n\t    }\n\t}\n\t```\n\n## Configuration file locations\n\nThe node and its related processes will look for the files listed below, either in their default location or the location specified with `--data_path`. These files are *optional*. The table includes a command which can be used to generate a documented TOML file with defaults suitable for the system.\n\n--8<-- \"toml-config-commands.md\"\n\nThe default locations of the config files are listed in the table below.\n\n--8<-- \"directory-locations-all.md\"\n\n## Options formatting\n\nConfig options are referred to in the documentation using the format `category.option` where `category` can be multiple levels. For example, the `node.enable_voting` option would correspond to the following entry in the TOML file:\n\n```toml\n[node]\n\n# Enable or disable voting. Enabling this option requires additional system resources, namely increased CPU, bandwidth and disk usage.\n# type:bool\nenable_voting = true\n```\n\nWhile a multiple category option like `node.websocket.enable` would correspond to this TOML file entry:\n\n```toml\n[node.websocket]\n\n# Enable or disable WebSocket server.\n# type:bool\nenable = false\n```\n\n## Passing config values on the command line\n\nInstead of changing the config file, config values can be passed in via the `--config` option, which can be repeated multiple times.\n\nExample that enables the RPC and WebSocket servers:\n\n`nano_node --config rpc.enable=true --config node.websocket.enable=true`\n\nThe way strings are passed is as follows:  \n_v22_+ uses quotes (`\"`) such as:\n\n`nano_node --config node.httpcallback.target=\"api/callback\"`  \nArrays must not have spaces inbetween entries.\n\n_v21_ and earlier must use escaped quotes (`\\\"`) such as:\n\n`nano_node --config node.httpcallback.target=\\\"api/callback\\\"`  \nFor backwards compatibility this is also supported in _v22_+\n\n!!! info \"Mixing config options on the command line and TOML files\"\n    If a config file exists, config values passed in via the command line will take precedence.\n\n## Notable configuration options\n\nAs of _V20.0_ the sample TOML packaged with the binaries and available for [generation via the command line](#configuration-file-locations) are commented out with descriptions of each option. Where applicable the following integration areas have those options included along with additional context where necessary.\n\n### Work generation\nSee the [Work Generation guide](../integration-guides/work-generation.md#node-configuration).\n\n### WebSockets\nSee the [WebSockets Integration guide](../integration-guides/websockets.md#configuration).\n\n### RPC\n\n--8<-- \"config-node-option-rpc-enable-true.md\"\n\n#### enable_control\nThis configuration option is set in the [`config-rpc.toml`](../running-a-node/configuration.md#configuration-file-locations) file.\n\nDue to their sensitive or dangerous nature, certain RPC calls/options require this setting to be enabled before they can be used. Examples of RPC calls that require this include:\n\n* [stop](../commands/rpc-protocol.md#stop): allows you to completely stop the node from running\n* [work_generate](../commands/rpc-protocol.md#work_generate): allows potential consumption of CPU or GPU resources on the node or attached work peers to generate PoW\n* [send](../commands/rpc-protocol.md#send): can be used to transfer available funds in the wallet to another account\n* Various other wallet and resource-heavy operations\n\n```toml\n# Enable or disable control-level requests.\n# WARNING: Enabling this gives anyone with RPC access the ability to stop the node and access wallet funds.\n# type:bool\nenable_control = false\n```\n\n!!! danger \"Dangerous RPC calls controlled by `enable_control`\"\n\tDue to the sensitive or dangerous nature of these calls, **caution should be used when considering setting `enable_control` to `true`** in your config file. It is highly recommended to **only enable this when RPC ports are listening exclusively to local or loopback IP addresses** or other measure are put in place outside the node to limit RPC access to dangerous calls. For more details see the [Node Security page](security.md).\n\nMore advanced options for controlling the process the RPC server runs under can be found in the [Running Nano as a service guide](../integration-guides/advanced.md#running-nano-as-a-service).\n\n### IPC\nSee the [IPC Integration guide](../integration-guides/ipc-integration.md#configuration).\n\n### Voting\nSee the [Voting as a Representative guide](voting-as-a-representative.md).\n\n### Ledger backends\nSee the [Ledger Management guide](ledger-management.md).\n\n### HTTPS support\nSupport for TLS is deprecated from V27.\nSecure RPC/Websockets can be achieved by using a reverse proxy.\n\n### HTTP callback\n\n!!! tip\n\tWhen possible, using a [WebSocket](../integration-guides/websockets.md#configuration) is recommended as it provides more efficiency, more options for types of information to receive and better control over the volume of notifications with filtering.\n\nThese configuration options are set in the [`config-node.toml`](../running-a-node/configuration.md#configuration-file-locations) file.\n\n```toml\n[node.httpcallback]\n\n# Callback address.\n# type:string,ip\n#address = \"\"\n\n# Callback port number.\n# type:uint16\n#port = 0\n\n# Callback target path.\n# type:string,uri\n#target = \"\"\n```\n\nJSON POST requests with every confirmed block are sent to the callback server as defined in the config values above: `http://callback_address:callback_port<callback_target>`. Callback target should include a leading slash.\n\nFor details on how to integrate using the HTTP callback, see the [HTTP Callback section of the Integration Guides](../integration-guides/advanced.md#http-callback).\n\n---\n\n--8<-- \"network-details.md\"\n"
  },
  {
    "path": "docs/running-a-node/docker-management.md",
    "content": "title: Docker Management\ndescription: Learn how to use Docker to manage your nano node - starting, stopping, upgrading, RPC and more\n\n# Docker Management\n\nDocker greatly simplifies node management.  Below we will go over some of the best practices for managing your Docker Image.\n\n--8<-- \"warning-docker-limitations.md\"\n\n### Nano Directory\n\n--8<-- \"directory-contents.md\"\n\nFor Docker setups, the `${NANO_HOST_DIR}` indicated in the steps below will be the location of these files on your host machine.\n\n### Managing the Container\n\n#### Starting\n\nThe following command will start the node container. Either set the specified environment variables (i.e. `NANO_NAME=nano_node`) or substitute in explicit values to the `docker run` command.\n\n---\n\n* `${NANO_NAME}` - The name that you would like to assign to the docker container.\n\n* `${NANO_TAG}` - The version of docker image you will be running.\n\n* `${NANO_HOST_DIR}` - Location on the host computer where the ledger, configuration files, and logs will be stored. The Docker container will directly store files such as [config-node.toml](/running-a-node/configuration) and `data.ldb` into this directory.\n\n---\n\n```bash\ndocker run --restart=unless-stopped -d \\\n  -p 7075:7075 \\\n  -p 127.0.0.1:7076:7076 \\\n  -p 127.0.0.1:7078:7078 \\\n  -v ${NANO_HOST_DIR}:/root \\\n  --name ${NANO_NAME} \\\n  nanocurrency/nano:${NANO_TAG}\n```\n\n| Option                                                | Purpose |\n|                                                       |         |\n| `-d`                                                  | Starts the docker container as a daemon |\n| `-p 7075:7075`                                        | Maps the bootstrapping TCP port |\n| `-v ${NANO_HOST_DIR}:/root`                           | Maps the host's Nano directory to the guest `/root` directory |\n| `--restart=unless-stopped`                            | Restarts the container if it crashes |\n| `nanocurrency/nano:${NANO_TAG}`                       | Specifies the container to execute with tag |\n| `-p 127.0.0.1:7076:7076`<br />or `-p[::1]:7076:7076` | Indicates that only RPC commands originating from the host will be accepted. **WARNING: Without the proper IP configured here, anyone with access to your system's IP address can control your nano\\_node.** |\n| `-p 127.0.0.1:7078:7078`<br />or `-p[::1]:7078:7078` | Indicates that only the host can create a connection to the [websocket server](/integration-guides/websockets). Data throughput can be very high depending on configuration, which could slow down the node if available outside the host.\n\nIf you wish to use different ports, change the host ports in the `docker run` command; do not change the ports in the [config-node.toml](/running-a-node/configuration) file.\n\nThis will start the docker container using host ports 7075 and 7076 and put the data in a permanent location in your hosts's home directory, outside the docker container. Upon successful startup, Docker will return the container's full ID. A typical ID will look something like the value below.\n\n```\n0118ad5b48489303aa9d195f8a45ddc74a90e8a7209fc67d5483aabf3170d619\n```\n\n!!! note\n    The ability to use UDP is now fully removed from the node. For more information, see the [network details](/running-a-node/configuration/#network-details).\n\n    On port 7075, only TCP is required since V21.\n\n!!! warning\n    If you are running multiple nano\\_node Docker containers, **DO NOT** share the same `${NANO_HOST_DIR}`, each nano\\_node requires its own independent files.\n\n---\n\n#### Stopping\n\nTo stop your Nano Node:\n\n```bash\ndocker stop ${NANO_NAME}\n```\n\n---\n\n#### Restarting\n\nIf you need to restart your node for any reason:\n\n```bash\ndocker restart ${NANO_NAME}\n```\n\n---\n\n#### Checking Status\n\nA list of currently running containers can be found by issuing the following command.\n\n```bash\ndocker ps\n```\n\n```bash\nCONTAINER ID        IMAGE               COMMAND                 CREATED             STATUS              PORTS                                                                      NAMES\n0118ad5b4848        nanocurrency/nano   \"/bin/bash /entry.sh\"   41 seconds ago      Up 56 seconds       0.0.0.0:7075->7075/tcp 127.0.0.1:7076->7076/tcp                            nano_node_1\n```\n\n---\n\n#### Updating the Docker Image\n\nFirst, [stop the container](#stopping) if it is running.\n\n```bash\ndocker stop ${NANO_NAME}\n```\n\nThen we can download the [specific version](https://hub.docker.com/r/nanocurrency/nano/tags/) we need.\n\nPull a version of the nano node\n```bash\ndocker pull nanocurrency/nano:V22.0\n```\n\nLastly, we [start up the docker container again](#starting) using the same command but the with new version tag.\nAlteratively, you can use [`docker-compose`](#docker-compose).\n\n---\n\n### Updating Node Configuration\n\nFirst, [stop the container](#stopping) if it is running.\n\n```bash\ndocker stop ${NANO_NAME}\n```\n\n!!! warning\n\tModifications made to configuration files while the Docker container is running have no effect until the container is restarted.\n\nYou may now edit the [configuration files](/running-a-node/configuration) located in `${NANO_HOST_DIR}` using your preferred text editor.\n\nOnce modifications are complete, [start up the docker container again](#starting) using the same command.\n\n--8<-- \"enable-voting.md\"\n\n---\n\n### Docker Compose\n\nA sample docker-compose.yml is provided to model the same behavior as the docker cli examples above\n\n```yml\nversion: '3'\nservices:\n  node:\n    image: \"nanocurrency/nano:${NANO_TAG}\" # tag you wish to pull\n    restart: \"unless-stopped\"\n    ports:\n     - \"7075:7075\"       #tcp network traffic\n     - \"127.0.0.1:7076:7076\" #rpc to localhost only\n     - \"127.0.0.1:7078:7078\" #websocket to localhost only\n    volumes:\n     - \"${NANO_HOST_DIR}:/root\" #path to host directory\n```\n\n---\n\n### Docker entrypoint support\n\nAs of v20.0, the docker entry script has migrated to a command with default arguments:\n```\nUsage:\n   /entry.sh nano_node [[--]daemon] [cli_options] [-l] [-v size]\n     [--]daemon\n       start as daemon either cli [--daemon] form or short form [daemon]\n     cli_options\n       nano_node cli options <see nano_node --help>\n     -l\n       log to console <use docker logs {container}>\n     -v<size>\n       vacuum database if over size GB on startup\n   /entry.sh bash [other]\n     other\n       bash pass through\n   /entry.sh [*]\n     *\n       usage\n default:\n   /entry.sh nano_node daemon -l\n```\n---\n\n### Docker USER Support\n\nAs of v20.0, the docker containers support the [--user=](https://docs.docker.com/engine/reference/run/#user) and [-w=](https://docs.docker.com/engine/reference/run/#workdir) flags.\n\nTo maintain existing compatibility the Docker containers are being built with `USER ROOT` and `WORK_DIR /root`\n\nThe problem with this is that the container ends up writing files to your mounted path as root. Best practices would dictate that since there is no need for privilege escalation we can create a user and run under that context instead.\n\nIn the event you wish to use the `--user=nanocurrency -w=/home/nanocurrency` flags the directory you mount should have permissions changed for uid:guid 1000:1000 using `sudo chown -R 1000:1000 <local_path>` and your mount flag will become `-v <local_path>:/home/nanocurrency`\n\nThis will be changed to default to `USER nanocurrency` and `WORK_DIR /home/nanocurrency` in a future release\n\n---\n\n### RPC calls to the node\n\nYou can use the RPC interface on the local host via `curl` to interact with the node.\n\nFor example the version of the node:\n\n```bash\ncurl -d '{\n  \"action\": \"version\"\n}' http://127.0.0.1:17076\n```\n\nOr the blockcount:\n\n```bash\ncurl -d '{\n  \"action\": \"block_count\"\n}' http://127.0.0.1:17076\n```\n\n--8<-- \"docker-ipv6-tip.md\"\n\nIn addition, you can make use of command-line JSON utilities such as [jq](https://stedolan.github.io/jq/) to parse and manipulate the structured data retrieved from `curl`. For example the account information associated with certain block:\n\n```bash\ncurl -s -d '{\n  \"action\": \"blocks_info\",\n  \"hashes\": [\"87434F8041869A01C8F6F263B87972D7BA443A72E0A97D7A3FD0CCC2358FD6F9\"],\n  \"json_block\": \"true\" \n}' http://127.0.0.1:7076 | jq \".blocks[].block_account\"\n```\n\nFor other commands, review the [RPC Protocol](/commands/rpc-protocol) details.\n\n---\n\n### Troubleshooting\n\nIf you get `Error starting userland proxy: port is not a proto:IP:port: 'tcp:[:'.` or want to expose IPv4 port, use `-p 127.0.0.1:7076:7076`. Likewise, if you get `curl: (7) Couldn't connect to server` when interacting with the node, replace `[::1]:7076` with `127.0.0.1:7076`.\n\nIf you get `create ~: volume name is too short, names should be at least two alphanumeric characters.` replace the `~` with the full pathname such as `/Users/someuser`.\n"
  },
  {
    "path": "docs/running-a-node/ledger-management.md",
    "content": "title: Ledger Management\ndescription: Learn various aspects of properly managing your nano node's ledger file including boostrapping options, handling it properly for upgrades and more\n\n# Ledger Management\n\n!!! tip \"Default and experimental backends available\"\n\tBy default the node uses LMDB as the ledger backend, which the first part of this guide is focused on. The second part of the guide covers [RocksDB](#rocksdb-ledger-backend), which is an experimental option available as of _v20.0+_.\n\n## Ledger file\n\nThe node automatically manages the full Nano ledger in the `data.ldb` file which can be found in the data directory at these locations:\n\n--8<-- \"directory-locations-all.md\"\n\nThis file will grow in size as the ledger does. As of September 2020 there are over 56 million blocks in the ledger which requires at least 29GB of free space. See [hardware recommendations](/running-a-node/node-setup/#hardware-recommendations) for more preferred node specs.\n\n!!! warning \"RocksDB uses many files\"\n\tThe above details are for the default LMDB database setup. If using RocksDB, please note that it uses potentially 100s of SST files to manage the ledger so details should be followed from the [RocksDB Ledger Backend](#rocksdb-ledger-backend) section below.\n\n!!! tip \"Updating the node may require a lengthy ledger upgrade\"\n\tRead the [guide](#updating-the-node) further down this page for some tips on how to minimize downtime during an update.\n\n---\n\n## Configuration\n\n!!! note \"\"\n    Available in Version 21.0+ only\n\nWithin the `node.lmdb` section of the [`config-node.toml`](../running-a-node/configuration.md#configuration-file-locations) file, the following options can be set to better tune LMDB performance for the available resources.\n\n| Option name | Details |\n|             |         |\n| `map_size`  | Allows the map size to be changed (default value is 128GB). This only affects the ledger database. |\n| `max_databases` | Maximum open LMDB databases. Increase default if more than 100 wallets is required. [External management](/integration-guides/key-management/) is recommended when a large amounts of wallets are required. |\n| `sync`      | LMDB environment flags. Applies to ledger, not wallet:<ul><li>`always`: Default (MDB_NOSUBDIR \\| MDB_NOTLS \\| MDB_NORDAHEAD).</li><li>`nosync_safe`: Do not flush meta data eagerly. This may cause loss of transactions, but maintains integrity (MDB_NOSUBDIR \\| MDB_NOTLS \\| MDB_NORDAHEAD \\| MDB_NOMETASYNC).</li><li>`nosync_unsafe`: Let the OS decide when to flush to disk. On filesystems with write ordering, this has the same guarantees as nosync_safe, otherwise corruption may occur on system crash (MDB_NOSUBDIR \\| MDB_NOTLS \\| MDB_NORDAHEAD \\| MDB_NOSYNC).</li><li>`nosync_unsafe_large_memory`: Use a writeable memory map. Let the OS decide when to flush to disk, and make the request asynchronous. This may give better performance on systems where the database fits entirely in memory, otherwise it may be slower. Note that this option will expand the file size logically to map_size. It may expand the file physically on some file systems. (MDB_NOSUBDIR \\| MDB_NOTLS \\| MDB_NORDAHEAD \\| MDB_NOSYNC \\| MDB_WRITEMAP \\| MDB_MAPASYNC).</li></ul> |\n\n---\n\n## Bootstrapping\n\nWhen starting a new node the ledger must be downloaded and kept updated in order to participate on the network properly. This is done automatically via bootstrapping - the node downloads and verifies blocks from other nodes across the network. This process can take hours to days to complete depending on network conditions and [hardware specifications](/running-a-node/node-setup/#hardware-recommendations).\n\n!!! warning \"Restarting node during bootstrapping not recommended\"\n\tIt is **highly recommended to avoid restarting the node during bootstrapping** as this can cause extra delays in the syncing process. An exception can be made when it is very clear from calls to the [`block_count`](/commands/rpc-protocol/#block_count) RPC that block counts are stuck for multiple hours.\n\n### Tuning options\n\nDepending on machine and networking resources, the bootstrap performance can be improved by updating the following [configuration](/running-a-node/configuration/) values in the [`config-node.toml`](../running-a-node/configuration.md#configuration-file-locations) file:\n\n* `node.bootstrap_connections_max`: up to max of `128`\n* `node.bootstrap_connections`: up to max of `16`\n* `node.bootstrap_initiator_threads`: set to `2`\n\nThe additional resource usage these options cause should be considered, especially if left during normal operation (after initial bootstrap is complete).\n\n---\n\n## Downloaded ledger files\n\n!!! tip \"Always backup your ledgers file\"\n\tWhenever you are attempting to change the ledger, it is highly recommended you create backups of the existing `data.ldb` file to ensure you have a rollback point if issues are encountered.\n\nTo avoid bootstrapping times, a [ledger file](#ledger-file) (`data.ldb`) can be downloaded off-network and added to the data file used by the node. This process is sometimes referred to as a \"fast sync\". The Nano Foundation uploads a new ledger file every other day for downloading in the `#ledger-download` channel of our [Discord server](https://chat.nano.org). This is posted by the robot `Nano Snapshots Uploader` and contains checksums for validation.\n\nBefore using this method there are a few considerations to ensure it is done safely:\n\n### Data source\nMake sure you trust the source providing the data to you. If you are unfamiliar with the individual or organization providing the ledger, consider other options for the data or fallback to the default of [bootstrapping](#bootstrapping) from the network.\n\n### Validating blocks and voting weights\nBlocks are confirmed using the voting weight of representatives and these weights are determined by the account balances assigned to those representatives. In addition, the node releases contain a hard-coded set of representative weights captured at the time of the node release to help this process during bootstrapping.\n\nIf looking to use a downloaded ledger there is a risk of it providing inaccurate representative voting weights. Although the potential impacts of this are minimal, below are some recommended steps to take which can help provide additional confidence the ledger can be used.\n\n1. **Scan the ledger for integrity using the [`--debug_validate_blocks`](/commands/command-line-interface/#-debug_validate_blocks) CLI command**. If issues are found they should be inspected carefully and alternative sources of a ledger may need to be considered as failures with this command have a high chance of indicating potentially malicious behavior.\n1. **Review the differences in representative voting weights by running the [`--compare_rep_weights`](/commands/command-line-interface/#-compare_rep_weights) CLI command** (_v21.0+ only)_ with the new ledger in the default data directory (old ledger backed up) or in a different data directory by using the optional `--data_path` argument. This will compare the new ledger voting weights against the hardcoded values in the node (set at the time of release). See the [CLI command](/commands/command-line-interface/#-compare_rep_weights) for details on the output with special attention paid to entries in the `outliers` and `newcomers` sections. By inspecting those addresses in public explorers such as [BlockLattice.io](https://blocklattice.io/), [Nano.community](https://nano.community/), or [NanoCharts.info](https://nanocharts.info/), this can help to determine if voting weight may have been manipulated in the downloaded ledger.\n\nIf you need support with this process or need help in evaluating some of the CLI command results, join the [Node and Representative Management category](https://forum.nano.org/c/node-and-rep/8) on the [Nano Forums](https://forum.nano.org).\n\n### Confirmation data\nWithin each account on the ledger a confirmation height is set. This indicates the height of the last block on that chain where quorum was observed on the network. This is set locally by the node and a new ledger file may include this information with it. If the ledger is from a trusted source this confirmation data can be kept, which will save bandwidth and resources on the network by not querying for votes to verify these confirmations.\n\nIf confirmation data for the ledger is not trusted the [--confirmation_height_clear](/commands/command-line-interface/#-confirmation_height_clear) CLI can be used to clear these out.\n\n---\n\n## Updating the node\n\nOccasionally, updating to the [latest node version](/releases/node-releases/#current-release) requires upgrading the existing ledger which can have the following effects:\n\n- Significant downtime, from a few minutes to several hours, during which the node RPC is not accessible and no voting occurs. The upgrade is especially slower if the ledger is not on an SSD.\n- Temporary increased disk space usage - up to 3x the current ledger size in total (e.g. 60GB for a 20GB ledger)\n\nIn order to minimize downtime, consider performing the update in a different machine, and replacing the [ledger file](#ledger-file) once complete. Note the following instructions, where **Machine A** has the node and ledger, and **Machine B** will be updating it.\n\n1. Create a directory `/home/<user>/Nano_Update` on Machine B.\n1. Stop the node on Machine A.\n1. If enough free space (at least [`data.ldb`](#ledger-file) size) is available on Machine A:\n\t* Make a local copy of [`data.ldb`](#ledger-file) in any directory.\n\t* Start the node again on Machine A, resuming operation.\n\t* Move the local copy of the ledger from Machine A to `/home/<user>/Nano_Update/data.ldb` on Machine B.\n\t* Skip the next step.\n1. If there is not enough free space on Machine A:\n\t* Copy [`data.ldb`](#ledger-file) from Machine A to `/home/<user>/Nano_Update/data.ldb` on Machine B.\n\t* Start the node again on Machine A, resuming operation.\n1. Download the [latest node version](/releases/node-releases/#current-release) to Machine B. For the purposes of this guide, using a binary is easier.\n1. Run the following command on Machine B (varies based on your operating system): `./nano_node --debug_block_count --data_path /home/<user>/Nano_Update --config log.console.to_cerr=true`\n1. The message *\"Upgrade in progress...\"* will be displayed if a ledger upgrade is required. Wait until the command finishes and **do not stop the upgrade preemptively**.\n1. Copy `/home/<user>/Nano_Update/data.ldb` from Machine B to a temporary location on Machine A. **do not overwrite data.ldb on Machine A while the node is running**.\n1. **Stop** the node on Machine A.\n1. Replace `/home/<user>/Nano/data.ldb` with the transferred file.\n1. **Upgrade** to the latest node version on Machine A as you would do normally.\n\nIn the event that you are unable to upgrade the ledger on another machine but would still like to minimize downtime, consider [obtaining the ledger from another source](#downloaded-ledger-files) as a last resource.\n\n---\n\n## RocksDB Ledger Backend\n\n!!! info \"\"\n    If you are testing RocksDB and want to discuss results, configurations, etc. please join the forum topic here: https://forum.nano.org/t/rocksdb-ledger-backend-testing/111\n\nThe node ledger currently uses LMDB (Lightning memory-mapped database) by default as the data store. As of _v20+_ the option to use RocksDB became available as an experimental option and should not be used in production.\nThis document will not go into much detail about theses key-value data stores as there is a lot of information available online.\n\n### Enable RocksDB\nThis can be enabled by adding the following to the `config-node.toml` file:\n\n```\n[node.rocksdb]\nenable = true\n```\n\nThe other options are:\n```\nio_threads = 4\nmemory_multiplier = 2\n```\nIt shouldn't be necessary to update these variables manually. See TOML comments in the generated file for more information on what these do.\n\n### Migrating existing ledger from LMDB to RocksDB\nAn existing LMDB ledger can be upgraded by running the [--migrate_database_lmdb_to_rocksdb](/commands/command-line-interface/#-migrate_database_lmdb_to_rocksdb) CLI command. This process can take some time, estimates range from 20 minutes to 1 hour depending on node hardware specs. There are some internal checks which are made to determine if the migration was successful, however it is recommended to run the node first (after [enabling RocksDB](#enable-rocksdb)) for a period of time to make sure things are working as expected. After which the `data.ldb` file can be deleted if no longer required to save on disk space. Please also note the [limitations](#rocksdb-limitations) most notably is that the `unchecked_count` from the `block_count` RPC will only be an estimate.\n\nLedger backend comparison:\n\n| LMDB | RocksDB |\n| :-------: | :---------: |\n| Tested with the node for many years | Recently implemented |\n| 1 file (data.ldb) | 100+ SST files |\n| Ledger size won't shrink without manual vacuum | Will shrink automatically when using pruning |\n| - | Less file I/O (writes are flushed in bulk) |\n| - | More CPU heavy |\n\n\\* At the time of last reviewed (May 2023)\n\n### RocksDB Limitations:\n\n* Automatic backups not currently supported\n* Database transaction tracker is not supported\n* Cannot execute CLI commands which require writing to the database while a node is running, such as `nano_node --peer_clear`, these must be executed when the node is stopped\n\n!!! note \"Snapshotting with RocksDB\"\n\tWhen backing up using the --snapshot CLI option, it is currently set up to do incremental backups, which reduces the need to copy the whole database. However if the original files are deleted, then the backup directory should also be deleted otherwise there can be inconsistencies.\n"
  },
  {
    "path": "docs/running-a-node/logging-tracing.md",
    "content": "# Nano Node Logging Documentation\n\n## Introduction \n\nThis documentation covers the logging facilities of the Nano Node, including configuration options, environment variables, and usage of tracing and stats logging.\n\n## Overview - V27 and later\n\n### Log Levels\n\nLog levels are used to control the verbosity of log output. The available log levels are:\n\n```toml\n- trace\n- debug\n- info\n- warn\n- error\n- critical\n- off\n```\n\nFor users, log levels up to debug are useful. Tracing and stats logging are primarily for developers debugging the node.\n\n### Configuration - V27 and later\n\nThere are two ways to configure the logger:\n\n* The first is to use a **config file** `config-log.toml`, which is located in the data directory alongside other configuration files.\n\n* The second is to use `NANO_LOG` and `NANO_LOG_LEVELS` **environment variables**. The environment variables take precedence over the configuration file.\n\n\n#### Config File (config-log.toml)\n\nDuring normal node operation, the configuration file is loaded from the data directory.\nWhen running test suites, the configuration is loaded from the current working directory.\n\n##### Example config-log.toml\n```\n[log]\ndefault_level = \"info\"\n\n[log.console]\n#colors = true\nenable = true\n#to_cerr = false\n\n[log.file]\nenable = true\n#max_size = 33554432\n#rotation_count = 4\n\n[log.levels]\n#active_transactions = \"info\"\n#all = \"info\"\n#blockprocessor = \"info\"\n#bootstrap = \"info\"\n#bootstrap_lazy = \"info\"\n#...\n#log_type = \"log_level\"\n```\n\nThe full list of `log_types` can be found [here](https://github.com/nanocurrency/nano-node/blob/develop/nano/lib/logging_enums.hpp#L24-L95)\n\n\n#### Environment Variables\n\nEnvironment variables override the configuration file. This is useful when running test suites.\n\n##### Set default log level\n```\nNANO_LOG = [trace|debug|info|warn|error|critical|off]\n```\n\n##### Set log level for individual loggers\n```\nNANO_LOG_LEVELS = log_type_1=level_1[,log_type_2=level_2,...]\n```\n\nExample:\n```\nexport NANO_LOG=warn\nexport NANO_LOG_LEVELS=active_transactions=debug,bootstrap=debug\n```\n\n\n### Unit Tests\n\nBy default, the logger is disabled when running unit tests to keep the output clean.  To enable it, set the `NANO_LOG` environment variable to a desired log level.\nAlternatively a configuration file inside the current working directory will be loaded by the test suites.\n\nIn test suite mode, each log line additionally contains the identifier of the node that produced the log line (first 10 characters of its node ID). This makes it easier to follow the flow of events and will become much more useful once full tracing is implemented.\n\n\n### Tracing\n\nThe goal of tracing is to introduce a framework for tracing events in the node. This is meant to be used for debugging and profiling purposes, e.g., by visualizing the flow of votes through the network or analyzing the delay between receiving a block and confirming it.\n\n#### Tracing Usage\nTo use tracing, it must be enabled **at compile time** by passing the `-DNANO_TRACING=ON` flag to CMake. By default, it is disabled for release builds and enabled for debug builds.\n\nAfter that, tracing can be enabled by setting the logging verbosity level to `trace`:\n```\nNANO_LOG=trace\n```\n\nSince the amount of logs when setting the logging level to `trace` is very large, it is recommended to use the trace level only for specific components. This can be done by setting the `NANO_LOG_LEVELS` environment variable to a comma-separated list of components to trace. For example, to trace only `active_transactions` and `vote_processor`, set:\n```\nNANO_LOG_LEVELS=\"active_transactions=trace,vote_processor=trace\"\n```\n\nAlternatively, this can also be done by modifying the `config-log.toml` file.\n\n\n### Tracing Formats\n\nIt is possible to specify the format of tracing output at runtime. This is done by setting the `NANO_TRACE_FORMAT` environment variable to one of the following: `standard` or `json`.\n\n#### Standard Tracing\nStandard tracing is enabled by default. It is a simple key: { value } format with indentation that should be easy to read.\n\n#### JSON Tracing\nJSON tracing is meant to be parsed by external tools. There is no indentation or newlines, so each log output line can be treated as a separate event, which simplifies parsing.\n\n##### Sample JSON Tracing output:\n```\n[2024-01-30 17:56:53.312] [vote_processor::vote_processed] [trace] \"event\":\"vote_processor::vote_processed\",\"time\":1706633813312751,\"vote\":{\"account\":\"FD16B0FE0102F68C2D9482348AE7211E3CBF86681364E53D8793A5E551167A6C\",\"final\":true,\"timestamp\":18446744073709551615,\"hashes\":[\"7DEF4D1F5EB222BC5DE2123293EE5A8CE58E283176AB65DF3373DA009FD99E86\"]},\"result\":\"indeterminate\"\n```\n\n\n### Stats Logging\n\nThis allows logging individual stat counter increments. This is useful for debugging tests. This functionality can be enabled by setting the `NANO_LOG_STATS=[1,true,on]` environment variable.\n\n#### Example output:\n```\n[2024-05-02 18:43:27.939] [node_16gzg] [stats] [debug] Stat: bootstrap_server::request::in += 1\n[2024-05-02 18:43:27.939] [node_16gzg] [stats] [debug] Stat: bootstrap_server_request::blocks::in += 1\n[2024-05-02 18:43:27.939] [node_3e5x4] [stats] [debug] Stat: traffic_tcp::all::out += 51\n[2024-05-02 18:43:27.939] [node_3e5x4] [stats] [debug] Stat: bootstrap_ascending::track::in += 1\n[2024-05-02 18:43:27.939] [node_3e5x4] [stats] [debug] Sample: bootstrap_tag_duration -> 1\n```\n\n\n\n## Overview - V26 and prior\n\nV26 and prior version use a different method to enable logs.\n\n### Configuration - V26 and prior\n\n```toml\n[node.logging]\n\n# Append to log/node.log without a timestamp in the filename.\n# The file is not emptied on startup if it exists, but appended to.\n# type:bool\nstable_log_filename = true\n```\n\nThis configuration option is set in the [`config-node.toml` file](../running-a-node/configuration.md#configuration-file-locations).\n\nTo generate a config file with all logging options, run `nano_node --generate_config node`\n\n#### logging.stable_log_filename\n\n--8<-- \"known-issue-windows-logging-stable.md\"\n\nBy default this option is set to `false` which results in all log files having a timestamp appended to them, even the currently active file. If set to `true` the currently active log file will have a static name at `log/node.log` for easier management.\n\n\n#### logging.log_rpc\nThis configuration option is set in the [`config-rpc.toml`](../running-a-node/configuration.md#configuration-file-locations) file.\n\nBy default, all RPC calls and the time spent handling each one are [logged](../running-a-node/troubleshooting.md#log-files). This can be optionally turned off by switching option `logging.log_rpc` to `false`\n\n```toml\n[logging]\n\n# Whether to log RPC calls.\n# type:bool\nlog_rpc = true\n```"
  },
  {
    "path": "docs/running-a-node/node-setup.md",
    "content": "title: Node Setup\ndescription: Get the basic recommendations and instructions for setting up a nano node to participate on the network\n\n# Node Setup\n\nThe following guide will help you get started running a nano node on the various network available. If you haven't already, reviewing both the [overview](overview.md) and [security](security.md) pages of this running a node section is highly encouraged.\n\n## Overview and node lifecycle\n\nThe simplest process for setting up a node includes configuring a machine with the proper TCP port open to the internet for your chosen network and running a build of the node software you generated or which was published by the Nano Foundation. Beyond that there are various methods for monitoring, querying and integrating with the node for specific cases.\n\nThe lifecycle of a new node is helpful to understand at a high level, with plenty of additional detail to be discovered here in the documentation:\n\n- On startup the node will discover other nodes on the network through the [peering process](../node-implementation/networking.md#peering-process), becoming aware of and establishing connections to hundreds of them.\n- Before a new node can fully participate on the network, it must [bootstrap](ledger-management.md#bootstrapping) the ledger from its peers by requesting chains of blocks starting from the [genesis block](../glossary.md#genesis) up to more recent blocks.\n- As the ledger is built out the node works to [gain consensus](../protocol-design/orv-consensus.md) on blocks by requesting votes from representatives on the network - once enough voting weight is received for a block it is considered confirmed and unchangeable in the ledger.\n- Before the ledger is built out and blocks are confirmed, the node can be queried but may return partial data, and it will only participate in certain activities. Once the ledger is synced with the rest of the network and stays synced, it can fully participate.\n\nIn addition to the lifecycle details and processes mentioned above, it can be helpful to know the different between [accounts, keys, seeds and wallet IDs](../integration-guides/the-basics.md#account-key-seed-and-wallet-ids) in nano and how they are used. Also understanding the different [blocks and transaction types](../protocol-design/blocks.md#protocol-design-blocks) is useful as you work with the node.\n\n## Choose a network\n\nThere are three networks the Nano Foundations published builds for:\n\n| <span class=\"no-break\">Network name</span> | Purpose | <span class=\"no-break\">Do funds have value?</span> |\n|--------------|---------|------------------|\n| Test network | Used for basic integration testing, no load testing | No, test nano has no value |\n| Main network | Primary network that exchanges and services integrate with | Yes |\n| Beta network | Experimental network used to test new features and do load and performance testing | No, beta nano has no value |\n\nIf you are just looking to try out and experiment with basic node setup, we recommend setting up on the test network first and then exploring the beta and main networks after.\n\nAt this point if you know which network you want to setup a node for, have a machine with the proper [hardware specifications](overview.md#hardware-recommendations), understand how to manage ports and firewall settings on it and are comfortable with the [maintenance requirements](overview.md#maintenance), you should be ready to get started!\n\n---\n\n## Configure network ports\n\nThe node has a few configurable ports it may use throughout its lifecycle, but at a minimum the port for the live network and bootstrap traffic over TCP must be open to the internet for proper connectivity. The port numbers vary based on the network being joined:\n\n=== \"Test network\"\n\n\t--8<-- \"network-details-simple-test.md\"\n\n=== \"Main network\"\n\n\t--8<-- \"network-details-simple-main.md\"\n\n=== \"Beta network\"\n\n\t--8<-- \"network-details-simple-beta.md\"\n\n!!! note \"\"\n\tBy default the node will attempt to use UPnP. [Troubleshooting information can be found here](troubleshooting.md#troubleshooting-upnp)\n\n---\n\n## Get a build\n\nThere are three main options for nano node builds:\n\n- [Generating your own build (advanced)](../integration-guides/build-options.md)\n- Using a binary build published by the Nano Foundation (see below)\n- Running a Docker container published by the Nano Foundation (see below)\n\nUsing Docker is recommended for most implementations due to the ease of upgrading and maintenance, so this guide will focus on setting up a node using that method. If you are not familiar with Docker, we recommend checkout out the official [Docker documentation](https://docs.docker.com/get-started/overview/) and other related resources to gain some knowledge before moving forward.\n\n--8<-- \"warning-docker-limitations.md\"\n\n--8<-- \"current-build-links-all.md\"\n\n---\n\n## Docker setup\n\n### Step 1: Install Docker\n\nDocker must be installed on the host machine and instructions can be found here: https://docs.docker.com/install/. We recommend installing the latest stable version available.\n\n### Step 2: Pull the Docker Image\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/nanocurrency/nano.svg)](https://hub.docker.com/r/nanocurrency/nano/)\n\t\nThe Docker image can be downloaded via `docker pull` for a specific version/tag.\n\n=== \"Test network\"\n\n\t```bash\n\tdocker pull nanocurrency/nano-test:V25.1\n\t```\n\n=== \"Main network\"\n\n\t```bash\n\tdocker pull nanocurrency/nano:V25.1\n\t```\n\n=== \"Beta network\"\n\n\t```bash\n\tdocker pull nanocurrency/nano-beta:V25.1\n\t```\n\n\tPlease see the [Beta Network](beta-network.md) page if you plan to join this network.\n\n--8<-- \"warning-multiple-node-setups.md\"\n\n---\n\n### Step 3: Start the Node\n\nThe following command will start the node container. Either set the specified environment variables (i.e. `NANO_NAME=nano_node_container`) or substitute in explicit values to the `docker run` command.\n\n`${NANO_NAME}` - The name that you would like to assign to the docker container, `nano_node_container` can be used to avoid ambiguity with the commands made to the `nano_node` process.\n\n`${NANO_TAG}` - The version you will be running from the Docker tag section above (i.e. `V25.1`).\n\n`${NANO_HOST_DIR}` - Location on the host computer where the ledger, configuration files, and logs will be stored. The Docker container will directly store files such as `config-node.toml`, `config-rpc.toml` and `data.ldb` into this directory.\n\n\n=== \"Test network\"\n\n\t--8<-- \"docker-run-command-test.md\"\n\n=== \"Main network\"\n\n\t--8<-- \"docker-run-command-main.md\"\n\n=== \"Beta network\"\n\n\t--8<-- \"docker-run-command-beta.md\"\n\n\tSee the [Beta Network](beta-network.md) page for further details.\n\n--8<-- \"docker-ipv6-tip.md\"\n\n---\n\n### Step 4: Check the logs\n\nWhen the node starts up it will generate log files in the `${NANO_HOST_DIR}` defined in the `docker run` command above. All lines will have a date and time prefix such as `[2021-Jun-24 08:26:49.331844]:`. Below are some common messages seen on startup with brief descriptions of their meanings. The date and time prefixes have been removed from examples below for simplicity.\n\n```\nNode starting, version: V25.1\n```\n:exclamation: Verify you are running the correct version  \nAppears at each startup to indicate version number\n\n```\nBuild information: d91016b \"Clang version \" \"12.0.0 (clang-1200.0.32.29)\" \"BOOST 107000\" BUILT \"Jun 21 2021\"\n```\nVarious build information starting with the abbreviated git hash of latest commit, Clang and BOOST version information and build date.\n\n```\nDatabase backend: LMDB 0.9.25\n```\nDatabase used for the backend - default LMDB but [RocksDB](ledger-management.md#rocksdb-ledger-backend) can also be configured.\n\n```\nActive network: test\n```\n:exclamation: Verify you are running on the correct network  \nIndicates which of the three network (test, main, beta) the node is running on.\n\n```\nWork pool running 12 threads \n```\nNumber of threads available for generating Proof of Work.\n\n```\n0 work peers configured\n```\nWork peers setup in the `config-node.toml` file, option `node.work_peers`. This is not required if doing local work generation, but is encouraged if planning to do large transaction volumes. See the [work generation integration guide](../integration-guides/work-generation.md) for further details.\n\n```\nOutbound Voting Bandwidth limited to 10485760 bytes per second, burst ratio 3\n```\nBandwidth limit set in the `config-node.toml` file, options `node.bandwidth_limit` and `node.bandwidth_limit_burst_ratio`.\n\n```\nNode ID: node_1gh7ghwwquxp9kw7r3p5634p3n8goyf49a3xyzcnbykxge44gjjonmhexd6h\n```\nEphemeral and unique node ID created on each startup and only used for network communications with other nodes. This is not a valid nano address (notice prefix of `node_`).\n\n```\nStarting legacy bootstrap attempt with ID auto_bootstrap_0\n...\nExiting legacy bootstrap attempt with ID auto_bootstrap_0\n```\nIndicates attempts at starting [bootstrap](ledger-management.md#bootstrapping) activities from other nodes on the network.\n\n```\nUPnP local address: 10.0.0.115, discovery: 0, IGD search: 1\nUPNP_GetSpecificPortMappingEntry failed 714: NoSuchEntryInArray\nUPnP leasing time getting old, remaining time: 0, lease time: 1787, below the threshold: 893\nUPnP TCP 24.17.20.184:17075 mapped to 17075\n```\nDetails of UPnP attempts at mapping ports. See [UPnP troubleshooting](troubleshooting.md#troubleshooting-upnp) for further details.\n\n```\nFound a representative at [::ffff:168.119.169.220]:17075\n```\nIndicates the IP address of a new representative discovered on the network.\n\n```\nWallet unlocked\n```\nCertain activities performed by the node, including signing votes, requires unlocking the wallet during operation.\n\nThe above examples are subset of potential entries in logging.\n\n---\n\n### Step 5: Query RPC\n\nOnce the node is up and running you can query via RPC. Below is a basic command example to return the block counts on the node and example responses. If you are unable to connect to the server, it may be worth trying IPv6 `[::1]` or `localhost` instead of `http://127.0.0.1`.\n\n=== \"Test network\"\n\n\t**Request**\n\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"block_count\"\n\t}' http://127.0.0.1:17076\n\t```\n\n\t**Response**\n\t```json\n\t{\n\t    \"count\": \"16599\",\n\t    \"unchecked\": \"0\",\n\t    \"cemented\": \"12456\"\n\t}\n\t```\n\n=== \"Main network\"\n\n\t**Request**\n\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"block_count\"\n\t}' http://127.0.0.1:7076\n\t```\n\n\t**Response**\n\n\t```json\n\t{\n    \t\"count\": \"122301952\",\n    \t\"unchecked\": \"89\",\n    \t\"cemented\": \"122301952\"\n\t}\n\t```\n\n=== \"Beta network\"\n\n\t**Request**\n\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"block_count\"\n\t}' http://127.0.0.1:55000\n\t```\n\n\t**Response**\n\n\t```json\n\t{\n    \t\"count\": \"48983527\",\n    \t\"unchecked\": \"0\",\n    \t\"cemented\": \"48983527\"\n\t}\n\t```\n\nThe `count` indicates how many blocks are in the ledger total (confirmed and unconfirmed). The `unchecked` is how many blocks have been downloaded but haven't been verified and inserted into the ledger. These `unchecked` blocks may or may not be valid and having a count here typically does not indicate any issue. The `cemented` count is how many blocks have been confirmed.\n\nAfter your node has been running or a few minutes you should see the `count` increasing. The `cemented` will being increasing also as resources are available for the node to confirm blocks, but will go up at a slower rate.\n\n---\n\n### Step 6: Monitor sync status\n\nIt is important to wait for your node to be synced with the network before attempting to setup a representative or send and receive transactions from a wallet it uses. In order to determine when the node should be able to carry out these activities you will want to use the above [`block_count` RPC](../commands/rpc-protocol.md#block_count) to see your local `count` and `cemented` values, and compare those to other nodes on the network.\n\nThe fastest way compare is using the ['telemetry' RPC](../commands/rpc-protocol.md#telemetry). This will return average/median/mode values from all peers for each of the values nodes share with each other.\n\n=== \"Test network\"\n\n\t**Request**\n\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"telemetry\"\n\t}' http://127.0.0.1:17076\n\t```\n\n\t**Response**\n\t```json\n\t{\n\t    \"block_count\": \"16599\",\n\t    \"cemented_count\": \"16599\",\n\t    \"unchecked_count\": \"0\",\n\t    \"account_count\": \"413\",\n\t    \"bandwidth_cap\": \"10485760\",\n\t    \"peer_count\": \"8\",\n\t    \"protocol_version\": \"18\",\n\t    \"uptime\": \"928162\",\n\t    \"genesis_block\": \"B1D60C0B886B57401EF5A1DAA04340E53726AA6F4D706C085706F31BBD100CEE\",\n\t    \"major_version\": \"22\",\n\t    \"minor_version\": \"1\",\n\t    \"patch_version\": \"0\",\n\t    \"pre_release_version\": \"0\",\n\t    \"maker\": \"0\",\n\t    \"timestamp\": \"1624923328669\",\n\t    \"active_difficulty\": \"ffffffe300000000\"\n\t}\n\t```\n\n=== \"Main network\"\n\n\t**Request**\n\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"telemetry\"\n\t}' http://127.0.0.1:7076\n\t```\n\n\t**Response**\n\t```json\n\t{\n\t    \"block_count\": \"122270697\",\n\t    \"cemented_count\": \"122206279\",\n\t    \"unchecked_count\": \"13045\",\n\t    \"account_count\": \"25682295\",\n\t    \"bandwidth_cap\": \"10485760\",\n\t    \"peer_count\": \"266\",\n\t    \"protocol_version\": \"18\",\n\t    \"uptime\": \"1234166\",\n\t    \"genesis_block\": \"991CF190094C00F0B68E2E5F75F6BEE95A2E0BD93CEAA4A6734DB9F19B728948\",\n\t    \"major_version\": \"22\",\n\t    \"minor_version\": \"1\",\n\t    \"patch_version\": \"0\",\n\t    \"pre_release_version\": \"0\",\n\t    \"maker\": \"0\",\n\t    \"timestamp\": \"1624924581283\",\n\t    \"active_difficulty\": \"fffffff800000000\"\n\t}\n\t```\n\n=== \"Beta network\"\n\n\t**Request**\n\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"telemetry\"\n\t}' http://127.0.0.1:55000\n\t```\n\n\t**Response**\n\t```json\n\t{\n\t    \"block_count\": \"48983527\",\n\t    \"cemented_count\": \"48979917\",\n\t    \"unchecked_count\": \"81\",\n\t    \"account_count\": \"3701404\",\n\t    \"bandwidth_cap\": \"10485760\",\n\t    \"peer_count\": \"18\",\n\t    \"protocol_version\": \"18\",\n\t    \"uptime\": \"2186034\",\n\t    \"genesis_block\": \"01A92459E69440D5C1088D3B31F4CA678BE944BAB3776C2E6B7665E9BD99BD5A\",\n\t    \"major_version\": \"22\",\n\t    \"minor_version\": \"1\",\n\t    \"patch_version\": \"0\",\n\t    \"pre_release_version\": \"1\",\n\t    \"maker\": \"0\",\n\t    \"timestamp\": \"1624924823965\",\n\t    \"active_difficulty\": \"fffff00000000000\"\n\t}\n\t```\n\nAlthough the threshold for being synced can vary based on the level of network activity, typically if your node has `count` and `cemented` each within 1% of the network telemetry values, you can consider it in sync. In the example above from the test network the local node has 100% of `count` vs. other nodes, but only \\~75% of `cemented`. This means it is still working to confirm all available blocks to get in sync.\n\nThis is a common situation when starting a new node, as it takes time to bootstrap all the blocks and confirm them. As you check the counts over time you should see them both getting closer to the 99% mark, although there may be interruptions in progress lasting minutes to hours or longer.\n\nIf your node stops making progress on syncing for over 24 hours, try connecting with the nano community for troubleshooting assistance on [Discord](https://chat.nano.org) or the [Forum](https://forum.nano.org).\n\n---\n\n## Next steps\n\nCongratulations on getting your node setup and running! We'd recommend joining our mailing list to ensure you get all the latest updates about the protocol and node:\n\n--8<-- \"join-technical-mailing-list.md\"\n\nBelow are resources to help you take the next step to use your node to interact with and participate on the network:\n\n- Get a [wallet setup](wallet-setup.md) with a seed and accounts\n- Learn more about [managing the node in a Docker container](docker-management.md)\n- Update your [node configuration options](configuration.md) to enable various features\n- Start [voting as a representative](voting-as-a-representative.md)\n- Find out how to best [manage your ledger file](ledger-management.md)\n\n"
  },
  {
    "path": "docs/running-a-node/overview.md",
    "content": "title: Running a Node Overview\ndescription: Understand the purpose for running a nano node, the different types of nodes available and what type of maintenance should be expected\n\n# Running a Node Overview\n\nRunning a node is a key way to help decentralize the network and provide a network access point for systems built on top of nano. Before setting up a node we recommend reviewing the following details in order to understand more about the motivations for running, required upkeep, types and recommended specifications for nodes.\n\n## Why run a node?\nBy design, the incentives for running a nano node are not built into the network itself, but instead are external. This is an important difference compared to nearly all other cryptocurrency networks and allows nano to operate securely without transaction fees.[^1][^2] These indirect, external incentives include the following and more:\n\n* Advertising exposure from their representative showing up on curated representative lists\n* Transaction fee savings for businesses and organizations accepting nano as payment\n* Helping support and further decentralize a global payment network\n* Having a trusted access point for building additional software on the network\n\nRegardless of the motivation for running a node, it will only benefit the network if proper care is taken to ensure it is run on correctly provisioned machines and ongoing maintenance of the node, OS and any supporting systems are routinely done.\n\n## Node types\n\n--8<-- \"dedicated-representative-nodes.md\"\n\n!!! tip \"Review Node security guide\"\n\tRegardless of the type of node you are planning to run, make sure to review the [Node security guide](security.md) to ensure best practice with configuration, firewalls and more.\n\n### Non-voting nodes\nWhen first setting up a node it will not be configured to participate in consensus by voting on traffic. This type of node is common and is recommended for all integrations. If your goal in setting up a node is to learn how to integrate and use nano for payments, this is the best starting point. If you want to dedicate resources to help secure consensus on the network, then a Representative node should be explored.\n\n!!! info \"Representatives and voting\"\n\tFor a very brief overview of how representatives and voting works in the nano network, see the [What is nano? page](../what-is-nano/overview.md#representatives-and-voting). If you're looking to dig deeper, the [ORV consensus section of the living whitepaper](../protocol-design/orv-consensus.md) helps explain further how consensus works.\n\n### Representative nodes\nIf a node is setup with a Representative account, is configured to vote and has **less than 0.1% of [online voting weight](/glossary#online-voting-weight)** delegated to them, they are a considered Representative node. These nodes will validate and vote on transactions seen on the network. Their votes will be directly sent to a subset of their peers, but other nodes on the network will not rebroadcast their votes.\n\n### Principal Representative nodes\nRepresentative nodes with **at least 0.1% of the [online voting weight](/glossary#online-voting-weight)** delegated to them participate more broadly in network consensus because votes they send to their peers are then rebroadcasted by those nodes as well. These \"PR\" nodes have the most impact to the security and availability of the network so [keeping them secure](security.md) and following [maintenance recommendations](#maintenance) should be taken seriously.\n\n!!! success \"Becoming a Principal Representative\"\n\tWith the ability for any user on the network to redelegate their voting weight, even an account with no weight today can become a Principal Representative over time.\n\n## Hardware recommendations\n<span id=\"resources-and-ongoing-maintenance\"></span>\nNodes consume CPU, RAM, disk IO and bandwidth IO resources, all of which come at a cost. In order to keep the node participating and in-sync, the recommended specifications for machines based on node type below should be followed.\n\n--8<-- \"hardware-recommendations.md\"\n\n## Maintenance\n\n--8<-- \"join-technical-mailing-list.md\"\n\nWith any system, ongoing maintenance must be taken into account to avoid issues. The following are a few examples of regular activities that should be committed to, especially when running a [Representative](#representative-nodes) or [Principal Representative](#principal-representative-nodes) node:\n\n- Performing OS-level updates and security patches regularly applied\n- Upgrading to the [latest node versions](../releases/node-releases.md) as they are available\n- Following best practices for securing passwords or other sensitive data related to the node\n\nWithout taking care of the security and maintenance of systems hosting the node, any benefit to the network could be lost. Continue learning about how best to keep the node secure in our [Node security guide](security.md).\n\n[^1]: https://medium.com/nanocurrency/the-incentives-to-run-a-node-ccc3510c2562\n[^2]: https://medium.com/@clemahieu/emergent-centralization-due-to-economies-of-scale-83cc85a7cbef\n"
  },
  {
    "path": "docs/running-a-node/security.md",
    "content": "title: Node Security\ndescription: Information about how to properly secure your nano node when getting setup on the network\n\n# Node Security\n\nThere are [many reasons to run a Nano node](/running-a-node/overview/#why-run-a-node) on the network. Nodes are the participants that help vote on transaction validity, assist other nodes with bootstrapping blocks in the ledger and providing an access point to all accounts. But those who choose to run them should be making a long-term commitment to [run them on proper hardware](/running-a-node/node-setup/#hardware-recommendations), keep them updated with the [latest release](/releases/node-releases/) and, most importantly, keep their setup as secure as possible.\n\n--8<-- \"join-technical-mailing-list.md\"\n\nThe details below are guidelines on things to watch out for when setting up and securing your Nano node. As the node can be run on many different operating systems, some of these guidelines have been kept more general. There are plenty of resources online for learning how to apply these guidelines to more specific setups and additional details will be included in the docs here as they are appropriate.\n\n## Node configuration\n\n### Enabling control\n\nVarious RPC calls are marked as requiring the `enable_control` option to be turned on before they can be called. This extra level of permission to use these RPCs was put in place because the calls can be dangerous in a couple ways:\n\n* They can potentially allow access to wallet funds\n* They can consume extra node resources compared to other calls, such as using more disk space or requiring additional computation to complete\n\nBy turning `enable_control` on, anyone with access to your RPC can run these potentially dangerous commands, so it is only recommended with [port configurations](#port-configuration) where RPC access is restricted to local and loopback addresses only. If your RPC is exposed to external or non-loopback addresses, the node will print out warnings to `stdout` and your logs to help make you aware of potential exposure.\n\n### Port configuration\n\nOpening default port `7075` on TCP is required for the node to participate on the main network and this should be done unrestricted. The default port for RPC access is `7076` and should only be available to those you wish to have control of the node. Verifying the configuration in `config-rpc.toml` file for `address` and `enable_control` should be done on all nodes, alonside other access verifications outlined below.\n\n!!! danger \"Opening RPC port externally and enabling control is potentially dangerous\"\n\tAs mentioned above, enabling control allows anyone with RPC access to make potentially dangerous calls to your node. If turning on `enable_control`, you must carefully review any access granted to the RPC port (default `7076`) to ensure it is as secure as possible.\n\n## Firewalls\n\nThere are various firewall options available across operating systems. IPTables, PeerBlock, Windows Firewall and others allow you to better control access to your host machine and thus your node. By having a firewall in place you can completely block unused and unnecessary ports, as well as whitelist other ports for access only from trusted IP addresses. Using this in combination with good [server access](#server-access) and [port configuration](#port-configuration) practices helps harden your node setup even further.\n\n## Server access\n\nDue to the node currently processing all transactions, keeping them running and online as much as possible is recommended, so many operators use dedicated servers or shared servers, often in data centers or cloud providers. When running node on a remote machine, access to that machine should be tightened up in various ways. Some common tips are included below which may or may not apply to your specific system:\n\n* Use private/public key pairs exclusively for authentication over SSH, which involves disabling password-based authentication\n* Disable root login entirely\n* Disable remote logins for accounts with an empty password\n* Change default SSH port\n* Use a [firewall](#firewalls) to whitelist IP access to SSH connections\n* Set timeouts for idle SSH connections\n* Get setup to block SSH brute force attempts automatically with tools like Fail2ban\n* Limit the maximimum authentication attempts allowed\n* Setup alerts and monitoring for SSH connections\n\nUsing a variety of these control measures for server access can increase your resistance to unauthorized access to your host machine and help protect your node from interference.\n\n## Maintenance\n\nAs always the machine hosting the node should have regular maintenance done such as security patches, updates, etc. See [Maintenance](overview.md#maintenance) for more details.\n\n## Docker considerations\n\nWhen running a node in Docker there is an extra layer of port controls between the node in the Docker container and the host machine. The default node configuration provided with Docker images in [Docker hub](https://hub.docker.com/r/nanocurrency/nano), along with examples in our documentation [for commands such as `docker run`](/running-a-node/docker-management/#starting), result in allowing RPC access only to the machine hosting the container. This is the recommended setup for most nodes.\n\nTo make sure Docker security is understood by any node operator and the setup used is as secure as possible, we recommend reading up on general best practices for using Docker, consider [running Docker with non-root USER](/running-a-node/docker-management/#docker-user-support) and verifying external access to RPC calls are controlled sufficiently by the Docker host machine.\n"
  },
  {
    "path": "docs/running-a-node/test-network.md",
    "content": "title: Test Network\ndescription: Find out how to get a nano node setup on the test network for general integration and node upgrade testing\n\n# Test network\n\nThe test network exists primarily for the purpose of conducting general integration and node upgrade testing in light volumes. By providing a network with similar parameters to the main network (work difficulty, etc.) this is the best environment for connecting test or staging versions of services and applications to for small scale tests. In order to keep the network as stable as possible, the Nano Foundation will maintain nodes on this network on the latest Release Candidate (RC) or release version, it will not be updated with beta or development features.\n\nFor load testing and new node releases and features testing, head over to the [beta network](beta-network.md) page where details on how to conduct those types of network-wide testing exist.\n\n## Running a test node\n\nSetting up a node on the test network is similar to the beta network. To start you should [install docker](/running-a-node/node-setup/#installing-docker) and be familiar with the general setup and [Docker management](/running-a-node/docker-management/) processes.\n\n### Network ports\n\n--8<-- \"network-details-simple-test.md\"\n\n___\n\n### Directory locations\n\n--8<-- \"directory-locations-test.md\"\n\n---\n\n\n### Binaries\n\nIn addition to the Docker details above, the latest binary builds of the node for the test network can be found below. These will only change when Release Candidates (RC) builds are ready, or when final releases are done. However, the first build available today is actually a development build since the changes to enable this network were recently introduced.\n\n--8<-- \"current-build-links-test.md\"\n\n\nIf manual builds are needed, see the [build options](../integration-guides/build-options.md) page for details.\n\n\n### Pulling the Docker image\n[![Docker Pulls](https://img.shields.io/docker/pulls/nanocurrency/nano.svg)](https://hub.docker.com/r/nanocurrency/nano-test)\n\nPulls the latest test release of the nano Node:\n```bash\ndocker pull nanocurrency/nano-test\n```\n\nPulls a specific test version of the nano node:\n```bash\ndocker pull nanocurrency/nano-test:<tag>\n```\n\nA list of test tags can be found at the official [Nano Currency Docker Hub](https://hub.docker.com/r/nanocurrency/nano-test/tags)\n\n### Starting the Docker container\n\n--8<-- \"docker-run-command-test.md\"\n\n!!! tip\n\t* For an explanation of the options included in the Docker `run` command, see [Starting the Container](/running-a-node/docker-management/#starting) details for the main network.\n\t* See [Docker management](/running-a-node/docker-management/) for other related commands\n\n!!! warning \"Separate host directories\"\n\tBe sure to use a different host directory for main network, beta network and test network Docker node setups. Attempting to use the same directory will result in issues.\n\n## Getting test funds\n\nOne you have a node up and running the ledger should bootstrap from the network quickly, and then you just need some test network specific Nano funds. We are currently working on a faucet setup to enable self-service options, but for now please reach out to `ThiagoSFS#1554` on [Discord](https://chat.nano.org) or email [infrastructure@nano.org](mailto:integrations@nano.org) with the account number you would like funds distributed to for the test network.\n"
  },
  {
    "path": "docs/running-a-node/troubleshooting.md",
    "content": "title: Troubleshooting\ndescription: Find answers for common issues nano node operators run as well as methods for getting proper log and crash files\n\n# Troubleshooting\n\n## Log Files\n\nThe default location of standard node log files for various systems:\n\n| **OS**  | **Location** |\n|---------|--------------|\n| Windows | `:::bash C:\\Users\\<user>\\AppData\\Local\\Nano\\log` -or- `:::bash %LOCALAPPDATA%\\Nano\\log`  |\n| macOS   | `:::bash /Users/<user>/Library/Nano/log ` |\n| Linux   | `:::bash /home/<user>/Nano/log ` |\n\n!!! tip \"\"\n    To get a static file name for the currently active log file, see the [stable_log_filename configuration option](configuration.md#loggingstable_log_filename)\n\n---\n\n## What to do if the node crashes (Linux)\n\n!!! warning \"Do not restart the node\"\n    If your node crashes, please follow this guide before attempting to run it again.\n\nIf the node crashes, the most commonly seen message is \"Segmentation fault (core dumped)\". When using docker, this message will only show up in the docker logs. In any case, this is often not enough to go on in terms of figuring out what went wrong. The next steps detail what you should do to provide us with as much information as possible about the problem.\n\nWhen you are done gathering all information, please [create a new Github issue](https://github.com/nanocurrency/nano-node/issues/new), or [reach us on Discord](https://chat.nano.org) in the *#support* channel, detailing your issue as much as possible.\n\n\n!!! note \"Getting the latest node log\"\n    The following command will order the log files such that the first one in the output is the most recent. If you restarted the node since the crash, then the relevant log file is not the latest one. Please be careful to give us the relevant log file.\n\n    ```bash\n    # Nano -> NanoBeta if debugging a beta node\n    ls -dlt ~/Nano/log/* | head\n    ```\n\n    Please provide the complete log file.\n\nPlease follow the steps below for the corresponding node version you are using. Should there be an error obtaining the information in a newer version, the older version steps should then be attempted.\n#### _v21_+ nodes\n\n!!! example \"Step 1: Make sure addr2line is installed\"\n    It is likely installed already, consult documentation for your linux distribution if it is not mentioned below:  \n    **Ubuntu/Debian**\n    `apt-get install binutils`\n  \n    **Fedora 22+**  \n    `dnf install binutils`\n\n!!! example \"(Optional) Step 2: Save crash dump files\"\n    The next step will clean up the dump files generated during the crash, if you wish to keep these then save `nano_node_backtrace.dump`, and all `nano_node_crash_load_address_dump_*.txt` files.\n\n!!! example \"Step 3: Generate crash report\"\n    Run:\n    `./nano_node --debug_generate_crash_report`\n\n    This will generate a text file `nano_node_crash_report.txt` please send us the contents of this file.\n\n#### _v20_ nodes\n\n!!! example \"Step 1: Getting dmesg information\"\n    Depending on the error, it is possible you do not find any useful information in this step, in which case please move on to Step 3.\n    Run the following command and look for `nano_node` at the end. If you see a relevant message, gather all messages with a similar timestamp - the number within brackets on the left.\n\n    ```bash\n    dmesg\n    ```\n\n    Example output:\n    ```\n    [    6.336071] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready\n    [    6.375123] wlp2s0: Limiting TX power to 23 (23 - 0) dBm as advertised by **:**:**:**:**:**\n    [ 6141.711993] show_signal_msg: 23 callbacks suppressed\n    [ 6141.711995] I/O[14487]: segfault at 1 ip 000055c69d3a1634 sp 00007f6e9332df10 error 6 in nano_node[55c69d25f000+70b000]\n    [ 6141.711999] Code: 24 70 48 83 c5 10 48 89 c3 48 39 ef 74 b6 e8 e3 b8 39 00 eb af 90 41 57 41 56 41 55 41 54 49 89 fc 55 53 48 81 ec a8 00 00 00 <c6> 04 25 01 00 00 00 31 64 48 8b 04 25 28 00 00 00 48 89 84 24 98\n    ```\n\n    From this output, only the last 3 lines are relevant.\n\n!!! example \"Step 2: Getting syslog information\"\n    More information might be available in syslog. Run the following command and look for the time the crash ocurred.\n\n    ```bash\n    cat /var/log/syslog\n    ```\n\n    Example output:\n    ```\n    Aug 15 11:56:07 ubuntu-server kernel: [6141.711993] show_signal_msg: 23 callbacks suppressed\n    Aug 15 11:56:07 ubuntu-server kernel: [6141.711995] I/O[25975]: segfault at 1 ip 000055b2960e2d24 sp 00007fcff50f6fc0 error 6 in nano_node[55b295f9b000+6d8000]\n    Aug 15 11:56:07 ubuntu-server kernel: [6141.711999] Code: 24 70 48 83 c5 10 48 89 c3 48 39 ef 74 b6 e8 e3 b8 39 00 eb af 90 41 57 41 56 41 55 41 54 49 89 fc 55 53 48 81 ec a8 00 00 00 <c6> 04 25 01 00 00 00 31 64 48 8b 04 25 28 00 00 00 48 89 84 24 98\n    ```\n\n    Include the relevant lines from the output. In this example, the log is similar to the one from Step 2.\n\n!!! example \"Step 3: Getting a backtrace dump\"\n    This command will produce some basic information about the error.\n\n    **Not using docker**:\n    ```bash\n    ./nano_node --debug_output_last_backtrace_dump > nano_node_backtrace_output.txt\n    ```\n\n    **Using docker**:\n    ```bash\n    mkdir -p /tmp/nano_node_crash && cd $_\n    docker exec ${NANO_NAME} nano_node --debug_output_last_backtrace_dump > nano_node_backtrace_output.txt\n    docker exec ${NANO_NAME} sh -c 'mkdir -p crash_files; mv nano_node_crash*.txt crash_files/'\n    docker cp ${NANO_NAME}:/crash_files/ . && mv crash_files/* .\n    ```\n\n!!! example \"Step 4: Producing the archive file\"\n    See the output of this command for the name of the file you should include in your report.\n    ```bash\n    FILE=\"nano_node_crash_$(date +\"%Y-%m-%d_%H-%M-%S.tar.gz\")\" && tar czf $FILE --exclude=*.tar.gz nano_node_* && echo \"Created archive $FILE\"\n    ```\n\n---\n\n## Statistics from RPC\n\nThe \"stats\" RPC command can be used by external processes to query statistics, such as traffic counters. This is useful for diagnostics, monitoring and display in admin consoles. \n\nStatistics are optionally logged to separate text files.\n\nFor implementations details, please see [Statistics API](https://github.com/cryptocode/raiblocks/wiki/Statistics-API)\n\n!!! warning \"Duplicate observer stats\"\n    Under certain conditions, confirmations seen through the observer type stat can be duplicates. In order to get accurate data, block hashes must be tracked and validated against previously seen hashes.\n\n### Configuration\n\nAll configuration nodes and values are optional, with the default values shown in comments below:\n\n```json\n\"node\": {\n    ...\n    \"statistics\": {\n\n        // Sampling configuration (optional)\n        // Only activate if you need sampling information, as there's some overhead associated with this feature.\n        \"sampling\": {\n            \"enabled\": \"true\",                // If sampling is enabled. Default false.\n            \"capacity\": \"5\",                  // How many samples to keep. Must be set if sampling is enabled.\n            \"interval\": \"1000\"                // Sample interval in milliseconds. Must be set if sampling is enabled.\n        },\n\n        // File logging (optional)\n        \"log\": {                              \n            \"interval_counters\": \"5000\",      // How often to write counters to file in milliseconds. Default 0 (off)\n            \"interval_samples\": \"5000\",       // How often to write samples to file, milliseconds. Default 0 (off)\n            \"rotation_count\": \"5\",            // Rotate file after writing statistics this many times. Default 100.\n            \"headers\": \"true\",                // Write header containing log\n            \"filename_counters\": \"counters.stat\",\n            \"filename_samples\": \"samples.stat\"\n        }\n    }\n}\n```\n\n#### Available type, detail and direction values\n\n_version 25.0+_  \n\n```\ntype:\n\ttraffic_tcp\n\terror\n\tmessage\n\tblock\n\tledger\n\trollback\n\tbootstrap\n\ttcp_server\n\tvote\n\telection\n\thttp_callback\n\tipc\n\ttcp\n\tconfirmation_height\n\tconfirmation_observer\n\tdrop\n\taggregator\n\trequests\n\tfilter\n\ttelemetry\n\tvote_generator\n\tvote_cache\n\thinting\n\tblockprocessor\n\tbootstrap_server\n\tactive\n\tactive_started\n\tactive_confirmed\n\tactive_dropped\n\tactive_timeout\n\tbacklog\n\tunchecked\n\telection_scheduler\n\toptimistic_scheduler\n\thandshake\n\tbootstrap_ascending\n\tbootstrap_ascending_accounts\n\ndetails:\n    all\n\n\t// common\n\tok\n\tloop\n\ttotal\n\tprocess\n\tupdate\n\trequest\n\tbroadcast\n\n\t// processing queue\n\tqueue\n\toverfill\n\tbatch\n\n\t// error specific\n\tinsufficient_work\n\thttp_callback\n\tunreachable_host\n\tinvalid_network\n\n\t// confirmation_observer specific\n\tactive_quorum\n\tactive_conf_height\n\tinactive_conf_height\n\n\t// ledger, block, bootstrap\n\tsend\n\treceive\n\topen\n\tchange\n\tstate_block\n\tepoch_block\n\tfork\n\told\n\tgap_previous\n\tgap_source\n\trollback_failed\n\tprogress\n\tbad_signature\n\tnegative_spend\n\tunreceivable\n\tgap_epoch_open_pending\n\topened_burn_account\n\tbalance_mismatch\n\trepresentative_mismatch\n\tblock_position\n\n\t// message specific\n\tnot_a_type\n\tinvalid\n\tkeepalive\n\tpublish\n\tconfirm_req\n\tconfirm_ack\n\tnode_id_handshake\n\ttelemetry_req\n\ttelemetry_ack\n\tasc_pull_req\n\tasc_pull_ack\n\n\t// bootstrap, callback\n\tinitiate\n\tinitiate_legacy_age\n\tinitiate_lazy\n\tinitiate_wallet_lazy\n\n\t// bootstrap specific\n\tbulk_pull\n\tbulk_pull_account\n\tbulk_pull_error_starting_request\n\tbulk_pull_failed_account\n\tbulk_pull_request_failure\n\tbulk_push\n\tfrontier_req\n\terror_socket_close\n\n\t// vote specific\n\tvote_valid\n\tvote_replay\n\tvote_indeterminate\n\tvote_invalid\n\tvote_overflow\n\n\t// election specific\n\tvote_new\n\tvote_processed\n\tvote_cached\n\telection_block_conflict\n\tgenerate_vote\n\tgenerate_vote_normal\n\tgenerate_vote_final\n\n\t// election types\n\tnormal\n\thinted\n\toptimistic\n\n\t// received messages\n\tinvalid_header\n\tinvalid_message_type\n\tinvalid_keepalive_message\n\tinvalid_publish_message\n\tinvalid_confirm_req_message\n\tinvalid_confirm_ack_message\n\tinvalid_node_id_handshake_message\n\tinvalid_telemetry_req_message\n\tinvalid_telemetry_ack_message\n\tinvalid_bulk_pull_message\n\tinvalid_bulk_pull_account_message\n\tinvalid_frontier_req_message\n\tinvalid_asc_pull_req_message\n\tinvalid_asc_pull_ack_message\n\tmessage_too_big\n\toutdated_version\n\n\t// tcp\n\ttcp_accept_success\n\ttcp_accept_failure\n\ttcp_write_drop\n\ttcp_write_no_socket_drop\n\ttcp_excluded\n\ttcp_max_per_ip\n\ttcp_max_per_subnetwork\n\ttcp_silent_connection_drop\n\ttcp_io_timeout_drop\n\ttcp_connect_error\n\ttcp_read_error\n\ttcp_write_error\n\n\t// ipc\n\tinvocations\n\n\t// peering\n\thandshake\n\n\t// confirmation height\n\tblocks_confirmed\n\tblocks_confirmed_unbounded\n\tblocks_confirmed_bounded\n\n\t// [request] aggregator\n\taggregator_accepted\n\taggregator_dropped\n\n\t// requests\n\trequests_cached_hashes\n\trequests_generated_hashes\n\trequests_cached_votes\n\trequests_generated_votes\n\trequests_cannot_vote\n\trequests_unknown\n\n\t// duplicate\n\tduplicate_publish\n\n\t// telemetry\n\tinvalid_signature\n\tnode_id_mismatch\n\tgenesis_mismatch\n\trequest_within_protection_cache_zone\n\tno_response_received\n\tunsolicited_telemetry_ack\n\tfailed_send_telemetry_req\n\tempty_payload\n\tcleanup_outdated\n\n\t// vote generator\n\tgenerator_broadcasts\n\tgenerator_replies\n\tgenerator_replies_discarded\n\tgenerator_spacing\n\n\t// hinting\n\tmissing_block\n\n\t// bootstrap server\n\tresponse\n\twrite_error\n\tblocks\n\tdrop\n\tresponse_blocks\n\tresponse_account_info\n\tchannel_full\n\n\t// backlog\n\tactivated\n\n\t// active\n\tinsert\n\tinsert_failed\n\n\t// unchecked\n\tput\n\tsatisfied\n\ttrigger\n\n\t// election scheduler\n\tinsert_manual\n\tinsert_priority\n\tinsert_priority_success\n\terase_oldest\n\n\t// handshake\n\tinvalid_node_id\n\tmissing_cookie\n\tinvalid_genesis\n\n\t// bootstrap ascending\n\tmissing_tag\n\treply\n\tthrottled\n\ttrack\n\ttimeout\n\tnothing_new\n\n\t// bootstrap ascending connections\n\tconnect\n\treuse\n\n\t// bootstrap ascending accounts\n\tprioritize\n\tprioritize_failed\n\tblock\n\tunblock\n\tunblock_failed\n\n\tnext_priority\n\tnext_database\n\tnext_none\n\n\tblocking_insert\n\tblocking_erase_overflow\n\tpriority_insert\n\tpriority_erase_threshold\n\tpriority_erase_block\n\tpriority_erase_overflow\n\tdeprioritize\n\tdeprioritize_failed\n\ndir (direction) :\n    in\n    out\n```\n\n_previous versions up to 24.0_  \n\n```\ntype:\n    traffic_udp\n    traffic_tcp\n    error\n    message\n    block\n    ledger\n    rollback\n    bootstrap\n    vote\n    election\n    http_callback\n    peering\n    ipc\n    tcp\n    udp\n    confirmation_height\n    confirmation_observer\n    drop\n    aggregator\n    requests\n    filter\n    telemetry\n\ndetails:\n    all\n\n    // error specific\n    bad_sender\n    insufficient_work\n    http_callback\n    unreachable_host\n\n    // confirmation_observer specific\n    active_quorum\n    active_conf_height\n    inactive_conf_height\n\n    // ledger block bootstrap\n    send\n    receive\n    open\n    change\n    state_block\n    epoch_block\n    fork\n    old\n    gap_previous\n    gap_source\n\n    // message specific\n    keepalive\n    publish\n    republish_vote\n    confirm_req\n    confirm_ack\n    node_id_handshake\n    telemetry_req\n    telemetry_ack\n\n    // bootstrap callback\n    initiate\n    initiate_lazy\n    initiate_wallet_lazy\n\n    // bootstrap specific\n    bulk_pull\n    bulk_pull_account\n    bulk_pull_deserialize_receive_block\n    bulk_pull_error_starting_request\n    bulk_pull_failed_account\n    bulk_pull_receive_block_failure\n    bulk_pull_request_failure\n    bulk_push\n    frontier_req\n    frontier_confirmation_failed\n    frontier_confirmation_successful\n    error_socket_close\n\n    // vote specific\n    vote_valid\n    vote_replay\n    vote_indeterminate\n    vote_invalid\n    vote_overflow\n\n    // election specific\n    vote_new\n    vote_cached\n    late_block\n    late_block_seconds\n    election_non_priority\n    election_priority\n    election_block_conflict\n    election_difficulty_update\n    election_drop\n    election_restart\n\n    // udp\n    blocking\n    overflow\n    invalid_magic\n    invalid_network\n    invalid_header\n    invalid_message_type\n    invalid_keepalive_message\n    invalid_publish_message\n    invalid_confirm_req_message\n    invalid_confirm_ack_message\n    invalid_node_id_handshake_message\n    invalid_telemetry_req_message\n    invalid_telemetry_ack_message\n    outdated_version\n\n    // tcp\n    tcp_accept_success\n    tcp_accept_failure\n    tcp_write_drop\n    tcp_write_no_socket_drop\n    tcp_excluded\n\n    // ipc\n    invocations\n\n    // peering\n    handshake\n\n    // confirmation height\n    blocks_confirmed\n    blocks_confirmed_unbounded\n    blocks_confirmed_bounded\n    invalid_block\n\n    // [request] aggregator\n    aggregator_accepted\n    aggregator_dropped\n\n    // requests\n    requests_cached_hashes\n    requests_generated_hashes\n    requests_cached_votes\n    requests_generated_votes\n    requests_cannot_vote\n    requests_unknown\n\n    // duplicate\n    duplicate_publish\n\n    // telemetry\n    invalid_signature\n    different_genesis_hash\n    node_id_mismatch\n    request_within_protection_cache_zone\n    no_response_received\n    unsolicited_telemetry_ack\n    failed_send_telemetry_req\n\ndir (direction) :\n    in\n    out\n```\n\n### RPC Command\n\n#### Counters query:\n\n```json\n{\n    \"action\": \"stats\",\n    \"type\": \"counters\"\n}\n```\n\n#### Counters response\n\n```json\n{\n    \"type\": \"counters\",\n    \"created\": \"2018.03.29 01:46:36\",\n    \"entries\": [\n        {\n            \"time\": \"01:46:36\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"3122792\"\n        },\n        {\n            \"time\": \"01:46:36\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"out\",\n            \"value\": \"203184\"\n        },\n        {\n            \"time\": \"01:46:36\",\n            \"type\": \"message\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"12494\"\n        },\n        {\n            \"time\": \"01:46:36\",\n            \"type\": \"message\",\n            \"detail\": \"all\",\n            \"dir\": \"out\",\n            \"value\": \"1380\"\n        },\n        {\n            \"time\": \"01:46:36\",\n            \"type\": \"message\",\n            \"detail\": \"keepalive\",\n            \"dir\": \"in\",\n            \"value\": \"172\"\n        },\n        ...\n    ]\n}\n```\n\n#### Samples query:\n\n```json\n{\n    \"action\": \"stats\",\n    \"type\": \"samples\"\n}\n```\n#### Samples response\n\n```json\n{\n    \"type\": \"samples\",\n    \"created\": \"2018.03.29 01:47:08\",\n    \"entries\": [\n        {\n            \"time\": \"01:47:04\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"59480\"\n        },\n        {\n            \"time\": \"01:47:05\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"44496\"\n        },\n        {\n            \"time\": \"01:47:06\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"44136\"\n        },\n        {\n            \"time\": \"01:47:07\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"18784\"\n        },\n        {\n            \"time\": \"01:47:08\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"in\",\n            \"value\": \"22680\"\n        },\n        {\n            \"time\": \"01:47:03\",\n            \"type\": \"traffic\",\n            \"detail\": \"all\",\n            \"dir\": \"out\",\n            \"value\": \"4128\"\n        },\n        {\n            \"time\": \"01:47:04\",\n            \"type\": \"message\",\n            \"detail\": \"all\",\n            \"dir\": \"out\",\n            \"value\": \"17\"\n        },\n        {\n            \"time\": \"01:47:05\",\n            \"type\": \"message\",\n            \"detail\": \"all\",\n            \"dir\": \"out\",\n            \"value\": \"10\"\n        },\n        ...\n    ]\n}\n```\n\n### Log file example\n\n`counters.stat`\n\nAs specified in the example config, sampling interval is 1 second, stats are logged every 5 seconds, and the file rotates after 5 log cycles.\n\n```\ncounters,2018.03.29 01:45:36\n01:44:56,bootstrap,all,out,1\n01:45:36,bootstrap,initiate,out,2\ncounters,2018.03.29 01:45:41\n01:45:41,traffic,all,in,456344\n01:45:41,traffic,all,out,189520\n01:45:41,message,all,in,1925\n01:45:41,message,all,out,1289\n01:45:38,message,keepalive,in,165\n01:45:41,message,keepalive,out,1027\n01:45:41,message,publish,in,34\n01:45:38,message,confirm_req,in,164\n01:45:41,message,confirm_req,out,262\n01:45:41,message,confirm_ack,in,1562\n01:45:36,bootstrap,all,out,2\n01:45:41,bootstrap,initiate,out,3\n```\n\n`samples.stat`\n\nAs specified in the example config, logging is done every 5 seconds and the sampling capacity is 5 (how many samplings are kept)\n\n```\nsamples,2018.03.29 01:45:36\n01:45:36,bootstrap,initiate,out,2\nsamples,2018.03.29 01:45:41\n01:45:37,traffic,all,in,322608\n01:45:38,traffic,all,in,37064\n01:45:39,traffic,all,in,38752\n01:45:40,traffic,all,in,25632\n01:45:38,traffic,all,out,185072\n01:45:39,traffic,all,out,3072\n01:45:41,traffic,all,out,920\n01:45:37,message,all,in,1387\n01:45:38,message,all,in,126\n01:45:39,message,all,in,179\n01:45:40,message,all,in,101\n01:45:37,message,all,out,1254\n01:45:38,message,all,out,10\n01:45:39,message,all,out,16\n01:45:41,message,all,out,6\n01:45:38,message,keepalive,in,165\n01:45:38,message,keepalive,out,1011\n01:45:39,message,keepalive,out,12\n01:45:41,message,keepalive,out,3\n01:45:37,message,publish,in,19\n01:45:38,message,publish,in,8\n01:45:40,message,publish,in,3\n01:45:41,message,publish,in,4\n01:45:38,message,confirm_req,in,164\n01:45:37,message,confirm_req,out,249\n01:45:38,message,confirm_req,out,3\n01:45:39,message,confirm_req,out,6\n01:45:41,message,confirm_req,out,3\n01:45:37,message,confirm_ack,in,1046\n01:45:38,message,confirm_ack,in,141\n01:45:39,message,confirm_ack,in,150\n01:45:40,message,confirm_ack,in,100\n01:45:36,bootstrap,all,out,2\n01:45:36,bootstrap,initiate,out,2\n01:45:41,bootstrap,initiate,out,1\n```\n\n---\n\n## Troubleshooting UPnP\n\n### Ensure UPnP is enabled\nUPnP will be enabled unless the external port is set in either the config\n```toml\n[node]\n...\n# The external address of this node (NAT). If not set, the node will request this information via UPnP.\n# type:string,ip\nexternal_address = \"::ffff:<some_public_ipv4>\"\n```\nor via cli flag\n```bash\n--config node.external_address=\"::ffff:<some_public_ipv4>\"\n```\n\n### Enable UPnP logging\nAppending this to your launch command will enable upnp debug logging.\n\n```bash\n#V27 or later\n--config log.console.upnp=debug\n```\n\n```bash\n# V26 or before\n--config node.logging.upnp_details=true\n```\n### Error UPnP Messages\nCheck the beginning of the logs for UPNP_* messages\n\n!!! error \"Port Mapping Conflict\"\n    Check for static routes\n    ```bash\n    [2019-Oct-29 11:06:56.641389]: UPnP failed 718: ConflictInMappingEntry\n    [2019-Oct-29 11:06:56.644387]: UPnP failed 718: ConflictInMappingEntry\n    ```\n\n### Normal UPnP Messages\n\n!!! note \"\"\n    ```bash\n    [2019-Oct-29 11:06:56.641389]: UPNP_GetSpecificPortMappingEntry failed 714: NoSuchEntryInArray\n    [2019-Oct-29 11:06:56.644387]: UPNP_GetSpecificPortMappingEntry failed 714: NoSuchEntryInArray\n    ```\n    This message is expected when starting the node and will go away after the UPnP has mappeded the port\n\n---\n"
  },
  {
    "path": "docs/running-a-node/voting-as-a-representative.md",
    "content": "title: Voting as a Representative\ndescription: A comprehensive guide for getting your nano node to participate in consensus on the network by voting as a representative\n\n# Voting as a Representative\n\nThe default [node setup](node-setup.md) guide provides instructions for getting a non-voting node setup, but if you're looking to run a [Representative node](overview.md#representative-nodes), and perhaps hoping to become a [Principal Representative](overview.md#principal-representative-nodes), the node will need to be configured to vote and be setup with a Representative account.\n\n--8<-- \"join-technical-mailing-list.md\"\n\nBefore getting into the setup instructions, there are a few important considerations:\n\n## Commitment, security and maintenance\nRunning a Nano Representative is a commitment to helping secure the network. This can only be done if the operation of the node is taken seriously.\n\n* Prepare for the necessary [maintenance](overview.md#maintenance) on the node and host machine\n* Carefully review the [security guide](security.md) and follow general security best practices at all times\n* Ensure you are prepared for the time and cost commitments of maintaining the node over the long term to help maximize the benefits\n\n## Hardware recommendations\n\n--8<-- \"hardware-recommendations.md\"\n\n## Synced ledger\nIn order to open a new account to become a representative, the local node ledger must be in sync with the rest of the network. If you are starting a fresh node and bootstrapping, this process can take days to complete, depending on the network conditions, hardware specifications, etc. To speed this up, a [downloaded ledger](ledger-management.md#downloaded-ledger-files) can be used if necessary.\n\n---\n\n## Step 1: Enable voting\nFor the node to start voting, the following [configuration](configuration.md) options need to be updated:\n\n--8<-- \"config-node-option-node-enable-voting-true.md\"\n\n--8<-- \"config-node-option-rpc-enable-true.md\"\n\n#### enable_control\n\n--8<-- \"config-node-option-rpc-enable-control-true.md\"\n\n---\n\n## Step 2: Setup Representative account\n\nAdd a representative account to a wallet:\n\n1. Use [wallet_create](../commands/rpc-protocol.md#wallet_create) RPC, optionally with `seed` if you already know your representative account’s seed\n1. One of the following:\n    - [wallet_add](../commands/rpc-protocol.md#wallet_add) RPC, if you have a private key and didn’t have a seed before\n    - [account_create](../commands/rpc-protocol.md#account_create) RPC if you had a seed or are creating a new representative account\n1. Verify the account is in the wallet with [account_list](../commands/rpc-protocol.md#account_list)\n\n\nOpen the account - until you do [account_info](../commands/rpc-protocol.md#account_info) and others will fail:\n\n1. Send some funds to the account, at least 0.01 Nano\n1. Use [search_pending](../commands/rpc-protocol.md#search_pending) to make the wallet open the account automatically\n1. Use [account_info](../commands/rpc-protocol.md#account_info) to verify the state of the account\n    - If the account is still not open, use [receive](../commands/rpc-protocol.md#receive) as a backup\n\n---\n\n## Step 3: Restart the node and check voting\n\nBefore the node will vote, the representative account configured above must have at least 1000 Nano delegated to it. This is done by changing the representative of other accounts in your wallet with [account_representative_set](../commands/rpc-protocol.md#account_representative_set). If you do not control over 1000 Nano, you will need to have others delegate their weight to your representative.\n\nOnce you have enough weight, after a few minutes you can search for your representative account on [BlockLattice.io](https://blocklattice.io/), [Nano.community](https://nano.community/), or [NanoCharts.info](https://nanocharts.info/) to verify it is voting.\n\n--8<-- \"warning-multiple-node-setups.md\"\n\n## Step 4 (Optional): Disable RPC control commands for more security\n\n`enable_control` was only needed to create the account which the Representative uses to vote. It is not actually needed for voting. Therefore there is no need to actually keep it active after the node is prepared for voting.\n\n--8<-- \"config-node-option-rpc-enable-control-false.md\"\n\n## Step 5: Monitoring and more\n\nCongratulations on getting your representative setup! If you are able to do a good job maintaining the node and keeping it performing well, you may have a chance at becoming a [Principal Representative](overview.md#principal-representative-nodes). To reach this higher level of participation in consensus, you must get at least 0.1% of [online voting weight](/glossary#online-voting-weight) delegated to your node. After that any votes you send for transactions will be rebroadcast by other nodes to help with consensus even more.\n\nOnce you are comfortable with your node setup and want to connect it to the broader Nano ecosystem, there are a few recommended options:\n\n### Setup monitoring\n\nDetails for setting up a popular monitoring service for the node can be found at https://github.com/NanoTools/nanoNodeMonitor. Not only can this provide a website for viewing the status and promoting your representative, but it also provides metrics to popular services in the ecosystem who help monitor the broader network status and performance, such as [BlockLattice.io](https://blocklattice.io/), [Nano.community](https://nano.community/), and [NanoCharts.info](https://nanocharts.info/). \n\n### Connect with community services\n\nAt nano.community [[1]](https://github.com/mistakia/nano-community/blob/main/data/nano-reps.csv)[[2]](https://nano.community/cli) you can also verify your representative and share additional details about your social accounts. Many community members use this service to evaluate representatives which can help you get additional weight if your setup is reliable and well maintained.\n\n### Ongoing maintenance and support\n\nAs you continue maintaining your representative there are great community resources available for support:\n\n* Ask questions in the [Node and Representative Management](https://forum.nano.org/c/node-and-rep/8) category of the Nano Forum\n* Connect on the [Nano Discord server](https://chat.nano.org) for discussion around node maintenance\n* Join our [Technical Updates Mailing List](http://eepurl.com/gZucL1) to stay updated on releases, network upgrade details and more\n"
  },
  {
    "path": "docs/running-a-node/wallet-setup.md",
    "content": "title: Wallet Setup\ndescription: Learn how to setup a nano wallet with your node\n\n# Wallet Setup\n\nIn order to transact or participate in consensus on the network the node must have a method of storing and managing private/public keys. There are a few options worth considering.\n\n## Third-party wallets\n\nThere are a variety of third-party wallets dedicated to just nano, as well as other multi-coin options. Although many are intended for end users with full GUIs, some expose APIs for programmatic use and integration. Some good resources for the latest wallets can be found at:\n\n[Nano.org developer tools](https://nano.org/tools#wallets){ .md-button } [Nanowallets.guide](https://nanowallets.guide/){ .md-button }\n\n---\n\n## Custom key management\n\nIf none of the third-party offerings work for your integration needs, the best option can be to create your own custom key management setup. This is the most time consuming but is also as flexible as you need it to be. For some of the main considerations and procedures for handling private keys, manually creating transactions and properly tracking confirmations, see the [key management guide](../integration-guides/key-management.md).\n\n---\n\n## Node wallet\n\nThe published binary builds and Docker images will have an internal node wallet included. The `node_wallet` process runs alongside `nano_node` by default and provides a wallet for use by Representatives on the network, as well as for development activities. If you are building the node manually, make sure to review the [QT wallet section](../integration-guides/build-options.md#qt-wallet) of the build guide for how to include and run this wallet.\n\n--8<-- \"warning-node-wallet-not-for-prod-use.md\"\n\nBelow is a basic walkthrough on how to setup a wallet and make a transaction using the built-in node wallet. It is important to understand the differences between accounts, private and public keys, seeds and wallet IDs before going much further. If you aren't comfortable with these concepts yet, see [this guide](https://docs.nano.org/integration-guides/the-basics/#account-key-seed-and-wallet-ids). Creating a wallet with a seed and generating accounts from that seed will be the focus of this guide.\n\n### Update configuration\n\nA configuration update is required to complete this guide. If you aren't familiar with configuring the node, see the [configuration guide](../running-a-node/configuration.md) which includes [configuration file locations](../running-a-node/configuration.md#configuration-file-locations) for various operating systems and other useful details.\n\n--8<-- \"config-node-option-rpc-enable-control-true.md\"\n\nOnce the change is made, make sure to reset your node for it to take effect. At the end of this guide you will remove this option if it is no longer needed.\n\n### Create a wallet\n\nIn order to manage accounts, you first have to create a wallet to hold the seed or private keys for the accounts. If you started the node from the published binary builds or Docker images a wallet will have already been created. There will also be a cryptographically secure [seed](../integration-guides/the-basics.md#seed) and the first private key (derived from the seed at index `0`) added to the wallet.\n\nFor the purposes of this guide we will proceed as if these didn't exist, which will be the case for self-built nodes. We will instead use various commands to create the wallet and seed, backup seed details and add accounts. But before these RPC commands can be called a configuration option is needed.\n\n#### Run command\n\nAfter this configuration change you can create a wallet using the ['wallet_create' RPC](../commands/rpc-protocol.md#wallet_create). During this call not only will a wallet be created, but a cryptographically secure [seed](../integration-guides/the-basics.md#seed) will also be created and added to the wallet. If you wish to use an existing seed instead of have one generated, make sure to include it using the optional `seed` parameter.\n\n=== \"Test network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"wallet_create\"\n\t}' http://127.0.0.1:17076\n\t```\n\n=== \"Main network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"wallet_create\"\n\t}' http://127.0.0.1:7076\n\t```\n\n=== \"Beta network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"wallet_create\"\n\t}' http://127.0.0.1:55000\n\t```\n**Response**\n```json\n{ \n  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n}\n```\n\nThe wallet ID provided in the response is an ID local to the node and only available from the [`wallet_create` RPC](../commands/rpc-protocol.md#wallet_create) response or from CLI commands. This provides an extra layer of security if RPC access to sensitive calls exists: without direct access to the server to run CLI commands to get the wallet ID, remote calls to RPC won't be able to send funds or take other types of actions. \n\nMake sure to backup this wallet ID as this will be needed for other calls (you can [recover your wallet ID later](../integration-guides/key-management.md#recovering-wallet_id) too if needed).\n\n#### Backup or import your seed\n\nNote that the seed generated in the wallet isn't returned in the RPC response. This is also for security reasons. The node will only output the wallet seed to stdout via the [`--wallet_decrypt_unsafe` CLI command](../commands/command-line-interface.md#-wallet_decrypt_unsafe-walletwallet-passwordpassword). Run this command and backup your seed now (see [backing up seed](../integration-guides/key-management.md#backing-up-seed) for more details).\n\n=== \"Docker\"\n\t**Request**\n\t```bash\n\tdocker exec ${NANO_CONTAINER_NAME} nano_node --wallet_decrypt_unsafe --wallet E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\n\t```\n=== \"Other builds\"\n\t**Request**\n\t```bash\n\t/path/to/nano_node --wallet_decrypt_unsafe --wallet E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\n\t```\n**Response**\n```bash\nSeed: A7EA09F17C914AE8BA1B7FD1747DB8942DF551C271A7085187B8A20C21898CC6\n```\n\nIf you would like to replace the wallet's automatically generated seed with your own, you can use the [`wallet_change_seed` RPC](../commands/rpc-protocol.md#wallet-change-seed) command:\n\n??? danger \"wallet_change_seed replaces the previous seed\"\n    This command replaces the existing seed and clears all deterministic accounts in the wallet! Backup the old seed first if necessary.\n\n    === \"Test network\"\n      **Request**\n      ```bash\n      curl -d '{\n          \"action\": \"wallet_change_seed\",\n          \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\", \n          \"seed\": \"A7EA09F17C914AE8BA1B7FD1747DB8942DF551C271A7085187B8A20C21898CC6\" \n      }' http://127.0.0.1:17076\n      ```\n\t=== \"Main network\"\n      **Request**\n      ```bash\n      curl -d '{\n          \"action\": \"wallet_change_seed\",\n          \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\", \n          \"seed\": \"A7EA09F17C914AE8BA1B7FD1747DB8942DF551C271A7085187B8A20C21898CC6\" \n      }' http://127.0.0.1:7076\n      ```\n    === \"Beta network\"\n      **Request**\n      ```bash\n      curl -d '{\n          \"action\": \"wallet_change_seed\",\n          \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\", \n          \"seed\": \"A7EA09F17C914AE8BA1B7FD1747DB8942DF551C271A7085187B8A20C21898CC6\" \n      }' http://127.0.0.1:55000\n      ```\n\n#### Set wallet password\n\nIt is a best practice to set the wallet password for additional security. Use the ['password_change' RPC](../commands/rpc-protocol.md#password_change) to change from the empty default to a secure password. When looking to interact with the wallet it must first be unlocked, so use ['password_enter' RPC](/commands/rpc-protocol.md#password_enter) to ensure it is unlocked after setting.\n\n### Create accounts\n\nBy default a newly created wallet with a seed will not have any accounts in it, but they are easy to add by simply calling the ['account_create' RPC](../commands/rpc-protocol.md#account-create). By default this will derive the private key for index `0` first from the seed and return the related public address. See the [seed](../integration-guides/the-basics.md#seed) section for more information about private key derivation.\n\n\n=== \"Test network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"account_create\",\n\t  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n\t}' http://127.0.0.1:17076\n\t```\n\n=== \"Main network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"account_create\",\n\t  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n\t}' http://127.0.0.1:7076\n\t```\n\n=== \"Beta network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"account_create\",\n\t  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n\t}' http://127.0.0.1:55000\n\t```\n**Response**\n```json\n{\n    \"account\": \"nano_3z3ntcdh5st3mtsogwip7kys1mgp6febnk3pwtex7acggykdkc9kexj4j87b\"\n}\n```\n\n\nIf the optional `index` parameter is included the private key for that specific index will be added. Any subsequent calls to ['account_create' RPC](../commands/rpc-protocol.md#account-create) without the `index` parameter will return to incrementing one from the lowest derived index above 0. Test out the command by generating a few accounts and then using the [`account_list` RPC](../commands/rpc-protocol.md#account_list) to see them all.\n\n=== \"Test network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"account_list\",\n\t  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n\t}' http://127.0.0.1:17076\n\t```\n\n=== \"Main network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"account_list\",\n\t  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n\t}' http://127.0.0.1:7076\n\t```\n\n=== \"Beta network\"\n\t**Request**\n\t```bash\n\tcurl -d '{\n\t  \"action\": \"account_list\",\n\t  \"wallet\": \"E3E67B1B3FFA46F606240F1D0B964873D42E9C6D0B7A0BF376A2E128541CC446\"\n\t}' http://127.0.0.1:55000\n\t```\n**Response**\n```json\n{\n    \"accounts\": [\n        \"nano_1wxyhf5xupfzwpu5fhsuudh1zcx3jtgaf3yiby9yh6oixdgad5e1u17oxaof\",\n        \"nano_3x6c688rp87dhh5rywezxqqct6q8t431hh7xux9h9pmqonpyd5oh8ipod7df\",\n        \"nano_3xu3rsd5krf6xxzn6jzubnd9asmpuk6bxoh98br5bqio4fy5yf3fkr5697gb\",\n        \"nano_3z3ntcdh5st3mtsogwip7kys1mgp6febnk3pwtex7acggykdkc9kexj4j87b\"\n    ]\n}\n```\n\n### Revert configuration\n\n--8<-- \"config-node-option-rpc-enable-control-false.md\"\n\nMake sure the node is restarted after making this change.\n\n## Next steps\n\nAt this point you have a functioning wallet setup with some accounts for use on the network. There are other details about the node wallet that can be explored further in the [internal key management guide](../integration-guides/key-management.md#internal-management), as well as many additional [wallet RPCs](../commands/rpc-protocol.md#wallet-rpcs) available for use.\n\nFor most new node operators learning how to [receive and send funds](../integration-guides/key-management.md#receiving-funds) or start [voting as a Representative](voting-as-a-representative.md) is next on the list. Other useful resources include:\n\n- [Ledger management guide](ledger-management.md) for more details about bootstrapping, managing the database files, and updating the node\n- [Docker management guide](docker-management.md) with additional commands and examples for those running Docker containers\n- [Simple](voting-as-a-representative.md#setup-monitoring) and [advanced](advanced-monitoring.md) monitoring for options to keep an eye on node operations\n- Many other integration and configuration options in the [integration guides](https://docs.nano.org/integration-guides/the-basics/)\n"
  },
  {
    "path": "docs/snippets/community-links.md",
    "content": "!!! note \"\"\n\t[Nano.org](https://nano.org) | [Forum](https://forum.nano.org) | [GitHub](https://github.com/nanocurrency) | [Twitter](https://twitter.com/nano) | [Discord](https://chat.nano.org) | [Reddit](https://reddit.com/r/nanocurrency) | [Medium](https://medium.com/nanocurrency)\n\n\t[Facebook](https://facebook.com/nanofoundation) | [LinkedIn](https://www.linkedin.com/company/nano-foundation/) | [YouTube](https://youtube.com/nanocurrency) | [Instagram](https://www.instagram.com/nanocurrency/)"
  },
  {
    "path": "docs/snippets/config-node-option-node-enable-voting-true.md",
    "content": "#### node.enable_voting\nNewly setup nodes have voting disabled by default. In order to participate in network consensus, this value must be updated in the [`config-node.toml`](../running-a-node/configuration.md#configuration-file-locations) file.\n\n```toml\n[node]\n\n# Enable or disable voting. Enabling this option requires additional system resources, namely increased CPU, bandwidth and disk usage.\n# type:bool\nenable_voting = true\n```"
  },
  {
    "path": "docs/snippets/config-node-option-rpc-enable-control-false.md",
    "content": "In the [`config-rpc.toml`](../running-a-node/configuration.md#configuration-file-locations) file, you can disable the control commands again by setting `enable_control` back to false.\n\n```toml\n# Enable or disable control-level requests.\n# WARNING: Enabling this gives anyone with RPC access the ability to stop the node and access wallet funds.\n# type:bool\nenable_control = false\n```"
  },
  {
    "path": "docs/snippets/config-node-option-rpc-enable-control-true.md",
    "content": "This configuration option, which is needed for certain sensitive RPC calls such as those for creating wallets and accounts, is set in the [`config-rpc.toml`](../running-a-node/configuration.md#configuration-file-locations) file. Please make sure you are aware of the sensitive RPC calls opened up by enabling this option (detailed in the [configuration guide](../running-a-node/configuration.md#enable_control)).\n\n```toml\n# Enable or disable control-level requests.\n# WARNING: Enabling this gives anyone with RPC access the ability to stop the node and access wallet funds.\n# type:bool\nenable_control = true\n```"
  },
  {
    "path": "docs/snippets/config-node-option-rpc-enable-true.md",
    "content": "#### rpc.enable\nTo enable communication via RPC, set this configuration option in the [`config-node.toml`](../running-a-node/configuration.md#configuration-file-locations) file.\n\n```toml\n[rpc]\n\n# Enable or disable RPC\n# type:bool\nenable = true\n```"
  },
  {
    "path": "docs/snippets/contributing-code.md",
    "content": "!!! tip \"Contributing to the code\"\n\tIf you are interested in helping develop the C++ based Nano node we will help you out! Check out our details on [contributing code to the Nano node](/node-implementation/contributing) to get started."
  },
  {
    "path": "docs/snippets/current-build-links-all.md",
    "content": "=== \"Test network\"\n\n    --8<-- \"current-build-links-test.md\"\n\n=== \"Main network\"\n\n    --8<-- \"current-build-links-main.md\"\n\n=== \"Beta network\"\n\n    --8<-- \"current-build-links-beta.md\""
  },
  {
    "path": "docs/snippets/current-build-links-beta.md",
    "content": "Join the [nano Discord server](https://chat.nano.org) and head to the `#beta-announcements` channel for the latest build details."
  },
  {
    "path": "docs/snippets/current-build-links-main.md",
    "content": "| OS                  | Download link/command                                                                                                                                        | Verification                                                                                                        |\n|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| Universal Linux     | https://repo.nano.org/live/binaries/nano-node-V28.2-Linux.tar.bz2                                                                                            | [SHA256 Checksum](https://repo.nano.org/live/binaries/nano-node-V28.2-Linux.tar.bz2.sha256)                         |\n| Debian              | https://repo.nano.org/live/binaries/nano-node-V28.2-Linux.deb                                                                                                | [SHA256 Checksum](https://repo.nano.org/live/binaries/nano-node-V28.2-Linux.deb.sha256)                             |\n| macOS               | https://repo.nano.org/live/binaries/nano-node-V28.2-Darwin.dmg                                                                                               | [SHA256 Checksum](https://repo.nano.org/live/binaries/nano-node-V28.2-Darwin.dmg.sha256) |\n| Windows (exe)       | https://repo.nano.org/live/binaries/nano-node-V28.2-win64.exe                                                                                                | [SHA256 Checksum](https://repo.nano.org/live/binaries/nano-node-V28.2-win64.exe.sha256)                             |\n| Windows (zip)       | https://repo.nano.org/live/binaries/nano-node-V28.2-win64.zip                                                                                                | [SHA256 Checksum](https://repo.nano.org/live/binaries/nano-node-V28.2-win64.zip.sha256)                             |\n| Docker              | `docker pull nanocurrency/nano:V28.2`<br />See [Pulling the Docker Image](/running-a-node/node-setup/#pulling-the-docker-image) for more details.            |                                                                                                                     |\n| RHEL/RockyLinux rpm | Not available anymore. Please check [Build Options](#build-options) for build instructions.                                                          |                                                                                                                     |\n"
  },
  {
    "path": "docs/snippets/current-build-links-test.md",
    "content": "| OS                  | Download link/command                                            |\n|---------------------|------------------------------------------------------------------|\n| Universal Linux     | https://repo.nano.org/test/binaries/nano-node-V28.2-Linux.tar.bz2 |\n| Debian              | https://repo.nano.org/test/binaries/nano-node-V28.2-Linux.deb    |\n| macOS               | https://repo.nano.org/test/binaries/nano-node-V28.2-Darwin.dmg   |\n| Windows (exe)       | https://repo.nano.org/test/binaries/nano-node-V28.2-win64.exe    |\n| Windows (zip)       | https://repo.nano.org/test/binaries/nano-node-V28.2-win64.zip    |\n| Docker              | `docker pull nanocurrency/nano-test:V28.2`                       |\n| RHEL/RockyLinux rpm | Not available anymore. Please check [Build Options](#build-options) for build instructions.                               |\n"
  },
  {
    "path": "docs/snippets/dedicated-representative-nodes.md",
    "content": "!!! tip \"Dedicated Representative nodes recommended\"\n\tDue to the resources needed to participate in the voting process, it is recommended that **any node setup as a Representative should be dedicated to generating consensus**. If the resources of the Representative are used for other activities, such as application integrations, it reduces the potential benefit that node brings to the network.\n"
  },
  {
    "path": "docs/snippets/deprecation-info-pending.md",
    "content": "!!! info \"\"\n\tThe term `pending` was deprecated in favor of [`receivable`](/glossary/#receivable). For compatibility reasons both terms are still available for many calls and in responses. For more details see: https://docs.nano.org/releases/release-v24-0/#pendingreceivable-term-rpc-updates."
  },
  {
    "path": "docs/snippets/directory-contents.md",
    "content": "The Nano directory contains:\n\n- Node wallet files (`wallets.ldb`, `wallets.ldb-lock`)\n- [Configuration files](../running-a-node/configuration.md#configuration-file-locations)\n- [Log files](/running-a-node/troubleshooting/#log-files)\n- Ledger files (`data.ldb` and `data.ldb-lock` for default LMDB, or `rocksdb` directory with files for optional [RocksDB backend](../running-a-node/ledger-management.md#rocksdb-ledger-backend))\n- Directory for wallet backups (`backup`)\n\n!!! warning \"Protect wallet and backup files\"\n\tThe built-in node wallet is for use in development and testing only. Those using it should take care in protecting access to the `wallets.ldb` file and backup files, whether encrypted or not, for added security.\n"
  },
  {
    "path": "docs/snippets/directory-locations-all.md",
    "content": "=== \"Test network\"\n\n    --8<-- \"directory-locations-test.md\"\n\n=== \"Main network\"\n\n    --8<-- \"directory-locations-main.md\"\n\n=== \"Beta network\"\n\n    --8<-- \"directory-locations-beta.md\""
  },
  {
    "path": "docs/snippets/directory-locations-beta.md",
    "content": "| **OS**         | **Location** |\n|----------------|--------------|\n| Windows        | `C:\\Users\\<user>\\AppData\\Local\\NanoBeta\\` |\n| macOS          | `/Users/<user>/Library/NanoBeta/ ` |\n| Linux          | `/home/<user>/NanoBeta/ ` |\n| Docker         | As defined by the `-v` flag in the `docker run` command |\n| .deb/rpm       | `/var/nanocurrency/NanoBeta` |"
  },
  {
    "path": "docs/snippets/directory-locations-main.md",
    "content": "| **OS/Build**   | **Location** |\n|----------------|--------------|\n| Windows        | `C:\\Users\\<user>\\AppData\\Local\\Nano\\` |\n| macOS          | `/Users/<user>/Library/Nano/ ` |\n| Linux          | `/home/<user>/Nano/ ` |\n| Docker         | As defined by the `-v` flag in the `docker run` command |\n| .deb/rpm       | `/var/nanocurrency/Nano` |\n"
  },
  {
    "path": "docs/snippets/directory-locations-test.md",
    "content": "| **OS**         | **Location** |\n|----------------|--------------|\n| Windows        | `C:\\Users\\<user>\\AppData\\Local\\NanoTest\\` |\n| macOS          | `/Users/<user>/Library/NanoTest/ ` |\n| Linux          | `/home/<user>/NanoTest/ ` |\n| Docker         | As defined by the `-v` flag in the `docker run` command |\n| .deb/rpm       | `/var/nanocurrency/NanoTest` |"
  },
  {
    "path": "docs/snippets/docker-ipv6-tip.md",
    "content": "!!! tip\n\tOn some systems it may be necessary to replace `127.0.0.1` with IPv6 equivalent of `[::1]` when mapping Docker ports"
  },
  {
    "path": "docs/snippets/docker-run-command-beta.md",
    "content": "``` { .bash .annotate }\ndocker run --restart=unless-stopped -d \\\n  -p 54000:54000 \\\n  -p 127.0.0.1:55000:55000 \\ # (1)\n  -p 127.0.0.1:57000:57000 \\ # (2)\n  -v ${NANO_HOST_DIR}:/root \\\n  --name ${NANO_NAME} \\\n  nanocurrency/nano-beta:${NANO_TAG}\n```\n\n1. Port 55000 is optional, but recommended, for querying via [RPC](../commands/rpc-protocol.md)\n2. Port 57000 is optional for connecting via [WebSockets](../integration-guides/websockets.md)"
  },
  {
    "path": "docs/snippets/docker-run-command-main.md",
    "content": "``` { .bash .annotate }\ndocker run --restart=unless-stopped -d \\\n  -p 7075:7075 \\\n  -p 127.0.0.1:7076:7076 \\ # (1)\n  -p 127.0.0.1:7078:7078 \\ # (2)\n  -v ${NANO_HOST_DIR}:/root \\\n  --name ${NANO_NAME} \\\n  nanocurrency/nano:${NANO_TAG}\n```\n\n1. Port 7076 is optional, but recommended, for querying via [RPC](../commands/rpc-protocol.md)\n2. Port 7078 is optional for connecting via [WebSockets](../integration-guides/websockets.md)"
  },
  {
    "path": "docs/snippets/docker-run-command-test.md",
    "content": "``` { .bash .annotate }\ndocker run --restart=unless-stopped -d \\\n  -p 17075:17075 \\\n  -p 127.0.0.1:17076:17076 \\ # (1)\n  -p 127.0.0.1:17078:17078 \\ # (2)\n  -v ${NANO_HOST_DIR}:/root \\\n  --name ${NANO_NAME} \\\n  nanocurrency/nano-test:${NANO_TAG}\n```\n\n1. Port 17076 is optional, but recommended, for querying via [RPC](../commands/rpc-protocol.md)\n2. Port 17078 is optional for connecting via [WebSockets](../integration-guides/websockets.md)"
  },
  {
    "path": "docs/snippets/enable-voting.md",
    "content": "!!! tip \"Enable Voting\"\n\tWhen setting up a new node, voting is disabled by default in the configuration file and must be manually enabled in order to participate in consensus. See [enable_voting configuration option](/running-a-node/configuration/#nodeenable_voting) for more details."
  },
  {
    "path": "docs/snippets/hardware-recommendations.md",
    "content": "### Principal Representative Nodes\nThe following are minimum recommended specifications for nodes with more than 0.1% of the online voting weight ([Principal Representatives](../glossary.md#principal-representative)):\n\n* 16GB RAM\n* Quad-Core or higher CPU\n* 500 Mbps bandwidth (8TB or more of available monthly bandwidth)\n* SSD-based hard drive with 400GB+ of free space\n\n### Non-voting and Representative Nodes\nThe following are minimum recommended specifications for non-voting nodes and Representative nodes with less than 0.1% of the online voting weight (regular [Representatives](../glossary.md#representative)):\n\n* 8GB RAM\n* Quad-Core CPU\n* 250 Mbps bandwidth (4TB or more of available monthly bandwidth)\n* SSD-based hard drive with 400GB+ of free space\n\nThese lower specifications are also valid for any type of node run on the [Beta network](../running-a-node/beta-network.md) and [Test network](../running-a-node/test-network.md).\n\n!!! warning \"Varied resource usage\"\n\tVarious factors affect resource usage including how often RPC calls are made, other applications running on the machine, etc. These recommendations should be evaluated along with other considerations.\n\n!!! tip \"Work Generation guide\"\n\tFor nodes being used with services requiring regular or high volume sending and receiving of transactions, special considerations must be made for handling Proof-of-Work generation activities. Find details on configuring a GPU, external work services and more for the perfect setup in the [Work Generation guide](../integration-guides/work-generation.md).\n"
  },
  {
    "path": "docs/snippets/join-technical-mailing-list.md",
    "content": "!!! info \"\"\n\t<div style=\"display:flex;\">\n\t\t<div style=\"padding-right: 10px;\">\n\t\t\t<a href=\"http://eepurl.com/gZucL1\" target=\"_blank\" rel=\"noopener\"><h3 style=\"margin-top: 0;\">Technical Update Mailing List</h3></a>\n\t\t\t<div style=\"margin-bottom: 1rem\">Sign up for email updates on the latest protocol/node releases and other technical details including network upgrades.</div>\n\t\t\t<a href=\"http://eepurl.com/gZucL1\" class=\"md-button\" target=\"_blank\" rel=\"noopener\">Join Mailing List</a>\n\t\t</div>\n\t\t<div>\n\t\t\t<div style=\"background-color: #DCE9F9; padding: 10px 10px 0 10px;\">\n\t\t\t\t<a href=\"http://eepurl.com/gZucL1\" target=\"_blank\" rel=\"noopener\"><img alt=\"Join Technical Updates Mailing List\" src=\"../../images/mailing-list.svg\" title=\"Mailing list\" style=\"width:100%; min-width: 120px;\"></a>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n"
  },
  {
    "path": "docs/snippets/known-issue-macos-too-many-open-files.md",
    "content": "??? info \"Known Issue V19+: 'Too many open files'\"\n\n    * **Issue:** The following error, or a similar one, can be seen when attempting to run a full node on some versions of macOS, Linux and possibly other operating systems. This is most common when using the built-in Qt wallet or other GUI-based wallets: \"Exception while running wallet: open: Too many open files\" or other errors containing \"Too many open files\". This is due to some systems having a very low default file descriptor limit and V19.0+ uses more of them after the move to TCP.\n    \n    * **Solution:** Increasing the file limits is needed to resolve this. See [this known issue](../integration-guides/advanced.md#known-issues) for more details on resolution.\n\n\n\n"
  },
  {
    "path": "docs/snippets/known-issue-peers-stake-reporting.md",
    "content": "??? warning \"Known Issue V20: Peers stake reporting inaccurate (Windows only)\"\n\n    * **Issue:** For Windows builds only, when calling [confirmation_quorum RPC](/commands/rpc-protocol/#confirmation_quorum) the `peers_stake_total` amount returned may be inaccurate, returning a range from the correct full peer stake amount down to 0.\n\n    * **Solution:** A solution to the issue has been found and as this is a reporting issue only, the fix will be included in the next released version. For those manually building the node, patching the [fix pull request](https://github.com/nanocurrency/nano-node/pull/2405) onto the [V20.0 tag](https://github.com/nanocurrency/nano-node/tree/V20.0) can resolve the issue now. Or alternatively, building on the V20.0 tag with `RelWithDebInfo` option, see [Build Instructions for Windows](/integration-guides/build-options/#setup).\n"
  },
  {
    "path": "docs/snippets/known-issue-unable-to-find-libboost.md",
    "content": "??? warning \"Known Issue Linux V21: 'unable to find libboost'\"\n\tIf you are on Linux and unable to get V21.0 to start, `unable to find libboost...` https://github.com/nanocurrency/nano-node/releases/download/V21.0/nano-node-V21.0.1-Linux.tar.bz2 has been added to the release artifacts with the correct lib rpath. Please use this if you do not wish to move the lib folder into the bin folder after extraction."
  },
  {
    "path": "docs/snippets/known-issue-unchecked-keys-rpc-rocksdb.md",
    "content": "???info \"Known issue with RocksDB: RPC `unchecked_keys` not working properly\"\n    **Issue:** The RPC `unchecked_keys` is returning `0` for all calls when used with the RocksDB backend. This known issue will be resolved in a future release.\n    \n    **Solution:** Until the issue is resolved any integrations using this command should remain on the existing LMDB backend"
  },
  {
    "path": "docs/snippets/known-issue-windows-logging-stable.md",
    "content": "??? warning \"Known Issue Windows V21: Crash when using config `node.logging.stable_log_filename`\"\r\n\tSetting `node.logging.stable_log_filename` configuration option to `true` results in a node crash on Windows in V21.0 and V21.1, after a node restart. This must be set to `false`.\r\n"
  },
  {
    "path": "docs/snippets/network-details-simple-beta.md",
    "content": "| Port | Protocol | Required?   | Purpose |\n|-------------|----------|------------------|---------|\n| 54000       | TCP      | Yes, open to all traffic | For [live network](/glossary#live-network) activity and [bootstrap network](/glossary#bootstrap-network) activity. |\n| 55000       | TCP      | No, recommended    | For communication with RPC server. **Do not expose this outside of your production environment. Anyone with access to this port can control your node's RPC.** |\n| 56000       | TCP      | No, optional    | For communication via IPC (advanced). See [IPC integration guide](../integration-guides/ipc-integration.md) for more details. |\n| 57000       | TCP      | No, optional    | For communication with [websocket server](/integration-guides/websockets). Depending on configuration, data throughput can be very high. |"
  },
  {
    "path": "docs/snippets/network-details-simple-main.md",
    "content": "| Port | Protocol | Required?   | Purpose |\n|-------------|----------|------------------|---------|\n| 7075       | TCP      | Yes, open to all traffic | For [live network](/glossary#live-network) activity and [bootstrap network](/glossary#bootstrap-network) activity. |\n| 7076       | TCP      | No, recommended    | For communication with RPC server. **Do not expose this outside of your production environment. Anyone with access to this port can control your node's RPC.** |\n| 7077       | TCP      | No, optional    | For communication via IPC (advanced). See [IPC integration guide](../integration-guides/ipc-integration.md) for more details. |\n| 7078       | TCP      | No, optional    | For communication with [websocket server](/integration-guides/websockets). Depending on configuration, data throughput can be very high. |"
  },
  {
    "path": "docs/snippets/network-details-simple-test.md",
    "content": "| Port | Protocol | Required?   | Purpose |\n|-------------|----------|------------------|---------|\n| 17075       | TCP      | Yes, open to all traffic | For [live network](/glossary#live-network) activity and [bootstrap network](/glossary#bootstrap-network) activity. |\n| 17076       | TCP      | No, recommended    | For communication with RPC server. **Do not expose this outside of your production environment. Anyone with access to this port can control your node's RPC.** |\n| 17077       | TCP      | No, optional    | For communication via IPC (advanced). See [IPC integration guide](../integration-guides/ipc-integration.md) for more details. |\n| 17078       | TCP      | No, optional    | For communication with [websocket server](/integration-guides/websockets). Depending on configuration, data throughput can be very high. |"
  },
  {
    "path": "docs/snippets/network-details.md",
    "content": "## Network Details\n\n| Port | Type | Default  | Details |\n|      |      |          |         |\n| 7075 | TCP  | Enabled  | <ul><li>Node bootstrapping server</li><li>Share port configuration in `config-node.toml`, option `node.peering_port`</li><li>Binds to all adapters; unicast</li><li>Contents: Raw nano protocol stream</li><li>Transmits the ledger to new nodes in bulk</li><li>If blocked other nodes will not be able retrieve the ledger from this node</li></ul> |\n| 7076 | TCP  | Disabled | <ul><li>RPC server</li><li>Port configurable in `config-rpc.toml`, option `rpc.port`</li><li>Enable in `config-node.toml`, option `rpc.enable` or by starting `nano_rpc` manually</li><li> Binds to localhost by default for security reasons, configurable in `config-rpc.toml`, option `rpc.address`; unicast</li><li>Contents: Unencrypted HTTP requests containing JSON object bodies</li><li>Allows the node to be queried or controlled through HTTP requests</li><li>If blocked the node will not be able to be queried or controlled by HTTP</li><li>**WARNING: Exposing this port externally while setting `enable_control` option to `true` in configs could expose your wallet, allow the node to be stopped remotely and open your node up to other dangerous activity.** See the [Node Security page](/running-a-node/security) for more details.</li></ul> |\n| 7078 | TCP | Disabled | <ul><li>Websocket server</li><li>Port configurable in `config-node.toml`, option `node.websocket.port`</li><li>Enable in `config-node.toml`, option `node.websocket.enable`</li><li>Binds to localhost by default due to data throughput potentially being very high; producer-subscriber broadcast</li><li>Contents: Standard websocket frames containing JSON-encoded objects</li><li>See [WebSocket Support](/integration-guides/websockets) for details on configuration</li></ul> |\n"
  },
  {
    "path": "docs/snippets/release-details-v18-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 18.0 | 16 | 13 | 2019-02-21 || [Release](https://github.com/nanocurrency/nano-node/releases/tag/V18.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/7) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V17.1...V18.0) |"
  },
  {
    "path": "docs/snippets/release-details-v19-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 19.0 | 17       | 14       | 2019-07-11   | [V19.0](../releases/release-v19-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V19.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/9) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V18.0...V19.0) | \n\n--8<-- \"known-issue-macos-too-many-open-files.md\""
  },
  {
    "path": "docs/snippets/release-details-v20-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 20.0 | 17       | 15       | 2019-11-12   | [V20.0](../releases/release-v20-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V20.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/10) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V19.0...V20.0) | \n\n--8<-- \"known-issue-macos-too-many-open-files.md\"\n\n--8<-- \"known-issue-peers-stake-reporting.md\""
  },
  {
    "path": "docs/snippets/release-details-v21-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 21.0 | 18       | 18       | 2020-06-16   | [V21.0](../releases/release-v21-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/18) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V20.0...V21.0) | \n\n--8<-- \"known-issue-macos-too-many-open-files.md\"\n\n--8<-- \"known-issue-unable-to-find-libboost.md\"\n\n--8<-- \"known-issue-windows-logging-stable.md\""
  },
  {
    "path": "docs/snippets/release-details-v21-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 21.1 | 18       | 18       | 2020-07-14   | [V21.1](../releases/release-v21-1.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/21) - [Changelog](https://github.com/nanocurrency/nano-node/compare/4631c10c0eb67b0c62328a7ed8cef5f3169633f9...V21.1) | \n\n--8<-- \"known-issue-macos-too-many-open-files.md\"\n\n--8<-- \"known-issue-windows-logging-stable.md\""
  },
  {
    "path": "docs/snippets/release-details-v21-2.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 21.2 | 18       | 18       | 2020-09-03   | [V21.2](../releases/release-v21-2.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.2) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/21) - [Changelog](https://github.com/nanocurrency/nano-node/compare/9e65cf68664a3bcbe2734fed0b1cb6df264bce58...V21.2) | \n\n--8<-- \"known-issue-macos-too-many-open-files.md\""
  },
  {
    "path": "docs/snippets/release-details-v21-3.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 21.3 | 18       | 18       | 2021-03-18   | [V21.3](../releases/release-v21-3.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V21.3) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/23) - [Changelog](https://github.com/nanocurrency/nano-node/compare/51600739a828d9d43cbefd077bb9f2fde460f1fb...V21.3) | \n\n--8<-- \"known-issue-macos-too-many-open-files.md\""
  },
  {
    "path": "docs/snippets/release-details-v22-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 22.0 | 18       | 21       | 2021-05-14          | [V22.0](../releases/release-v22-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V22.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/19) - [Changelog](https://github.com/nanocurrency/nano-node/compare/adc904d8514c1f147b164dabdaf7375ff0c5c729...ef09e55c74cf74d40c95ec11639d85fa2233ad94) | \n\n--8<-- \"known-issue-unchecked-keys-rpc-rocksdb.md\"\n"
  },
  {
    "path": "docs/snippets/release-details-v22-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 22.1 | 18       | 21       | 2021-06-11          | [V22.1](../releases/release-v22-1.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V22.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/24) - [Changelog](https://github.com/nanocurrency/nano-node/compare/853398af...ade6f224) | \n\n"
  },
  {
    "path": "docs/snippets/release-details-v23-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 23.0 | 18       | 21       | 2022-01-17   | [V23.0](../releases/release-v23-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V23.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/20) - [Changelog](https://github.com/nanocurrency/nano-node/compare/e2232dd7ab961278557d0c41e95278ac85ca7157...a7a44f9e8a23672f66e15804e79560f004995859) |\n"
  },
  {
    "path": "docs/snippets/release-details-v23-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 23.1 | 18       | 21       | 2022-05-19   | [V23.1](../releases/release-v23-1.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V23.1) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/26) - [Changelog](https://github.com/nanocurrency/nano-node/compare/a7a44f9e8a23672f66e15804e79560f004995859...fef94e3601410542a971f945b0f8c238829c3c96) | \n\n"
  },
  {
    "path": "docs/snippets/release-details-v23-3.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              | \t\t\t\t|\t\t\t   |\n| 23.3 | 18       | 21       | 2022-06-13   | [V23.3](../releases/release-v23-3.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V23.3) - [Changelog](https://github.com/nanocurrency/nano-node/compare/fef94e3601410542a971f945b0f8c238829c3c96...33422f46e3fb46c3086278e2bdc411220133f3e2) | \n\n"
  },
  {
    "path": "docs/snippets/release-details-v24-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              |               |              |\n| 24.0 | 19       | 21       | 2023-01-19   | [V24.0](../releases/release-v24-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V24.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/25) - [Changelog](https://github.com/nanocurrency/nano-node/compare/941331bdb3ee1314a26dd95df058beb4e22f155a...3d8d7cbe0e719aa26fcbe07a6d169f8979a0562e) |\n"
  },
  {
    "path": "docs/snippets/release-details-v25-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              |               |              |\n| 25.0 | 19       | 22       | 2023-05-24   | [V25.0](../releases/release-v25-0.md)         | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V25.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/27) - [Changelog](https://github.com/nanocurrency/nano-node/compare/927d1b9ae2da0c03bdee2403fdff3680c88c6030...8dad120507b78f725ccb5ad6147f2ac1631953b4) |\n"
  },
  {
    "path": "docs/snippets/release-details-v25-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              |               |              |\n| 25.1 | 19       | 22       | 2023-06-02   | [V25.1](../releases/release-v25-1.md)         | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V25.1) - [Changelog](https://github.com/nanocurrency/nano-node/compare/8dad120507b78f725ccb5ad6147f2ac1631953b4...d710e2934792bf29c44e62edb8c4a6ef372456ba) |\n"
  },
  {
    "path": "docs/snippets/release-details-v26-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              |               |              |\n| 26.0 | 20       | 22       | 2024-01-16   | [V26.0](../releases/release-v26-0.md)         | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V26.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/32) - [Changelog](https://github.com/nanocurrency/nano-node/compare/27820f92647e15149f05a138d6885e93c9c23165...bbbfe92cffe6ba861085c7eb3d21193bc141aaba) |\n"
  },
  {
    "path": "docs/snippets/release-details-v26-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links | \n|      |          |          |              |               |              |\n| 26.1 | 20       | 22       | 2024-02-26   | [V26.1](../releases/release-v26-1.md)         | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V26.1) - Milestone - [Changelog](https://github.com/nanocurrency/nano-node/compare/bbbfe92cffe6ba861085c7eb3d21193bc141aaba...66d74ffd86b4beea3c8df3b918e4f1e8e31f2800) | \n"
  },
  {
    "path": "docs/snippets/release-details-v27-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n|      |          |          |              |               |              |\n| 27.0 | 21       | 24       | 2024-09-02     | [V27.0](../releases/release-v27-0.md)         | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V27.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/33) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V26.1...V27.0) |\n"
  },
  {
    "path": "docs/snippets/release-details-v27-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n|      |          |          |              |               |              |\n| 27.1 | 21      | 24        | 2024-09-10          | [V27.1](../releases/release-v27-1.md)         | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V27.1) - Milestone - [Changelog](https://github.com/nanocurrency/nano-node/compare/V27.0...V27.1) |\n"
  },
  {
    "path": "docs/snippets/release-details-v28-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n|      |          |          |              |               |              |\n| 28.0 | TBD      | TBD      | TBD          | [V28.0](../releases/release-v28-0.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V28.0) - [Milestone](https://github.com/nanocurrency/nano-node/milestone/34) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V27.1...V28.0) |\n"
  },
  {
    "path": "docs/snippets/release-details-v28-1.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n|      |          |          |              |               |              |\n| 28.1 | TBD      | TBD      | TBD          | [V28.1](../releases/release-v28-1.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V28.1) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V28.1...V28.0) |\n"
  },
  {
    "path": "docs/snippets/release-details-v28-2.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n|      |          |          |              |               |              |\n| 28.2 | TBD      | TBD      | TBD          | [V28.2](../releases/release-v28-2.md) | [Release](https://github.com/nanocurrency/nano-node/releases/tag/V28.2) - [Changelog](https://github.com/nanocurrency/nano-node/compare/V28.1...V28.2) |\n"
  },
  {
    "path": "docs/snippets/release-details-v29-0.md",
    "content": "| Node | Protocol | Database | Release Date | Release Notes | GitHub Links |\n|      |          |          |              |               |              |\n| 29.0 | TBD      | TBD      | TBD          |               | Release - Milestone - Changelog |\n"
  },
  {
    "path": "docs/snippets/security-vulnerability-reporting.md",
    "content": "!!! warning \"Submit vulnerabilities privately\"\n\t**Do NOT discuss potential security vulnerabilities on the issue tracker, public forums or open discussion channels. Submit sensitive issues privately to the Nano Foundation for review.**\n\nIf you discover a bug you believe to pose a security risk to the Nano network, please contact info@nano.org with a proof of concept with full details of the bug including:\n\n* Repository of the bug\n* High-level summary\n* Detailed description\n* Steps to reproduce\n* Supporting material/references\n* The potential security impact of the bug\n\nIt is strongly recommended to encrypt the email using GPG and the pubkeys for this purpose can be found on the [SECURITY file](https://github.com/nanocurrency/nano-node/blob/develop/SECURITY.md) in the node repository. The Nano Foundation will work to determine potential impacts and coordinate resolution in a node release."
  },
  {
    "path": "docs/snippets/setup-beta-test-testing.md",
    "content": "!!! info \"Setup for testing on beta or test network\"\n\tIf you are looking to test the latest version of the node ahead of release, check out the [Beta Network](../running-a-node/beta-network.md) and [Test Network](../running-a-node/test-network.md) pages for more details about how to get setup on the appropriate network. Typically general integration and node upgrades are tested on the public test network, while new feature and load testing are conducted on the beta network."
  },
  {
    "path": "docs/snippets/terms-block-transaction-transfer.md",
    "content": "* **block** is the digital encoding of the transaction details.\n\n* **transaction** is the action of creating and publishing a block to the network. Depending on the type of transaction, the block will have different requirements.\n\n* **transfer** is the completion of both a send transaction and the corresponding receive transaction, representing the movement of funds which can be sent again by the recipient."
  },
  {
    "path": "docs/snippets/toml-config-commands.md",
    "content": "| **Name**  | **Description** | **Generated or updated with** |\n|---------|--------------|--------------|\n| `config-node.toml` | Node configuration | `nano_node --generate_config node`<br>`nano_node --update_config`|\n| `config-rpc.toml` | RPC configuration | `nano_node --generate_config rpc` |\n| `config-log.toml` | Log configuration | `nano_node --generate_config log` |\n| `config-nano-pow-server.toml` | Proof of work server configuration | `nano_pow_server --generate_config` |\n| `config-qtwallet.toml` | Qt developer wallet configuration | This file is maintained by the Qt wallet |\n"
  },
  {
    "path": "docs/snippets/unconfirmed-information.md",
    "content": "!!! info \"Unconfirmed information\"\n\tThis call returns information that may be based on unconfirmed blocks. These details should not be relied on for any process or integration that requires confirmed blocks.  "
  },
  {
    "path": "docs/snippets/warning-alternative-work-generation-setup-preferred.md",
    "content": "!!! warning \"Alternative work generation setup preferred\"\n\tDue to potential performance impacts to nodes participating on the network (voting, staying in sync, etc.), when possible this option should be updated to a value of `0` to turn off local work generation. Please see the [Work Generation guide](/integration-guides/work-generation) for best practices."
  },
  {
    "path": "docs/snippets/warning-debug-only-command.md",
    "content": "!!! warning \"Debug purposes only\"\n\tThis call is for internal diagnostics/debug purposes only. Do not rely on this interface being stable and do not use in a production system."
  },
  {
    "path": "docs/snippets/warning-docker-limitations.md",
    "content": "!!! warning \"Docker Limitations\"\n\tAlthough Docker is a great choice for many setups, it is not recommended to run a \\*nix container, such as the officially provided one, on a Windows host - there are known issues with handling ports which prevent proper communication with peers.\n\n\tIf planning to use `ufw` with Docker, note that you may need to [prevent Docker from manipulating iptables](https://docs.docker.com/network/iptables/#prevent-docker-from-manipulating-iptables) to properly manage firewall settings.\n"
  },
  {
    "path": "docs/snippets/warning-enable-control.md",
    "content": "!!! danger \"Dangerous RPC calls controlled by `enable_control`\"\n\tThis RPC command/option requires `enable_control` to be enabled within the RPC config file. Enabling this means that anyone with access to the RPC port could potentially [access wallet funds](/commands/rpc-protocol#send), [stop](/commands/rpc-protocol#stop) the node from running and take other dangerous actions. **Use caution when enabling this option, especially with external RPC access available.** For more details see the [Node Security page](/running-a-node/security)."
  },
  {
    "path": "docs/snippets/warning-external-libraries.md",
    "content": "!!! warning \"External libraries, review before using\"\n    The linked resources below contain code dealing with private key management and/or execution of transactions. The Nano Foundation does not control this code, does not endorse it and is not responsible for its use. Use of this code requires review and is at your own discretion."
  },
  {
    "path": "docs/snippets/warning-includes-unconfirmed.md",
    "content": "!!! warning \"Includes unconfirmed blocks\"\n\tThis call may return results that include unconfirmed blocks, so it should not be used in any processes or integrations requiring only details from blocks confirmed by the network."
  },
  {
    "path": "docs/snippets/warning-multiple-confirmation-notifications.md",
    "content": "!!! warning \"Multiple notifications for blocks\"\n    Depending on the node setup and sync status, multiple confirmation notifications for the same block hash may be sent by a single tracking mechanism. **In order to prevent potential issues, integrations must track these block hashes externally to the node and prevent any unwanted actions based on multiple notifications.**"
  },
  {
    "path": "docs/snippets/warning-multiple-node-setups.md",
    "content": "!!! warning \"Warning - Multiple Node Setups\"\n\t**Never** use the same seed on multiple running nano node instances at the same time.\n\t\n\t* Multiple nano nodes using the same seed can result in network race conditions that degrade performance for your personal accounts.\n\t* In addition, publishing transactions from two nodes with the same account at the same time may cause an account fork which requires a slower representative voting process.\n\t* Similarly, if you are running a representative account on multiple nodes, they may publish conflicting votes, causing your representative to be ignored by the network.\n\t* Performance degradation in enterprise environments may be significant."
  },
  {
    "path": "docs/snippets/warning-node-wallet-not-for-prod-use.md",
    "content": "!!! warning \"Node wallet not for production use\"\n\tThe node wallet is not supported for use in production environments. Use third-party or custom key management for production applications."
  },
  {
    "path": "docs/snippets/warning-only-official-builds-supported.md",
    "content": "!!! warning \"Only Official Builds Supported\"\n\t* The fastest and most recommended method of installation is through [Docker management](/running-a-node/node-setup)\n\t* Only [official release builds](/integration-guides/build-options#official-release-builds) are recommended and supported for use on the main network\n\t* Builds created from git should be done using the available release tags (`V21.2` etc.)\n"
  },
  {
    "path": "docs/snippets/warning-process-sub-type-recommended.md",
    "content": "!!! warning \"Including `subtype` in `process` RPC calls highly recommended\"\n\tIn order to avoid potential incorrect sends **including the optional `subtype` parameter on all [`process`](/commands/rpc-protocol/#process) RPC calls is highly recommended**. In the next version of the RPC this parameter will be required."
  },
  {
    "path": "docs/snippets/warning-security-vulnerability-reporting.md",
    "content": "!!! warning \"Submit vulnerabilities privately\"\n\t**Do NOT discuss potential security vulnerabilities on the issue tracker, public forums or open discussion channels. Submit sensitive issues privately to the Nano Foundation for review.**\n\nIf you discover a bug you believe to pose a security risk to the Nano network, please contact info@nano.org with a proof of concept with full details of the bug including:\n\n* Repository of the bug\n* High-level summary\n* Detailed description\n* Steps to reproduce\n* Supporting material/references\n* The potential security impact of the bug\n\nIt is strongly recommended to encrypt the email using GPG and the pubkeys for this purpose can be found on the [SECURITY file](https://github.com/nanocurrency/nano-node/blob/develop/SECURITY.md) in the node repository. The Nano Foundation will work to determine potential impacts and coordinate resolution in a node release."
  },
  {
    "path": "docs/snippets/warning-telemetry-can-be-forged.md",
    "content": "!!! warning \"Telemetry can be forged\"\n\tAlthough the telemetry messages are signed by nodes, the data provided by other peers can be forged by malicious nodes so they cannot be guaranteed as accurate. All details in these messages should be used as rough indicators of peer and broad network situations, but not exclusively relied on for any key integration or network activities."
  },
  {
    "path": "docs/snippets/warning-unsupported-configuration.md",
    "content": "!!! warning \"Unsupported configuration\"\n\t* This documentation is intended only for developers of the Nano Node software, and will not result in a supported configuration.  End-users are advised to use releases.\n\t* The fastest and most recommended method of installation is through [Docker](/running-a-node/node-setup).\n\t* [Running node as a service](/integration-guides/advanced/#running-nano-as-a-service).\n\t* To manage a node, use [RPC commands](/commands/rpc-protocol/) or the [CLI](/commands/command-line-interface)."
  },
  {
    "path": "docs/snippets/wip-living-whitepaper.md",
    "content": "??? info \"Part of work in progress Living Whitepaper\"\n\tThis page is part of the Living Whitepaper revisions currently underway to replace the original static whitepaper. These efforts include the [Protocol Design](/protocol-design/introduction) and [Node Implementation](/node-implementation/introduction) sections of the docs, which will cover and expand on details and topics covered in the [original whitepaper](/whitepaper/english).\n\n\tSee the bottom of the page for related whitepaper sections and other related details. Some of the sections and headers on this page may be in draft form or just suggestions/framework for later consideration. If you are interested in helping with revisions please connect with us on the `#documentation` channel on our [Discord server](https://chat.nano.org)."
  },
  {
    "path": "docs/stylesheets/extras.css",
    "content": "\n[data-md-color-scheme=\"nano\"] {\n  --md-primary-fg-color:        #4a90e2;\n  --md-primary-fg-color--light: #F4FAFF;\n  --md-primary-fg-color--dark:  #000034;\n\n  --md-footer-bg-color:         #000034;\n\n}\n\n[data-md-color-scheme=\"slate\"] {\n  --md-primary-fg-color:        #000034;\n  --md-primary-fg-color--light: #F4FAFF;\n  --md-primary-fg-color--dark:  #000034;\n\n  --md-footer-bg-color:         #000034;\n\n  --md-hue: 240;\n\n  --md-typeset-a-color: #4a90e2;\n\n  --md-code-bg-color: #2E2E3E;\n\n}\n\n.md-annotation__index {\n    background-color: #4a90e2;\n}\n\n[data-md-color-scheme=\"slate\"] .md-tooltip {\n\n    background-color: var(--md-primary-fg-color);\n\n }\n\n[data-md-color-scheme=\"slate\"] .mermaid-wrapper {\n    background-color: var(--md-default-fg-color--light);\n}\n\n[data-md-color-scheme=\"slate\"] .mermaid-wrapper a {\n    color: var(--md-primary-fg-color);\n}\n\n[data-md-color-scheme=\"slate\"] .md-tabs  {\n    width: 100%;\n    overflow: auto;\n    color: var(--md-primary-bg-color);\n    background-color: rgb(0 0 52 / 30%);\n    transition: background 250ms;\n}\n\n[data-md-color-scheme=\"slate\"] .md-header {\n    position: -webkit-sticky;\n    position: sticky;\n    top: 0;\n    right: 0;\n    left: 0;\n    z-index: 2;\n    height: 2.4rem;\n    color: var(--md-primary-bg-color);\n    background-color: rgb(0 0 52 / 1.0);\n    box-shadow: 0 0 0.2rem rgba(0,0,0,0), 0 0.2rem 0.4rem rgba(0,0,0,0);\n    transition: color 250ms,background-color 250ms;\n}\n\n\n[data-md-color-scheme=\"slate\"] .md-announce { \n    background-color: rgb(0 0 52 / 1.0);\n}\n\n[data-md-color-scheme=\"slate\"] .md-typeset a {\n    color: hsl(212 72% 62% / 1);\n    word-break: break-word;\n}\n\n[data-md-color-scheme=\"slate\"] .md-typeset a:focus, .md-typeset a:hover {\n    color: hsl(212 66% 67% / 1);\n}\n\n[data-md-color-scheme=\"slate\"] .md-main {\n    flex-grow: 1;\n    background-color: #1e1f2d;\n}\n\n[data-md-color-scheme=\"slate\"] .md-typeset h1 {\n    margin: 0 0 1.25em;\n    color: hsl(0 0% 100% / 0.95);\n    font-weight: 300;\n    font-size: 2em;\n    line-height: 1.3;\n    letter-spacing: -0.01em;\n}\n\n[data-md-color-scheme=\"slate\"] .md-typeset h5 {\n    color: rgb(233, 233, 252);\n    font-size: 0.6rem;\n}\n\n[data-md-color-scheme=\"slate\"] .md-typeset table:not([class]) th {\n    min-width: 5rem;\n    padding: .9375em 1.25em;\n    color: hsl(0 0% 87% / 1);\n    vertical-align: top;\n    background-color: hsl(238deg 12% 39%);\n}\n\n[data-md-color-scheme=\"slate\"] .md-footer-nav {\n    background-color: #1f213c;\n}\n\n[data-md-color-scheme=\"slate\"] .md-footer-meta {\n    background-color: hsl(232deg 22% 15%);\n}\n\n.md-announce__inner a {\n    color: #F4FAFF !important;\n}\n\n/*.md-container {\n    background-color: white;\n}*/\n\n.md-header-nav__button.md-logo img {\n    display: block;\n    height: 48px;\n    width: 120px;\n}\n\n.md-header-nav__button.md-logo {\n    margin: 0rem;\n    padding: 0rem;\n}\n\n.md-nav--primary .md-nav__title, .md-nav--secondary .md-nav__title   {\n    background: none;\n    box-shadow: none;\n}\n\n.md-nav__button img {\n    width: 50px;\n    height: 50px;\n}\n\n.md-header-nav__title {\n\tpadding-left: 0.6rem;\n}\n\n.md-header__title {\n    margin-left: 0rem;\n}\n\n/*\n.md-header,\n.md-footer-nav,\n.md-footer-meta {\n    background-color: #4a90e2;\n}\n*/\n\n/* Highlight current page in nav menu */\n.md-nav__link--active {\n    /*color      : #4a90e2;*/\n    font-weight: bold;\n}\n\n.md-footer-social {\n    font-size: 24px;\n}\n/*\n.md-typeset .codehilite pre {\n\tbackground-color: #EDEFF1;\n}\n\n.md-typeset pre>code {\n    border-radius: 5px;\n    background-color: #f2f2f2;\n}\n*/\n\n/*tighten up table padding*/\n.md-typeset table:not([class]) td {\n    padding: 0.6rem 0.6rem;\n}\n\n.md-typeset table:not([class]) th {\n    padding: 0.6rem 0.6rem;\n    min-width: 50px;\n}\n\n.md-typeset {\n    font-size: 0.7rem;\n    line-height: 1.8;\n}\n/*\n.md-typeset details summary {\n    font-size: 14px;\n}\n.md-typeset .admonition-title{\n    font-size: 14px;\n}\n.md-typeset .admonition p{\n    font-size: 14px;\n}\n.md-typeset .admonition ul{\n    font-size: 14px;\n}\n*/\n@media (min-width: 768px) {\n    .md-typeset code {\n        white-space: pre;\n    }\n}\n\n.no-break {\n    white-space: pre;\n}\n\n\n.codehilite {\n\tcolor: #131121;\n}\n\n.codehilite .c1 {\n\tcolor: #7e7c8e;\n}\n\n/*.md-typeset h1 {\n\tcolor: #131121;\n}*/\n\n\n.h4-no-toc {\n    margin: .8rem 0;\n    font-weight: 700;\n    letter-spacing: -.01em;\n    font-size: .8rem;\n    display: block;\n    margin-block-start: 1.33em;\n    margin-block-end: 1.33em;\n    margin-inline-start: 0px;\n    margin-inline-end: 0px;\n    line-height: 1.8;\n}\n\n.md-footer-copyright {\n    padding: 0.6rem 0 0 0;\n}\n\n.md-footer-disclaimer {\n    text-align: center;\n    max-width: 100%;\n    float:none;\n    border-top: 1px solid hsla(0,0%,100%,.3);\n    padding: 0.6rem 0;\n}\n\n.md-grid-disclaimer {\n    margin-left: 0;\n    margin-right: 0;\n    max-width: 100%;\n}\n\n.md-footer-social {\n    padding: 0;\n    float:right;\n}\n\n.md-footer-social__link svg {\n    max-height: 1.2rem;\n}\n\n.md-header__button.md-logo img {\n    height: 0.9rem;\n    width: unset;\n}\n\n.md-announce {\n    background-color: #000034;\n}\n\n@media only screen and (min-width: 45em) {\n    .md-footer-social {\n        padding: 0;\n    }\n    .md-footer-disclaimer {\n        width: 100%;\n    }\n}\n\n@media (min-width: 1600px) {\n    .md-header-nav__button.md-logo svg {\n        height: 52px;\n    }\n}"
  },
  {
    "path": "docs/what-is-nano/overview.md",
    "content": "---\ntitle: What is nano?\ndescription: A broad introduction to nano - the instant, fee-less and eco-friendly digital money available across the world\nhide:\n  - navigation\n  - toc\n---\n\n# What is nano?\n\nNano is a digital payment protocol designed to be accessible and lightweight, with a focus on removing inefficiencies present in other cryptocurrencies. With ultrafast transactions and zero fees on a secure, green and decentralized network, this makes Nano ideal for everyday transactions.\n\n### How do transactions work?\n\nNano utilizes the [Block Lattice](/glossary#block-lattice), a data-structure in which individual accounts control their own blockchain. This allows blocks to be added quickly without conflict and sent to the network for confirmation.\n\nTransactions occur between accounts with two separate actions:\n\n1. The sender publishes a block debiting their own account for the amount to be sent to the receiving account\n1. The receiver publishes a matching block crediting their own account for the amount sent\n\nOnce a block sending funds is confirmed by the network, the transaction goes into a [receivable](/glossary#receivable) state and cannot be reversed. The receiver can be offline and safely leave the funds in this state until they are ready to publish a matching block receiving the funds to their account.\n\n### Lightweight, stateful blocks\n\nNano uses a structure for each block which contains all the information about an account at that point in time: account number, balance, representative.\n\nEvery block must also contain a small, user-generated [Proof-of-Work](/glossary#proof-of-work-pow) value which is a Quality-of-Service prioritization mechanism allowing occasional, average user transactions to process quickly and consistently. The PoW computation for a transaction typically takes a few seconds on a modern desktop CPU.\n\nFor more details, see the [Blocks](/integration-guides/the-basics/#blocks-specifications) and [Proof-of-Work specifications](/integration-guides/the-basics/#proof-of-work) in our [Integration Guides](/integration-guides/the-basics/).\n\n### Representatives and Voting\nNano has a unique consensus mechanism called [Open Representative Voting (ORV)](/glossary/#open-representative-voting-orv). Every account can freely choose a [Representative](/glossary#representative) at any time to vote on their behalf, even when the delegating account itself is offline. These Representative accounts are configured on nodes that remain online and vote on the validity of transactions they see on the network. Their voting weight is the sum of balances for accounts delegating to them, and if they have enough voting weight they become a [Principal Representative](/glossary/#principal-representative). The votes these Principal Representatives send out will subsequently be rebroadcasted by other nodes.\n\nAs these votes are shared and rebroadcasted between nodes, they are tallied up and compared against the online voting weight available. Once a node sees a block get enough votes to reach [quorum](/glossary/#quorum), that block is confirmed. Due to the lightweight nature of blocks and votes, the network is able to reach confirmation for transaction ultrafast, often in under a couple seconds. Also note that delegation of voting weight does not mean staking of any funds - the account delegating can still spend all their available funds at any time without restrictions.\n\nBecause Nano accounts can freely delegate their voting weight to representatives at any time, the users have more control over who has power with consensus and how decentralized the network is. This is a key advantage to the design of [Open Representative Voting (ORV)](/glossary/#open-representative-voting-orv). With no direct monetary incentive for nodes, this removes emergent centralization forces for longer-term trending toward decentralization of the network.[^1]\n\n### Design Advantages\nNano was designed with new data structures, consensus mechanisms and other features to gain some key advantages over competing digital currencies:\n\n* Minimal block size allows for lightweight communication resulting in ultrafast transaction confirmation times\n* Without traditional Proof-of-Work and mining, nodes use significantly less energy per transaction than other popular networks\n* Emergent centralization forces for node operators are reduced due to the near zero marginal cost of producing consensus in Nano [^1]\n\n---\n\n### Exploring More\n\n* Looking for technical details of the protocol and node design? Check out the [Living Whitepaper](../living-whitepaper/index.md)\n* Ready to participate on the network? Try [running a node](/running-a-node/overview), [review integration options](/integration-guides/the-basics) or find commands via [RPC](/commands/rpc-protocol) and [CLI](/commands/command-line-interface)\n* Want to know the future of Nano? See the [upcoming features](/releases/upcoming-features/) for the node or help shape the future by [contributing to the development of the protocol](/node-implementation/contributing) if you can!\n* Want to explore less technical aspects of Nano or join our community? Head over to [Nano.org](https://nano.org)\n\n[^1]: https://medium.com/@clemahieu/emergent-centralization-due-to-economies-of-scale-83cc85a7cbef\n"
  },
  {
    "path": "docs/whitepaper/english.md",
    "content": "title: Original RaiBlocks/Nano Whitepaper\ndescription: An HTML-based version of the original RaiBlocks/nano whitepaper last updated in November 2017\nrobots: nofollow\n\n# Original RaiBlocks/Nano Whitepaper\n\n_Last updated: November 2017_\n\n!!! info\n    This original whitepaper contains details about the protocol which are no longer accurate, such as voting only being performed on blocks for which forks were detected, but is being left intact for historical reference purposes. For more accurate details, head over to the [Living Whitepaper](../living-whitepaper/index.md) section.\n\n## Introduction\n\nSince the implementation of Bitcoin in 2009, there has been a growing shift\naway from traditional, government-backed currencies and financial\nsystems towards modern payments systems based on cryptography, which\noffer the ability to store and transfer funds in a trustless and secure\nmanner [^1]. In order to function effectively, a\ncurrency must be easily transferable, non-reversible, and have limited\nor no fees. The increased transaction times, large fees, and\nquestionable network scalability have raised questions about the\npracticality of Bitcoin as an everyday currency.\n\nIn this paper, we introduce RaiBlocks, a low-latency cryptocurrency\nbuilt on an innovative block-lattice data structure offering unlimited\nscalability and no transaction fees. RaiBlocks by design is a simple\nprotocol with the sole purpose of being a high-performance\ncryptocurrency. The RaiBlocks protocol can run on low-power hardware,\nallowing it to be a practical, decentralized cryptocurrency for everyday\nuse.\n\nCryptocurrency statistics reported in this paper are accurate as of\npublication date.\n\n## Background\n\nIn 2008, an anonymous individual under the pseudonym Satoshi Nakamoto\npublished a whitepaper outlining the world's first decentralized\ncryptocurrency, Bitcoin [^1]. A key innovation brought\nabout by Bitcoin was the blockchain, a public, immutable and\ndecentralized data-structure which is used as a ledger for the\ncurrency's transactions. Unfortunately, as Bitcoin matured, several\nissues in the protocol made Bitcoin prohibitive for many applications:\n\n1.  Poor scalability: Each block in the blockchain can store a limited\n    amount of data, which means the system can only process so many\n    transactions per second, making spots in a block a commodity.\n    Currently the median transaction fee is \\$10.38 [^2].\n\n2.  High latency: The average confirmation time is 164 minutes\n    [^3].\n\n3.  Power inefficient: The Bitcoin network consumes an estimated\n    27.28TWh per year, using on average 260KWh per transaction\n    [^4].\n\nBitcoin, and other cryptocurrencies, function by achieving consensus on\ntheir global ledgers in order to verify legitimate transactions while\nresisting malicious actors. Bitcoin achieves consensus via an economic\nmeasure called Proof of Work (PoW). In a PoW system, participants compete\nin computing a number, called a *nonce*, such that the hash of the entire\nblock is in a target range. This valid range is inversely proportional\nto the cumulative computation power of the entire Bitcoin network in\norder to maintain a consistent average time taken to find a valid nonce.\nThe finder of a valid nonce is then allowed to add the block to the\nblockchain; therefore, those who exhaust more computational resources to\ncompute a nonce play a greater role in the state of the blockchain. PoW\nprovides resistance against a Sybil attack, where an entity behaves as\nmultiple entities to gain additional power in a decentralized system,\nand also greatly reduces race conditions that inherently exist while\naccessing a global data-structure.\n\nAn alternative consensus protocol, Proof of Stake (PoS), was first\nintroduced by Peercoin in 2012 [^5]. In a PoS system,\nparticipants vote with a weight equivalent to the amount of wealth they\npossess in a given cryptocurrency. With this arrangement, those who have\na greater financial investment are given more power and are inherently\nincentivized to maintain the honesty of the system or risk losing their\ninvestment. PoS does away with the wasteful computation power\ncompetition, only requiring light-weight software running on low power\nhardware.\n\nThe original RaiBlocks paper and first beta implementation were\npublished in December, 2014, making it one of the first Directed Acyclic\nGraph (DAG) based cryptocurrencies [^6]. Soon\nafter, other DAG cryptocurrencies began to develop, most notably\nDagCoin/Byteball and IOTA [^7][^8]. These\nDAG-based cryptocurrencies broke the blockchain mold, improving system\nperformance and security. Byteball achieves consensus by relying on a\n\"main-chain\" comprised of honest, reputable and user-trusted\n\"witnesses\", while IOTA achieves consensus via the cumulative PoW of\nstacked transactions. RaiBlocks achieves consensus via a\nbalance-weighted vote on conflicting transactions. This consensus system\nprovides quicker, more deterministic transactions while still\nmaintaining a strong, decentralized system. RaiBlocks continues this\ndevelopment and has positioned itself as one of the highest performing\ncryptocurrencies.\n\n## RaiBlocks Components\n\nBefore describing the overall RaiBlocks architecture, we define the\nindividual components that make up the system.\n\n### Account\n\nAn account is the public-key portion of a digital signature key-pair.\nThe public-key, also referred to as the address, is shared with other\nnetwork participants while the private-key is kept secret. A digitally\nsigned packet of data ensures that the contents were approved by the\nprivate-key holder. One user may control many accounts, but only one\npublic address may exist per account.\n\n### Block/Transaction\n\nThe term \"block\" and \"transaction\" are often used interchangeably, where\na block contains a single transaction. Transaction specifically refers\nto the action, while block refers to the digital encoding of the\ntransaction. Transactions are signed by the private-key belonging to the\naccount on which the transaction is performed.\n\n### Ledger\n\nThe ledger is the global set of accounts where each account has its own\ntransaction chain. This is a key design component that\nfalls under the category of replacing a run-time agreement with a\ndesign-time agreement; everyone agrees via signature checking that only\nan account owner can modify their own chain. This converts a seemingly\nshared data-structure, a distributed ledger, into a set of non-shared\nones.\n\n``` mermaid\ngraph TB\n    subgraph Account C\n    A[\"Block <i>N<sub>C</sub></i>\"]-->B[\"Block <i>N<sub>C</sub></i>  - 1\"]\n    B-->C[\"...\"]\n    C-->D[\"Block 1\"]\n    D-->E[\"Block 0\"]\n    end    \n    subgraph Account B\n    F[\"Block <i>N<sub>B</sub></i>\"]-->G[\"Block <i>N<sub>B</sub></i>  - 1\"]\n    G-->H[\"...\"]\n    H-->I[\"Block 1\"]\n    I-->J[\"Block 0\"]\n    end\n    subgraph Account A\n    K[\"Block <i>N<sub>A</sub></i>\"]-->L[\"Block <i>N<sub>A</sub></i> - 1\"]\n    L-->M[\"...\"]\n    M-->N[\"Block 1\"]\n    N-->O[\"Block 0\"]\n    end\n```\n\n### Node\n\nA *node* is a piece of software running on a computer that conforms to\nthe RaiBlocks protocol and participates in the RaiBlocks network. The\nsoftware manages the ledger and any accounts the node may control, if\nany. A node may either store the entire ledger or a pruned history\ncontaining only the last few blocks of each account's blockchain. When\nsetting up a new node it is recommended to verify the entire history and\nprune locally.\n\n## System Overview\n\nUnlike blockchains used in many other cryptocurrencies, RaiBlocks uses a\n*block-lattice* structure. Each account has its own blockchain\n(account-chain) equivalent to the account's transaction/balance history\nEach account-chain can only be updated\nby the account's owner; this allows each account-chain to be updated\nimmediately and asynchronously to the rest of the block-lattice,\nresulting in quick transactions. RaiBlocks' protocol is extremely\nlight-weight; each transaction fits within the required minimum UDP\npacket size for being transmitted over the internet. Hardware\nrequirements for nodes are also minimal, since nodes only have to record\nand rebroadcast blocks for most transactions.\n\n```mermaid\ngraph BT\n    subgraph Account C\n    idc4[Receive]-->idc5((\"...\"))\n    idc3[Receive]---idc4\n    idc2[Receive]---idc3\n    idc1[Send]---idc2\n    end\n    subgraph Account B\n    idb4[Send]-->idb5((\"...\"))\n    idb3[Send]---idb4\n    idb2[\"&nbsp;\"]---idb3\n    idb1[Send]---idb2\n    end\n    subgraph Account A\n    ida4[Receive]-->ida5((\"...\"))\n    ida3[Receive]---ida4\n    ida2[Send]---ida3\n    ida1[\"&nbsp;\"]---ida2\n    end\n    idb1-.->idc4\n    ida2-.->idc3\n    idb3-.->ida4\n    idc1-.->ida3\n```\n\nThe system is initiated with a *genesis account* containing the *genesis\nbalance*. The genesis balance is a fixed quantity and can never be\nincreased. The genesis balance is divided and sent to other accounts via\nsend transactions registered on the genesis account-chain. The sum of\nthe balances of all accounts will never exceed the initial genesis\nbalance which gives the system an upper bound on quantity and no ability\nto increase it.\n\nThis section will walk through how different types of transactions are\nconstructed and propagated throughout the network.\n\n### Transactions\n\n**Transaction Flow**\n\n```mermaid\ngraph LR;\n  Receive-->Repeat;\n  Repeat-->Observe;\n  Observe-->Quorum;\n  Quorum-->Confirm;\n```\n\n<p style=\"text-align: center; font-weight:bold;\">(a) When no conflict is detected, no further overhead is required.</p>\n\n```mermaid\ngraph LR;\n  Receive-->Repeat;\n  Repeat-->Observe;\n  Observe-->Conflict;\n  Conflict-->Vote;\n  Vote-->Confirm;\n```\n\n<p style=\"text-align: center; font-weight:bold;\">(b) In the event of a conflicting transaction, nodes vote for the valid transaction.</p>\n\nTransferring funds from one account to another requires two\ntransactions: a *send* deducting the amount from the sender's balance\nand a *receive* adding the amount to the receiving account's balance.\n\nTransferring amounts as separate transactions in the sender's and\nreceiver's accounts serves a few important purposes:\n\n1.  Sequencing incoming transfers that are inherently asynchronous.\n\n2.  Keeping transactions small to fit in UDP packets.\n\n3.  Facilitating ledger pruning by minimizing the data footprint.\n\n4.  Isolating settled transactions from unsettled ones.\n\nMore than one account transferring to the same destination account is an\nasynchronous operation; network latency and the sending accounts not\nnecessarily being in communication with each other means there is no\nuniversally agreeable way to know which transaction happened first.\nSince addition is associative, the order the inputs are sequenced does\nnot matter, and hence we simply need a global agreement. This is a key\ndesign component that converts a run-time agreement in to a design-time\nagreement. The receiving account has control over deciding which\ntransfer arrived first and is expressed by the signed order of the\nincoming blocks.\n\nIf an account wants to make a large transfer that was received as a set\nof many small transfers, we want to represent this in a way that fits\nwithin a UDP packet. When a receiving account sequences input transfers,\nit keeps a running total of its account balance so that at any time it\nhas the ability to transfer any amount with a fixed size transaction.\nThis differs from the input/output transaction model used by Bitcoin and\nother cryptocurrencies.\n\nSome nodes are uninterested in expending resources to store an account's\nfull transaction history; they are only interested in each account's\ncurrent balance. When an account makes a transaction, it encodes its\naccumulated balance and these nodes only need to keep track of the\nlatest block, which allows them to discard historical data while\nmaintaining correctness.\n\nEven with a focus on design-time agreements, there is a delay window\nwhen validating transactions due to identifying and handling bad actors\nin the network. Since agreements in RaiBlocks are reached quickly, on\nthe order of milliseconds to seconds, we can present the user with two\nfamiliar categories of incoming transactions: settled and unsettled.\nSettled transactions are transactions where an account has generated\nreceive blocks. Unsettled transactions have not yet been incorporated in\nto the receiver's cumulative balance. This is a replacement for the more\ncomplex and unfamiliar confirmations metric in other cryptocurrencies.\n\n### Creating an Account\n\nTo create an account, you need to issue an *open* transaction.\nAn open transaction is always the first\ntransaction of every account-chain and can be created upon the first\nreceipt of funds. The *account* field stores the public-key (address)\nderived from the private-key that is used for signing. The *source*\nfield contains the hash of the transaction that sent the funds. On\naccount creation, a representative must be chosen to vote on your\nbehalf; this can be changed later. The account can declare itself as its own\nrepresentative.\n\n```\nopen {\n   account: DC04354B1...AE8FA2661B2,\n   source: DC1E2B3F7C...182A0E26B4A,\n   representative: xrb_1anr...posrs,\n   work: 0000000000000000,\n   type: open,\n   signature: 83B0...006433265C7B204\n}\n```\n\n### Account Balance\n\nThe account balance is recorded within the ledger itself. Rather than\nrecording the amount of a transaction, verification requires checking the\ndifference between the balance at the send block and the balance of the\npreceding block. The receiving account may then increment the previous\nbalance as measured into the final balance given in the new receive\nblock. This is done to improve processing speed when downloading high\nvolumes of blocks. When requesting account history, amounts are already\ngiven.\n\n### Sending From an Account\n\nTo send from an address, the address must already have an existing open\nblock, and therefore a balance. The *previous* field contains the hash of the\nprevious block in the account-chain. The *destination* field contains\nthe account for funds to be sent to. A send block is immutable once\nconfirmed. Once broadcasted to the network, funds are immediately\ndeducted from the balance of the sender's account and wait as *pending*\nuntil the receiving party signs a block to accept these funds. Pending\nfunds should not be considered awaiting confirmation, as they are as\ngood as spent from the sender's account and the sender cannot revoke the\ntransaction.\n\n```\nsend {\n   previous: 1967EA355...F2F3E5BF801,\n   balance: 010a8044a0...1d49289d88c,\n   destination: xrb_3w...m37goeuufdp,\n   work: 0000000000000000,\n   type: send,\n   signature: 83B0...006433265C7B204\n}\n```\n\n### Receiving a Transaction\n\nTo complete a transaction, the recipient of sent funds must create a\nreceive block on their own account-chain. The source field references the hash of the\nassociated send transaction. Once this block is created and broadcasted,\nthe account's balance is updated and the funds have officially moved\ninto their account.\n\n```\nreceive {\n   previous: DC04354B1...AE8FA2661B2,\n   source: DC1E2B3F7C6...182A0E26B4A,\n   work: 0000000000000000,\n   type: receive,\n   signature: 83B0...006433265C7B204\n}\n```\n\n### Assigning a Representative\n\nAccount holders having the ability to choose a representative to vote on\ntheir behalf is a powerful decentralization tool that has no strong\nanalog in Proof of Work or Proof of Stake protocols. In conventional PoS\nsystems, the account owner's node must be running to participate in\nvoting. Continuously running a node is impractical for many users;\ngiving a representative the power to vote on an account's behalf relaxes\nthis requirement. Account holders have the ability to reassign consensus\nto any account at any time. A *change* transaction changes the\nrepresentative of an account by subtracting the vote weight from the old\nrepresentative and adding the weight to the new representative. No funds are moved in this transaction, and\nthe representative does not have spending power of the account's funds.\n\n```\nchange {\n   previous: DC04354B1...AE8FA2661B2,\n   representative: xrb_1anrz...posrs,\n   work: 0000000000000000,\n   type: change,\n   signature: 83B0...006433265C7B204\n}\n```\n### Forks and Voting\n\nA fork occurs when $j$ signed blocks $b_1, b_2, \\dots, b_j$ claim the\nsame block as their predecessor.\n\n```mermaid\ngraph RL\n    subgraph Account A\n    ida3[\"Block <i>i</i> + 1\"]---ida4[\"Block <i>i</i>\"]\n    ida2[\"Block <i>i</i> + 2\"]-->ida3\n    ida1[\"Block <i>i</i> + 2\"]-->ida3\n    end\n```\n\nThese blocks cause a conflicting view on the status of an account and\nmust be resolved. Only the account's owner has the ability to sign\nblocks into their account-chain, so a fork must be the result of poor\nprogramming or malicious intent (double-spend) by the account's owner.\n\nUpon detection, a representative will create a vote referencing the\nblock $\\hat{b}_i$ in its ledger and broadcast it to the network. The\nweight of a node's vote, $w_i$, is the sum of the balances of all\naccounts that have named it as its representative. The node will observe\nincoming votes from the other $M$ online representatives and keep a\ncumulative tally for 4 voting periods, 1 minute total, and confirm the\nwinning block.\n\n$$\\begin{aligned}\n   v(b_j) &= \\sum_{i=1}^M w_i{1}_{\\hat{b}_i=b_j} \\label{eq:weighted_vote} \\\\\n   b^* &= \\mathop{\\mathrm{arg\\,max}}_{b_j} v(b_j) \\label{eq:most_votes}\\end{aligned}$$\n\nThe most popular block $b^*$ will have the majority of the votes and\nwill be retained in the node's ledger. The block(s) that lose the vote are\ndiscarded. If a representative replaces a block in its ledger, it will\ncreate a new vote with a higher sequence number and broadcast the new\nvote to the network. This is the **only** scenario where representatives\nvote.\n\nIn some circumstances, brief network connectivity issues may cause a\nbroadcasted block to not be accepted by all peers. Any subsequent block\non this account will be ignored as invalid by peers that did not see the\ninitial broadcast. A rebroadcast of this block will be accepted by the\nremaining peers and subsequent blocks will be retrieved automatically.\nEven when a fork or missing block occurs, only the accounts referenced\nin the transaction are affected; the rest of the network proceeds with\nprocessing transactions for all other accounts.\n\n### Proof of Work\n\nAll four transaction types have a work field that must be correctly\npopulated. The work field allows the transaction creator to compute a\nnonce such that the hash of the nonce concatenated with the previous\nfield in receive/send/change transactions or the account field in an\nopen transaction is below a certain threshold value. Unlike Bitcoin, the\nPoW in RaiBlocks is simply used as an anti-spam tool, similar to\nHashcash, and can be computed on the order of seconds [^9].\nOnce a transaction is sent, the PoW for the subsequent block can be\nprecomputed since the previous block field is known; this will make\ntransactions appear instantaneous to an end-user so long as the time\nbetween transactions is greater than the time required to compute the\nPoW.\n\n### Transaction Verification\n\nFor a block to be considered valid, it must have the following\nattributes:\n\n1.  The block must not already be in the ledger (duplicate transaction).\n\n2.  Must be signed by the account's owner.\n\n3.  The previous block is the head block of the account-chain. If it\n    exists but is not the head, it is a fork.\n\n4.  The account must have an open block.\n\n5.  The computed hash meets the PoW threshold requirement.\n\nIf it is a receive block, check if the source block hash is pending,\nmeaning it has not already been redeemed. If it is a send block, the\nbalance must be less than the previous balance.\n\n## Attack Vectors\n\nRaiBlocks, like all decentralized cryptocurrencies, may be attacked by\nmalicious parties for attempted financial gain or system demise. In this\nsection we outline a few possible attack scenarios, the consequences of\nsuch an attack, and how RaiBlock's protocol takes preventative measures.\n\n### Block Gap Synchronization\n\nIn a previous section, we discussed the scenario where a block may not\nbe properly broadcasted, causing the network to ignore subsequent\nblocks. If a node observes a block that does not have the referenced\nprevious block, it has two options:\n\n1.  Ignore the block as it might be a malicious garbage block.\n\n2.  Request a resync with another node.\n\nIn the case of a resync, a TCP connection must be formed with a\nbootstrapping node to facilitate the increased amount of traffic a\nresync requires. However, if the block was actually a bad block, then\nthe resync was unnecessary and needlessly increased traffic on the\nnetwork. This is a Network Amplification Attack and results in a\ndenial-of-service.\n\nTo avoid unnecessary resyncing, nodes will wait until a certain\nthreshold of votes have been observed for a potentially malicious block\nbefore initiating a connection to a bootstrap node to synchronize. If a\nblock doesn't receive enough votes it can be assumed to be junk data.\n\n### Transaction Flooding\n\nA malicious entity could send many unnecessary but valid transactions\nbetween accounts under its control in an attempt to saturate the\nnetwork. With no transaction fees, they are able to continue this attack\nindefinitely. However, the PoW required for each transaction limits the\ntransaction rate the malicious entity could generate without\nsignificantly investing in computational resources. Even under such an\nattack in an attempt to inflate the ledger, nodes that are not full\nhistorical nodes are able to prune old transactions from their chain;\nthis clamps the storage usage from this type of attack for almost all\nusers.\n\n### Sybil Attack\n\nAn entity could create hundreds of RaiBlocks nodes on a single machine;\nhowever, since the voting system is weighted based on account balance,\nadding extra nodes into the network will not gain an attacker extra\nvotes. Therefore there is no advantage to be gained via a Sybil attack.\n\n### Penny-Spend Attack\n\nA penny-spend attack is where an attacker spends infinitesimal\nquantities to a large number of accounts in order to waste the storage\nresources of nodes. Block publishing is rate-limited by the PoW, so this\nlimits the creation of accounts and transactions to a certain extent.\nNodes that are not full historical nodes can prune accounts below a\nstatistical metric where the account is most likely not a valid account.\nFinally, RaiBlocks is tuned to use minimal permanent storage space, so\nspace required to store one additional account is proportional to the\nsize of an\n$\\text{open block} + \\text{indexing} = 96\\text{B} + 32\\text{B} = 128\\text{B}$.\nThis equates to 1GB being able to store 8 million penny-spend account.\nIf nodes wanted to prune more aggressively, they can calculate a\ndistribution based on access frequency and delegate infrequently used\naccounts to slower storage.\n\n### Precomputed PoW Attack\n\nSince the owner of an account will be the only entity adding blocks to\nthe account-chain, sequential blocks can be computed, along with their\nPoW, before being broadcasted to the network. Here the attacker\ngenerates a myriad of sequential blocks, each of minimal value, over an\nextended period of time. At a certain point, the attacker performs a\nDenial of Service (DoS) by flooding the network with lots of valid\ntransactions, which other nodes will process and echo as quickly as\npossible. This is an advanced version of the transaction flooding\ndescribed in the [Transaction flooding section](#transaction-flooding). Such an attack would only work\nbriefly, but could be used in conjunction with other attacks, such as a\n\\>50% Attack to increase effectiveness. Transaction\nrate-limiting and other techniques are currently being investigated to\nmitigate attacks.\n\n### \\>50% Attack\n\nThe metric of consensus for RaiBlocks is a balance weighted voting\nsystem. If an attacker is able to gain over 50% of the voting strength,\nthey can cause the network to oscillate consensus rendering the system\nbroken. An attacker is able to lower the amount of balance they must\nforfeit by preventing good nodes from voting through a network DoS.\nRaiBlocks takes the following measures to prevent such an attack:\n\n1.  The primary defense against this type of attack is voting-weight\n    being tied to investment in the system. An account holder is\n    inherently incentivized to maintain the honesty of the system to\n    protect their investment. Attempting to flip the ledger would be\n    destructive to the system as a whole which would destroy their\n    investment.\n\n2.  The cost of this attack is proportional to the market capitalization\n    of RaiBlocks. In PoW systems, technology can be invented that gives\n    disproportionate control compared to monetary investment and if the\n    attack is successful, this technology could be repurposed after the\n    attack is complete. With RaiBlocks the cost of attacking the system\n    scales with the system itself and if an attack were to be successful\n    the investment in the attack cannot be recovered.\n\n3.  In order to maintain the maximum quorum of voters, the next line of\n    defense is representative voting. Account holders who are unable to\n    reliably participate in voting for connectivity reasons can name a\n    representative who can vote with the weight of their balance.\n    Maximizing the number and diversity of representatives increases\n    network resiliency.\n\n4.  Forks in RaiBlocks are never accidental, so nodes can make policy\n    decisions on how to interact with forked blocks. The only time\n    non-attacker accounts are vulnerable to block forks is if they\n    receive a balance from an attacking account. Accounts wanting to be\n    secure from block forks can wait a little or a lot longer before\n    receiving from an account who generated forks or opt to never\n    receive at all. Receivers could also generate separate accounts to\n    use when receiving funds from dubious accounts in order to insulate\n    other accounts.\n\n5.  A final line of defense that has not yet been implemented is *block\n    cementing*. RaiBlocks goes to great lengths to settle block forks\n    quickly via voting. Nodes could be configured to cement blocks,\n    which would prevent them from being rolled back after a certain\n    period of time. The network is sufficiently secured through focusing\n    on fast settling time to prevent ambiguous forks.\n\nA more sophisticated version of a $>50\\%$ attack is detailed below. \"Offline\" is the percentage of\nrepresentatives who have been named but are not online to vote. \"Stake\"\nis the amount of investment the attacker is voting with. \"Active\" is\nrepresentatives that are online and voting according to the protocol. An\nattacker can offset the amount of stake they must forfeit by knocking\nother voters offline via a network DoS attack. If this attack can be\nsustained, the representatives being attacked will become unsynchronized,\nand this is demonstrated by \"Unsync.\" Finally, an attacker can gain a\nshort burst in relative voting strength by switching their Denial of\nService attack to a new set of representatives while the old set is\nre-synchronizing their ledger, this is demonstrated by \"Attack.\"\n\nIf an attacker is able to cause Stake \\>Active by a combination of these\ncircumstances, they would be able to successfully flip votes on the\nledger at the expense of their stake. We can estimate how much this type\nof attack could cost by examining the market cap of other systems. If we\nestimate 33% of representatives are offline or attacked via DoS, an\nattacker would need to purchase 33% of the market cap in order to attack\nthe system via voting.\n\n### Bootstrap Poisoning\n\nThe longer an attacker is able to hold an old private-key with a\nbalance, the higher the probability that balances that existed at that\ntime will not have participating representatives because their balances\nor representatives have transferred to newer accounts. This means if a\nnode is bootstrapped to an old representation of the network where the\nattacker has a quorum of voting stake compared to representatives at\nthat point in time, they would be able to oscillate voting decisions to\nthat node. If this new user wanted to interact with anyone besides the\nattacking node all of their transactions would be denied since they have\ndifferent head blocks. The net result is nodes can waste the time of new\nnodes in the network by feeding them bad information. To prevent this,\nnodes can be paired with an initial database of accounts and known-good\nblock heads; this is a replacement for downloading the database all the\nway back to the genesis block. The closer the download is to being\ncurrent, the higher the probability of accurately defending against this\nattack. In the end, this attack is probably no worse than feeding junk\ndata to nodes while bootstrapping, since they wouldn't be able to\ntransact with anyone who has a contemporary database.\n\n## Implementation\n\nCurrently, the reference implementation is implemented in C++ and has\nbeen producing releases since 2014 on Github [^10].\n\n### Design Features\n\nThe RaiBlocks implementation adheres to the architecture standard\noutlined in this paper. Additional specifications are described here.\n\n### Signing Algorithm\n\nRaiBlocks uses a modified ED25519 elliptic curve algorithm with Blake2b\nhashing for all digital signatures [^11]. ED25519 was\nchosen for fast signing, fast verification, and high security.\n\n### Hashing Algorithm\n\nSince the hashing algorithm is only used to prevent network spam, the\nalgorithm choice is less important when compared to mining-based\ncryptocurrencies. Our implementation uses Blake2b as a digest algorithm\nagainst block contents [^12].\n\n### Key Derivation Function\n\nIn the reference wallet, keys are encrypted by a password and the\npassword is fed through a key derivation function to protect against\nASIC cracking attempts. Presently Argon2 [^13] is the\nwinner of the only public competition aimed at creating a resilient key\nderivation function.\n\n### Block Interval\n\nSince each account has its own blockchain, updates can be performed\nasynchronous to the state of network. Therefore there are no block\nintervals and transactions can be published instantly.\n\n### UDP Message Protocol\n\nOur system is designed to operate indefinitely using the minimum amount\nof computing resources as possible. All messages in the system were\ndesigned to be stateless and fit within a single UDP packet. This also\nmakes it easier for lite peers with intermittent connectivity to\nparticipate in the network without reestablishing short-term TCP\nconnections. TCP is used only for new peers when they want to bootstrap\nthe block chains in a bulk fashion.\n\nNodes can be sure their transaction was received by the network by\nobserving transaction broadcast traffic from other nodes as it should\nsee several copies echoed back to itself.\n\n### IPv6 and Multicast\n\nBuilding on top of connection-less UDP allows future implementations to\nuse IPv6 multicast as a replacement for traditional transaction flooding\nand vote broadcast. This will reduce network bandwidth consumption and\ngive more policy flexibility to nodes going forward.\n\n### Performance\n\nAt the time of this writing, 4.2 million transactions have been\nprocessed by the RaiBlocks network, yielding a blockchain size of 1.7GB.\nTransaction times are measured on the order of seconds. A current\nreference implementation operating on commodity SSDs can process over\n10,000 transactions per second being primarily IO bound.\n\n## Resource Usage\n\nThis is an overview of resources used by a RaiBlocks node. Additionally,\nwe go over ideas for reducing resource usage for specific use cases.\nReduced nodes are typically called light, pruned, or simplified payment\nverification (SPV) nodes.\n\n### Network\n\nThe amount of network activity depends on how much the network\ncontributes towards the health of a network.\n\n**Representative**\n\nA representative node requires maximum network resources as it observes\nvote traffic from other representatives and publishes its own votes.\n\n**Trustless**\n\nA trustless node is similar to a representative node but is only an\nobserver, it doesn't contain a representative account private key and\ndoes not publish votes of its own.\n\n**Trusting**\n\nA trusting node observes vote traffic from one representative it trusts\nto correctly perform consensus. This cuts down on the amount of inbound\nvote traffic from representatives going to this node.\n\n**Light**\n\nA light node is also a trusting node that only observes traffic for\naccounts in which it is interested allowing minimal network usage.\n\n**Bootstrap**\n\nA bootstrap node serves up parts or all of the ledger for nodes that are\nbringing themselves online. This is done over a TCP connection rather\nthan UDP since it involves a large amount of data that requires advanced\nflow control.\n\n### Disk Capacity\n\nDepending on the user demands, different node configurations require\ndifferent storage requirements.\n\n**Historical**\n\nA node interested in keeping a full historical record of all\ntransactions will require the maximum amount of storage.\n\n**Current**\n\nDue to the design of keeping accumulated balances with blocks, nodes\nonly need to keep the latest or head blocks for each account in order to\nparticipate in consensus. If a node is uninterested in keeping a full\nhistory it can opt to keep only the head blocks.\n\n**Light**\n\nA light node keeps no local ledger data and only participates in the\nnetwork to observe activity on accounts in which it is interested or\noptionally create new transactions with private keys it holds.\n\n### CPU\n\n**Transaction Generating**\n\nA node interested in creating new transactions must produce a Proof of\nWork nonce in order to pass RaiBlock's throttling mechanism. Computation\nof various hardware is benchmarked in Appendix A.\n\n**Representative**\n\nA representative must verify signatures for blocks, votes, and also\nproduce its own signatures to participate in consensus. The amount of\nCPU resources for a representative node is significantly less than\ntransaction generating and should work with any single CPU in a\ncontemporary computer.\n\n**Observer**\n\nAn observer node doesn't generate its own votes. Since signature\ngeneration overhead is minimal, the CPU requirements are almost\nidentical to running a representative node.\n\n## Conclusion\n\nIn this paper we presented the framework for a trustless, feeless,\nlow-latency cryptocurrency that utilizes a novel block-lattice structure\nand delegated Proof of Stake voting. The network requires minimal\nresources, no high-power mining hardware, and can process high\ntransaction throughput. All of this is achieved by having individual\nblockchains for each account, eliminating access issues and\ninefficiencies of a global data-structure. We identified possible attack\nvectors on the system and presented arguments on how RaiBlocks is\nresistant to these forms of attacks.\n\n-----\n\n## Appendix A: PoW Hardware benchmarks\n\nAs mentioned previously, the PoW in RaiBlocks is to reduce network spam.\nOur node implementation provides acceleration that can take advantage of\nOpenCL compatible GPUs. Table I below provides a real-life benchmark\ncomparison of various hardware. Currently the PoW threshold is fixed,\nbut an adaptive threshold may be implemented as average computing power\nprogresses.\n\nTable I  \nHardware PoW Performance\n\n| Device                                     | Transactions Per Second |\n|--------------------------------------------|-------------------------|\n| Nvidia Tesla V100 (AWS)                    | 6.4 |\n| Nvidia Tesla P100 (Google,Cloud)           | 4.9 |\n| Nvidia Tesla K80 (Google,Cloud)            | 1.64 |\n| AMD RX 470 OC                              | 1.59 |\n| Nvidia GTX 1060 3GB                        | 1.25 |\n| Intel Core i7 4790K AVX2                   | 0.33 |\n| Intel Core i7 4790K,WebAssembly (Firefox)  | 0.14 |\n| Google Cloud 4 vCores                      | 0.14-0.16 |\n| ARM64 server 4 cores (Scaleway)            | 0.05-0.07 |\n\n## Acknowledgment\n\nWe would like to thank Brian Pugh and B. Cchung for compiling and\nformatting this paper.\n\n## References\n\n[^1]: S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” 2008. [Online]. Available: http://bitcoin.org/bitcoin.pdf\n[^2]: “Bitcoin median transaction fee historical chart.” [Online]. Available: https://bitinfocharts.com/comparison/bitcoin-median-transaction-fee.html\n[^3]: “Bitcoin average confirmation time.” [Online]. Available: https://blockchain.info/charts/avg-confirmation-time\n[^4]: “Bitcoin energy consumption index.” [Online]. Available: https://digiconomist.net/bitcoin-energy-consumption\n[^5]: S. King and S. Nadal, “Ppcoin: Peer-to-peer crypto-currency withproof-of-stake,” 2012. [Online]. Available: https://peercoin.net/assets/paper/peercoin-paper.pdf\n[^6]: C. LeMahieu, “Raiblocks distributed ledger network,” 2014.\n[^7]: Y. Ribero and D. Raissar, “Dagcoin whitepaper,” 2015.\n[^8]: S. Popov, “The tangle,” 2016.\n[^9]: A. Back, “Hashcash - a denial of service counter-measure,” 2002. [Online]. Available: http://www.hashcash.org/papers/hashcash.pdf\n[^10]: C. LeMahieu, “Raiblocks,” 2014. [Online]. Available: https://github.com/clemahieu/raiblocks\n[^11]: D. J. Bernstein, N. Duif, T. Lange, P. Shwabe, and B.-Y. Yang, “High-speed high-security signatures,” 2011. [Online]. Available: http://ed25519.cr.yp.to/ed25519-20110926.pdf\n[^12]: J.-P. Aumasson, S. Neves, Z. Wilcox-O’Hearn, and C. Winnerlein, “Blake2: Simpler, smaller, fast as md5,” 2012. [Online]. Available: https://blake2.net/blake2.pdf\n[^13]: A. Biryukov, D. Dinu, and D. Khovratovich, “Argon2: The memoryhard function for password hashing and other applications,” 2015. [Online]. Available: https://password-hashing.net/argon2-specs.pdf\n"
  },
  {
    "path": "mkdocs.yml",
    "content": "site_name: Nano Documentation\nsite_url: https://docs.nano.org/\ntheme:\n  name: 'material'\n  palette:\n    - scheme: nano\n      toggle:\n        icon: material/weather-sunny\n        name: Switch to dark mode\n    - scheme: slate\n      toggle:\n        icon: material/weather-night\n        name: Switch to light mode\n  font:\n    text: 'Noto Sans'\n    code: 'Roboto Mono'\n  icon:\n    repo: 'fontawesome/brands/github'\n  logo: 'images/nano-logo.svg'\n  favicon: 'images/favicon.png'\n  custom_dir: 'theme-overrides'\n  features:\n    - content.tabs.link\n    - navigation.indexes\n    - navigation.expand\n    - navigation.tabs\n    - navigation.top\n    - search.share\n    - search.suggest\n    - content.tabs.link\n    - navigation.indexes\n    - navigation.expand\nnav:\n  - Home: index.md\n  - What is Nano?: what-is-nano/overview.md\n  - Running a Node:\n    - Overview: running-a-node/overview.md\n    - Security: running-a-node/security.md\n    - Node Setup: running-a-node/node-setup.md\n    - Wallet Setup: running-a-node/wallet-setup.md\n    - Docker Management: running-a-node/docker-management.md\n    - Configuration: running-a-node/configuration.md\n    - Logging & Tracing: running-a-node/logging-tracing.md\n    - Ledger Management: running-a-node/ledger-management.md\n    - Voting as a Representative: running-a-node/voting-as-a-representative.md\n    - Advanced Monitoring: running-a-node/advanced-monitoring.md\n    - Beta Network: running-a-node/beta-network.md\n    - Test Network: running-a-node/test-network.md\n    - Troubleshooting: running-a-node/troubleshooting.md\n    - Beyond the Node: running-a-node/beyond-the-node.md\n  - Integration Guides: \n    - integration-guides/index.md\n    - The Basics: integration-guides/the-basics.md\n    - Key Management: integration-guides/key-management.md\n    - Block Confirmation Tracking: integration-guides/block-confirmation-tracking.md\n    - Work Generation: integration-guides/work-generation.md\n    - Build Options: integration-guides/build-options.md\n    - WebSockets: integration-guides/websockets.md\n    - IPC Integration: integration-guides/ipc-integration.md\n    - Advanced: integration-guides/advanced.md\n  - Living Whitepaper:\n      - living-whitepaper/index.md\n      - Protocol Design:\n        - Introduction: protocol-design/introduction.md\n        - Ledger: protocol-design/ledger.md\n        - Blocks: protocol-design/blocks.md\n        - Spam, Work, & Prioritization: protocol-design/spam-work-and-prioritization.md\n        - Networking: protocol-design/networking.md\n        - ORV Consensus: protocol-design/orv-consensus.md\n        - Attack Vectors: protocol-design/attack-vectors.md\n        - Resource Usage: protocol-design/resource-usage.md\n        - Distribution and Units: protocol-design/distribution-and-units.md\n        - Signing, Hashing and Key Derivation: protocol-design/signing-hashing-and-key-derivation.md\n        - Original whitepaper: whitepaper/english.md\n      - Node Implementation:\n        - Introduction: node-implementation/introduction.md\n        - Components: node-implementation/components.md\n        - Database: node-implementation/database.md\n        - Blocks: node-implementation/blocks.md\n        - Networking: node-implementation/networking.md\n        - Voting: node-implementation/voting.md\n        - Work: node-implementation/work.md\n  - Core Development:\n    - Overview: core-development/overview.md\n    - Collaboration Process: core-development/collaboration-process.md\n    - Code Standards: core-development/code-standards.md\n    - Understanding the Code: core-development/understanding-the-code.md\n    - Developer Discussions: core-development/developer-discussions.md\n  - Commands:\n    - RPC Protocol: commands/rpc-protocol.md\n    - Command Line Interface: commands/command-line-interface.md\n  - Releases:\n    - Node Releases: releases/node-releases.md\n    - Release Notes:\n      - V28.2 (Latest): releases/release-v28-2.md\n      - V28.1: releases/release-v28-1.md\n      - V28.0: releases/release-v28-0.md\n      - V27.1: releases/release-v27-1.md\n      - V27.0: releases/release-v27-0.md\n      - V26.1: releases/release-v26-1.md\n      - V26.0: releases/release-v26-0.md\n      - V25.1: releases/release-v25-1.md\n      - V25.0: releases/release-v25-0.md\n      - V24.0: releases/release-v24-0.md\n      - V23.3: releases/release-v23-3.md\n      - V23.1: releases/release-v23-1.md\n      - V23.0: releases/release-v23-0.md\n      - V22.1: releases/release-v22-1.md\n      - V22.0: releases/release-v22-0.md\n      - V21.3: releases/release-v21-3.md\n      - V21.2: releases/release-v21-2.md\n      - V21.1: releases/release-v21-1.md\n      - V21.0: releases/release-v21-0.md\n      - V20.0: releases/release-v20-0.md\n      - V19.0: releases/release-v19-0.md\n    - Network Upgrades: releases/network-upgrades.md\n    - Roadmap: releases/roadmap.md\n  - Glossary: glossary.md\nmarkdown_extensions:\n  - admonition\n  - attr_list\n  - codehilite:\n      guess_lang: false\n  - footnotes\n  - meta\n  - pymdownx.arithmatex\n  - pymdownx.betterem:\n      smart_enable: all\n  - pymdownx.caret\n  - pymdownx.critic\n  - pymdownx.details\n  - pymdownx.emoji:\n      emoji_index: !!python/name:material.extensions.emoji.twemoji\n      emoji_generator: !!python/name:pymdownx.emoji.to_svg\n  - pymdownx.highlight\n  - pymdownx.inlinehilite\n  - pymdownx.keys\n  - pymdownx.magiclink\n  - pymdownx.mark\n  - pymdownx.smartsymbols\n  - pymdownx.snippets:\n      check_paths: true\n      base_path: 'docs/snippets'\n  - pymdownx.striphtml:\n      strip_comments: true\n      strip_attributes: ''\n  - pymdownx.superfences:\n      custom_fences:\n      - name: mermaid\n        class: mermaid\n        format: !!python/name:pymdownx.superfences.fence_div_format\n  - pymdownx.tabbed:\n      alternate_style: true \n  - pymdownx.tasklist:\n      custom_checkbox: true\n  - pymdownx.tilde\n  - toc:\n      permalink: true\n      toc_depth: 4\nextra_javascript:\n  - 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'\n  - 'https://unpkg.com/mermaid@8.13.3/dist/mermaid.min.js'\n  - 'javascript/mermaid-loose-security.js'\nextra_css:\n  - 'stylesheets/extras.css'\nextra:\n  social:\n  - icon: 'fontawesome/brands/github'\n    link: 'https://github.com/nanocurrency'\n  - icon: 'fontawesome/brands/twitter'\n    link: 'https://twitter.com/nano'\n  - icon: 'material/comment-multiple'\n    link: 'https://chat.nano.org'\n  - icon: 'fontawesome/brands/reddit'\n    link: 'https://reddit.com/r/nanocurrency'\n  - icon: 'fontawesome/brands/medium'\n    link: 'https://medium.com/nanocurrency'\n  - icon: 'fontawesome/brands/facebook'\n    link: 'https://facebook.com/nanofoundation'\n  - icon: 'fontawesome/brands/linkedin'\n    link: 'https://linkedin.com/company/nano-foundation'\n  - icon: 'fontawesome/brands/youtube'\n    link: 'https://www.youtube.com/nanocurrency/'\n  - icon: 'fontawesome/brands/instagram'\n    link: 'https://www.instagram.com/nanocurrency/'\n  consent:\n    title: Cookie consent\n    description: >-\n      We use necessary cookies to make our site work. By using this and related Nano.org sites, \n      you are accepting these cookies. For more detailed information, see the Cookies section \n      in our <a href=\"https://nano.org/privacy\" target=\"_blank\" rel=\"noopener\">Privacy Policy</a>.\n  analytics:\n    provider: google\n    property: G-RGP8S06PYJ\nrepo_name: 'nanocurrency/nano-docs'\nrepo_url: 'https://github.com/nanocurrency/nano-docs'\nedit_uri: 'edit/main/docs/'\nplugins:\n    - search:\n        separator: '[\\s\\-,:!=\\[\\]()\"/]+|(?!\\b)(?=[A-Z][a-z])|\\.(?!\\d)|&[lg]t;'\n    - social:\n        cards: !ENV [ PRODUCTION, FALSE ]\n        cards_layout_options:\n            background_color: \"#20204c\"\n            color: \"#FFFFFF\"\n    - redirects:\n        redirect_maps:\n            'running-a-node/rocksdb-ledger-backend.md': 'running-a-node/ledger-management.md'\n            'protocol-design/network-attacks.md': 'protocol-design/attack-vectors.md'\n            'what-is-nano/contributing.md': 'core-development/overview.md'\n            'what-is-nano/exploring-more.md': 'what-is-nano/overview.md'\n            'releases/roadmap.md': 'https://github.com/orgs/nanocurrency/projects/27'\n            'releases/upcoming-features.md': 'https://github.com/orgs/nanocurrency/projects/27'\n            'releases/current-release-notes.md': 'releases/release-v28-2.md'\n            'node-implementation/contributing.md': 'core-development/overview.md'\n"
  },
  {
    "path": "readme.md",
    "content": "# Nano Protocol Documentation\n\n`nano-docs` is the source code for the Nano protocol documentation and is built using [MkDocs](https://www.mkdocs.org/) with the [MkDocs Material theme](https://squidfunk.github.io/mkdocs-material/).\n\n### Purpose\nThis documentation focuses on various users within the technical community: advanced users, node operators, developers integrating Nano, and those interested in details around how the protocol works. All efforts to help update the documentation should keep in mind these goals as submissions that fall outside of this scope are likely to be rejected.\n\n### Contributing\nFor users wishing to contribute to this documentation, we recommend you join the Discord (https://chat.nano.org) #documentation channel to keep up to date on the latest activity. GitHub issues will be used to manage requests for changes. It is recommended any navigational changes or larger updates be discussed on the Discord #nano-docs channel or within a GitHub issue before completing work - this will help avoid wasted work that does not align with the documentation goals.\n\nTo submit changes, please fork the repository and create a branch to make changes. Submit a Pull Request back to the source repository when ready for review ahead of possible inclusion.\n\n## Development\nThe recommended local setup is to use Docker with a pre-built image for MkDocs and Material theme. With Docker installed, from the cloned nano-docs directory run:\n\n```bash\ndocker pull ghcr.io/nanocurrency/nano-docs:latest\ndocker run --rm -it -p 8000:8000 ghcr.io/nanocurrency/nano-docs:latest\n```\n\nYou can also install MkDocs with Python 3 to serve using the following:\n\n```bash\npip3 install -r requirements.txt\nmkdocs serve\n```\n\nIf only reviewing pull requests is required, using a pre-packaged container with all custom theme modifications can be done with the following commands:\n```bash\ndocker pull ghcr.io/nanocurrency/nano-docs:pr-<pull_request_number>\ndocker run --rm -it -p 8000:8000 ghcr.io/nanocurrency/nano-docs:pr-<pull_request_number>\n```\n\nNote that because a local volume isn't being mounted this pull request review approach is only good for validating changes and not for development purposes. These PR-specific containers will be deleted once the related pull request is either closed or merged. If an offline version of the docs are needed, the container tag `latest` is also available and updated on each change to the `master` branch.\n\nAccess the site at http://localhost:8000. This supports automatic rebuilding, so anytime changes are saved to the documentation or configuration, it will be rebuilt and refresh the page. Some search indexing may remain cache between builds.\n\n## Formatting and Organization Tips\n\n## Title and description\nAt the top of every page (not snippets) two fields should be added `title: ` and `description: ` which will be converted to values of `<title>` and `<meta>` tags in the header to better inform search engines, social scraping tools and more.\n\n### Headers\nPages automatically have a `<h1>` title setup for them based on the page name, so headers `##` (`<h2>`) and higher should only be used to organize the content.\n\n### Table of Contents\nCurrently, the ToC on the right side is limited to a depth of 4, so `##`, `###`, and `####` will be included there. Higher header levels can be used on the page to better organize content but will not be in the ToC.\n\n### Links\nMkDocs has a link checker built in that can be run using the `--strict` flag on `mkdocs serve`, or `mkdocs build` command. This flag is included in the build pipeline. For it to work, links must be referencing the relative file path with the file extension included and no trailing slashes. Anchors are not included in this check. Although relative URLs will function if used, they will not be verified by the link checker.\n\nFor example, linking from a page in the`running-a-node` folder to `integration-guides` would be:\n\n* Gets checked: `../integration-guides/the-basics.md`.\n* Doesn't get checked: `/integration-guides/the-basics`\n\n### Snippets\nThe `snippets` directory contains reusable pieces of content which can be inserted as follows:\n\n`--8<-- \"snippet-file-name.md\"`\n\nThis should be used for simple, duplicated content only and is not a complex templating setup.\n\n### Comments\nThe StripHTML extension is used so that HTML-style comments can be included in the markdown docs. However, for best compatibility, keep them at the top level, not within indented areas/rendered admonition blocks, etc. as much as possible.\n\n`<!-- this is a valid comment that will not get rendered to the browser -->`\n\n### Admonition Extension Quick Reference\nAdmonition is an extension for MkDocs that provides easy block-styled side content (including collapsible blocks). More details on use can be found here: https://squidfunk.github.io/mkdocs-material/extensions/admonition/. Below is a quick reference for this functionality:\n\nFor an always expanded option:\n`!!! note \"This is the title\"\n\t This is the text`\n\nFor a collapsible option:\n\n`??? question \"Is this collapsed by default?\"\n\t Yes, it is`\n\n`???+ question \"Is this expanded by default?\"\n\t Yes, it is`\n\nTypes include:\n\n- note\n- abstract\n- info\n- tip\n- success\n- question\n- warning\n- failure\n- danger\n- bug\n- example\n- quote\n\n### Diagrams\nUsage of Draw.io is encouraged for generating diagrams:\n\n* Folder `/docs/diagrams` contains the `.svg` files that are the preferred format for diagrams\n* Diagrams can be edited using the Draw.io and similar applications:\n\t* Web: https://nanocurrency.github.io/drawio/src/main/webapp/index.html or https://app.diagrams.net\n\t* Desktop: https://github.com/jgraph/drawio-desktop/releases/latest \n* Embedding diagrams uses markdown format: `![account-chains](/diagrams/account-chains.svg)`\n\nThere is also support for Mermaid Sequence Diagrams, and documentation can be found here: https://mermaidjs.github.io/#/sequenceDiagram, however given the desire to have consistency in the diagrams and the limitations of Mermaid, generating Draw.io type diagrams is preferred.\n\n### Octicon icons\nThe scripts for using Github's Octicons are included in the header. Details for available icons can be found here: https://primer.style/octicons/. Usage should be limited. Example currently available in announcement block:\n\n`<span class=\"iconify\" data-icon=\"octicon-tag-16\" data-inline=\"false\"></span>`\n"
  },
  {
    "path": "requirements.txt",
    "content": "# Direct dependencies\nmkdocs>=1.5\nmkdocs-material[imaging]>=9.4\nmkdocs-material-extensions>=1.3\nmkdocs-redirects>=1.2\n"
  },
  {
    "path": "theme-overrides/main.html",
    "content": "{% extends \"base.html\" %}\n\n{% block extrahead %}\n  <!-- Extra Twitter Card data (other data comes from MKDocs Material Social Cards integration)-->\n  <meta name=\"twitter:site\" content=\"@nano\">\n\n  <!-- Extra Open Graph data (other data comes from MKDocs Material Social Cards integration)-->\n  <meta property=\"og:type\" content=\"website\" />\n  <meta property=\"og:site_name\" content=\"Nano Docs\" />\n\n  <!-- Robots meta -->\n  {% if page and page.meta and page.meta.robots %}\n    <meta property=\"robots\" content=\"{{ page.meta.robots }}\" />\n  {% else %}\n    <meta property=\"robots\" content=\"index, follow\" />\n  {% endif %}\n\n  <script src=\"https://code.iconify.design/1/1.0.7/iconify.min.js\"></script>\n\n{% endblock %}\n\n{% block announce %}\n<a href=\"/releases/current-release-notes/\" height=\"100\">\n  <span class=\"iconify\" data-icon=\"octicon-tag-16\" data-inline=\"false\"></span>\n  <span style=\"padding-left: 0.3em;\"><strong>Nano node V28.2 now available!</strong>&nbsp;We highly recommend upgrading to\n    this version for improved network operation: efficiency and security.</span> ⭢\n  </div>\n</a>\n{% endblock %}\n"
  },
  {
    "path": "theme-overrides/partials/footer.html",
    "content": "<!-- Application footer -->\n<footer class=\"md-footer\">\n\n  <!-- Link to previous and/or next page -->\n  {% if page.previous_page or page.next_page %}\n    <nav\n      class=\"md-footer__inner md-grid\"\n      aria-label=\"{{ lang.t('footer.title') }}\"\n    >\n\n      <!-- Link to previous page -->\n      {% if page.previous_page %}\n        <a\n          href=\"{{ page.previous_page.url | url }}\"\n          class=\"md-footer__link md-footer__link--prev\"\n          rel=\"prev\"\n        >\n          <div class=\"md-footer__button md-icon\">\n            {% include \".icons/material/arrow-left.svg\" %}\n          </div>\n          <div class=\"md-footer__title\">\n            <div class=\"md-ellipsis\">\n              <span class=\"md-footer__direction\">\n                {{ lang.t(\"footer.previous\") }}\n              </span>\n              {{ page.previous_page.title }}\n            </div>\n          </div>\n        </a>\n      {% endif %}\n\n      <!-- Link to next page -->\n      {% if page.next_page %}\n        <a\n          href=\"{{ page.next_page.url | url }}\"\n          class=\"md-footer__link md-footer__link--next\"\n          rel=\"next\"\n        >\n          <div class=\"md-footer__title\">\n            <div class=\"md-ellipsis\">\n              <span class=\"md-footer__direction\">\n                {{ lang.t(\"footer.next\") }}\n              </span>\n              {{ page.next_page.title }}\n            </div>\n          </div>\n          <div class=\"md-footer__button md-icon\">\n            {% include \".icons/material/arrow-right.svg\" %}\n          </div>\n        </a>\n      {% endif %}\n    </nav>\n  {% endif %}\n\n  <!-- Further information -->\n  <div class=\"md-footer-meta md-typeset\">\n      <div class=\"md-footer-meta__inner md-grid\">\n          <div class=\"md-footer-copyright\">\n              © Nano Foundation |\n              <a href=\"https://nano.org/terms\" target=\"_blank\">\n                  Terms of Use\n              </a>\n               | \n              <a href=\"https://nano.org/privacy\">\n                  Privacy Policy\n              </a>\n          </div>\n          \n          <!-- Social links -->\n          {% include \"partials/social.html\" %}\n      </div>\n      <div class=\"md-footer-meta__inner md-grid md-grid-disclaimer\">\n      <div class=\"md-footer-disclaimer md-footer-copyright\">\n        This site uses cookies, see our <a href=\"https://nano.org/privacy#cookies\" target=\"_blank\">Cookie policy</a> for details. The Nano Foundation is not responsible for the content of external sites and services. \n        <a href=\"https://nano.org/terms#linked-websites\" target=\"_blank\">Learn more</a>\n      </div>\n    </div>\n  </div>\n</footer>"
  }
]