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

Rc docs #2409

Merged
merged 66 commits into from
Mar 1, 2024
Merged

Rc docs #2409

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
d8817ad
doc: replaced local markdown links
jtakalai Nov 3, 2023
884ae99
doc: improvements
jtakalai Nov 3, 2023
ed72a50
edit url and search crawler speedup (maybe)
fonty1 Nov 4, 2023
627e3f7
fixing broken links
fonty1 Nov 4, 2023
856295f
Websocket help, broken links, operator help
fonty1 Nov 5, 2023
fcba6fa
typo
fonty1 Nov 6, 2023
9ab8223
logs memory warning
fonty1 Nov 6, 2023
d5628c2
Warnings and formatting
fonty1 Nov 6, 2023
b4f94b2
docs: better explanation on modifying config file and starting the node
jtakalai Nov 8, 2023
3cee40b
node inspection section, some extra op help
fonty1 Nov 9, 2023
c1bffd8
false flagging and formatting
fonty1 Nov 9, 2023
bc14ef8
pretestnet.0 -> pretestnet.2
fonty1 Nov 9, 2023
486b9ff
Net penalties copy improvements
fonty1 Nov 9, 2023
1dfcb51
pretestnet.3, faq, incentive content
fonty1 Nov 15, 2023
fd69c7b
Update testnets.md (#2062)
lelas Nov 15, 2023
6158a77
copypaste error operator content
fonty1 Nov 17, 2023
136c9fc
testnet v4 version bump
fonty1 Nov 20, 2023
72b3f75
v6 bump
fonty1 Nov 22, 2023
8409046
t1 live
fonty1 Nov 28, 2023
82705b3
1.0 live
fonty1 Nov 28, 2023
6e4fdd5
Polish1
fonty1 Nov 28, 2023
dfaf2ac
add v to docker
fonty1 Nov 28, 2023
f8f3616
mumbai terminology and migration advice
fonty1 Nov 28, 2023
850b53b
node fleet and link fix
fonty1 Nov 28, 2023
3d7875c
broken link
fonty1 Nov 28, 2023
fe6662f
brokenlink
fonty1 Nov 29, 2023
d9f68b1
typos, schedule, faq
fonty1 Dec 4, 2023
09353a8
.1 v bump and broken links
fonty1 Dec 4, 2023
7e54d26
safety tips
fonty1 Dec 4, 2023
6498bca
testnet clarity
fonty1 Dec 4, 2023
4869dcf
v bump
fonty1 Dec 6, 2023
b9bf17f
warnings and FAQs
fonty1 Dec 7, 2023
f054e8a
v bump
fonty1 Dec 7, 2023
a07f80c
flag docs fixes
fonty1 Dec 8, 2023
dd2e1eb
v bump and update instructions
fonty1 Dec 11, 2023
44b0c1d
Added google tag manager to docs, bumped docusaurus to version 2.3.1
yaruno Dec 13, 2023
b4b9530
Added robots.txt
yaruno Dec 15, 2023
9818618
robots metadata
yaruno Dec 15, 2023
21d693e
docs: use environment preset (#2139)
teogeb Dec 15, 2023
1fad8ea
testnet2 updates
fonty1 Dec 18, 2023
71d3d1d
t2 updates
fonty1 Dec 18, 2023
7f0e63d
Revert "t1 updates
fonty1 Dec 18, 2023
f1448cf
version bump
fonty1 Dec 18, 2023
90b4477
merge conflict fixes
fonty1 Dec 18, 2023
4458879
version fixes
fonty1 Dec 18, 2023
59a2f5f
minor fixes
fonty1 Dec 18, 2023
7b77b2a
version bump
fonty1 Dec 20, 2023
1e6ffb4
version bump v4
fonty1 Dec 22, 2023
f43ae91
tentative schedule update
fonty1 Jan 11, 2024
911839f
Highlight important parts in delegators.md (#2151)
lelas Jan 11, 2024
bba0d40
upgrade nodejs requirements
fonty1 Jan 15, 2024
b865418
version bump
fonty1 Jan 19, 2024
d7d87b5
version bump
fonty1 Jan 22, 2024
b54f3d4
update start time
fonty1 Jan 22, 2024
ab0e90d
version bump
fonty1 Jan 24, 2024
b3610a8
Polygon POS note
fonty1 Jan 26, 2024
b51815d
version bump
fonty1 Feb 1, 2024
896cbc9
From testnet era to Mainnet
fonty1 Feb 9, 2024
4e4a57c
Added operator migration guide from Streamr 1.0 testnets to Streamr 1.0
yaruno Feb 27, 2024
0b5f996
merge with v100.0.0-rc.0
yaruno Feb 29, 2024
2e529e0
terminology updates
yaruno Feb 29, 2024
5a8ad62
refine script SDK version correction
yaruno Feb 29, 2024
4d4c8d8
updating rc packages, terminology
yaruno Feb 29, 2024
9bec85c
terminology update, docker
yaruno Feb 29, 2024
8889733
streamr sdk version and terminology updates
yaruno Mar 1, 2024
5f34960
updated config wizard network description
yaruno Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 107 additions & 80 deletions docs/docs/guides/become-an-operator.md

Large diffs are not rendered by default.

312 changes: 178 additions & 134 deletions docs/docs/guides/how-to-run-streamr-node.md

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions docs/docs/guides/how-to-stake-and-earn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
sidebar_position: 4
---

# How to stake and earn

### Background
In Streamr 1.0, the incentivization comes from [stream Sponsorship](../streamr-network/incentives/stream-sponsorships.md) contracts which act as a decentralized mechanism for managing a stream of earnings distributed among a set of [Operators](../streamr-network/network-roles/operators.md). Those Operators run nodes which will join the sponsored stream and help to relay the traffic inside it.

:::info
To earn DATA tokens on Polygon you must be willing to hold and stake DATA tokens on Polygon smart contracts that we call [Sponsorships](../streamr-network/incentives/stream-sponsorships.md). See [how to get DATA](../help/operator-faq.md#how-do-i-get-data-tokens)
:::

### How to participate & earn
1. [Become a node Operator](../guides/become-an-operator.md)
2. Stake your [Operator](../streamr-network/network-roles/operators.md) on [stream Sponsorships](../streamr-network/incentives/stream-sponsorships.md), and/or,
3. [Delegate](../streamr-network/network-roles/delegators.md) your `DATA` tokens onto other Operators

:::info
- **Do NOT** create or sponsor Sponsorships. If you do tokens will be irreversibly sent to that Sponsorship contract. There is no undo for this.
:::

### Current node software version
Use node version: `v100.0.0-rc.0`. Do not use the `latest` tag release.

### Sponsorships
Sponsorships are the source of incentivization. These are visible on [The Hub](https://streamr.network/hub/network/sponsorships).

### The Mumbai test environment
The [Mumbai Hub](https://mumbai.streamr.network) is the place to test out your Operator before creating it on Polygon with real tokens.

You'll need Mumbai `MATIC` - widely available with [public faucets](https://mumbaifaucet.com) and you'll need ` TEST` tokens (the Mumbai network's worthless `DATA` tokens) - There is a `TEST` token faucet on the [Streamr Discord](https://discord.gg/gZAm8P7hK8).

### Community resources
- Tutorial videos. Follow at your own risk. Note that version numbers and exact instructions may change over time.
- [StreamrRUN - A Streamr Node in 3 minutes, by Logic Ethos](https://www.youtube.com/watch?v=tGTdaNTtjLY)
- [Manage your Streamr Node in 1 minute, by Logic Ethos](https://www.youtube.com/watch?v=V6yS0bCt13g)
<!-- TODO Autoharvestor https://github.com/Tocard/Streamr_auto_harvest_earning -->

### Safety
**Please be aware of some important safety tips:**

:::info
Your tokens are at risk and [the risks are real!](../streamr-network/network-roles/operators.md#operator-risks).
:::

- Consider starting small with your stake amount and use common sense to never stake more than you can afford to lose. A professional audit of the incentive layer has been completed by Cyfrin, but nothing can be guaranteed of course.
- If you want to stake on a sponsorship, DO NOT click on the "Sponsor". That's for funding the sponsorship, not staking! Instead, go to the sponsorship you want to stake on and click "Join as an operator” and enter the amount.
- There may be an increase in activity by scammers. A common approach is to pretend to offer help or tech support in direct messages (something we never do). Report any account that is asking you to sign transactions or asking for any sort of credentials such as your private key. These accounts are trying to steal your tokens. It’s advised you disable DMs on Discord. More tips can be found in #server-safety-guide.
61 changes: 61 additions & 0 deletions docs/docs/guides/how-to-update-your-streamr-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
sidebar_position: 6
---

# How to update your Streamr node
Keeping your node up to date is very important as new releases contain bug fixes and performance improvements. The exact update instructions may vary based on the environment that the node has been installed in.

## Docker update guide
:::info
This guide is meant for Linux and MacOS. Windows Powershell commands will be slightly different.
:::

To update your Streamr node from `v100.0.0-testnet-three.6` to `v100.0.0-rc.0` (for example), run:

```
sudo docker stop streamr && sudo docker rm streamr && sudo docker container prune --force
```

Then run and following command:
```
sudo docker images
```

Copy the image ID (`IMAGE_ID`) from the output and use it in the following command. In this next command you'll be removing your old Docker image.

```
sudo docker rmi IMAGE_ID
```

Run your updated node with the new node version,

```
sudo docker run -p 32200:32200 --name streamr --restart unless-stopped -d -v $(cd ~/.streamrDocker && pwd):/home/streamr/.streamr streamr/node:v100.0.0-rc.0
```

Your updated node will now be running. As usual, you can checkup on it with

```
sudo docker logs streamr --follow
```

## npm update guide
Firstly stop your node, if you're running your node with `PM2` for example, then it will be something like:

```
pm2 list
```

```
pm2 stop streamr
```

Next, globally install the node upgrade:
```
npm install -g @streamr/node
```

And then you can run the node:
```
`streamr-broker`
```
18 changes: 5 additions & 13 deletions docs/docs/guides/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,28 @@ sidebar_position: 1
---

# Pub/Sub in NodeJS

This is a quickstart guide on creating your first stream using the Streamr TypeScript SDK in a NodeJS script.

**Prerequisites:**

- NPM v8 or greater
- NodeJS 16.13.x or greater
- NodeJS 18.13.x or greater (version 20 and later ideally)
- A small amount of `MATIC` to pay for gas on Polygon mainnet. You can reachout to us on the #dev channel of [Discord](https://discord.gg/gZAm8P7hK8) for some tokens.

## Streamr SDK

The Streamr SDK is available on [NPM](https://www.npmjs.com/package/streamr-client) and can be installed simply with:
The Streamr SDK is available on [NPM](https://www.npmjs.com/package/@streamr/node) and can be installed simply with:

```shell
$ npm install streamr-client
$ npm install @streamr/sdk
```

Having trouble installing the SDK? Maybe our [troubleshooting](../usage/streamr-js-client/how-to-use#Troubleshooting) section will help.

### Initialize the SDK

```ts
// Import Streamr
const Streamr = require("streamr-client")
const { StreamrClient } = require('streamr-client')
const Streamr = require("@streamr/sdk")
const { StreamrClient } = require('@streamr/sdk')

// Initialize the client with an Ethereum account
const streamr = new Streamr({
Expand All @@ -46,7 +43,6 @@ You can generate an Ethereum private key using any Ethereum wallet, or you can u
:::

## Create the stream

A stream is simply a **sequence of data points in time**, i.e. an append only log. This is semantically equivalent to **topics** in traditional pub/sub networks.

```ts
Expand Down Expand Up @@ -75,7 +71,6 @@ const stream = await streamr.getOrCreateStream({
```

### Set stream permissions

By default, the creator of the stream has full read, write and manage permissions over the stream, but if you'd like different addresses or public access controls to read and write (publish and subscribe) to your stream, then you'll need to add these permissions.

```ts
Expand All @@ -91,7 +86,6 @@ await stream.grantPermissions({
:::

## Publish data to the stream

You can either push data using the stream ID,

```ts
Expand All @@ -114,7 +108,6 @@ You must give `PUBLISH` permission to the address you have authenticated `Stream
:::

## Subscribe to the stream

Just like publishing, you can either use the stream ID,

```ts
Expand All @@ -126,5 +119,4 @@ streamr.subscribe(streamId, (message) => {
Or, by using the `stream` object.

## Summary

Congrats! You've managed to create a stream and publish/subscribe data to it! 💪
10 changes: 5 additions & 5 deletions docs/docs/guides/use-any-language-or-device.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This tutorial will show you how to publish data into the Streamr Network from in
**Prerequisites:**

- NPM v8 or greater
- NodeJS 16.13.x or greater
- NodeJS 18.x or greater (Ideally v20+)
- MacOS/Linux environments (Windows environments may require minor adjustments)
- A small amount of `MATIC` to pay for gas on Polygon mainnet. You can reachout to us on the #dev channel of [Discord](https://discord.gg/gZAm8P7hK8) for some tokens.
- A MQTT library of your choice (this tutorial uses [MQTT.js](https://www.npmjs.com/package/mqtt))
Expand All @@ -21,7 +21,7 @@ If you have a Helium setup, you may benefit from reading this blog post first, [
You'll need to run a [Streamr node](../streamr-network/streamr-nodes.md) to connect your app to.

```shell
$ npm i -g streamr-broker
$ npm i -g @streamr/node
```

Before the Streamr node can be started, its configuration files need to be created using the following command:
Expand Down Expand Up @@ -58,10 +58,10 @@ Create a folder cd into it and create a package.json by running
$ npm init
```

The Streamr SDK is available on [NPM](https://www.npmjs.com/package/streamr-client) and can be installed simply with:
The Streamr SDK is available on [NPM](https://www.npmjs.com/package/@streamr/sdk) and can be installed simply with:

```shell
$ npm install streamr-client
$ npm install @streamr/sdk
```

Having trouble installing the client? Maybe our [troubleshooting](../usage/streamr-js-client/how-to-use#Troubleshooting) section will help.
Expand All @@ -74,7 +74,7 @@ TODO: ** Create a stream widget **

```ts
// Import the Streamr client
import { StreamrClient } from "streamr-client"
import { StreamrClient } from "@streamr/sdk"

const PRIVATE_KEY = ""

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/guides/web-app-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In this quickstart guide, you'll be using Streamr in a **ReactJS** web applicati
**Prerequisites:**

- NPM v8 or greater
- NodeJS 16.13.x or greater
- NodeJS 18.x or greater (Ideally v20+)
- A basic understanding of ReactJS or NextJS
- A small amount of `MATIC` to pay for gas on Polygon mainnet. You can reachout to us on the #dev channel of [Discord](https://discord.gg/gZAm8P7hK8) for some tokens.

Expand All @@ -21,10 +21,10 @@ First you need to install the Streamr SDK in your application:

<!-- TODO: add hub video tutorial -->

The SDK is available on [NPM](https://www.npmjs.com/package/streamr-client) and can be installed simply with:
The SDK is available on [NPM](https://www.npmjs.com/package/@streamr/sdk) and can be installed simply with:

```shell
$ npm install streamr-client
$ npm install @streamr/sdk
```

Having trouble installing the SDK? Maybe our [troubleshooting](../usage/streamr-js-client/how-to-use#Troubleshooting) section will help.
Expand All @@ -43,7 +43,7 @@ If you have created your own stream, set the `SUBSCRIBE` permission to public or
:::

```ts
import { StreamrClient } from "streamr-client"
import { StreamrClient } from "@streamr/sdk"
declare var window: any

export const startSubscribing = () => {
Expand All @@ -69,7 +69,7 @@ export const startSubscribing = () => {
Simply install the following packages in your application:

```shell
$ npm install streamr-client streamr-client-react@hkt
$ npm install streamr-client-react@latest
```

The `Provider` component holds its own StreamrClient instance and makes it available to all its children components.
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/help/debugging-tools.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 4
---

# Debugging streams
Expand All @@ -9,7 +9,7 @@ Turning up the log level is a good way to diagnose tricky connectivity problems.
You can pass the logging level in the Streamr constructor as follows:

```ts
const Streamr = require('streamr-client')
const Streamr = require('@streamr/sdk')

const streamr = new Streamr({
logLevel: 'debug',
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/help/how-to-contribute.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 6
---

# How to contribute
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/help/how-to-get-support.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 5
---

# Get support
Expand Down
Loading
Loading