diff --git a/README.md b/README.md index cfb6f41e3..f1388a279 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ + + +
- Pocket Network logo + Pocket Network logo
@@ -22,52 +25,13 @@ # poktroll -**poktroll** is built using the [Cosmos SDK](https://docs.cosmos.network) and -[CometBFT](https://cometbft.com/), created with [Ignite CLI](https://ignite.com/cli) -for the Shannon upgrade of the [Pocket Network](https://pokt.network) blockchain. - -- [Learn about Pocket Network](#learn-about-pocket-network) -- [Developer Documentation](#developer-documentation) -- [Roadmap](#roadmap) -- [Quickstart](#quickstart) -- [Godoc](#godoc) -- [Have questions? Ask An PNYX](#have-questions-ask-an-pnyx) -- [License](#license) - -## Learn about Pocket Network - -User friendly documentation of the Shannon upgrade is still a WIP, but there are -a handful of (potentially outdated) resources you can reference in the meantime -to build a better understanding of Pocket Network: - -- [Pocket Network official documentation](https://docs.pokt.network) -- [[Live] Pocket Network Morse; aka v0](https://github.com/pokt-network/pocket-core) -- [[Outdated] Pocket Network Protocol](https://github.com/pokt-network/pocket-network-protocol) -- [[Deprecated]Pocket Network V1](https://github.com/pokt-network/pocket) - -## Developer Documentation - -The developer documentation is available at [dev.poktroll.com](https://dev.poktroll.com). - -## Roadmap - -You can view the Shannon Roadmap on [Github](https://github.com/orgs/pokt-network/projects/144?query=is%3Aopen+sort%3Aupdated-desc) - -## Quickstart - -The best way to get involved is by following the [quickstart instructions](https://dev.poktroll.com/develop/developer_guide/quickstart). - -## Godoc - -The Godoc for the source code in this can be found at [pkg.go.dev/github.com/pokt-network/poktroll](https://pkg.go.dev/github.com/pokt-network/poktroll). - -## Have questions? Ask An PNYX +**poktroll** is the source code for [Pocket Network's](https://pokt.network/) +[Shannon upgrade](https://docs.pokt.network/pokt-protocol/the-shannon-upgrade). -You can use [PNYX](https://migration.pnyxai.com/), an AI-powered search engine that has been -trained and indexed on the Pocket Network documentation, community calls, forums -and much more! +For technical documentation, visit [dev.poktroll.com](https://dev.poktroll.com). ---- +Documentation is maintained in the [docusaurus repo](./docusaurus) and is +automatically deployed to the link above. ## License diff --git a/docusaurus/docs/README.md b/docusaurus/docs/README.md index 1de7ee4d7..bb0fe17d1 100644 --- a/docusaurus/docs/README.md +++ b/docusaurus/docs/README.md @@ -5,12 +5,23 @@ id: home-doc slug: / --- + + +
- Pocket Network logo + Pocket Network logo
+:::note Pocket Network Project Documentation + +This is the living technical documentation for the protocol design, implementation, +and operation. If you're looking for general documentation related to Pocket Network, +please visit [docs.pokt.network](https://docs.pokt.network). + +::: +
@@ -27,47 +38,62 @@ slug: /
-# poktroll +## Pocket Network Shannon Technical Docs (aka poktroll) + +**poktroll** is the source code and core implementation of the [Shannon upgrade](https://docs.pokt.network/pokt-protocol/the-shannon-upgrade) for [Pocket Network](https://pokt.network/). + +`poktroll` is built using the [Cosmos SDK](https://docs.cosmos.network), [CometBFT](https://cometbft.com/) and [Ignite CLI](https://ignite.com/cli). + +## What is Pocket Network? -**poktroll** is built using the [Cosmos SDK](https://docs.cosmos.network) and -[CometBFT](https://cometbft.com/), created with [Ignite CLI](https://ignite.com/cli) -for the Shannon upgrade of the [Pocket Network](https://pokt.network) blockchain. +:::note 🚧 Under Construction 🚧 -- [Learn about Pocket Network](#learn-about-pocket-network) -- [Roadmap](#roadmap) -- [Quickstart](#quickstart) -- [Godoc](#godoc) -- [Have questions? Ask An PNYC](#have-questions-ask-an-pnyc) +This documentation is not intended to answer this question as of 02/2025 + +Consider reading [this post from 02/2025](https://medium.com/decentralized-infrastructure/an-update-from-grove-on-shannon-beta-testnet-path-the-past-the-future-5bf7ec2a9acf) by @olshansk +to get some understanding of why you need Pocket & Grove. + +::: + +--- + +## Table of Contents + +- [Where do I start?](#where-do-i-start) +- [Shannon Roadmap](#shannon-roadmap) +- [PATH for Gateways](#path-for-gateways) +- [GoDoc Documentation](#godoc-documentation) - [License](#license) -## Learn about Pocket Network +## Where do I start? + +1. [Guides & Deployment](./operate/cheat_sheets/full_node_cheatsheet.md): Deployment cheat sheets and config overviews for node runners, infrastructure operators and CLI users. +2. [Tools & Explorers](./tools/user_guide/poktrolld_cli.md): Explorers, wallets, faucets and other resources to interact with the network. +3. [Core Developers](./develop/developer_guide/walkthrough.md): Guides & walkthroughs for core or external developers looking to contribute to the core protocol or SDK. +4. [Protocol Design](./protocol/actors/actors.md): Learn more about tokenomics design & protocol architecture. -User friendly documentation of the Shannon upgrade is still a WIP, but there are -a handful of (potentially outdated) resources you can reference in the meantime -to build a better understanding of Pocket Network: +:::note 🚧 Under Construction 🚧 -- [Pocket Network official documentation](https://docs.pokt.network) -- [[Live] Pocket Network Morse; aka v0](https://github.com/pokt-network/pocket-core) -- [[Outdated] Pocket Network Protocol](https://github.com/pokt-network/pocket-network-protocol) -- [[Deprecated]Pocket Network V1](https://github.com/pokt-network/pocket) +As of 02/2025, this documentation is under construction and does not have a clear +user journey. Different parts are intended to serve as references one can link to +or jump to/from when needed. -## Roadmap +::: -You can view the Shannon Roadmap on [Github](https://github.com/orgs/pokt-network/projects/144?query=is%3Aopen+sort%3Aupdated-desc) +## Shannon Roadmap -## Quickstart +The Shannon Roadmap, along with all past, active and future work is tracked via [this Github project](https://github.com/orgs/pokt-network/projects/144). -The best way to get involved is by following the [quickstart instructions](develop/developer_guide/walkthrough.md). +## PATH for Gateways -## Godoc +[Grove](https://grove.city/) is developing [PATH](https://path.grove.city/) for +anyone who aims to deploy a Pocket Network gateway. Visit the docs to get started. -The Godoc for the source code in this can be found at [pkg.go.dev/github.com/pokt-network/poktroll](https://pkg.go.dev/github.com/pokt-network/poktroll). +The PATH Roadmap, along with all past, active and future work is tracked via [this Github project](https://github.com/orgs/buildwithgrove/projects/1). -## Have questions? Ask An PNYC +## GoDoc Documentation -You can use [PNYX](https://pnyxai.com/), an AI-powered search engine that has been -trained and indexed on the Pocket Network documentation, community calls, forums -and much more! +The Godoc for the source code can be found at [pkg.go.dev/github.com/pokt-network/poktroll](https://pkg.go.dev/github.com/pokt-network/poktroll). --- diff --git a/docusaurus/docs/develop/developer_guide/_category_.json b/docusaurus/docs/develop/developer_guide/_category_.json index ecb8c52b7..315f7c6ec 100644 --- a/docusaurus/docs/develop/developer_guide/_category_.json +++ b/docusaurus/docs/develop/developer_guide/_category_.json @@ -1,6 +1,6 @@ { "label": "Developer Guide", - "position": 2, + "position": 1, "link": { "type": "generated-index", "description": "Documentation related to onboarding as a developer to the Pocket Network protocol." diff --git a/docusaurus/docs/develop/localnet/observability.md b/docusaurus/docs/develop/developer_guide/pocketdex_indexer.md similarity index 99% rename from docusaurus/docs/develop/localnet/observability.md rename to docusaurus/docs/develop/developer_guide/pocketdex_indexer.md index 0879b009b..795ff7267 100644 --- a/docusaurus/docs/develop/localnet/observability.md +++ b/docusaurus/docs/develop/developer_guide/pocketdex_indexer.md @@ -1,5 +1,5 @@ --- -sidebar_position: 1 +sidebar_position: 7 title: Pocketdex Indexer --- diff --git a/docusaurus/docs/develop/developer_guide/walkthrough.md b/docusaurus/docs/develop/developer_guide/walkthrough.md index da5f30ed3..daa43c16f 100644 --- a/docusaurus/docs/develop/developer_guide/walkthrough.md +++ b/docusaurus/docs/develop/developer_guide/walkthrough.md @@ -95,7 +95,7 @@ Install the following dependencies: 6. [Tilt](https://docs.tilt.dev/install.html) - k8s local development tool & environment manager :::note -If you've followed the [LocalNet instructions](../../operate/infrastructure/localnet.md), +If you've followed the [LocalNet instructions](../networks/localnet.md), you may already have them installed. ::: @@ -106,7 +106,7 @@ and inspect it so you have an idea of what's going on! We'll be manually configuring a few actors to run in your shell for the sake of the tutorial so you have visibility into the types of onchain and offchain -actors. In practice, you should be using [localnet](../../operate/infrastructure/localnet.md) +actors. In practice, you should be using [localnet](../networks/localnet.md) to dynamically scale your actors. To learn more about the different actors type, see the docs [here](../../protocol/actors/actors.md). @@ -653,7 +653,7 @@ We went through a flow of steps above just so you can get a feel for how things That said, you can dynamically scale the number of any actors in LocalNet by ony changing one line! -Go to our [localnet tutorial](../../operate/infrastructure/localnet.md) to learn more. +Go to our [localnet tutorial](../networks/localnet.md) to learn more. ## 7. Explore the tools diff --git a/docusaurus/docs/operate/testing/_category_.json b/docusaurus/docs/develop/e2e_testing/_category_.json similarity index 75% rename from docusaurus/docs/operate/testing/_category_.json rename to docusaurus/docs/develop/e2e_testing/_category_.json index 1805c4aeb..eca33fb96 100644 --- a/docusaurus/docs/operate/testing/_category_.json +++ b/docusaurus/docs/develop/e2e_testing/_category_.json @@ -1,6 +1,6 @@ { - "label": "Testing (Internal)", - "position": 6, + "label": "E2E Testing", + "position": 4, "link": { "type": "generated-index", "description": "Documentation related to the type of end-to-end testing (load or other) we are doing." diff --git a/docusaurus/docs/operate/testing/load_testing.md b/docusaurus/docs/develop/e2e_testing/load_testing.md similarity index 97% rename from docusaurus/docs/operate/testing/load_testing.md rename to docusaurus/docs/develop/e2e_testing/load_testing.md index 4063e0314..3b4875fee 100644 --- a/docusaurus/docs/operate/testing/load_testing.md +++ b/docusaurus/docs/develop/e2e_testing/load_testing.md @@ -27,7 +27,7 @@ The load-testing suite is built on [Gherkin](https://cucumber.io/docs/gherkin/), ## Dependencies -- [LocalNet](../infrastructure/localnet.md) (for local suite execution) +- [LocalNet](../networks/localnet.md) (for local suite execution) - [Golang](https://go.dev/dl/) ## Load Test Manifests @@ -63,7 +63,7 @@ This natural language syntax is parsed and used to match and execute the corresp To execute tests on LocalNet: -1. Ensure [LocalNet](../infrastructure/localnet.md) is operational. +1. Ensure [LocalNet](../networks/localnet.md) is operational. 2. In the `localnet_config.yaml` file, set `gateways.count` and `relayminers.count` to `3`. 3. Run `make acc_initialize_pubkeys` to initialize blockchain state public keys. 4. Run `make test_load_relays_stress_localnet` to run the LocalNet stress-test. diff --git a/docusaurus/docs/operate/testing/load_testing_devnet.md b/docusaurus/docs/develop/e2e_testing/load_testing_devnet.md similarity index 93% rename from docusaurus/docs/operate/testing/load_testing_devnet.md rename to docusaurus/docs/develop/e2e_testing/load_testing_devnet.md index dedae1936..105dfa60f 100644 --- a/docusaurus/docs/operate/testing/load_testing_devnet.md +++ b/docusaurus/docs/develop/e2e_testing/load_testing_devnet.md @@ -27,12 +27,12 @@ single instance of each offchain actor. We can create custom DevNets with multip ### 1. Create and configure the DevNet -Please refer to the DevNet creation guide [here](../infrastructure/devnet.md#how-to-create). +Please refer to the DevNet creation guide [here](../networks/devnet.md#how-to-create). ### 2. Stake the necessary actors - Depending on your load testing requirements, you may need to stake one or more `gateways` and `suppliers`. -- [DevNet documentation](../infrastructure/devnet.md#stake-actors) provides more details about staking actors in DevNets. +- [DevNet documentation](../networks/devnet.md#stake-actors) provides more details about staking actors in DevNets. ### 3. Configure the load test manifest @@ -96,7 +96,7 @@ gateways: exposed_url: https://devnet-sophon-gateway-1.poktroll.com - address: pokt15w3fhfyc0lttv7r585e2ncpf6t2kl9uh8rsnyz exposed_url: https://devnet-sophon-gateway-2.poktroll.com - - address: pokt1zhmkkd0rh788mc9prfq0m2h88t9ge0j83gnxya + - address: pokt1zhmkkd0rh788mc9prfq0m2h88t9ge0j83gnxya exposed_url: https://devnet-sophon-gateway-3.poktroll.com ``` diff --git a/docusaurus/docs/operate/testing/load_testing_plan_1.md b/docusaurus/docs/develop/e2e_testing/load_testing_plan_1.md similarity index 100% rename from docusaurus/docs/operate/testing/load_testing_plan_1.md rename to docusaurus/docs/develop/e2e_testing/load_testing_plan_1.md diff --git a/docusaurus/docs/operate/testing/load_testing_testnet.md b/docusaurus/docs/develop/e2e_testing/load_testing_testnet.md similarity index 100% rename from docusaurus/docs/operate/testing/load_testing_testnet.md rename to docusaurus/docs/develop/e2e_testing/load_testing_testnet.md diff --git a/docusaurus/docs/develop/localnet/_category_.json b/docusaurus/docs/develop/localnet/_category_.json deleted file mode 100644 index eeb79d4a7..000000000 --- a/docusaurus/docs/develop/localnet/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "LocalNet", - "position": 9, - "link": { - "type": "generated-index", - "description": "Tips on how to leverage the most out of your LocalNet Environment." - } -} diff --git a/docusaurus/docs/operate/infrastructure/_category_.json b/docusaurus/docs/develop/networks/_category_.json similarity index 92% rename from docusaurus/docs/operate/infrastructure/_category_.json rename to docusaurus/docs/develop/networks/_category_.json index 962324af5..bede72b59 100644 --- a/docusaurus/docs/operate/infrastructure/_category_.json +++ b/docusaurus/docs/develop/networks/_category_.json @@ -1,6 +1,6 @@ { "label": "Networks", - "position": 5, + "position": 3, "link": { "type": "generated-index", "description": "Infrastructure related to deploying, maintaining and testing various (Local, Dev, Test) environments." diff --git a/docusaurus/docs/operate/infrastructure/access_dashboard_on_service.png b/docusaurus/docs/develop/networks/access_dashboard_on_service.png similarity index 100% rename from docusaurus/docs/operate/infrastructure/access_dashboard_on_service.png rename to docusaurus/docs/develop/networks/access_dashboard_on_service.png diff --git a/docusaurus/docs/operate/infrastructure/devnet.md b/docusaurus/docs/develop/networks/devnet.md similarity index 100% rename from docusaurus/docs/operate/infrastructure/devnet.md rename to docusaurus/docs/develop/networks/devnet.md diff --git a/docusaurus/docs/operate/infrastructure/gcp_workloads.png b/docusaurus/docs/develop/networks/gcp_workloads.png similarity index 100% rename from docusaurus/docs/operate/infrastructure/gcp_workloads.png rename to docusaurus/docs/develop/networks/gcp_workloads.png diff --git a/docusaurus/docs/operate/infrastructure/grafana_explore_logs.png b/docusaurus/docs/develop/networks/grafana_explore_logs.png similarity index 100% rename from docusaurus/docs/operate/infrastructure/grafana_explore_logs.png rename to docusaurus/docs/develop/networks/grafana_explore_logs.png diff --git a/docusaurus/docs/operate/infrastructure/grafana_save_dashboard.png b/docusaurus/docs/develop/networks/grafana_save_dashboard.png similarity index 100% rename from docusaurus/docs/operate/infrastructure/grafana_save_dashboard.png rename to docusaurus/docs/develop/networks/grafana_save_dashboard.png diff --git a/docusaurus/docs/operate/infrastructure/localnet.md b/docusaurus/docs/develop/networks/localnet.md similarity index 100% rename from docusaurus/docs/operate/infrastructure/localnet.md rename to docusaurus/docs/develop/networks/localnet.md diff --git a/docusaurus/docs/operate/infrastructure/private_testnet.md b/docusaurus/docs/develop/networks/private_testnet.md similarity index 100% rename from docusaurus/docs/operate/infrastructure/private_testnet.md rename to docusaurus/docs/develop/networks/private_testnet.md diff --git a/docusaurus/docs/operate/infrastructure/repositories.md b/docusaurus/docs/develop/networks/repositories.md similarity index 100% rename from docusaurus/docs/operate/infrastructure/repositories.md rename to docusaurus/docs/develop/networks/repositories.md diff --git a/docusaurus/docs/operate/infrastructure/testnet.md b/docusaurus/docs/develop/networks/testnet.md similarity index 100% rename from docusaurus/docs/operate/infrastructure/testnet.md rename to docusaurus/docs/develop/networks/testnet.md diff --git a/docusaurus/docs/develop/packages/_category_.json b/docusaurus/docs/develop/packages/_category_.json index 4f8136c12..48734213d 100644 --- a/docusaurus/docs/develop/packages/_category_.json +++ b/docusaurus/docs/develop/packages/_category_.json @@ -1,6 +1,6 @@ { "label": "Packages", - "position": 5, + "position": 2, "link": { "type": "generated-index", "description": "Documentation related to the source code and packages in poktroll." diff --git a/docusaurus/docs/develop/testing/_category_.json b/docusaurus/docs/develop/testing/_category_.json new file mode 100644 index 000000000..d79c85960 --- /dev/null +++ b/docusaurus/docs/develop/testing/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Testing", + "position": 5, + "link": { + "type": "generated-index", + "description": "Documentation related to unit testing." + } +} diff --git a/docusaurus/docs/develop/developer_guide/testing/app_integration.md b/docusaurus/docs/develop/testing/app_integration.md similarity index 100% rename from docusaurus/docs/develop/developer_guide/testing/app_integration.md rename to docusaurus/docs/develop/testing/app_integration.md diff --git a/docusaurus/docs/develop/developer_guide/testing/e2e.md b/docusaurus/docs/develop/testing/e2e.md similarity index 100% rename from docusaurus/docs/develop/developer_guide/testing/e2e.md rename to docusaurus/docs/develop/testing/e2e.md diff --git a/docusaurus/docs/develop/developer_guide/testing/in_memory_integration.md b/docusaurus/docs/develop/testing/in_memory_integration.md similarity index 100% rename from docusaurus/docs/develop/developer_guide/testing/in_memory_integration.md rename to docusaurus/docs/develop/testing/in_memory_integration.md diff --git a/docusaurus/docs/develop/developer_guide/testing/integration_suites.md b/docusaurus/docs/develop/testing/integration_suites.md similarity index 100% rename from docusaurus/docs/develop/developer_guide/testing/integration_suites.md rename to docusaurus/docs/develop/testing/integration_suites.md diff --git a/docusaurus/docs/develop/developer_guide/testing/module_integration.md b/docusaurus/docs/develop/testing/module_integration.md similarity index 100% rename from docusaurus/docs/develop/developer_guide/testing/module_integration.md rename to docusaurus/docs/develop/testing/module_integration.md diff --git a/docusaurus/docs/develop/developer_guide/testing/testing_levels.md b/docusaurus/docs/develop/testing/testing_levels.md similarity index 100% rename from docusaurus/docs/develop/developer_guide/testing/testing_levels.md rename to docusaurus/docs/develop/testing/testing_levels.md diff --git a/docusaurus/docs/explore/genesis.md b/docusaurus/docs/explore/genesis.md deleted file mode 100644 index 18424b525..000000000 --- a/docusaurus/docs/explore/genesis.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Genesis -sidebar_position: 4 ---- - -## Genesis - -The genesis file for the Pocket Network is located at [pokt-network-genesis](https://github.com/pokt-network/pocket-network-genesis). diff --git a/docusaurus/docs/explore/roadmap.md b/docusaurus/docs/explore/roadmap.md deleted file mode 100644 index 75fc518a9..000000000 --- a/docusaurus/docs/explore/roadmap.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: Roadmap -sidebar_position: 2 ---- - -## Blogs & Updates - -- TODO_BETA(@olshansk): Pocket Network Shannon Update - Beta TestNet #1 Announcement -- [Pocket Network Shannon Update - Alpha TestNet #3 Announcement](https://medium.com/decentralized-infrastructure/pocket-network-shannon-update-alpha-testnet-3-eca539a9e111) - -## Alpha TestNet Roadmap - -See the Alpha TestNet #3 Announcement [here](https://medium.com/decentralized-infrastructure/pocket-network-shannon-update-alpha-testnet-3-eca539a9e111). - -```mermaid -timeline - title Shannon Roadmap - section Morse - Alpha TestNet(s)
(Q3/Q4): - βœ… Shannon Foundation: - βœ… Shannon SDK: - βœ… Relay Mining: - βœ… Morse Utility Parity: - βœ… Token Logic Modules: - βš™οΈ Governance: - βš™οΈ PATH Integration: - βš™οΈ Observability: - βš™οΈ Scalability Testing - Beta TestNet (Q4/Q1): - βš™οΈ E2E Permissionless Load Testing: - βš™οΈ POKTScan Explorer: - βš™οΈ TODOs & Optimizations: - βš™οΈ Streamline Upgrades: - IBC Integrations: - EVM Interoperability: - Migration module R&D: - Start wPOKT migration: - Auditing & Hardening - section Morse & Shannon - Shadow Migration
(Q1): - Shadow MainNet Launch: - Turn OFF Shannon inflation: - Bugs, Hardening & TECHDEBT: - Governance Parameter Eval: - Mirror Morse MainNet Traffic: - Tooling & Documentation Improvements: - Genesis File Preparation - Public Migration
(Q1): - Public MainNet Launch: - Morse POKT "Airdrop": - Gateway Migration: - Supplier Migration: - Bridge Migration: - Onboard Morse Validators: - CEX Support: - DEX Support - section Shannon - Launch & Deprecate
(Q2): - Turn ON Shannon inflation: - Enable New Incntives: - Deprecate Morse: - MainNet IBC and EVM Interoperability: - Kickoff Post-MainNet R&D -``` diff --git a/docusaurus/docs/explore/tools.md b/docusaurus/docs/explore/tools.md deleted file mode 100644 index 9e46f4f64..000000000 --- a/docusaurus/docs/explore/tools.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Tools & References -sidebar_position: 1 ---- - -- [Beta TestNet](#beta-testnet) -- [Alpha TestNet](#alpha-testnet) -- [πŸ› οΈ Tools \& References](#️-tools--references) - -## Beta TestNet - -- πŸͺ™ [Token Faucet](https://faucet.beta.testnet.pokt.network/) -- πŸ—ΊοΈ [Explorer](https://shannon.beta.testnet.pokt.network) -- πŸ—ΊοΈ [POKTScan's Explorer](https://shannon-beta.poktscan.com/) -- πŸ‘¨β€πŸ’» [POKTScan's GraphQL Playground](https://shannon-beta-api.poktscan.com/) - -## Alpha TestNet - -- πŸͺ™ [Token Faucet](https://faucet.alpha.testnet.pokt.network/) -- πŸ—ΊοΈ [Explorer](https://shannon.alpha.testnet.pokt.network) -- πŸ—ΊοΈ [POKTScan's Explorer](https://shannon-alpha.poktscan.com/) -- πŸ‘¨β€πŸ’» [POKTScan's GraphQL Playground](https://shannon-alpha-api.poktscan.com/) - -## πŸ› οΈ Tools & References - -- πŸ—οΈ [Deploy your own gateway & Supplier](https://dev.poktroll.com/operate/quickstart/docker_compose_walkthrough) -- 🍝 [Copy-pasta your way to deploying on a Debian server](https://dev.poktroll.com/operate/quickstart/docker_compose_debian_cheatsheet) -- πŸ§‘β€πŸ’» [Developer Onboarding](https://dev.poktroll.com/develop/developer_guide/quickstart) -- πŸ’½ [Full Node Indexer](https://shannon-testnet.poktscan.com/) + [Pocketdex source code](https://github.com/pokt-network/pocketdex/) -- πŸ“– [General Documentation](https://docs.pokt.network/pokt-protocol/the-shannon-upgrade) -- πŸ“’ [Technical Documentation](https://dev.poktroll.com/) -- πŸ§‘β€πŸ’» [Shannon SDK](https://github.com/pokt-network/shannon-sdk) -- πŸ–₯️ [Shannon source code](https://github.com/pokt-network/poktroll) diff --git a/docusaurus/docs/operate/cheat_sheets/_category_.json b/docusaurus/docs/operate/cheat_sheets/_category_.json new file mode 100644 index 000000000..119111e91 --- /dev/null +++ b/docusaurus/docs/operate/cheat_sheets/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Stake & Deploy Cheat Sheets", + "position": 1, + "link": { + "type": "generated-index", + "description": "Cheat sheets for staking and operating Pocket Network actors." + } +} diff --git a/docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md b/docusaurus/docs/operate/cheat_sheets/docker_compose_debian_cheatsheet.md similarity index 98% rename from docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md rename to docusaurus/docs/operate/cheat_sheets/docker_compose_debian_cheatsheet.md index eb8fd7f6c..8d88228d0 100644 --- a/docusaurus/docs/operate/quickstart/docker_compose_debian_cheatsheet.md +++ b/docusaurus/docs/operate/cheat_sheets/docker_compose_debian_cheatsheet.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 6 title: Docker Compose Cheat Sheet --- @@ -133,7 +133,7 @@ source ~/.bashrc :::warning The Alpha TestNet currently requires manual steps to sync the node to the latest block. Please find the affected block(s) -in [this document](../../protocol/upgrades/upgrade_list.md), which leads to the manual upgrade instructions. +in [this document](../upgrades/upgrade_list.md), which leads to the manual upgrade instructions. ::: ```bash diff --git a/docusaurus/docs/operate/quickstart/full_node_cheatsheet.md b/docusaurus/docs/operate/cheat_sheets/full_node_cheatsheet.md similarity index 58% rename from docusaurus/docs/operate/quickstart/full_node_cheatsheet.md rename to docusaurus/docs/operate/cheat_sheets/full_node_cheatsheet.md index 58161381a..d21f61d68 100644 --- a/docusaurus/docs/operate/quickstart/full_node_cheatsheet.md +++ b/docusaurus/docs/operate/cheat_sheets/full_node_cheatsheet.md @@ -1,45 +1,36 @@ --- title: Full Node Cheat Sheet -sidebar_position: 3 +sidebar_position: 1 --- -## Full Node Cheat Sheet Using Systemd & Cosmovisor +**πŸ–¨ 🍝 instructions to get you up and running with a `Full Node` on Pocket Network using `Systemd` and `Cosmovisor` βœ…** -This cheat sheet provides quick copy-pasta like instructions for installing and -running a Full Node using an automated script. +:::warning There is lots of scripting and some details are abstracted away -:::tip - -If you're interested in understanding the underlying details, or having full control over every -step of the process, check out the [Full Node Walkthrough](../run_a_node/full_node_walkthrough.md). +See the [Full Node Walkthrough](../walkthroughs/full_node_walkthrough.md) if you want to understand what's happening under the hood. ::: -- [Introduction](#introduction) -- [Pre-Requisites](#pre-requisites) -- [Install and Run a Full Node using Cosmovisor](#install-and-run-a-full-node-using-cosmovisor) - - [Automatic Upgrades Out of the Box](#automatic-upgrades-out-of-the-box) - - [Verify successful installation (curl latest block)](#verify-successful-installation-curl-latest-block) -- [FAQ \& Troubleshooting](#faq--troubleshooting) -- [\[OPTIONAL\] Do you care to know what just happened?](#optional-do-you-care-to-know-what-just-happened) - -### Introduction +--- -This guide will help you install a Full Node for Pocket Network, -**using helper that abstract out some of the underlying complexity.** +## Table of Contents -Running a Full Node is the first step toward becoming a Validator, Supplier, or Gateway. +- [Pre-Requisites \& Requirements](#pre-requisites--requirements) +- [Install and Run a Full Node using Cosmovisor](#install-and-run-a-full-node-using-cosmovisor) + - [Verify successful installation using `curl`](#verify-successful-installation-using-curl) + - [How are automatic upgrades handled out of the box?](#how-are-automatic-upgrades-handled-out-of-the-box) +- [Do you care to know what just happened?](#do-you-care-to-know-what-just-happened) -### Pre-Requisites +## Pre-Requisites & Requirements -1. **Linux-based System**: Ensure you have a Debian-based Linux distribution (other distributions may work but are not fully supported). +1. **Linux-based System**: Ensure you have a Debian-based Linux distribution. 2. **Root or Sudo Access**: You need administrative privileges to run the installation script. -3. **Dedicated Server or Virtual Machine**: Any provider should work (Vultr and Hetzner have been tested). +3. **Dedicated Server or Virtual Machine**: Any provider should work (e.g. Vultr). -### Install and Run a Full Node using Cosmovisor +## Install and Run a Full Node using Cosmovisor :::info -This section script will handle the installation of dependencies, user creation, +This section's script will handle the installation of dependencies, user creation, environment variable setup, and configuration of Cosmovisor and `poktrolld`. ::: @@ -59,34 +50,29 @@ Follow the instructions below to **quickly** install and set up a Full Node: 3. **Follow the Prompts**: - - **Choose the Network**: Select `testnet-alpha`, `testnet-beta`, or `mainnet`. - - **Set Username**: Input the desired username to run `poktrolld` (default: `poktroll`). - - **Set Node Moniker**: Input the node moniker (default: your `hostname`). - - **Confirm Seeds and Genesis File**: The script fetches seeds and the genesis file automatically. - - **External IP Address**: The script detects your external IP address. Confirm or input manually if incorrect. - -#### Automatic Upgrades Out of the Box + 1. **Choose the Network**: Select `testnet-alpha`, `testnet-beta`, or `mainnet`. + 2. **Set Username**: Input the desired username to run `poktrolld` (default: `poktroll`). + 3. **Set Node Moniker**: Input the node moniker (default: your `hostname`). + 4. **Confirm Seeds and Genesis File**: The script fetches seeds and the genesis file automatically. + 5. **External IP Address**: The script detects your external IP address. Confirm or input manually if incorrect. -Your node is configured to handle chain upgrades automatically through Cosmovisor. No manual intervention is required for standard upgrades. +### Verify successful installation using `curl` -When a chain upgrade is proposed and approved: - -1. Cosmovisor will download the new binary -2. The node will stop at the designated upgrade height -3. Cosmovisor will switch to the new binary -4. The node will restart automatically +We are going to use `curl` to query the latest block to verify the installation was successful. -#### Verify successful installation (curl latest block) +Running the following command will return the latest synched block height: -You can verify the installation was successful by querying the latest block (i.e. checking the node height). +```bash +curl -X GET http://localhost:26657/block | jq '.result.block.header.height' +``` -Running the following command: +Or the following command to get the entire block: ```bash curl -X GET http://localhost:26657/block | jq ``` -Should provide a response in this form: +Which should return a response similar to the following format: ```json { @@ -156,15 +142,23 @@ Should provide a response in this form: } ``` -### FAQ & Troubleshooting +### How are automatic upgrades handled out of the box? -See the [FAQ & Troubleshooting section in the Full Node Walkthrough](../run_a_node/full_node_walkthrough.md#faq--troubleshooting) -for examples of useful commands, common debugging instructions and other advanced usage. +Your node is configured to handle chain upgrades automatically through Cosmovisor. No manual intervention is required for standard upgrades. -### [OPTIONAL] Do you care to know what just happened? +When a chain upgrade is proposed and approved: + +1. Cosmovisor will download the new binary +2. The node will stop at the designated upgrade height +3. Cosmovisor will switch to the new binary +4. The node will restart automatically + +## Do you care to know what just happened? + +:::info Optional reading for the curious -:::info This section is optional and for informational purposes only. + ::: If you're interested in understanding what just got installed, keep reading... @@ -173,17 +167,17 @@ If you're interested in understanding what just got installed, keep reading... 2. **Cosmovisor**: A binary manager that handles chain upgrades automatically: - - Location: `/home/poktroll/bin/cosmovisor` - - Purpose: Manages different versions of `poktrolld` and handles chain upgrades - - Configuration: Set up to automatically download and switch to new binaries during upgrades + - **Location**: `/home/poktroll/bin/cosmovisor` + - **Purpose**: Manages different versions of `poktrolld` and handles chain upgrades + - **Configuration**: Set up to automatically download and switch to new binaries during upgrades 3. **Poktrolld**: The core node software: - - Location: `/home/poktroll/.poktroll/cosmovisor/genesis/bin/poktrolld` - - Configuration: `/home/poktroll/.poktroll/config/` - - Data: `/home/poktroll/.poktroll/data/` + - **Location**: `/home/poktroll/.poktroll/cosmovisor/genesis/bin/poktrolld` + - **Configuration**: `/home/poktroll/.poktroll/config/` + - **Data**: `/home/poktroll/.poktroll/data/` 4. **Systemd Service**: A service that manages the node: - - Name: `cosmovisor.service` - - Status: Enabled and started automatically - - Configured for automatic restarts and upgrades + - **Name**: `cosmovisor.service` + - **Status**: Enabled and started automatically + - **Configured** for automatic restarts and upgrades diff --git a/docusaurus/docs/operate/quickstart/gateway_cheatsheet.md b/docusaurus/docs/operate/cheat_sheets/gateway_cheatsheet.md similarity index 96% rename from docusaurus/docs/operate/quickstart/gateway_cheatsheet.md rename to docusaurus/docs/operate/cheat_sheets/gateway_cheatsheet.md index 861c2b06a..e77d7f90f 100644 --- a/docusaurus/docs/operate/quickstart/gateway_cheatsheet.md +++ b/docusaurus/docs/operate/cheat_sheets/gateway_cheatsheet.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 4 title: Gateway Cheat Sheet --- @@ -9,7 +9,7 @@ This guide provides quick reference commands for setting up and running a **Gate on Pocket Network. For detailed instructions, troubleshooting, and observability setup, see the -[Gateway Walkthrough](./../run_a_node/gateway_walkthrough.md). +[Gateway Walkthrough](../walkthroughs/gateway_walkthrough.md). :::note @@ -38,8 +38,8 @@ streamline development and reduce friction for any new potential contributor. ## Pre-Requisites -1. Make sure to [install the `poktrolld` CLI](../user_guide/poktrolld_cli.md). -2. Make sure you know how to [create and fund a new account](../user_guide/create-new-wallet.md). +1. Make sure to [install the `poktrolld` CLI](../../tools/user_guide/poktrolld_cli.md). +2. Make sure you know how to [create and fund a new account](../../tools/user_guide/create-new-wallet.md). :::warning @@ -112,7 +112,7 @@ poktrolld query bank balances $APP_ADDR $NODE_FLAGS :::tip -You can find all the explorers, faucets and tools at the [tools page](../../explore/tools.md). +You can find all the explorers, faucets and tools at the [tools page](../../tools/tools/source_code.md). ::: diff --git a/docusaurus/docs/operate/quickstart/service_cheatsheet.md b/docusaurus/docs/operate/cheat_sheets/service_cheatsheet.md similarity index 94% rename from docusaurus/docs/operate/quickstart/service_cheatsheet.md rename to docusaurus/docs/operate/cheat_sheets/service_cheatsheet.md index eda5d4af5..564fcedbf 100644 --- a/docusaurus/docs/operate/quickstart/service_cheatsheet.md +++ b/docusaurus/docs/operate/cheat_sheets/service_cheatsheet.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 2 title: Service Cheat Sheet --- @@ -14,8 +14,8 @@ title: Service Cheat Sheet ### Pre-Requisites -1. Make sure to [install the `poktrolld` CLI](../user_guide/poktrolld_cli.md). -2. Make sure you know how to [create and fund a new account](../user_guide/create-new-wallet.md). +1. Make sure to [install the `poktrolld` CLI](../../tools/user_guide/poktrolld_cli.md). +2. Make sure you know how to [create and fund a new account](../../tools/user_guide/create-new-wallet.md). ### How do I query for all existing onchain Services? diff --git a/docusaurus/docs/operate/quickstart/supplier_cheatsheet.md b/docusaurus/docs/operate/cheat_sheets/supplier_cheatsheet.md similarity index 96% rename from docusaurus/docs/operate/quickstart/supplier_cheatsheet.md rename to docusaurus/docs/operate/cheat_sheets/supplier_cheatsheet.md index 32446be7a..4cfa49fb3 100644 --- a/docusaurus/docs/operate/quickstart/supplier_cheatsheet.md +++ b/docusaurus/docs/operate/cheat_sheets/supplier_cheatsheet.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 3 title: Supplier (RelayMiner) Cheat Sheet --- @@ -9,7 +9,7 @@ This guide provides quick reference commands for setting up a **Supplier** and running a **RelayMiner** on Pocket Network. For detailed instructions, troubleshooting, and observability setup, see the -[Supplier Walkthrough](./../run_a_node/supplier_walkthrough.md). +[Supplier Walkthrough](../walkthroughs/supplier_walkthrough.md). :::note @@ -39,8 +39,8 @@ streamline development and reduce friction for any new potential contributor. ## Pre-Requisites -1. Make sure to [install the `poktrolld` CLI](../user_guide/poktrolld_cli.md). -2. Make sure you know how to [create and fund a new account](../user_guide/create-new-wallet.md). +1. Make sure to [install the `poktrolld` CLI](../../tools/user_guide/poktrolld_cli.md). +2. Make sure you know how to [create and fund a new account](../../tools/user_guide/create-new-wallet.md). 3. You have either [staked a new `service` or found an existing one](./service_cheatsheet.md). 4. `[Optional]` You can run things locally or have dedicated long-running hardware. See the [Docker Compose Cheat Sheet](./docker_compose_debian_cheatsheet#deploy-your-server) if you're interested in the latter. @@ -117,7 +117,7 @@ poktrolld query bank balances $SUPPLIER_ADDR $NODE_FLAGS :::tip -You can find all the explorers, faucets and tools at the [tools page](../../explore/tools.md). +You can find all the explorers, faucets and tools at the [tools page](../../tools/tools/source_code.md). ::: diff --git a/docusaurus/docs/operate/quickstart/validator_cheatsheet.md b/docusaurus/docs/operate/cheat_sheets/validator_cheatsheet.md similarity index 77% rename from docusaurus/docs/operate/quickstart/validator_cheatsheet.md rename to docusaurus/docs/operate/cheat_sheets/validator_cheatsheet.md index f12ffe560..f1e87fb15 100644 --- a/docusaurus/docs/operate/quickstart/validator_cheatsheet.md +++ b/docusaurus/docs/operate/cheat_sheets/validator_cheatsheet.md @@ -1,6 +1,6 @@ --- title: Validator Cheat Sheet -sidebar_position: 4 +sidebar_position: 6 --- ## Validator Cheat Sheet @@ -13,7 +13,7 @@ running a Validator using an automated script. :::tip If you're interested in understanding everything, or having full control of every -step, check out the [Validator Walkthrough](../run_a_node/validator_walkthrough.md). +step, check out the [Validator Walkthrough](../walkthroughs/validator_walkthrough.md). ::: @@ -27,4 +27,4 @@ This guide will help you install a Validator on Pocket Network, ### Pre-Requisites -1. **Run a Full Node**: Make sure you have followed the [Full Node Cheat Sheet](../quickstart/full_node_cheatsheet.md) to install and run a Full Node first +1. **Run a Full Node**: Make sure you have followed the [Full Node Cheat Sheet](full_node_cheatsheet.md) to install and run a Full Node first diff --git a/docusaurus/docs/operate/run_a_node/hardware_requirements.md b/docusaurus/docs/operate/configs/hardware_requirements.md similarity index 99% rename from docusaurus/docs/operate/run_a_node/hardware_requirements.md rename to docusaurus/docs/operate/configs/hardware_requirements.md index fc9af1981..3e06f61eb 100644 --- a/docusaurus/docs/operate/run_a_node/hardware_requirements.md +++ b/docusaurus/docs/operate/configs/hardware_requirements.md @@ -1,6 +1,6 @@ --- title: Hardware Requirements -sidebar_position: 1 +sidebar_position: 5 --- ## Hardware Requirements @@ -64,6 +64,7 @@ information on what a `PATH Gateway` is. | CPU Cores | 1 | 4 | | RAM | 1GB | 16GB | | SSD Storage | 5GB | 5GB | + ### Additional Considerations diff --git a/docusaurus/docs/operate/faq/_category_.json b/docusaurus/docs/operate/faq/_category_.json new file mode 100644 index 000000000..ab2dd17d1 --- /dev/null +++ b/docusaurus/docs/operate/faq/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "FAQ & Troubleshooting", + "position": 4, + "link": { + "type": "generated-index", + "description": "Frequently Asked Questions (FAQ) & Troubleshooting" + } +} diff --git a/docusaurus/docs/operate/faq/full_node_faq.md b/docusaurus/docs/operate/faq/full_node_faq.md new file mode 100644 index 000000000..23e2e3c17 --- /dev/null +++ b/docusaurus/docs/operate/faq/full_node_faq.md @@ -0,0 +1,111 @@ +--- +sidebar_position: 1 +title: Full Node FAQ +--- + +## How do I check whether my node is accessible from another machine? + +```bash +nc -vz {EXTERNAL_IP} 26656 +``` + +## How do I view my node status? + +```bash +sudo systemctl status cosmovisor.service +``` + +## How do I view my node logs? + +```bash +sudo journalctl -u cosmovisor.service -f +``` + +## How do I stop my node? + +```bash +sudo systemctl stop cosmovisor.service +``` + +## How do I start my node? + +```bash +sudo systemctl start cosmovisor.service +``` + +## How do I restart my node? + +```bash +sudo systemctl restart cosmovisor.service +``` + +## How do I query the latest block (i.e. check the node height)? + +Using poktrolld: + +```bash +poktrolld query block --type=height --node http://localhost:26657 +``` + +Or, using curl: + +```bash +curl -X GET http://localhost:26657/block | jq +``` + +## How do I access my CometBFT endpoint externally? + +The default CometBFT port is at `26657`. + +To make it accessible externally, you'll need to port all the instructions from +port `26656` on this page to port `26657`. Specifically: + +```bash +# Update your firewall +sudo ufw allow 26657/tcp + +# Alternatively, if ufw is not available, update your iptables +sudo iptables -A INPUT -p tcp --dport 26657 -j ACCEPT + +# Update your Cosmovisor config +sed -i 's|laddr = "tcp://127.0.0.1:26657"|laddr = "tcp://0.0.0.0:26657"|' $HOME/.poktroll/config/config.toml +sed -i 's|cors_allowed_origins = \[\]|cors_allowed_origins = ["*"]|' $HOME/.poktroll/config/config.toml + +# Restart the service +sudo systemctl restart cosmovisor.service + +# Test the connection +nc -vz {EXTERNAL_IP} 26657 +``` + +Learn more [here](https://docs.cometbft.com/main/rpc/). + +:::warning + +Be careful about making this public as adversarial actors may try to DDoS your node. + +::: + +## How do I check the node version? + +```bash +poktrolld version +``` + +## How do I check the Cosmosvisor directory structure? + +```bash +ls -la /home/poktroll/.poktroll/cosmovisor/ +``` + +## How do I check if an upgrade is available? + +```bash +ls -la /home/poktroll/.poktroll/cosmovisor/upgrades/ +``` + +## How do I view node configuration? + +```bash +cat /home/poktroll/.poktroll/config/config.toml +``` diff --git a/docusaurus/docs/operate/quickstart/_category_.json b/docusaurus/docs/operate/quickstart/_category_.json deleted file mode 100644 index 4a8928e1d..000000000 --- a/docusaurus/docs/operate/quickstart/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Quickstart", - "position": 1, - "link": { - "type": "generated-index", - "description": "Quickstart documentation to start deploying on Shannon." - } -} diff --git a/docusaurus/docs/operate/run_a_node/_category_.json b/docusaurus/docs/operate/run_a_node/_category_.json deleted file mode 100644 index ea46ef992..000000000 --- a/docusaurus/docs/operate/run_a_node/_category_.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "label": "Run a Node Walkthroughs", - "position": 3, - "link": { - "type": "generated-index", - "description": "Guides on how to deploy and operated various type of Pocket Network nodes." - } -} diff --git a/docusaurus/docs/protocol/upgrades/_category_.json b/docusaurus/docs/operate/upgrades/_category_.json similarity index 72% rename from docusaurus/docs/protocol/upgrades/_category_.json rename to docusaurus/docs/operate/upgrades/_category_.json index 2e80f4c80..46cb7f8e4 100644 --- a/docusaurus/docs/protocol/upgrades/_category_.json +++ b/docusaurus/docs/operate/upgrades/_category_.json @@ -1,6 +1,6 @@ { - "label": "Upgrades", - "position": 4, + "label": "Protocol Upgrades", + "position": 5, "link": { "type": "generated-index", "description": "Documentation related to Pocket Network protocol upgrades." diff --git a/docusaurus/docs/develop/developer_guide/chain_halt_troubleshooting.md b/docusaurus/docs/operate/upgrades/chain_halt_troubleshooting.md similarity index 96% rename from docusaurus/docs/develop/developer_guide/chain_halt_troubleshooting.md rename to docusaurus/docs/operate/upgrades/chain_halt_troubleshooting.md index 5b32f5cda..7e11f41d1 100644 --- a/docusaurus/docs/develop/developer_guide/chain_halt_troubleshooting.md +++ b/docusaurus/docs/operate/upgrades/chain_halt_troubleshooting.md @@ -74,7 +74,7 @@ To interpret this data: 2. Input the hexadecimal data into CyberChef. 3. Apply the "From Hex" operation followed by "Protobuf Decode" to reveal the human-readable content. -![CyberChef Decoding Example](./img/cyberchef_1.png) +![CyberChef Decoding Example](../../develop/developer_guide/img/cyberchef_1.png) ### Step 5: Comparing Records @@ -84,7 +84,7 @@ After decoding, compare the data from both nodes: 2. Identify specific fields or values that differ between the two records. 3. Pay close attention to timestamps, numerical values, and complex data structures. -![CyberChef Diff Example](./img/cyberchef_2.png) +![CyberChef Diff Example](../../develop/developer_guide/img/cyberchef_2.png) The image above illustrates a difference in the JSON representation of an object, which is likely the root cause of the non-deterministic state breaking consensus between nodes. @@ -112,4 +112,4 @@ to sync a node from genesis by automatically using the appropriate binary for ea ## Syncing from genesis -If you're encountering any of the errors mentioned above while trying to sync the historical blocks - make sure you're running the correct version of the binary in accordance with this table [Upgrade List](../../protocol/upgrades/upgrade_list.md). +If you're encountering any of the errors mentioned above while trying to sync the historical blocks - make sure you're running the correct version of the binary in accordance with this table [Upgrade List](upgrade_list.md). diff --git a/docusaurus/docs/protocol/upgrades/contigency_plans.md b/docusaurus/docs/operate/upgrades/contigency_plans.md similarity index 96% rename from docusaurus/docs/protocol/upgrades/contigency_plans.md rename to docusaurus/docs/operate/upgrades/contigency_plans.md index 260f37823..0a262bd5c 100644 --- a/docusaurus/docs/protocol/upgrades/contigency_plans.md +++ b/docusaurus/docs/operate/upgrades/contigency_plans.md @@ -90,7 +90,7 @@ In such a case, we need: ### Option 3: The migration succeed but the network is stuck (i.e. migration had a bug) -This should be treated as a consensus or non-determinism bug that is unrelated to the upgrade. See [Recovery From Chain Halt](../../develop/developer_guide/recovery_from_chain_halt.md) for more information on how to handle such issues. +This should be treated as a consensus or non-determinism bug that is unrelated to the upgrade. See [Recovery From Chain Halt](recovery_from_chain_halt.md) for more information on how to handle such issues. ### MANDATORY Checklist of Documentation & Scripts to Update diff --git a/docusaurus/docs/protocol/upgrades/module_params.md b/docusaurus/docs/operate/upgrades/module_params.md similarity index 100% rename from docusaurus/docs/protocol/upgrades/module_params.md rename to docusaurus/docs/operate/upgrades/module_params.md diff --git a/docusaurus/docs/protocol/upgrades/protocol_upgrades.md b/docusaurus/docs/operate/upgrades/protocol_upgrades.md similarity index 93% rename from docusaurus/docs/protocol/upgrades/protocol_upgrades.md rename to docusaurus/docs/operate/upgrades/protocol_upgrades.md index 684bc8e7a..cda31c8e9 100644 --- a/docusaurus/docs/protocol/upgrades/protocol_upgrades.md +++ b/docusaurus/docs/operate/upgrades/protocol_upgrades.md @@ -1,11 +1,11 @@ --- -title: Protocol Upgrades +title: Introduction to Protocol Upgrades sidebar_position: 1 --- -# Protocol Upgrades +## Introduction to Protocol Upgrades -Pocket Network is continuously evolving through regular protocol upgrades. We implement software upgrades via a DAO process, allowing validator nodes to incorporate consensus-breaking changes. These upgrades can be automatically applied when using [Cosmovisor](../../operate/run_a_node/full_node_walkthrough.md), or manually if not using `cosmovisor`. +Pocket Network is continuously evolving through regular protocol upgrades. We implement software upgrades via a DAO process, allowing validator nodes to incorporate consensus-breaking changes. These upgrades can be automatically applied when using [Cosmovisor](../../operate/walkthroughs/full_node_walkthrough.md), or manually if not using `cosmovisor`. - [What is a Protocol Upgrade?](#what-is-a-protocol-upgrade) - [List of Upgrades](#list-of-upgrades) diff --git a/docusaurus/docs/develop/developer_guide/recovery_from_chain_halt.md b/docusaurus/docs/operate/upgrades/recovery_from_chain_halt.md similarity index 93% rename from docusaurus/docs/develop/developer_guide/recovery_from_chain_halt.md rename to docusaurus/docs/operate/upgrades/recovery_from_chain_halt.md index d1ca5a069..e0e0b3f0a 100644 --- a/docusaurus/docs/develop/developer_guide/recovery_from_chain_halt.md +++ b/docusaurus/docs/operate/upgrades/recovery_from_chain_halt.md @@ -12,7 +12,7 @@ new release has been created and verified to function correctly. :::tip -See [Chain Halt Troubleshooting](./chain_halt_troubleshooting.md) for more information on identifying the cause of a chain halt. +See [Chain Halt Troubleshooting](chain_halt_troubleshooting.md) for more information on identifying the cause of a chain halt. ::: @@ -37,7 +37,7 @@ and use the same version of the software. If the halt is caused by the network upgrade, it is possible the solution can be as simple as skipping an upgrade (i.e. `unsafe-skip-upgrade`) and creating a new (fixed) upgrade. -Read more about [upgrade contingency plans](../../protocol/upgrades/contigency_plans.md). +Read more about [upgrade contingency plans](contigency_plans.md). ### Manual binary replacement (preferred) @@ -61,7 +61,7 @@ The steps to doing so are: 1. Prepare and verify a new binary that addresses the consensus-breaking issue. 2. Reach out to the community and validators so they can upgrade the binary manually. -3. Update [the documentation](../../protocol/upgrades/upgrade_list.md) to include a range a height when the binary needs +3. Update [the documentation](upgrade_list.md) to include a range a height when the binary needs to be replaced. :::warning @@ -115,8 +115,8 @@ propagating the existing blocks signed by the Validators, making it hard to roll However, if necessary, the instructions to follow are: 1. Prepare & verify a new binary that addresses the consensus-breaking issue. -2. [Create a release](../../protocol/upgrades/release_process.md). -3. [Prepare an upgrade transaction](../../protocol/upgrades/upgrade_procedure.md#writing-an-upgrade-transaction) to the new version. +2. [Create a release](release_process.md). +3. [Prepare an upgrade transaction](upgrade_procedure.md#writing-an-upgrade-transaction) to the new version. 4. Disconnect the `Validator set` from the rest of the network **3 blocks** prior to the height of the chain halt. For example: - Assume an issue at height `103`. - Revert the `validator set` to height `100`. diff --git a/docusaurus/docs/protocol/upgrades/release_process.md b/docusaurus/docs/operate/upgrades/release_process.md similarity index 98% rename from docusaurus/docs/protocol/upgrades/release_process.md rename to docusaurus/docs/operate/upgrades/release_process.md index 398d56c05..01ea60735 100644 --- a/docusaurus/docs/protocol/upgrades/release_process.md +++ b/docusaurus/docs/operate/upgrades/release_process.md @@ -28,7 +28,7 @@ TODO(#791): The process of adding the `consensus-breaking` label is still not fo If any exist, assume the release will require an upgrade. [Here is a link](https://github.com/pokt-network/poktroll/pulls?q=sort%3Aupdated-desc+is%3Apr+is%3Amerged+label%3Aconsensus-breaking) for convenience. -- **Verify a Full Node**: Deploy a Full Node on TestNet and allow it to sync and operate for a few days to verify that no accidentally introduced consensus-breaking changes affect the ability to sync. See the instructions in the [Quickstart Guide](../../operate/quickstart/docker_compose_debian_cheatsheet.md) for deploying a Full Node. +- **Verify a Full Node**: Deploy a Full Node on TestNet and allow it to sync and operate for a few days to verify that no accidentally introduced consensus-breaking changes affect the ability to sync. See the instructions in the [Quickstart Guide](../../operate/cheat_sheets/docker_compose_debian_cheatsheet.md for deploying a Full Node. - **Update Upgrade List**: If the new release includes an upgrade transaction for automatic upgrades, add the new release to the table in the [Upgrades List](./upgrade_list.md). diff --git a/docusaurus/docs/protocol/upgrades/upgrade_list.md b/docusaurus/docs/operate/upgrades/upgrade_list.md similarity index 100% rename from docusaurus/docs/protocol/upgrades/upgrade_list.md rename to docusaurus/docs/operate/upgrades/upgrade_list.md diff --git a/docusaurus/docs/protocol/upgrades/upgrade_procedure.md b/docusaurus/docs/operate/upgrades/upgrade_procedure.md similarity index 97% rename from docusaurus/docs/protocol/upgrades/upgrade_procedure.md rename to docusaurus/docs/operate/upgrades/upgrade_procedure.md index 91dfc12bf..855f0ae0e 100644 --- a/docusaurus/docs/protocol/upgrades/upgrade_procedure.md +++ b/docusaurus/docs/operate/upgrades/upgrade_procedure.md @@ -37,7 +37,7 @@ This process involves several key steps: 2. **Implementation**: The proposed changes are implemented in the codebase. 3. **Testing**: Thorough testing of the proposed changes is conducted in devnet and testnet environments before mainnet deployment. 4. **Announcement**: Upon successful testing, we announce the upgrade through our social media channels and community forums. -5. **Deployment**: An upgrade transaction is sent to the network, allowing node operators using [Cosmovisor](../../operate/run_a_node/full_node_walkthrough.md) to automatically upgrade their nodes at the specified block height. +5. **Deployment**: An upgrade transaction is sent to the network, allowing node operators using [Cosmovisor](../../operate/walkthroughs/full_node_walkthrough.md) to automatically upgrade their nodes at the specified block height. 6. **Monitoring**: Post-deployment, we closely monitor the network to ensure everything functions as expected. ## When is an Upgrade Warranted? @@ -259,7 +259,7 @@ We use Kubernetes to manage software versions, including validators. Introducing ### TestNet Upgrades -We currently deploy TestNet validators using Kubernetes with helm charts, which prevents us from managing the validator with `cosmovisor`. We do not control what other TestNet participants are running. However, if participants have deployed their nodes using the [cosmovisor guide](../../operate/run_a_node/full_node_walkthrough.md), their nodes will upgrade automatically. +We currently deploy TestNet validators using Kubernetes with helm charts, which prevents us from managing the validator with `cosmovisor`. We do not control what other TestNet participants are running. However, if participants have deployed their nodes using the [cosmovisor guide](../../operate/walkthroughs/full_node_walkthrough.md), their nodes will upgrade automatically. Until we transition to [cosmos-operator](https://github.com/strangelove-ventures/cosmos-operator), which supports scheduled upgrades (although not fully automatic like `cosmovisor`), we need to manually manage the process: diff --git a/docusaurus/docs/operate/walkthroughs/_category_.json b/docusaurus/docs/operate/walkthroughs/_category_.json new file mode 100644 index 000000000..e2c2e3336 --- /dev/null +++ b/docusaurus/docs/operate/walkthroughs/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Stake & Deploy Walkthroughs", + "position": 2, + "link": { + "type": "generated-index", + "description": "Walkthroughs for staking and operating Pocket Network actors." + } +} diff --git a/docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md b/docusaurus/docs/operate/walkthroughs/docker_compose_walkthrough.md similarity index 97% rename from docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md rename to docusaurus/docs/operate/walkthroughs/docker_compose_walkthrough.md index 6123e5ce8..b5269cff9 100644 --- a/docusaurus/docs/operate/quickstart/docker_compose_walkthrough.md +++ b/docusaurus/docs/operate/walkthroughs/docker_compose_walkthrough.md @@ -1,5 +1,5 @@ --- -sidebar_position: 1 +sidebar_position: 7 title: Docker Compose Walkthrough --- @@ -38,7 +38,7 @@ transitioning to `Shannon`. This document has a lot of details and explanations. If you're looking for a copy-paste quickstart guide to set all of it up on a Debian server, check out -the [Debian cheat sheet](./docker_compose_debian_cheatsheet.md). +the [Debian cheat sheet](../cheat_sheets/docker_compose_debian_cheatsheet.md). ::: @@ -83,7 +83,7 @@ Furthermore, `Shannon` uses [`PATH Gateway`](https://github.com/buildwithgrove/p a software component that acts on behalf of either `Applications` or `Gateways` to access services provided by Pocket Network `Supplier`s via `RelayMiners`. -The following diagram from the [actors](../../protocol/actors/) page captures the relationship +The following diagram from the [actors](../../protocol/actors) page captures the relationship between onchain records (actors) and offchain operators (servers). ```mermaid @@ -132,7 +132,7 @@ Make sure to replace `olshansky` with your username. You can generally do everything as the `root` user, but it's recommended to create a new user and give it sudo permissions. -This is necessary, in particular, if you want to use [homebrew](https://brew.sh/) [to install `poktrolld`](../user_guide/poktrolld_cli.md). +This is necessary, in particular, if you want to use [homebrew](https://brew.sh/) [to install `poktrolld`](../../tools/user_guide/poktrolld_cli.md). ```bash adduser poktroll @@ -190,7 +190,7 @@ sed -i -e s/NODE_HOSTNAME=/NODE_HOSTNAME=69.42.690.420/g .env You can generally do everything as the `root` user, but it's recommended to create a new user and give it sudo permissions. -This is necessary, in particular, if you want to use [homebrew](https://brew.sh/) [to install `poktrolld`](../user_guide/poktrolld_cli.md). +This is necessary, in particular, if you want to use [homebrew](https://brew.sh/) [to install `poktrolld`](../../tools/user_guide/poktrolld_cli.md). You can create a new user (e.g. poktroll), provide sudo permissions and switch users like so: @@ -216,7 +216,7 @@ poktroll ALL=(ALL) NOPASSWD:ALL :::warning The Alpha TestNet currently requires manual steps to sync the node to the latest block. Please find the affected block(s) -in [this document](../../protocol/upgrades/upgrade_list.md), which leads to the manual upgrade instructions. +in [this document](../upgrades/upgrade_list.md), which leads to the manual upgrade instructions. ::: _Note: You may need to replace `docker compose` with `docker-compose` if you are diff --git a/docusaurus/docs/operate/run_a_node/full_node_docker.md b/docusaurus/docs/operate/walkthroughs/full_node_docker.md similarity index 92% rename from docusaurus/docs/operate/run_a_node/full_node_docker.md rename to docusaurus/docs/operate/walkthroughs/full_node_docker.md index 5f70de6ce..3fb180cf4 100644 --- a/docusaurus/docs/operate/run_a_node/full_node_docker.md +++ b/docusaurus/docs/operate/walkthroughs/full_node_docker.md @@ -52,11 +52,11 @@ This guide outlines how to configure, deploy and maintain Full Nodes. ## Hardware requirements -Please see the [Hardware Requirements](./hardware_requirements.md#validator--full-node) page. +Please see the [Hardware Requirements](../configs/hardware_requirements.md#validator--full-node) page. ## Docker Compose Example -Please refer to the `Deploying a Full Node` section in [Docker Compose Walkthrough](../quickstart/docker_compose_walkthrough.md) +Please refer to the `Deploying a Full Node` section in [Docker Compose Walkthrough](../walkthroughs/docker_compose_walkthrough.md) on how to deploy a Full Node using `docker-compose`. ## Kubernetes Example diff --git a/docusaurus/docs/operate/run_a_node/full_node_walkthrough.md b/docusaurus/docs/operate/walkthroughs/full_node_walkthrough.md similarity index 50% rename from docusaurus/docs/operate/run_a_node/full_node_walkthrough.md rename to docusaurus/docs/operate/walkthroughs/full_node_walkthrough.md index 44ab1e221..26aea9883 100644 --- a/docusaurus/docs/operate/run_a_node/full_node_walkthrough.md +++ b/docusaurus/docs/operate/walkthroughs/full_node_walkthrough.md @@ -1,63 +1,50 @@ --- title: Full Node Walkthrough -sidebar_position: 2 +sidebar_position: 1 --- -## Run a Full Node Using Systemd & Cosmovisor +**πŸ§‘β€πŸ”¬ detailed step-by-step instructions to get you up and running with a `Full Node` on Pocket Network βœ…** -This walkthrough provides a detailed step-by-step instructions to install and -configure a Pocket Network Full Node from scratch. +:::warning This is an in-depth walkthrough -:::tip - -If you're comfortable using an automated scripts, or simply want to _copy-pasta_ a -few commands to get started, check out the [Full Node Cheat Sheet](../quickstart/full_node_cheatsheet.md). +See the [Full Node Cheat Sheet](../cheat_sheets/full_node_cheatsheet.md) if you want to just copy-pasta a few commands. ::: -- [Introduction](#introduction) -- [Pre-Requisites](#pre-requisites) -- [1. Install Dependencies](#1-install-dependencies) -- [2. Create a New User](#2-create-a-new-user) -- [3. Set Up Environment Variables for Cosmovisor](#3-set-up-environment-variables-for-cosmovisor) -- [4. Install Cosmovisor](#4-install-cosmovisor) -- [5. Install `poktrolld`](#5-install-poktrolld) -- [6. Retrieve the latest genesis file](#6-retrieve-the-latest-genesis-file) -- [7. Network Configuration](#7-network-configuration) -- [8. Set Up `systemd` Service](#8-set-up-systemd-service) -- [9. Configure your Firewall](#9-configure-your-firewall) -- [FAQ \& Troubleshooting](#faq--troubleshooting) - - [How do I check the node is accessible from another machine?](#how-do-i-check-the-node-is-accessible-from-another-machine) - - [How do I view the node status?](#how-do-i-view-the-node-status) - - [How do I view the node logs?](#how-do-i-view-the-node-logs) - - [How do I stop my node?](#how-do-i-stop-my-node) - - [How do I start my node?](#how-do-i-start-my-node) - - [How do I restart my node?](#how-do-i-restart-my-node) - - [How do I query the latest block (i.e. check the node height)?](#how-do-i-query-the-latest-block-ie-check-the-node-height) - - [How do I access my CometBFT endpoint externally?](#how-do-i-access-my-cometbft-endpoint-externally) - - [How do I check the node version?](#how-do-i-check-the-node-version) - - [How do I check the Cosmosvisor directory structure?](#how-do-i-check-the-cosmosvisor-directory-structure) - - [How do I check if an upgrade is available?](#how-do-i-check-if-an-upgrade-is-available) - - [How do I view node configuration?](#how-do-i-view-node-configuration) - -### Introduction - -This guide will help you install a Full Node for Pocket Network, from scratch, manually, -**giving you control over each step of the process**. +--- -Running a Full Node is the first step toward becoming a Validator, Supplier, or Gateway. +## Table of Contents + +- [Introduction - why run a Full Node?](#introduction---why-run-a-full-node) +- [Pre-Requisites \& Requirements](#pre-requisites--requirements) +- [Instructions](#instructions) + - [1. Install Dependencies](#1-install-dependencies) + - [2. Create a New User](#2-create-a-new-user) + - [3. Set Up Environment Variables for Cosmovisor](#3-set-up-environment-variables-for-cosmovisor) + - [4. Install Cosmovisor](#4-install-cosmovisor) + - [5. Install `poktrolld`](#5-install-poktrolld) + - [6. Retrieve the latest genesis file](#6-retrieve-the-latest-genesis-file) + - [7. Network Configuration](#7-network-configuration) + - [8. Set Up `systemd` Service](#8-set-up-systemd-service) + - [9. Configure your Firewall](#9-configure-your-firewall) + +## Introduction - why run a Full Node? -These instructions are **intended to be run on a Linux machine**. +This guide will guide through, step-by-step, through running a Full Node for Pocket Network. + +Running a Full Node is the first step toward becoming a Validator, Supplier, or Gateway. The instructions outlined here use [Cosmovisor](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) to enable automatic binary upgrades. -### Pre-Requisites +## Pre-Requisites & Requirements 1. **Linux-based System**: Preferably Debian-based distributions. 2. **Root or Sudo Access**: Administrative privileges are required. 3. **Dedicated Server or Virtual Machine**: Any provider is acceptable. +## Instructions + ### 1. Install Dependencies Update your package list and install necessary dependencies: @@ -89,7 +76,7 @@ sudo su - poktroll ### 3. Set Up Environment Variables for Cosmovisor -Create a `.poktrollrc` file and set environment variables: +Create a `.poktrollrc` file and set the following environment variables: ```bash touch ~/.poktrollrc @@ -106,15 +93,14 @@ source ~/.profile ### 4. Install Cosmovisor -:::info -Instead of following the instructions below, you can follow the [official cosmovisor installation instructions](https://docs.cosmos.network/main/build/tooling/cosmovisor#installation). -::: +**Option 1**: You can follow the official Cosmovisor installation instructions [here](https://docs.cosmos.network/main/build/tooling/cosmovisor#installation). -Download and install Cosmovisor: +**Option 2**: You can simply copy-paste the following commands to download and install Cosmovisor: ```bash mkdir -p $HOME/.local/bin COSMOVISOR_VERSION="v1.6.0" + ARCH=$(uname -m) if [ "$ARCH" = "x86_64" ]; then ARCH="amd64" @@ -130,7 +116,7 @@ source ~/.profile ### 5. Install `poktrolld` -Follow the instructions in the [CLI Installation Guide](../user_guide/poktrolld_cli.md) page to install `poktrolld`. +Follow the instructions in the [poktrolld Installation Guide](../../tools/user_guide/poktrolld_cli.md) page to install `poktrolld`. Create a symlink of the binary so Comosvisor knows where to find it: @@ -160,7 +146,10 @@ curl -s -o $HOME/.poktroll/config/genesis.json "$GENESIS_URL" :::note You may see a message saying `genesis.json file already exists`. -This is expected since we downloaded the genesis file in Step 5. The initialization will still complete successfully and set up the required configuration files. +This is expected since we downloaded the genesis file in one of the steps above. + +The initialization will still complete successfully and set up the required configuration files. + ::: Run the following commands to configure your network environment appropriately: @@ -243,112 +232,3 @@ This may involve one or more of the following: ```bash nc -vz {EXTERNAL_IP} 26656 ``` - -### FAQ & Troubleshooting - -#### How do I check the node is accessible from another machine? - -```bash -nc -vz {EXTERNAL_IP} 26656 -``` - -#### How do I view the node status? - -```bash -sudo systemctl status cosmovisor.service -``` - -#### How do I view the node logs? - -```bash -sudo journalctl -u cosmovisor.service -f -``` - -#### How do I stop my node? - -```bash -sudo systemctl stop cosmovisor.service -``` - -#### How do I start my node? - -```bash -sudo systemctl start cosmovisor.service -``` - -#### How do I restart my node? - -```bash -sudo systemctl restart cosmovisor.service -``` - -#### How do I query the latest block (i.e. check the node height)? - -Using poktrolld: - -```bash -poktrolld query block --type=height --node http://localhost:26657 -``` - -Or, using curl: - -```bash -curl -X GET http://localhost:26657/block | jq -``` - -#### How do I access my CometBFT endpoint externally? - -The default CometBFT port is at `26657`. - -To make it accessible externally, you'll need to port all the instructions from -port `26656` on this page to port `26657`. Specifically: - -```bash -# Update your firewall -sudo ufw allow 26657/tcp - -# Alternatively, if ufw is not available, update your iptables -sudo iptables -A INPUT -p tcp --dport 26657 -j ACCEPT - -# Update your Cosmovisor config -sed -i 's|laddr = "tcp://127.0.0.1:26657"|laddr = "tcp://0.0.0.0:26657"|' $HOME/.poktroll/config/config.toml -sed -i 's|cors_allowed_origins = \[\]|cors_allowed_origins = ["*"]|' $HOME/.poktroll/config/config.toml - -# Restart the service -sudo systemctl restart cosmovisor.service - -# Test the connection -nc -vz {EXTERNAL_IP} 26657 -``` - -Learn more [here](https://docs.cometbft.com/main/rpc/). - -:::warning - -Be careful about making this public as adversarial actors may try to DDoS your node. - -::: - -#### How do I check the node version? - -```bash -poktrolld version -``` - -#### How do I check the Cosmosvisor directory structure? - -```bash -ls -la /home/poktroll/.poktroll/cosmovisor/ -``` - -#### How do I check if an upgrade is available? - -```bash -ls -la /home/poktroll/.poktroll/cosmovisor/upgrades/ -``` - -#### How do I view node configuration? - -```bash -cat /home/poktroll/.poktroll/config/config.toml -``` diff --git a/docusaurus/docs/operate/run_a_node/gateway_walkthrough.md b/docusaurus/docs/operate/walkthroughs/gateway_walkthrough.md similarity index 87% rename from docusaurus/docs/operate/run_a_node/gateway_walkthrough.md rename to docusaurus/docs/operate/walkthroughs/gateway_walkthrough.md index 209feb137..43e49b821 100644 --- a/docusaurus/docs/operate/run_a_node/gateway_walkthrough.md +++ b/docusaurus/docs/operate/walkthroughs/gateway_walkthrough.md @@ -32,11 +32,11 @@ This ensures the necessary infrastructure for blockchain communication is in pla ## Hardware requirements -Please see the [Hardware Requirements](./hardware_requirements.md#path-gateway) page. +Please see the [Hardware Requirements](../configs/hardware_requirements.md#path-gateway) page. ## Docker Compose Example -Please refer to the `Deploying a PATH Gateway` section in [Docker compose walkthrough](../quickstart/docker_compose_walkthrough#d-creating-a-gateway-deploying-a-path-gateway) +Please refer to the `Deploying a PATH Gateway` section in [Docker compose walkthrough](../../operate/walkthroughs/docker_compose_walkthrough.md) for detailed instructions on how to deploy a `PATH Gateway` using `docker-compose`. ## Kubernetes Example diff --git a/docusaurus/docs/operate/run_a_node/supplier_walkthrough.md b/docusaurus/docs/operate/walkthroughs/supplier_walkthrough.md similarity index 88% rename from docusaurus/docs/operate/run_a_node/supplier_walkthrough.md rename to docusaurus/docs/operate/walkthroughs/supplier_walkthrough.md index ea46f5749..b56cc424e 100644 --- a/docusaurus/docs/operate/run_a_node/supplier_walkthrough.md +++ b/docusaurus/docs/operate/walkthroughs/supplier_walkthrough.md @@ -33,11 +33,11 @@ This ensures the necessary infrastructure for blockchain communication is in pla ## Hardware requirements -Please see the [Hardware Requirements](./hardware_requirements.md#relayminer) page. +Please see the [Hardware Requirements](../configs/hardware_requirements.md#relayminer) page. ## Docker Compose Example -Please refer to the `Deploying a RelayMiner` section in [Docker compose walkthrough](../quickstart/docker_compose_walkthrough#b-creating-a-supplier-and-deploying-a-relayminer) +Please refer to the `Deploying a RelayMiner` section in [Docker compose walkthrough](../../operate/walkthroughs/docker_compose_walkthrough.md) for detailed instructions on how to deploy a `RelayMiner` using `docker-compose`. _TODO_DOCUMENT: Move over the relevant information from the `poktroll-docker-compose-example` repository into the docs_ diff --git a/docusaurus/docs/operate/run_a_node/validator_walkthrough.md b/docusaurus/docs/operate/walkthroughs/validator_walkthrough.md similarity index 84% rename from docusaurus/docs/operate/run_a_node/validator_walkthrough.md rename to docusaurus/docs/operate/walkthroughs/validator_walkthrough.md index 6c8842f52..753075f98 100644 --- a/docusaurus/docs/operate/run_a_node/validator_walkthrough.md +++ b/docusaurus/docs/operate/walkthroughs/validator_walkthrough.md @@ -12,7 +12,7 @@ This walkthrough provides a detailed step-by-step instructions to run a validato :::tip If you're comfortable using an automated scripts, or simply want to _copy-pasta_ a -few commands to get started, check out the [Validator Cheat Sheet](../quickstart/validator_cheatsheet.md). +few commands to get started, check out the [Validator Cheat Sheet](../cheat_sheets/validator_cheatsheet.md) instead. ::: @@ -26,4 +26,4 @@ This guide will help you install a Validator on Pocket Network, from scratch, ma ## Pre-Requisites -1. **Run a Full Node**: Make sure you have followed the [Full Node Walkthrough](../run_a_node/full_node_walkthrough.md) to install and run a Full Node first +1. **Run a Full Node**: Make sure you have followed the [Full Node Walkthrough](full_node_walkthrough.md) to install and run a Full Node first diff --git a/docusaurus/docs/protocol/actors/_category_.json b/docusaurus/docs/protocol/actors/_category_.json index 72bcbd38d..68ee2cc75 100644 --- a/docusaurus/docs/protocol/actors/_category_.json +++ b/docusaurus/docs/protocol/actors/_category_.json @@ -1,5 +1,5 @@ { - "label": "Actors", + "label": "Protocol Actors", "position": 1, "link": { "type": "generated-index", diff --git a/docusaurus/docs/protocol/governance/params.md b/docusaurus/docs/protocol/governance/params.md index 1b51f5147..569a48f81 100644 --- a/docusaurus/docs/protocol/governance/params.md +++ b/docusaurus/docs/protocol/governance/params.md @@ -1,9 +1,9 @@ --- -title: Pocket Network Governance Params +title: Governance Params sidebar_position: 1 --- -# Governance Parameters +## Governance Parameters :::warning DO NOT EDIT: this file was generated by make docs_update_gov_params_page @@ -25,27 +25,26 @@ Please follow the instructions in [this guide](../../develop/developer_guide/add ## Parameters - -|Module | Field Type | Field Name |Comment | -|-------|------------|------------|--------| -| `application` | `uint64` | `max_delegated_gateways` | max_delegated_gateways defines the maximum number of gateways that a single application can delegate to. This is used to prevent performance issues in case the relay ring signature becomes too large. | -| `application` | `cosmos.base.v1beta1.Coin` | `min_stake` | min_stake is the minimum stake in upokt that an application must have to remain staked. | -| `gateway` | `cosmos.base.v1beta1.Coin` | `min_stake` | min_stake is the minimum amount of uPOKT that a gateway must stake. | -| `proof` | `cosmos.base.v1beta1.Coin` | `proof_missing_penalty` | proof_missing_penalty is the number of tokens (uPOKT) which should be slashed from a supplier when a proof is required (either via proof_requirement_threshold or proof_missing_penalty) but is not provided. TODO_MAINNET: Consider renaming this to `proof_missing_penalty_upokt`. | -| `proof` | `double` | `proof_request_probability` | proof_request_probability is the probability of a session requiring a proof if it's cost (i.e. compute unit consumption) is below the ProofRequirementThreshold. | -| `proof` | `cosmos.base.v1beta1.Coin` | `proof_requirement_threshold` | proof_requirement_threshold is the session cost (i.e. compute unit consumption) threshold which asserts that a session MUST have a corresponding proof when its cost is equal to or above the threshold. This is in contrast to the this requirement being determined probabilistically via ProofRequestProbability. TODO_MAINNET: Consider renaming this to `proof_requirement_threshold_upokt`. | -| `proof` | `cosmos.base.v1beta1.Coin` | `proof_submission_fee` | proof_submission_fee is the number of tokens (uPOKT) which should be paid by the supplier operator when submitting a proof. This is needed to account for the cost of storing proofs onchain and prevent spamming (i.e. sybil bloat attacks) the network with non-required proofs. TODO_MAINNET: Consider renaming this to `proof_submission_fee_upokt`. | -| `service` | `cosmos.base.v1beta1.Coin` | `add_service_fee` | The amount of uPOKT required to add a new service. This will be deducted from the signer's account balance, and transferred to the pocket network foundation. | -| `session` | `uint64` | `num_suppliers_per_session` | num_suppliers_per_session is the maximun number of suppliers per session (applicaiton:supplier pair for a given session number). | -| `shared` | `uint64` | `application_unbonding_period_sessions` | application_unbonding_period_sessions is the number of sessions that an application must wait after unstaking before their staked assets are moved to their account balance. Onchain business logic requires, and ensures, that the corresponding block count of the application unbonding period will exceed the end of its corresponding proof window close height. | -| `shared` | `uint64` | `claim_window_close_offset_blocks` | claim_window_close_offset_blocks is the number of blocks after the claim window open height, at which the claim window closes. | -| `shared` | `uint64` | `claim_window_open_offset_blocks` | claim_window_open_offset_blocks is the number of blocks after the session grace period height, at which the claim window opens. | -| `shared` | `uint64` | `compute_units_to_tokens_multiplier` | The amount of upokt that a compute unit should translate to when settling a session. DEV_NOTE: This used to be under x/tokenomics but has been moved here to avoid cyclic dependencies. | -| `shared` | `uint64` | `grace_period_end_offset_blocks` | grace_period_end_offset_blocks is the number of blocks, after the session end height, during which the supplier can still service payable relays. Suppliers will need to recreate a claim for the previous session (if already created) to get paid for the additional relays. | -| `shared` | `uint64` | `num_blocks_per_session` | num_blocks_per_session is the number of blocks between the session start & end heights. | -| `shared` | `uint64` | `proof_window_close_offset_blocks` | proof_window_close_offset_blocks is the number of blocks after the proof window open height, at which the proof window closes. | -| `shared` | `uint64` | `proof_window_open_offset_blocks` | proof_window_open_offset_blocks is the number of blocks after the claim window close height, at which the proof window opens. | -| `shared` | `uint64` | `supplier_unbonding_period_sessions` | supplier_unbonding_period_sessions is the number of sessions that a supplier must wait after unstaking before their staked assets are moved to their account balance. Onchain business logic requires, and ensures, that the corresponding block count of the unbonding period will exceed the end of any active claim & proof lifecycles. | -| `supplier` | `cosmos.base.v1beta1.Coin` | `min_stake` | min_stake is the minimum amount of uPOKT that a supplier must stake to be included in network sessions and remain staked. | -| `tokenomics` | `string` | `dao_reward_address` | dao_reward_address is the address to which mint_allocation_dao percentage of the minted tokens are at the end of claim settlement. | -| `tokenomics` | `MintAllocationPercentages` | `mint_allocation_percentages` | mint_allocation_percentages represents the distribution of newly minted tokens, at the end of claim settlement, as a result of the Global Mint TLM. | +| Module | Field Type | Field Name | Comment | +| ------------- | --------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `application` | `uint64` | `max_delegated_gateways` | max_delegated_gateways defines the maximum number of gateways that a single application can delegate to. This is used to prevent performance issues in case the relay ring signature becomes too large. | +| `application` | `cosmos.base.v1beta1.Coin` | `min_stake` | min_stake is the minimum stake in upokt that an application must have to remain staked. | +| `gateway` | `cosmos.base.v1beta1.Coin` | `min_stake` | min_stake is the minimum amount of uPOKT that a gateway must stake. | +| `proof` | `cosmos.base.v1beta1.Coin` | `proof_missing_penalty` | proof_missing_penalty is the number of tokens (uPOKT) which should be slashed from a supplier when a proof is required (either via proof_requirement_threshold or proof_missing_penalty) but is not provided. TODO_MAINNET: Consider renaming this to `proof_missing_penalty_upokt`. | +| `proof` | `double` | `proof_request_probability` | proof_request_probability is the probability of a session requiring a proof if it's cost (i.e. compute unit consumption) is below the ProofRequirementThreshold. | +| `proof` | `cosmos.base.v1beta1.Coin` | `proof_requirement_threshold` | proof_requirement_threshold is the session cost (i.e. compute unit consumption) threshold which asserts that a session MUST have a corresponding proof when its cost is equal to or above the threshold. This is in contrast to the this requirement being determined probabilistically via ProofRequestProbability. TODO_MAINNET: Consider renaming this to `proof_requirement_threshold_upokt`. | +| `proof` | `cosmos.base.v1beta1.Coin` | `proof_submission_fee` | proof_submission_fee is the number of tokens (uPOKT) which should be paid by the supplier operator when submitting a proof. This is needed to account for the cost of storing proofs onchain and prevent spamming (i.e. sybil bloat attacks) the network with non-required proofs. TODO_MAINNET: Consider renaming this to `proof_submission_fee_upokt`. | +| `service` | `cosmos.base.v1beta1.Coin` | `add_service_fee` | The amount of uPOKT required to add a new service. This will be deducted from the signer's account balance, and transferred to the pocket network foundation. | +| `session` | `uint64` | `num_suppliers_per_session` | num_suppliers_per_session is the maximun number of suppliers per session (application:supplier pair for a given session number). | +| `shared` | `uint64` | `application_unbonding_period_sessions` | application_unbonding_period_sessions is the number of sessions that an application must wait after unstaking before their staked assets are moved to their account balance. Onchain business logic requires, and ensures, that the corresponding block count of the application unbonding period will exceed the end of its corresponding proof window close height. | +| `shared` | `uint64` | `claim_window_close_offset_blocks` | claim_window_close_offset_blocks is the number of blocks after the claim window open height, at which the claim window closes. | +| `shared` | `uint64` | `claim_window_open_offset_blocks` | claim_window_open_offset_blocks is the number of blocks after the session grace period height, at which the claim window opens. | +| `shared` | `uint64` | `compute_units_to_tokens_multiplier` | The amount of upokt that a compute unit should translate to when settling a session. DEV_NOTE: This used to be under x/tokenomics but has been moved here to avoid cyclic dependencies. | +| `shared` | `uint64` | `grace_period_end_offset_blocks` | grace_period_end_offset_blocks is the number of blocks, after the session end height, during which the supplier can still service payable relays. Suppliers will need to recreate a claim for the previous session (if already created) to get paid for the additional relays. | +| `shared` | `uint64` | `num_blocks_per_session` | num_blocks_per_session is the number of blocks between the session start & end heights. | +| `shared` | `uint64` | `proof_window_close_offset_blocks` | proof_window_close_offset_blocks is the number of blocks after the proof window open height, at which the proof window closes. | +| `shared` | `uint64` | `proof_window_open_offset_blocks` | proof_window_open_offset_blocks is the number of blocks after the claim window close height, at which the proof window opens. | +| `shared` | `uint64` | `supplier_unbonding_period_sessions` | supplier_unbonding_period_sessions is the number of sessions that a supplier must wait after unstaking before their staked assets are moved to their account balance. Onchain business logic requires, and ensures, that the corresponding block count of the unbonding period will exceed the end of any active claim & proof lifecycles. | +| `supplier` | `cosmos.base.v1beta1.Coin` | `min_stake` | min_stake is the minimum amount of uPOKT that a supplier must stake to be included in network sessions and remain staked. | +| `tokenomics` | `string` | `dao_reward_address` | dao_reward_address is the address to which mint_allocation_dao percentage of the minted tokens are at the end of claim settlement. | +| `tokenomics` | `MintAllocationPercentages` | `mint_allocation_percentages` | mint_allocation_percentages represents the distribution of newly minted tokens, at the end of claim settlement, as a result of the Global Mint TLM. | diff --git a/docusaurus/docs/explore/_category_.json b/docusaurus/docs/tools/_category_.json similarity index 100% rename from docusaurus/docs/explore/_category_.json rename to docusaurus/docs/tools/_category_.json diff --git a/docusaurus/docs/tools/endpoints/_category_.json b/docusaurus/docs/tools/endpoints/_category_.json new file mode 100644 index 000000000..42be32e63 --- /dev/null +++ b/docusaurus/docs/tools/endpoints/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "RPC Endpoints", + "position": 2, + "link": { + "type": "generated-index", + "description": "RPC Endpoints" + } +} diff --git a/docusaurus/docs/explore/rpc.md b/docusaurus/docs/tools/endpoints/shannon_rpc.md similarity index 89% rename from docusaurus/docs/explore/rpc.md rename to docusaurus/docs/tools/endpoints/shannon_rpc.md index 5a407e2ce..b85486e4c 100644 --- a/docusaurus/docs/explore/rpc.md +++ b/docusaurus/docs/tools/endpoints/shannon_rpc.md @@ -1,5 +1,5 @@ --- -title: RPC Endpoints +title: Shannon RPC Endpoints sidebar_position: 3 --- @@ -10,6 +10,7 @@ sidebar_position: 3 - [Alpha TestNet](#alpha-testnet) - [Alpha RPC Endpoints](#alpha-rpc-endpoints) - [Alpha JSON-RPC Example](#alpha-json-rpc-example) +- [Genesis](#genesis) ## Types of RPC Endpoints @@ -62,3 +63,7 @@ Using the `poktrolld` binary: ```bash poktrolld query block --type=height 1 --node https://shannon-testnet-grove-seed-rpc.alpha.poktroll.com ``` + +## Genesis + +The genesis file for the Pocket Network is located at [pokt-network-genesis](https://github.com/pokt-network/pocket-network-genesis). diff --git a/docusaurus/docs/operate/user_guide/_category_.json b/docusaurus/docs/tools/tools/_category_.json similarity index 59% rename from docusaurus/docs/operate/user_guide/_category_.json rename to docusaurus/docs/tools/tools/_category_.json index 4f71de3e6..b8a7c0e2e 100644 --- a/docusaurus/docs/operate/user_guide/_category_.json +++ b/docusaurus/docs/tools/tools/_category_.json @@ -1,6 +1,6 @@ { - "label": "User Guide", - "position": 2, + "label": "Explorers, Faucets, Wallets, and More", + "position": 3, "link": { "type": "generated-index", "description": "poktrolld CLI documentation" diff --git a/docusaurus/docs/tools/tools/shannon_alpha.md b/docusaurus/docs/tools/tools/shannon_alpha.md new file mode 100644 index 000000000..6f351ed97 --- /dev/null +++ b/docusaurus/docs/tools/tools/shannon_alpha.md @@ -0,0 +1,9 @@ +--- +title: Alpha TestNet +sidebar_position: 1 +--- + +- πŸͺ™ [Token Faucet](https://faucet.alpha.testnet.pokt.network/) +- πŸ—ΊοΈ [Explorer](https://shannon.alpha.testnet.pokt.network) +- πŸ—ΊοΈ [POKTScan's Explorer](https://shannon-alpha.poktscan.com/) +- πŸ‘¨β€πŸ’» [POKTScan's GraphQL Playground](https://shannon-alpha-api.poktscan.com/) diff --git a/docusaurus/docs/tools/tools/shannon_beta.md b/docusaurus/docs/tools/tools/shannon_beta.md new file mode 100644 index 000000000..ccb7096f5 --- /dev/null +++ b/docusaurus/docs/tools/tools/shannon_beta.md @@ -0,0 +1,9 @@ +--- +title: Beta TestNet +sidebar_position: 1 +--- + +- πŸͺ™ [Token Faucet](https://faucet.beta.testnet.pokt.network/) +- πŸ—ΊοΈ [Explorer](https://shannon.beta.testnet.pokt.network) +- πŸ—ΊοΈ [POKTScan's Explorer](https://shannon-beta.poktscan.com/) +- πŸ‘¨β€πŸ’» [POKTScan's GraphQL Playground](https://shannon-beta-api.poktscan.com/) diff --git a/docusaurus/docs/tools/tools/source_code.md b/docusaurus/docs/tools/tools/source_code.md new file mode 100644 index 000000000..6b6fa5db8 --- /dev/null +++ b/docusaurus/docs/tools/tools/source_code.md @@ -0,0 +1,7 @@ +--- +title: Source Code +sidebar_position: 1 +--- + +- πŸ§‘β€πŸ’» [Shannon SDK](https://github.com/pokt-network/shannon-sdk) +- πŸ–₯️ [Shannon source code](https://github.com/pokt-network/poktroll) diff --git a/docusaurus/docs/tools/user_guide/_category_.json b/docusaurus/docs/tools/user_guide/_category_.json new file mode 100644 index 000000000..5d3ef69ee --- /dev/null +++ b/docusaurus/docs/tools/user_guide/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "poktrolld CLI", + "position": 1, + "link": { + "type": "generated-index", + "description": "User Guide for the poktrolld CLI" + } +} diff --git a/docusaurus/docs/operate/user_guide/app-transfer.md b/docusaurus/docs/tools/user_guide/app-transfer.md similarity index 99% rename from docusaurus/docs/operate/user_guide/app-transfer.md rename to docusaurus/docs/tools/user_guide/app-transfer.md index 12ca76b19..884564f80 100644 --- a/docusaurus/docs/operate/user_guide/app-transfer.md +++ b/docusaurus/docs/tools/user_guide/app-transfer.md @@ -1,6 +1,6 @@ --- -title: Application Transfer -sidebar_position: 5 +title: Application Stake Transfer +sidebar_position: 6 --- # Transferring an Application diff --git a/docusaurus/docs/operate/user_guide/check-balance.md b/docusaurus/docs/tools/user_guide/check-balance.md similarity index 99% rename from docusaurus/docs/operate/user_guide/check-balance.md rename to docusaurus/docs/tools/user_guide/check-balance.md index 60897ca22..40a19f0be 100644 --- a/docusaurus/docs/operate/user_guide/check-balance.md +++ b/docusaurus/docs/tools/user_guide/check-balance.md @@ -1,6 +1,6 @@ --- title: Balance check -sidebar_position: 3 +sidebar_position: 4 --- # Checking Your Wallet Account Balance diff --git a/docusaurus/docs/operate/user_guide/create-new-wallet.md b/docusaurus/docs/tools/user_guide/create-new-wallet.md similarity index 100% rename from docusaurus/docs/operate/user_guide/create-new-wallet.md rename to docusaurus/docs/tools/user_guide/create-new-wallet.md diff --git a/docusaurus/docs/operate/user_guide/poktrolld_cli.md b/docusaurus/docs/tools/user_guide/poktrolld_cli.md similarity index 98% rename from docusaurus/docs/operate/user_guide/poktrolld_cli.md rename to docusaurus/docs/tools/user_guide/poktrolld_cli.md index 9ca5431b9..2f95d20f5 100644 --- a/docusaurus/docs/operate/user_guide/poktrolld_cli.md +++ b/docusaurus/docs/tools/user_guide/poktrolld_cli.md @@ -1,6 +1,6 @@ --- -title: poktrolld CLI Installation -sidebar_position: 0 +title: poktrolld Installation +sidebar_position: 1 --- :::warning diff --git a/docusaurus/docs/operate/user_guide/recover-with-mnemonic.md b/docusaurus/docs/tools/user_guide/recover-with-mnemonic.md similarity index 99% rename from docusaurus/docs/operate/user_guide/recover-with-mnemonic.md rename to docusaurus/docs/tools/user_guide/recover-with-mnemonic.md index 6343667f9..c6b13ff19 100644 --- a/docusaurus/docs/operate/user_guide/recover-with-mnemonic.md +++ b/docusaurus/docs/tools/user_guide/recover-with-mnemonic.md @@ -1,6 +1,6 @@ --- title: Mnemonic Seed Phrase Recovery -sidebar_position: 2 +sidebar_position: 3 --- # Recovering an Account from a Mnemonic Seed Phrase diff --git a/docusaurus/docs/operate/user_guide/send-tokens.md b/docusaurus/docs/tools/user_guide/send-tokens.md similarity index 99% rename from docusaurus/docs/operate/user_guide/send-tokens.md rename to docusaurus/docs/tools/user_guide/send-tokens.md index 6d3c5676c..898e4789c 100644 --- a/docusaurus/docs/operate/user_guide/send-tokens.md +++ b/docusaurus/docs/tools/user_guide/send-tokens.md @@ -1,6 +1,6 @@ --- title: Send tokens -sidebar_position: 4 +sidebar_position: 5 --- # Sending Tokens Between Accounts diff --git a/docusaurus/docusaurus.config.js b/docusaurus/docusaurus.config.js index 288e013b8..89c43ab15 100644 --- a/docusaurus/docusaurus.config.js +++ b/docusaurus/docusaurus.config.js @@ -83,14 +83,13 @@ const config = { ({ docs: { sidebar: { - hideable: false, - autoCollapseCategories: false, + hideable: true, + autoCollapseCategories: true, }, }, - // image: "img/docusaurus-social-card.jpg", style: "dark", navbar: { - title: "Pocket Network", + // title: "Pocket Network", logo: { alt: "Pocket Network Logo", src: "img/logo.png", @@ -100,25 +99,25 @@ const config = { type: "docSidebar", position: "left", sidebarId: "operateSidebar", - label: "βš™οΈ Operate", + label: "βš™οΈ Guides & Deployment", }, { type: "docSidebar", position: "left", - sidebarId: "developSidebar", - label: "πŸ’» Develop", + sidebarId: "toolsSidebar", + label: "πŸ—Ί Tools & Explorers", }, { type: "docSidebar", position: "left", - sidebarId: "protocolSidebar", - label: "🧠 Protocol", + sidebarId: "developSidebar", + label: "πŸ§‘β€πŸ’»οΈ Core Developers", }, { type: "docSidebar", position: "left", - sidebarId: "exploreSidebar", - label: "πŸ—Ί Explore", + sidebarId: "protocolSidebar", + label: "🧠 Protocol Specification", }, ], }, diff --git a/docusaurus/sidebars.js b/docusaurus/sidebars.js index 1984be244..3090a3837 100644 --- a/docusaurus/sidebars.js +++ b/docusaurus/sidebars.js @@ -20,10 +20,10 @@ const sidebars = { dirName: "protocol", }, ], - exploreSidebar: [ + toolsSidebar: [ { type: "autogenerated", - dirName: "explore", + dirName: "tools", }, ], }; diff --git a/docusaurus/static/img/logo-large-white.png b/docusaurus/static/img/logo-large-white.png new file mode 100644 index 000000000..c59c8f885 Binary files /dev/null and b/docusaurus/static/img/logo-large-white.png differ diff --git a/docusaurus/static/img/logo-large.png b/docusaurus/static/img/logo-large.png new file mode 100644 index 000000000..f8e8a7d3a Binary files /dev/null and b/docusaurus/static/img/logo-large.png differ diff --git a/docusaurus/static/img/logo-monochrome-black.png b/docusaurus/static/img/logo-monochrome-black.png new file mode 100644 index 000000000..0a2deb17e Binary files /dev/null and b/docusaurus/static/img/logo-monochrome-black.png differ diff --git a/docusaurus/static/img/logo-monochrome-white.png b/docusaurus/static/img/logo-monochrome-white.png new file mode 100644 index 000000000..2bc6495ba Binary files /dev/null and b/docusaurus/static/img/logo-monochrome-white.png differ diff --git a/docusaurus/static/img/logo.png b/docusaurus/static/img/logo.png index 3ccb91ef1..c59c8f885 100644 Binary files a/docusaurus/static/img/logo.png and b/docusaurus/static/img/logo.png differ diff --git a/tools/installer/full-node.sh b/tools/installer/full-node.sh index f6c2abdb0..0ebcba9c0 100644 --- a/tools/installer/full-node.sh +++ b/tools/installer/full-node.sh @@ -26,29 +26,107 @@ check_root() { fi } -# Function to install jq if not installed -install_jq() { - if ! command -v jq &>/dev/null; then - print_color $YELLOW "Installing jq..." - if [ -f /etc/debian_version ]; then - apt-get update - apt-get install -y jq - elif [ -f /etc/redhat-release ]; then - yum update -y - yum install -y jq +# Function to get and normalize architecture +get_normalized_arch() { + local arch + arch=$(uname -m) + + if [ "$arch" = "x86_64" ]; then + echo "amd64" + elif [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then + echo "arm64" + else + print_color $RED "Unsupported architecture: $arch" + exit 1 + fi +} + +check_os() { + local os + os=$(uname -s) + + if [ "$os" = "Darwin" ]; then + print_color $RED "This script is not supported on macOS/Darwin." + print_color $RED "Please use a Linux distribution." + exit 1 + fi +} + +get_os_type() { + uname_out="$(uname -s)" + + if [ "$uname_out" = "Linux" ]; then + echo "linux" + elif [ "$uname_out" = "Darwin" ]; then + echo "darwin" + else + echo "unsupported" + fi +} + +# Function to check and install dependencies +install_dependencies() { + local missing_deps=0 + local deps=("jq" "curl" "tar" "wget") + local to_install=() + + print_color $YELLOW "About to start installing dependencies..." + + # Check which dependencies are missing + for dep in "${deps[@]}"; do + if ! command -v "$dep" &>/dev/null; then + print_color $YELLOW "$dep is not installed." + to_install+=("$dep") + ((missing_deps++)) else - print_color $RED "Unsupported distribution. Please install jq manually." - exit 1 + print_color $GREEN "$dep is already installed." fi - print_color $GREEN "jq installed successfully." + done + + # If no dependencies are missing, we're done + if [ $missing_deps -eq 0 ]; then + print_color $GREEN "All dependencies are already installed." + return 0 + fi + + # Try to install missing dependencies + print_color $YELLOW "Installing missing dependencies: ${to_install[*]}" + + if [ -f /etc/debian_version ]; then + apt-get update + apt-get install -y "${to_install[@]}" + elif [ -f /etc/redhat-release ]; then + yum update -y + yum install -y "${to_install[@]}" else - print_color $YELLOW "jq is already installed." + print_color $RED "Unsupported distribution. Please install ${to_install[*]} manually." + return 1 fi + + # Verify all dependencies were installed successfully + missing_deps=0 + for dep in "${to_install[@]}"; do + if ! command -v "$dep" &>/dev/null; then + print_color $RED "Failed to install $dep" + ((missing_deps++)) + else + print_color $GREEN "$dep installed successfully." + fi + done + + if [ $missing_deps -gt 0 ]; then + print_color $RED "Some dependencies failed to install." + return 1 + fi + + print_color $GREEN "All dependencies installed successfully." + return 0 } # Function to get user input get_user_input() { # Ask user which network to install + echo "" echo "Which network would you like to install?" echo "1) testnet-alpha (unstable)" echo "2) testnet-beta (recommended)" @@ -66,7 +144,9 @@ get_user_input() { esac print_color $GREEN "Installing the $NETWORK network." + echo "" + print_color $YELLOW "(NOTE: If you're on a macOS, enter the name of an existing user)" read -p "Enter the desired username to run poktrolld (default: poktroll): " POKTROLL_USER POKTROLL_USER=${POKTROLL_USER:-poktroll} @@ -92,6 +172,7 @@ get_user_input() { print_color $RED "Failed to extract chain_id from genesis file." exit 1 fi + echo "" print_color $GREEN "Using chain_id: $CHAIN_ID from genesis file" # Fetch seeds from the provided URL @@ -108,6 +189,7 @@ get_user_input() { read -p "Enter custom seeds: " custom_seeds SEEDS=${custom_seeds:-$SEEDS} fi + echo "" } # Function to create user @@ -129,22 +211,6 @@ create_user() { fi } -# Function to install dependencies -install_dependencies() { - print_color $YELLOW "Installing dependencies..." - if [ -f /etc/debian_version ]; then - apt-get update - apt-get install -y curl tar wget - elif [ -f /etc/redhat-release ]; then - yum update -y - yum install -y curl tar wget - else - print_color $RED "Unsupported distribution. Please install curl, tar and wget manually." - exit 1 - fi - print_color $GREEN "Dependencies installed successfully." -} - # TODO_TECHDEBT(@okdas): Use `.poktrollrc` across the board to create a clean # separation of concerns for pocket specific configurations and debugging. # Function to set up environment variables @@ -159,23 +225,23 @@ setup_env_vars() { source \$HOME/.profile EOF print_color $GREEN "Environment variables set up successfully." + echo "" } # Function to download and set up Cosmovisor setup_cosmovisor() { print_color $YELLOW "Setting up Cosmovisor..." - ARCH=$(uname -m) - if [ "$ARCH" = "x86_64" ]; then - ARCH="amd64" - elif [ "$ARCH" = "aarch64" ]; then - ARCH="arm64" - else - print_color $RED "Unsupported architecture: $ARCH" + + ARCH=$(get_normalized_arch) + + if [ "$OS_TYPE" = "unsupported" ]; then + echo "Unsupported OS: $(uname -s)" exit 1 fi COSMOVISOR_VERSION="v1.6.0" COSMOVISOR_URL="https://github.com/cosmos/cosmos-sdk/releases/download/cosmovisor%2F${COSMOVISOR_VERSION}/cosmovisor-${COSMOVISOR_VERSION}-linux-${ARCH}.tar.gz" + print_color $YELLOW "Attempting to download from: $COSMOVISOR_URL" sudo -u "$POKTROLL_USER" bash < +## Governance Parameters :::warning DO NOT EDIT: this file was generated by make docs_update_gov_params_page ::: -- [Access Control](#access-control) -- [Updating governance parameter values](#updating-governance-parameter-values) - [Updating this page](#updating-this-page) - [Adding a new parameter](#adding-a-new-parameter) - [Parameters](#parameters) @@ -27,7 +25,7 @@ Please follow the instructions in [this guide](../../develop/developer_guide/add ## Parameters +| Module | Field Type | Field Name | Comment | +| ------ | ---------- | ---------- | ------- | -|Module | Field Type | Field Name |Comment | -|-------|------------|------------|--------| -{{.}} \ No newline at end of file +{{.}}