Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial #49

Merged
merged 13 commits into from
Aug 12, 2024
11 changes: 0 additions & 11 deletions pages/community/resources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,3 @@
- https://www.youtube.com/watch?v=aPCvTVFUynA

## Community Guides

- **Deploying a worker node**
- https://rejump.dev/how-to-worker-node-on-allora-network/
- https://github.com/0xmoei/allora-testnet

- **Troubleshooting a worker node**
- https://medium.com/@casual1st/allora-worker-node-tshoot-655f46d9165d

- **Worker node migration (Testnet v2)**
- https://medium.com/@nodescribe/allora-worker-node-step-by-step-guide-ccb29d90e01f
- https://github.com/casual1st/alloraworkersetup/blob/main/testnetmigrator.sh
10 changes: 0 additions & 10 deletions pages/devs/consumers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,3 @@ Consumers are all-encompassing actors that consume inferences on the Allora Netw

### Consumer Contracts
Consumer contracts are blockchain-deployed contracts that consume inferences. These smart contracts automatically interact with the network to retrieve inference data and use it within their logic. For example, a decentralized finance (DeFi) application might use consumer contracts to obtain and act upon real-time price predictions for cryptocurrencies.

## Unsafe Requests
While the Allora Network provides a secure and accurate means of generating and consuming inferences, some consumers may opt for off-chain, direct requests to workers. These are known as unsafe requests, and they have several drawbacks.

**Risks Involved**:

- Workers can alter or disable the request at any time, disrupting the data flow.
- Returned inferences from such requests are not graded and might not match the inferences submitted on-chain.
- The self-improving properties of the Allora Network, which ensure the accuracy and quality of network inferences, are absent in these requests. Consequently, the inferences are unlikely to be as reliable as those found on-chain.

1 change: 0 additions & 1 deletion pages/devs/consumers/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"offchain-query-existing-topics": "How to Query Existing Workers Off-Chain",
"onchain-query-existing-data": "How to Query Topic Data On-Chain",
"consumer-contracts": "Consumer Contracts",
"existing-consumers": "Existing Consumers",
Expand Down
101 changes: 0 additions & 101 deletions pages/devs/consumers/offchain-query-existing-topics.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion pages/devs/consumers/walkthrough-use-topic-inference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Follow these instructions to bring the most recent inference data on-chain for a
## Step by Step Guide:

1. Create an Upshot API key by [creating an account](https://developer.upshot.xyz/signup).
2. Call the Consumer Inference API using the `topicId` found in the [deployed topics list](/devs/getting-started/existing-topics) and the correct chainId. For example, if you use sepolia, you would provide `ethereum-11155111`.
2. Call the Consumer Inference API using the `topicId` found in the [deployed topics list](/devs/get-started/existing-topics) and the correct chainId. For example, if you use sepolia, you would provide `ethereum-11155111`.

```shell
curl -X 'GET' --url 'https://api.upshot.xyz/v2/allora/consumer/<chainId>?allora_topic_id=<topicId>' -H 'accept: application/json' -H 'x-api-key: <apiKey>'
Expand Down
27 changes: 18 additions & 9 deletions pages/devs/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,31 @@ Allora is a decentralized network that leverages the power of collective partici

Here are the main repositories you'll need to get started with Allora:

### Allora Inference Base
### Allora Offchain Node

The [Allora Inference Base Image](https://github.com/allora-network/allora-inference-base) allows model providers to participate in the Allora network. This repo is the base for worker nodes (for providing inferences) and head nodes (which coordinate requests and aggregate results).
The [Allora Offchain Node](https://github.com/allora-network/allora-offchain-node) allows inference and data providers to participate in the Allora network. This repo is the base for both forecast and inference worker nodes, as well as reputers.

### Allora Chain
#### Workers
- [Deploy a Worker](/devs/workers/deploy-worker/build-and-deploy-worker-from-scratch)

The [Allora chain](https://github.com/allora-network/allora-chain) is a Cosmos Hub chain that forms the core of the Allora network. This repository contains the blockchain's codebase and is useful for validators.
##### Walkthroughs

You can use the [Allorad CLI tool](/devs/get-started/installation/cli) to query the chain and make transactions.
- [Basic Coin Prediction Worker](/devs/workers/walkthroughs/walkthrough-price-prediction-worker)
- [Hugging Face Worker](/devs/workers/walkthroughs/walkthrough-hugging-face-worker)

#### Reputers

- [Deploy a Reputer](/devs/reputers/reputers)

### Worker Repositories
##### Walkthroughs

The Hugging Face and Price Prediction worker examples below show how to provide inferences for different topics on Allora.
- [Coin Prediction Reputer](/devs/reputers/coin-prediction-reputer)

- [Hugging Face](https://github.com/allora-network/allora-huggingface-walkthrough)
- [Price Prediction](https://github.com/allora-network/basic-coin-prediction-node)
### Allora Chain

The [Allora chain](https://github.com/allora-network/allora-chain) is a Cosmos Hub chain that forms the core of the Allora network. This repository contains the blockchain's codebase and is useful for validators.

You can use the [Allorad CLI tool](/devs/get-started/installation/cli) to query the chain and make transactions.

### Allora Consumer Contracts

Expand Down
2 changes: 1 addition & 1 deletion pages/devs/get-started/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"setup-wallet": "Setup Wallet",
"installation": "Installation",
"cli": "Installation",
"basic-usage": "Basic Usage",
"existing-topics": "Existing Topics"
}
6 changes: 0 additions & 6 deletions pages/devs/get-started/basic-usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ The Allora Network is a sophisticated ecosystem designed to facilitate various p

Despite the complexities involved in the setup and operation of different participants, interacting with the Allora Network on a basic level is straightforward. Here are some ways to get started:

## Querying An Inference Off-chain

Users can easily query inferences offchain through a simple API call. This allows for quick access to processed data and results without the need to directly engage with the more complex aspects of the network.

Follow the tutorial [here](/devs/consumers/offchain-query-existing-topics) to learn how to query an inference offchain using an API.

## Querying an Inference On-chain

Interacting with the Allora Network also involves querying data of existing topics on-chain. This can be efficiently done using the Allorad CLI tool. The CLI tool provides a command-line interface to interact with the network, enabling users to retrieve on-chain data seamlessly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ import { Callout } from 'nextra/components'

# Allora CLI Spec

Allora provides two CLI tools that allow network participants to perform different functions on the Allora Network:

1. `allorad` - Used to read and write data to the chain, e.g. to create a wallet, create new topics or add/delegate stake to a reputer
Allora provides a CLI tools that allows network participants to perform different functions on the Allora Network:

- `allorad` - Used to read and write data to the chain, e.g. to create a wallet, create new topics or add/delegate stake to a reputer
- Refer to the [Allorad Reference](/devs/reference/allorad) section for a full list of `allorad` commands with their explanations

2. `allocmd` - Handles worker nodes' seamless creation and deployment. This tool eliminates the need to write the worker node from scratch, as the CLI tool bootstraps all the necessary components to get worker nodes operational.

Let's dive into how to install each CLI tool using a few different methods.

## Installing `allorad`

### Prerequisites
Expand Down Expand Up @@ -78,37 +73,4 @@ Flags:
--trace print out full stack trace on errors

Use "allorad [command] --help" for more information about a command.
```

For an explanatin of every command that can be used with `allorad`, see the reference section.

## Installing `allocmd`

### Prerequisites

You will need to install `pip` or `pipx` to download and use `allocmd` successfully.

- For `pip` installation, follow the instructions here: https://pip.pypa.io/en/stable/installation/
- For `pipx` installation, follow the instructions here: https://pipx.pypa.io/stable/installation/

### Installation

```bash
pip install allocmd --upgrade
```

Using `pipx`:

```bash
pipx install allocmd
```

At the time of writing, the latest `allocmd` version is `2.0.10`:
```shell
allocmd --version
allocmd version 2.0.10
```

<Callout>
You can run `allocmd --help` to get general help or `allocmd [command] --help` to get help relating to a particular command.
</Callout>
```
4 changes: 0 additions & 4 deletions pages/devs/get-started/installation/_meta.json

This file was deleted.

9 changes: 0 additions & 9 deletions pages/devs/get-started/installation/blockless.mdx

This file was deleted.

4 changes: 2 additions & 2 deletions pages/devs/get-started/setup-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Callout } from 'nextra/components'

## Create Wallet

Follow the instructions [here](/devs/get-started/installation/cli) to install our CLI tool `allorad`, which is needed to create a wallet.
Follow the instructions [here](/devs/get-started/cli) to install our CLI tool `allorad`, which is needed to create a wallet.

Prior to executing transactions, a wallet must be created by running:

Expand Down Expand Up @@ -47,5 +47,5 @@ Check to see that your wallet has been funded after requesting funds from the fa
Each network uses a different RPC URL and Chain ID which are needed to specify which network to run commands on when using specific commands on `allorad`. See a list of all RPC URLs and their respective Chain IDs supported today:

- **Testnet**
- `RPC_URL`: https://allora-rpc.testnet-1.testnet.allora.network
- `RPC_URL`: https://sentries-rpc.testnet-1.testnet.allora.network/
- `CHAIN_ID`: `allora-testnet-1`
1 change: 0 additions & 1 deletion pages/devs/reference/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"allorad": "allorad",
"module-accounts": "Module Accounts",
"blockless": "Blockless",
"params": "Parameters"
}
Loading
Loading