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

LocalNet documentation using playground #1535

Merged
merged 14 commits into from Apr 5, 2023
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -35,4 +35,4 @@ app/data/*

**/.DS_Store


output_*.dlv
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -132,4 +132,3 @@ To start the disclosure process, please send an email containing all evidence, d
#### Public disclosure

Once the vulnerability has been patched and deployed to the appropiate environments, the team will create a public disclosure announcement, acknowledging the vulnerability and giving credit to the original discloser or disclosers in case more than one person identifies and discloses the vulnerability.

18 changes: 9 additions & 9 deletions app/genesis.go
Expand Up @@ -8754,7 +8754,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "4900000000000",
"service_url": "https://node1.poktnodes.com:443",
"service_url": "https://node1.dev.poktnodes.com:443",
"chains": [
"0001",
"0021"
Expand All @@ -8767,7 +8767,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "4900000000000",
"service_url": "https://node2.poktnodes.com:443",
"service_url": "https://node2.dev.poktnodes.com:443",
"chains": [
"0001",
"0021"
Expand All @@ -8780,7 +8780,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "200000000000",
"service_url": "https://node3.poktnodes.com:443",
"service_url": "https://node3.dev.poktnodes.com:443",
"chains": [
"0001",
"0021"
Expand Down Expand Up @@ -12121,7 +12121,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "152527740000",
"service_url": "https://node1.pokt.net:443",
"service_url": "https://node3.dev.pokt.net:443",
"chains": [
"0001",
"0021"
Expand All @@ -12134,7 +12134,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "148041630000",
"service_url": "https://node2.pokt.net:443",
"service_url": "https://node2.dev.pokt.net:443",
"chains": [
"0001",
"0021"
Expand All @@ -12147,7 +12147,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "148041630000",
"service_url": "https://node3.pokt.net:4433",
"service_url": "https://node3.dev.pokt.net:4433",
"chains": [
"0001",
"0021"
Expand Down Expand Up @@ -14799,7 +14799,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "18083175000000",
"service_url": "https://node1.pokt.foundation:443",
"service_url": "https://node3.dev.pokt.foundation:443",
"chains": [
"0001",
"0021"
Expand All @@ -14812,7 +14812,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "18083175000000",
"service_url": "https://node2.pokt.foundation:443",
"service_url": "https://node2.dev.pokt.foundation:443",
"chains": [
"0001",
"0021"
Expand All @@ -14825,7 +14825,7 @@ var mainnetGenesis = `{
"jailed": true,
"status": 2,
"tokens": "18631150000000",
"service_url": "https://node3.pokt.foundation:443",
"service_url": "https://node3.dev.pokt.foundation:443",
"chains": [
"0001",
"0021"
Expand Down
52 changes: 22 additions & 30 deletions doc/guides/changesAndfeatures8.md
Expand Up @@ -21,7 +21,7 @@ pocket nodes stake custodial <fromAddr> <amount> <relayChainIDs> <serviceURI> <n

The updated command expects 1 new parameter:

* `<isBefore8.0>`: true or false depending if non-custodial upgrade is activated.
- `<isBefore8.0>`: true or false depending if non-custodial upgrade is activated.

Before the upgrade is activated be sure to use `true` for `<isBefore8.0>` or the transaction won't go through

Expand All @@ -33,9 +33,9 @@ pocket nodes stake non-custodial <operatorPublicKey> <outputAddress> <amount> <R

The new stake command expects 3 new parameters:

* `<operatorPublicKey>`: operatorAddress is the only valid signer for blocks & relays. Should match the running node.
* `<outputAddress>`: outputAddress is where reward and staked funds are directed.
* `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.
- `<operatorPublicKey>`: operatorAddress is the only valid signer for blocks & relays. Should match the running node.
- `<outputAddress>`: outputAddress is where reward and staked funds are directed.
- `<isBefore8.0>`: true or false depending if non custodial upgrade is activated.

Replacing the `<fromAddr>` we have the `<operatorPublicKey>`, notice the change from using an address to using the
public key of the node. Also, we have the `<outputAddress>`, where rewards and funds will be delivered after the update
Expand Down Expand Up @@ -67,48 +67,40 @@ check or update your hosted chains.

To use the endpoint:

* First make sure to set `"chains_hot_reload": false` before beginning, hot reloading and the update endpoint can't be
- First make sure to set `"chains_hot_reload": false` before beginning, hot reloading and the update endpoint can't be
used at the same time (enabling hot reload disables the update endpoint).
* Locate your `auth.json` file in the config directory, this file contains your `authtoken` you need its value to send
- Locate your `auth.json` file in the config directory, this file contains your `authtoken` you need its value to send
request to protected endpoints (../v1/private/..).
```json
{
"Value": "<TOKEN>",
"Issued": "2022-04-08T07:35:35.858373-04:00"
}
```
* Copy the token value and replace the placeholder `<TOKEN>` with its value on this example call
```json
{
"Value": "<TOKEN>",
"Issued": "2022-04-08T07:35:35.858373-04:00"
}
```
- Copy the token value and replace the placeholder `<TOKEN>` with its value on this example call
```text
curl --location --request POST 'http://localhost:8081/v1/private/updatechains?authtoken=<TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "0001",
"url": "http://localhost:8081",
"basic_auth": {
"username": "",
"password": ""
}
}
]'
```
* Check If your request is successful using this other call
```
- Check If your request is successful using this other call
```
curl --location --request POST 'http://localhost:8081/v1/private/chains?authtoken=<TOKEN>'
```
you should receive a response like this :
```json
{
"0001": {
"basic_auth": {
"password": "",
"username": ""
},
"id": "0001",
"url": "http://localhost:8081"
}
"0001": {
"id": "0001",
"url": "http://localhost:8081"
}
}
```
* Remember to manually update your chains.json with the desired changes before or after using this method as any changes
```
- Remember to manually update your chains.json with the desired changes before or after using this method as any changes
done using the `updatechains` endpoint will be overwritten at restart by loading the chains.json
* Also, if you are writing any automations remember the `authtoken` is recreated on every restart.
- Also, if you are writing any automations remember the `authtoken` is recreated on every restart.
6 changes: 1 addition & 5 deletions doc/guides/quickstart.md
Expand Up @@ -451,17 +451,13 @@ Use the CLI or Manually Edit: `$HOME/.pocket/config/chains.json`
{% hint style="info" %} Relay Chain ID's and docs can be
found [here](https://docs.pokt.network/supported-blockchains/). {% endhint %}

These are external blockchain nodes such as ethereum, polygon and harmony. You will need to set these up by following their respective documentation. Once they are synced, you can enter the url and credentials into the following file.
These are external blockchain nodes such as ethereum, polygon and harmony. You will need to set these up by following their respective documentation. Once they are synced, you can enter the url and credentials into the following file.

```text
[
{
"id": "0002",
"url": "http://eth-geth.com",
"basic_auth": {
"username": "",
"password": ""
}
}
]
```
Expand Down