Merge pull request #1443 from oceanprotocol/docs-housekeeping
Updated index and content
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 387 KiB |
Before Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 358 KiB |
Before Width: | Height: | Size: 167 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 165 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 506 KiB |
Before Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 158 KiB |
Before Width: | Height: | Size: 72 KiB |
21
SUMMARY.md
@ -14,11 +14,7 @@
|
||||
- [Using Wallets](user-guides/wallets/README.md)
|
||||
- [Set Up MetaMask](user-guides/wallets/metamask-setup.md)
|
||||
- [Manage Your OCEAN](user-guides/wallets/wallets-and-ocean.md)
|
||||
- [Compute-to-Data in Ocean Market](user-guides/compute-to-data/README.md)
|
||||
- [Make a Boss C2D Algorithm](user-guides/compute-to-data/make-a-boss-c2d-algorithm.md)
|
||||
- [Publish a C2D Algorithm NFT](user-guides/compute-to-data/publish-a-c2d-algorithm-nft.md)
|
||||
- [Publish a C2D Data NFT](user-guides/compute-to-data/publish-a-c2d-data-nft.md)
|
||||
- [Host Assets](user-guides/asset-hosting/README.md)
|
||||
- [Data Storage](user-guides/asset-hosting/README.md)
|
||||
- [Uploader](user-guides/asset-hosting/uploader.md)
|
||||
- [Arweave](user-guides/asset-hosting/arweave.md)
|
||||
- [AWS](user-guides/asset-hosting/aws.md)
|
||||
@ -108,21 +104,6 @@
|
||||
- [Data Value-Creation Loop](data-scientists/the-data-value-creation-loop.md)
|
||||
- [What data is valuable?](data-scientists/data-engineers.md)
|
||||
* [👀 Predictoor](predictoor/README.md)
|
||||
* [💰 Data Farming](data-farming/README.md)
|
||||
* [Passive DF (and veOCEAN)](data-farming/passivedf.md)
|
||||
* [Guide to Passive DF](data-farming/passivedf-guide.md)
|
||||
* [Liquid Staking](data-farming/liquid-staking.md)
|
||||
* [Volume DF](data-farming/volumedf.md)
|
||||
* [Guide to Volume DF](data-farming/volumedf-guide.md)
|
||||
* [Delegation in Volume DF](data-farming/delegate.md)
|
||||
* [Predictoor DF](data-farming/predictoordf.md)
|
||||
* [Guide to Predictoor DF](data-farming/predictoordf-guide.md)
|
||||
* [Claim Rewards](data-farming/claim-rewards.md)
|
||||
* [Reward Schedule](data-farming/reward-schedule.md)
|
||||
* [APYs](data-farming/apys.md)
|
||||
* [Estimated APY vs Time](data-farming/apys-plot.md)
|
||||
* [Guide to Estimating APY](data-farming/apys-guide.md)
|
||||
* [FAQ](data-farming/faq.md)
|
||||
* [🔨 Infrastructure](infrastructure/README.md)
|
||||
* [Set Up a Server](infrastructure/setup-server.md)
|
||||
* [Deploy Aquarius](infrastructure/deploying-aquarius.md)
|
||||
|
@ -1,64 +0,0 @@
|
||||
---
|
||||
description: Earn OCEAN rewards by predicting (and more streams to come).
|
||||
cover: ../.gitbook/assets/cover/data_farming_banner.png
|
||||
coverY: 0
|
||||
---
|
||||
|
||||
# What is Data Farming?
|
||||
|
||||
**Data Farming (DF) is Ocean's incentive program.** It rewards OCEAN to participants who make predictions (and more streams to come).
|
||||
|
||||
**[The DF webapp](https://df.oceandao.org)** is where users perform most DF actions.
|
||||
|
||||
|
||||
## Current DF Streams & Budgets
|
||||
|
||||
DF currently has one stream:
|
||||
|
||||
- **[Predictoor DF](predictoordf.md).** Run prediction bots to earn continuously. 37,500 OCEAN/week + ROSE rewards.
|
||||
|
||||
All streams repeat **weekly** that start on Thursdays 00:00 at UTC and end on Wed at 23:59 UTC.
|
||||
|
||||
DF Streams evolve over time. The next two sections cover past & future DF streams.
|
||||
|
||||
## Past DF Streams
|
||||
|
||||
In **Passive DF**, users locked OCEAN for veOCEAN. In **Active DF**, users allocated veOCEAN to curate data assets.
|
||||
- veOCEAN, Passive DF, and Active DF were [retired](https://blog.oceanprotocol.com/passive-volume-data-farming-airdrop-has-completed-they-are-now-retired-6933520b5fcb) on May 3, 2024, alongside an an airdrop to veOCEAN holders.
|
||||
- **veOCEAN holders can claim airdrop & past rewards at [df.oceandao.org/rewards](https://df.oceandao.org/rewards)**.
|
||||
- The locked OCEAN will unlock according to its schedule (up to 4 years)
|
||||
- [This article](https://blog.oceanprotocol.com/passive-volume-data-farming-airdrop-has-completed-they-are-now-retired-6933520b5fcb) has details.
|
||||
|
||||
In **Challenge DF**, users did weekly one-off predictions. It was [retired](https://blog.oceanprotocol.com/df62-completes-and-df63-launches-predictoor-df-is-here-081fc78ceb70) on Nov 30, 2023.
|
||||
|
||||
For further details, the ["Data Farming Series" article](https://blog.oceanprotocol.com/ocean-data-farming-series-c7922f1d0e45) chronicles week-by-week rewards and DF evolution.
|
||||
|
||||
|
||||
## Future DF Streams
|
||||
|
||||
Potential DF evolution includes:
|
||||
- Scaling up Predictoor DF rewards. [Details](https://blog.oceanprotocol.com/ocean-protocol-update-2024-e463bf855b03#4da0).
|
||||
- New stream: run Unified Backend nodes. [Details](https://blog.oceanprotocol.com/ocean-protocol-update-2024-e463bf855b03#f779).
|
||||
- New stream: decentralized model training for world-world models. [Details]([Details](https://blog.oceanprotocol.com/ocean-protocol-update-2024-e463bf855b03#4da0).)
|
||||
|
||||
## Networks
|
||||
|
||||
To engage in Predictoor DF, users submit Predictions on Oasis Sapphire. Rewards for Predictoor DF are on Oasis Sapphire as well (it's intertwined).
|
||||
|
||||
Passive DF and Volume DF reward payouts are on Ethereum network.
|
||||
|
||||
The [networks docs](../discover/networks/README.md) have more info.
|
||||
|
||||
## Further resources
|
||||
|
||||
- The **[DF FAQ](faq.md)** answers more questions.
|
||||
- Main DF github repos: [df-py (backend)](https://github.com/oceanprotocol/df-py), [df-web (frontend)](https://github.com/oceanprotocol/df-web)
|
||||
- The [Ocean Data Farming Series](https://blog.oceanprotocol.com/ocean-data-farming-series-c7922f1d0e45) article has a chronological account of all Data Farming activities since its inception. It links to related blog posts.
|
||||
|
||||
|
||||
----
|
||||
|
||||
_Next: [Predictoor DF](predictoordf.md)_
|
||||
|
||||
_Back: [Docs main](../README.md)_
|
||||
|
@ -1,72 +0,0 @@
|
||||
---
|
||||
title: Data Farming FAQ
|
||||
description: Frequently Asked Questions about Data Farming
|
||||
---
|
||||
## Data Farming FAQ
|
||||
|
||||
### Staking and Risk
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What does "staking" mean in an Ocean context?</summary>
|
||||
|
||||
Its precise meaning depends on the DF stream.
|
||||
|
||||
- Predictoor DF: put OCEAN into a prediction transaction
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Are there any risks associated with DF?</summary>
|
||||
|
||||
As with any system, inherent risks exist. We try to minimize them, as follows.
|
||||
|
||||
- Predictoor DF: you stake a small amount of OCEAN in each epoch (eg every 5min). If issues arise, you can get out quickly.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Is there any impermanent loss (IL) in my staking?</summary>
|
||||
|
||||
No. IL is typically associated with providing liquidity to decentralized exchange or pools. There are no pools involved in any of the DF streams [1].
|
||||
</details>
|
||||
|
||||
|
||||
### Rewards Payout
|
||||
|
||||
<details>
|
||||
|
||||
<summary>What APYs can I expect?</summary>
|
||||
|
||||
For Predictoor DF, it varies a lot based on your prediction accuracy, and more.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Can the DF rewards change during a given week?</summary>
|
||||
|
||||
No. At the beginning of a new DF round, rules are laid out, either implicitly if no change from the previous round, or explicitly in a blog post if there are new rules.
|
||||
|
||||
Caveat: it’s "no" at least in theory! Sometimes there may be tweaks if there is community consensus or a bug.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
|
||||
<summary>Where do I learn more about Predictoor DF?</summary>
|
||||
|
||||
In its [docs page](predictoordf.md).
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
Congrats! You've completed reading Data Farming docs.
|
||||
|
||||
_Next: Jump to [DF main](README.md)._
|
||||
|
||||
_Or: Jump to [Docs main](../README.md) and click on your interest._
|
||||
|
||||
_Back: [Predictoor DF Guide](predictoordf-guide.md)_
|
@ -1,34 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
How to earn $ via predictoor DF
|
||||
---
|
||||
|
||||
# Guide to Predictoor DF
|
||||
|
||||
<figure><img src="../.gitbook/assets/gif/money-robot.gif" alt=""></figure>
|
||||
|
||||
In Predictoor DF (and Predictoor proper), you run prediction bots to earn continuously. This guide describes how to become eligible for OCEAN rewards and claim them; and the same for Oasis ROSE rewards. And of course first thing you need to do is become a predictoor.
|
||||
|
||||
## How to become a predictoor
|
||||
|
||||
- Play with the dapp: http://predictoor.ai
|
||||
- Then go through "How to earn as a Predictoor" in [Predictoor docs](https://docs.predictoor.ai)
|
||||
- Or, go straight to the [quickstart README](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/predictoor.md) :) 🏎️
|
||||
|
||||
## On OCEAN Rewards in Predictoor DF
|
||||
|
||||
- **Duration:** ongoing
|
||||
- **To be eligible:** predictoors are automatically eligible 🧘
|
||||
- **To claim:** recall that the OCEAN rewards act as more sales coming to you (as a predictoor). So you claim your OCEAN from sales in the usual way, by running the OCEAN payout script. See the [payout README](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/payout.md) for specific instructions.
|
||||
|
||||
|
||||
## On ROSE rewards in Predictoor DF
|
||||
|
||||
- ⚠️ **To be eligible** for a given DF round: you MUST run [OCEAN payout script](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/payout.md) <= 4 days after the round ends, i.e. between Thu 00:00 UTC & Sun 11:59 PM UTC
|
||||
- **To claim:** See the [payout README](https://github.com/oceanprotocol/pdr-backend/blob/main/READMEs/payout.md) for specific instructions.
|
||||
|
||||
----
|
||||
|
||||
_Next: Jump to [DF FAQ](faq.md)._
|
||||
|
||||
_Back: [Predictoor DF](predictoordf.md)_
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Baseline sales for predictoors
|
||||
---
|
||||
|
||||
<figure><img src="../.gitbook/assets/data-farming/predictoordf_main.png" alt=""></figure>
|
||||
|
||||
**This page** is about Predictoor DF, and [this page](predictoordf-guide.md) is a guide.
|
||||
|
||||
# Predictoor DF Overview
|
||||
|
||||
**Predictoor DF** is a DF stream that amplifies predictoors’ earnings, via extra sales to Ocean Predictoor data feeds.
|
||||
|
||||
Predictoor DF has 37,500 OCEAN weekly rewards (ongoing) and 20,000 ROSE weekly rewards (throughout 2024).
|
||||
|
||||
## Introduction
|
||||
|
||||
**[Ocean Predictoor](../predictoor/README.md)** data feeds predict whether BTC, ETH etc will rise or fall 5min or 1h into the future. These feeds are crowdsourced by “predictoors”: people running AI-powered prediction bots.
|
||||
|
||||
**[Data Farming (DF)](../data-farming/README.md)** is Ocean’s incentive program, that rewards OCEAN to people who lock OCEAN or do active DF activities.
|
||||
|
||||
You should be familiar with both Predictoor and DF before reading on.
|
||||
|
||||
## Predictoor DF Timing
|
||||
|
||||
Predictoor DF started counting on Nov 9, 2023, at the beginning of Data Farming Round 63 (DF63). It runs indefinitely.
|
||||
|
||||
## Predictoor DF Rewards
|
||||
|
||||
Predictoor DF has two components: [OCEAN](https://oceanprotocol.com/about-us/ocean-token) rewards and [Oasis ROSE](https://www.coingecko.com/en/coins/oasis-network) rewards.
|
||||
|
||||
### OCEAN Rewards
|
||||
|
||||
- A special “DF buyer” bot purchases Predictoor feeds. It started operating on Nov 9, 2023. Every day, it spends 1/7 of the weekly Predictoor OCEAN budget for another 24h subscription. It spends an equal amount per feed. (Currently there are feeds: 10 x 5min, 10 x 1h.)
|
||||
- The OCEAN comes from the Ocean DF budget, and specifically, the Active DF budget.
|
||||
|
||||
### ROSE Rewards
|
||||
|
||||
- Payout happens on Mondays, 4 days after the end of the DF round.
|
||||
- ⚠️ To be counted for ROSE rewards of a given DF round, you must claim your OCEAN rewards for that DF round. See [Predictoor DF user guide](predictoordf-guide.md).
|
||||
- Payout for a given predictoor is pro-rata to the net earnings of that predictoor over that DF round, specifically (total sales $ to the predictoor) minus (predictoor stake slashed due to being wrong).
|
||||
- The ROSE comes from a generous contribution of[ Oasis Protocol Foundation](https://oasisprotocol.org/) 👪🙏.
|
||||
|
||||
|
||||
## How to Earn $ Via Predictoor DF
|
||||
|
||||
**Running a predictoor bot will automatically make you eligible for Predictoor DF rewards.**
|
||||
|
||||
The [Predictoor DF user guide](predictoordf-guide.md) tells how to get started as a predictoor, and how to claim rewards.
|
||||
|
||||
----
|
||||
|
||||
_Next: [Predictoor DF Guide](predictoordf-guide.md)_
|
||||
|
||||
_Back: [DF Main](README.md)_
|
@ -1,57 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
Use these steps to reveal the information contained within an asset's DID and
|
||||
list the buyers of a datatoken
|
||||
---
|
||||
|
||||
# Retrieve datatoken/data NFT addresses & Chain ID
|
||||
|
||||
### How to find the network, datatoken address, and data NFT address from an Ocean Market link?
|
||||
|
||||
If you are given an Ocean Market link, then the network and datatoken address for the asset is visible on the Ocean Market webpage. For example, given this asset's Ocean Market link: [https://odc.oceanprotocol.com/asset/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1](https://odc.oceanprotocol.com/asset/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1) the webpage shows that this asset is hosted on the Mumbai network, and one simply clicks the datatoken's hyperlink to reveal the datatoken's address as shown in the screenshot below:
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/marketplace_data.jpg" alt="" width="563"><figcaption><p>See the Network and Datatoken Address for an Ocean Market asset by visiting the asset's Ocean Market page.</p></figcaption></figure>
|
||||
|
||||
#### More Detailed Info:
|
||||
|
||||
You can access all the information for the Ocean Market asset also by **enabling Debug mode**. To do this, follow these steps:
|
||||
|
||||
**Step 1** - Click the Settings button in the top right corner of the Ocean Market
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/Click-Settings.png" alt=""><figcaption><p>Click the Settings button</p></figcaption></figure>
|
||||
|
||||
**Step 2** - Check the Activate Debug Mode box in the dropdown menu
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/Check-Debug-Mode.png" alt=""><figcaption><p>Check 'Active Debug Mode'</p></figcaption></figure>
|
||||
|
||||
**Step 3** - Go to the page for the asset you would like to examine, and scroll through the DDO information to find the NFT address, datatoken address, chain ID, and other information.
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/Scroll-DDO-Info.png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### How to use Aquarius to find the chainID and datatoken address from a DID?
|
||||
|
||||
If you know the DID:op but you don't know the source link, then you can use Ocean Aquarius to resolve the metadata for the DID:op to find the `chainId`+ `datatoken address` of the asset. Simply enter in your browser "[https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/](https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1)\<your did:op:XXX>" to fetch the metadata.
|
||||
|
||||
For example, for the following DID:op: "did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1" the Ocean Aquarius URL can be modified to add the DID:op and resolve its metadata. Simply add "[https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/](https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1)" to the beginning of the DID:op and enter the link in your browser like this: [https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1](https://v4.aquarius.oceanprotocol.com/api/aquarius/assets/ddo/did:op:1b26eda361c6b6d307c8a139c4aaf36aa74411215c31b751cad42e59881f92c1)
|
||||
|
||||
<figure><img src="../.gitbook/assets/market/network-and-datatoken-address.png" alt=""><figcaption><p>The metadata printout for this DID:op with the network's Chain ID and datatoken address circled in red</p></figcaption></figure>
|
||||
|
||||
Here are the networks and their corresponding chain IDs:
|
||||
|
||||
```json
|
||||
"mumbai: 80001"
|
||||
"polygon: 137"
|
||||
"bsc: 56"
|
||||
"energyweb: 246"
|
||||
"moonriver: 1285"
|
||||
"mainnet: 1"
|
||||
"goerli: 5"
|
||||
"polygonedge: 81001"
|
||||
"gaiaxtestnet: 2021000"
|
||||
"alfajores: 44787"
|
||||
"gen-x-testnet: 100"
|
||||
"filecointestnet: 3141"
|
||||
"oasis_saphire_testnet: 23295"
|
||||
"development: 8996"
|
||||
```
|
||||
|
@ -12,8 +12,6 @@ coverY: 0
|
||||
**Contents:**
|
||||
- Basic concepts
|
||||
- Using wallets
|
||||
- Using Ocean Market
|
||||
- C2D in Ocean Market
|
||||
- Host assets
|
||||
|
||||
Let's dive in!
|
||||
@ -36,28 +34,7 @@ For blockchain beginners
|
||||
[wallets/metamask-setup.md](wallets/metamask-setup.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
|
||||
## Using Ocean Market
|
||||
|
||||
{% content-ref url="using-ocean-market.md" %}
|
||||
[using-ocean-market.md](using-ocean-market.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
{% content-ref url="publish-data-nfts.md" %}
|
||||
[publish-data-nfts.md](publish-data-nfts.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
{% content-ref url="buy-data-nfts.md" %}
|
||||
[buy-data-nfts.md](buy-data-nfts.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
## C2D in Ocean Market
|
||||
|
||||
{% content-ref url="compute-to-data/" %}
|
||||
[compute-to-data](compute-to-data/README.md)
|
||||
{% endcontent-ref %}
|
||||
|
||||
## Host Assets
|
||||
## Data Storage
|
||||
|
||||
{% content-ref url="asset-hosting/" %}
|
||||
[asset-hosting](asset-hosting/README.md)
|
||||
|
@ -1,24 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
How to sell compute jobs on your datasets while keeping your data and
|
||||
algorithms private
|
||||
---
|
||||
|
||||
# Sell NFT Computations (Compute-to-Data)
|
||||
|
||||
### Introducing, The Problem
|
||||
|
||||
{% embed url="https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExNjNmMTc3MjFjNTg2MjQwZTQyY2VkNzFiNjk1YzM5ZmJkM2NjMzA4ZiZlcD12MV9pbnRlcm5hbF9naWZzX2dpZklkJmN0PWc/17FxSFyYNOgThnonDK/giphy.gif" fullWidth="false" %}
|
||||
|
||||
**Anyone could buy your data on the Ocean Market and then publicly share it all over the internet.** Pretty scary, right? But what if there was a way that buyers could access valuable insights from your data and algorithms without actually \*seeing\* the data or algorithms themselves? We have a solution for that!
|
||||
|
||||
Enter, **Compute-to-Data** (also lovingly called C2D 🥰). Ocean Protocol's C2D feature enables you to monetize the OUTPUT of compute jobs on your datasets without revealing the contents of the data/algorithms themselves. Let's dive in how!
|
||||
|
||||
## How to Compute-to-Data 💃
|
||||
|
||||
You will need to accomplish **3 main steps** in establishing a compute-to-data flow: [create an algorithm](make-a-boss-c2d-algorithm.md) that's compatible with C2D, [publish your C2D-specific algorithm NFT](publish-a-c2d-algorithm-nft.md), then [publish your data NFT with C2D configurations](publish-a-c2d-data-nft.md) allowing the algorithm to compute on it. That's it! Then you'll be able to sell compute jobs 🤩 Read the steps in this section's three subpages to create & sell a compute job from start to finish. 💪😃
|
||||
|
||||
Or you could watch this video tutorial about it below:
|
||||
|
||||
{% embed url="https://youtu.be/2AF9mkqlf5Y" %}
|
||||
|
@ -1,98 +0,0 @@
|
||||
---
|
||||
description: >-
|
||||
How to construct the beginnings of an awesome algorithm for C2D compute jobs
|
||||
on datasets
|
||||
---
|
||||
|
||||
# Make a Boss C2D Algorithm
|
||||
|
||||
<figure><img src="../../.gitbook/assets/gif/like-a-boss.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
The beginning of any algorithm for Compute-to-Data starts by loading the dataset correctly. Read on, anon 👨🏻💻
|
||||
|
||||
### Open the local dataset file
|
||||
|
||||
This code goes at the top of your algorithm file for your algorithm NFT asset to use with Compute-to-Data. It references your data NFT asset file on the Docker container you selected.
|
||||
|
||||
{% tabs %}
|
||||
{% tab title="Python" %}
|
||||
```python
|
||||
import csv
|
||||
import json
|
||||
import os
|
||||
|
||||
def get_input(local=False):
|
||||
|
||||
dids = os.getenv("DIDS", None)
|
||||
|
||||
if not dids:
|
||||
print("No DIDs found in the environment. Aborting.")
|
||||
return
|
||||
|
||||
dids = json.loads(dids)
|
||||
|
||||
for did in dids:
|
||||
filename = f"data/inputs/{did}/0" # 0 for metadata service
|
||||
print(f"Reading asset file {filename}.")
|
||||
return filename
|
||||
|
||||
# Get the input filename using the get_input function
|
||||
input_filename = get_input()
|
||||
|
||||
if not input_filename:
|
||||
# No input filename returned
|
||||
exit()
|
||||
|
||||
# Open the file & run your code
|
||||
with open(input_filename, 'r') as file:
|
||||
# Read the CSV file
|
||||
csv_reader = csv.DictReader(file)
|
||||
|
||||
<YOUR CODE GOES HERE>
|
||||
```
|
||||
{% endtab %}
|
||||
|
||||
{% tab title="Javascript" %}
|
||||
```javascript
|
||||
const fs = require("fs");
|
||||
|
||||
var input_folder = "/data/inputs";
|
||||
var output_folder = "/data/outputs";
|
||||
|
||||
async function processfolder(Path) {
|
||||
var files = fs.readdirSync(Path);
|
||||
for (var i =0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
var fullpath = Path + "/" + file;
|
||||
if (fs.statSync(fullpath).isDirectory()) {
|
||||
await processfolder(fullpath);
|
||||
} else {
|
||||
<YOUR CODE GOES HERE>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<YOUR CODE & FUNCTION DEFINITIONS GO HERE>
|
||||
|
||||
// Open the file & run your code
|
||||
processfolder(input_folder);
|
||||
|
||||
```
|
||||
{% endtab %}
|
||||
{% endtabs %}
|
||||
|
||||
**Note:** Here are the following Python libraries that you can use in your code:
|
||||
|
||||
```python
|
||||
// Python modules
|
||||
numpy==1.16.3
|
||||
pandas==0.24.2
|
||||
python-dateutil==2.8.0
|
||||
pytz==2019.1
|
||||
six==1.12.0
|
||||
sklearn
|
||||
xlrd == 1.2.0
|
||||
openpyxl >= 3.0.3
|
||||
wheel
|
||||
matplotlib
|
||||
```
|
@ -1,63 +0,0 @@
|
||||
---
|
||||
description: How to publish a C2D algorithm NFT on the Ocean Market
|
||||
---
|
||||
|
||||
# Publish a C2D Algorithm NFT
|
||||
|
||||
<figure><img src="../../.gitbook/assets/gif/the-algorithm.gif" alt=""><figcaption><p>You're an algorithm guru after all!</p></figcaption></figure>
|
||||
|
||||
### Publish Your Algorithm NFT
|
||||
|
||||
#### Step 1 - Navigate to the Ocean Market
|
||||
|
||||
* Go to [https://market.oceanprotocol.com](https://market.oceanprotocol.com)
|
||||
|
||||
#### Step 2 - Connect your wallet
|
||||
|
||||
* Click the top right Connect Wallet button to connect your self-custody wallet to the Ocean Market
|
||||
|
||||
<figure><img src="../../.gitbook/assets/market/connect-wallet.png" alt=""><figcaption><p>Connect your self-custody wallet</p></figcaption></figure>
|
||||
|
||||
#### Step 3 - Click the Publish link in the top left corner of the page
|
||||
|
||||
* Click the Publish link
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/publish.png" alt=""><figcaption><p>Navigate to the Publish page</p></figcaption></figure>
|
||||
|
||||
#### Step 4 - Enter the metadata
|
||||
|
||||
* Enter the metadata for your algorithm NFT paying special attention to select the Algorithm asset type button:
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/algo-asset.png" alt=""><figcaption><p>Be sure to select the Algorithm asset type</p></figcaption></figure>
|
||||
|
||||
* Select the appropriate Docker image to run your code - most algorithms are written in Javascript or Python, so you can use either of these Docker images or your own custom image!
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/docker-image.png" alt=""><figcaption><p>Select the appropriate Docker image for your algorithm type</p></figcaption></figure>
|
||||
|
||||
#### Step 5 - Enter the Access information
|
||||
|
||||
* Make sure to keep this option checked! ✅
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/algorithm-privacy.png" alt=""><figcaption><p>Keep this option checked for Compute-to-Data</p></figcaption></figure>
|
||||
|
||||
#### Step 6 - Set a price, Fixed or Free, for your algorithm
|
||||
|
||||
* It is recommended that you set a fixed price since the price that you choose for your algorithm will be charged any time that someone selects to run your algorithm on a dataset, including datasets that aren't yours!
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/Set-a-price-algo.png" alt=""><figcaption><p>Set a price for your C2D algorithm NFT</p></figcaption></figure>
|
||||
|
||||
#### Step 7 - Approve the preview
|
||||
|
||||
* Your preview should look like the following:
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/preview-publish.png" alt="" width="375"><figcaption></figcaption></figure>
|
||||
|
||||
#### Step 8 - Submit the transactions
|
||||
|
||||
* Click the pink Submit button at the bottom of the page and sign the two transactions with your wallet. You'll have to pay for gas when you sign to publish your algorithm asset.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/Sign-transactions.png" alt=""><figcaption><p>Sign and pay gas for 2 transactions on the final publishing step</p></figcaption></figure>
|
||||
|
||||
#### Congratulations on publishing your algorithm!
|
||||
|
||||
* On to the next step -> [Publish a C2D Data NFT](publish-a-c2d-data-nft.md)
|
@ -1,91 +0,0 @@
|
||||
---
|
||||
description: How to publish a data NFT with C2D configurations
|
||||
---
|
||||
|
||||
# Publish a C2D Data NFT
|
||||
|
||||
<figure><img src="../../.gitbook/assets/gif/talk-data-to-me.gif" alt="" width="375"><figcaption></figcaption></figure>
|
||||
|
||||
#### Step 1 - Navigate to the Ocean Market
|
||||
|
||||
* Go to [https://market.oceanprotocol.com](https://market.oceanprotocol.com)
|
||||
|
||||
#### Step 2 - Connect your wallet
|
||||
|
||||
* Click the top right Connect Wallet button to connect your self-custody wallet to the Ocean Market
|
||||
|
||||
<figure><img src="../../.gitbook/assets/market/connect-wallet.png" alt=""><figcaption><p>Connect your self-custody wallet</p></figcaption></figure>
|
||||
|
||||
#### Step 3 - Click the Publish link in the top left corner of the page
|
||||
|
||||
* Click the Publish link
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/publish.png" alt=""><figcaption><p>Navigate to the Publish page</p></figcaption></figure>
|
||||
|
||||
#### Step 4 - Enter the metadata
|
||||
|
||||
* Enter the metadata for your data NFT keeping the Dataset asset type selected by default:
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/dataset-default-option.png" alt=""><figcaption><p>Keep the default Dataset Asset Type selected</p></figcaption></figure>
|
||||
|
||||
#### Step 5 - Enter the Access information
|
||||
|
||||
* You must select the Compute access type in this step!
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/dataset-compute-option.png" alt=""><figcaption><p>Make sure that you select Compute access type</p></figcaption></figure>
|
||||
|
||||
#### Step 6 - Set a price, Fixed or Free, for your dataset
|
||||
|
||||
* Toggle the tab to decide whether you want to set a fixed or free price for your dataset.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/Set-a-price-algo.png" alt=""><figcaption><p>Set a price for your C2D data NFT</p></figcaption></figure>
|
||||
|
||||
#### Step 7 - Approve the preview
|
||||
|
||||
* Your preview should look like the following (this will change soon!):
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/data-nft-c2d-preview.png" alt="" width="375"><figcaption></figcaption></figure>
|
||||
|
||||
#### Step 8 - Submit the transactions
|
||||
|
||||
* Click the pink Submit button at the bottom of the page and sign the two transactions with your wallet. You'll have to pay for gas when you sign to publish your algorithm asset.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/Sign-transactions.png" alt=""><figcaption><p>Sign and pay gas for 2 transactions on the final publishing step</p></figcaption></figure>
|
||||
|
||||
**Ok, you've published a Data NFT that is \*almost\* ready for Compute-to-Data. Just a few tiny steps left and you're done!**
|
||||
|
||||
#### Step 9 - Edit the asset (yes, again!)
|
||||
|
||||
* On the webpage for your Data NFT, you need to click the Edit Asset link to change the C2D settings.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/edit-asset-link.png" alt="" width="563"><figcaption><p>Click the Edit Asset link</p></figcaption></figure>
|
||||
|
||||
#### Step 10 - Edit the Compute settings
|
||||
|
||||
* You must select the Edit Compute Settings button to add your algorithm to the data NFT for computation.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/edit-compute-settings.png" alt=""><figcaption><p>Select the Edit Compute Settings tab button</p></figcaption></figure>
|
||||
|
||||
* Then, search for your algorithm in the Selected algorithms search bar and check the box next to it to add it as an algorithm able to compute on the dataset.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/select-algorithm-for-compute.png" alt=""><figcaption><p>Search for and select your algorithm to compute on your dataset</p></figcaption></figure>
|
||||
|
||||
#### Step 11 - Submit the transactions
|
||||
|
||||
* Click the pink Submit button at the bottom of the page and sign all the transactions.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/Submit-compute-settings.png" alt=""><figcaption><p>Click the Submit button to finalize the transaction</p></figcaption></figure>
|
||||
|
||||
#### Congratulations! You have fully finished the C2D flow. Check your work by verifying that your algorithm appears on the data NFT's page, like in the following example:
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/double-check-work.png" alt="" width="375"><figcaption><p>Your algorithm should appear now on the data NFT's page!</p></figcaption></figure>
|
||||
|
||||
If you would like to run the compute job, then simply click the radio button to the left of the algorithm's name and click Buy Compute Job.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/c2d/buy-compute-job.png" alt="" width="375"><figcaption><p>Buy the compute job to check your work!</p></figcaption></figure>
|
||||
|
||||
The output of your algorithm's computation on the dataset will appear in the Algorithm.log output. Voilá!
|
||||
|
||||
#### Now do a little dance, because you're done!
|
||||
|
||||
{% embed url="https://media4.giphy.com/media/CxhWJeIicfOEynsEn6/giphy.gif?cid=ecf05e478eb1zzixmsjwbwx37a0d4e1096812j513crzr18j&ct=g&ep=v1_gifs_search&rid=giphy.gif" %}
|