Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pokt-network/pocket-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: RC-0.10.3
Choose a base ref
...
head repository: pokt-network/pocket-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: RC-0.10.4
Choose a head ref
  • 6 commits
  • 5 files changed
  • 5 contributors

Commits on Jul 5, 2023

  1. Add snapshot docs (#1565)

    Add docs on pocket database snapshot access
    
    #1562
    Andrew-Pohl authored Jul 5, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    482fa62 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    896b2be View commit details
  3. Change default config file values (#1568)

    ## Description
    
    Changes default values for the config file.
    
    <!-- reviewpad:summarize:start -->
    ### Summary generated by Reviewpad on 05 Jul 23 23:19 UTC
    This pull request changes the default values in the `config.go` file.
    Specifically, it increases the values for `Mempool.Size` and
    `Mempool.CacheSize` from 9000 to 18000. Additionally, it adds two new
    fields `Mempool.MaxTxsBytes` and `Mempool.MaxTxBytes` with their
    respective values. This patch also updates the `FastSync.Version` to
    "v1".
    <!-- reviewpad:summarize:end -->
    okdas authored Jul 5, 2023
    Copy the full SHA
    6ea15d7 View commit details

Commits on Jul 6, 2023

  1. Testnet docs updated (#1569)

    [Issue Document v0 TestNet #1563](#1563) done
    
    Co-authored-by: Daniel Olshansky <[email protected]>
    StevenMartinez94 and Olshansk authored Jul 6, 2023
    Copy the full SHA
    92529d7 View commit details
  2. Update TestNet documentation (#1570)

    ## Description
    
    <!-- reviewpad:summarize:start -->
    ### Summary generated by Reviewpad on 06 Jul 23 22:00 UTC
    This pull request updates the "testnet.md" file in the "doc/guides" directory. The diff includes changes to the table of contents, validator lists, example queries, credentials, querying net info and status, testnet seeds, Pocket TestNet metrics dashboard, and helper examples. The diff also updates the information about who is supporting Pocket's TestNet infrastructure.
    <!-- reviewpad:summarize:end -->
    Olshansk authored Jul 6, 2023
    Copy the full SHA
    0263af8 View commit details

Commits on Jul 10, 2023

  1. Upgrade AppVersion to 0.10.4

    Olshansk committed Jul 10, 2023
    Copy the full SHA
    353dd10 View commit details
Showing with 282 additions and 5 deletions.
  1. +11 −2 README.md
  2. +1 −1 app/app.go
  3. +89 −0 doc/guides/snapshot.md
  4. +177 −0 doc/guides/testnet.md
  5. +4 −2 types/config.go
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
# Pocket Core

Official golang implementation of the Pocket Network Protocol.

<div>
<a href="https://godoc.org/github.com/pokt-network/pocket-core"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"/></a>
<a href="https://goreportcard.com/report/github.com/pokt-network/pocket-core"><img src="https://goreportcard.com/badge/github.com/pokt-network/pocket-core"/></a>
@@ -37,7 +38,7 @@ Clone the repository, `cd` into it and run `go build app/cmd/pocket_core/main.go

To run the Pocket Core binary you can use the following flags alongside the `main` executable:

````
```
Usage:
pocket [command]
@@ -64,14 +65,22 @@ Flags:
--seeds string a comma separated list of PeerURLs: '<ID>@<IP>:<PORT>,<ID2>@<IP2>:<PORT>...<IDn>@<IPn>:<PORT>'
Use "pocket [command] --help" for more information about a command.
````
```

For more detailed command information, see the [usage section](doc/specs/cli/).

## Documentation

[Visit our user documentation](https://docs.pokt.network) for tutorials and technical information on the Pocket Network.

## Database Snapshots

Snapshots are provided by [Liquify LTD](https://www.liquify.io/) details on how to access the snapshots can be found in [snapshot.md](doc/guides/snapshot.md)

## Accessing TestNet

TestNet information can be found at [testnet.md](doc/guide/testnet.md)

## Running the tests

To run the Pocket Core unit tests, `go test -short -v -p 1 ./...`
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import (
)

const (
AppVersion = "RC-0.10.3"
AppVersion = "RC-0.10.4"
)

// NewPocketCoreApp is a constructor function for PocketCoreApp
89 changes: 89 additions & 0 deletions doc/guides/snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Pocket Snapshotter <!-- omit in toc -->

_tl;dr Access Liquify's Pocket Snapshotter [here](https://github.com/liquify-validation/pocket-snapshotter)_

- [Public snapshots](#public-snapshots)
- [Update Frequency](#update-frequency)
- [Mirrors](#mirrors)
- [Download using CLI](#download-using-cli)
- [Uncompressed](#uncompressed)
- [Uncompressed Inline (slower but smaller disk footprint)](#uncompressed-inline-slower-but-smaller-disk-footprint)
- [Compressed](#compressed)
- [Compressed Inline (slower but smaller disk footprint)](#compressed-inline-slower-but-smaller-disk-footprint)
- [Issues](#issues)

## Public snapshots

If you're looking for Pocket native blockchain data snapshots, they are provided by [Liquify LTD](https://www.liquify.io/) and can be viewed via the Explorer link: [File Explorer here](https://pocket-snapshot.liquify.com).

[https://pocket-snapshot.liquify.com](pocket-snapshot.liquify.com)

### Update Frequency

Snapshots are updated every **Monday at 00:00 UTC**. The snapshots are generated on the Master (UK) and then sent over to the US and JP regions.

## Mirrors

The pocket snapshot link above is a global endpoint which is available in 3 different regions (UK, US west, Japan). The individual regions can also be accessed on the following links.

- UK (Master):[pocket-snapshot-uk.liquify.com](https://pocket-snapshot-uk.liquify.com)
- US: [pocket-snapshot-us.liquify.com](https://pocket-snapshot-us.liquify.com)
- JP: [pocket-snapshot-jp.liquify.com](https://pocket-snapshot-jp.liquify.com)

_Note: If accessing the snapshots on Monday it may be best to use the UK (Master) endpoint since there will be a 4-12 hour delay in updating the slaves in the other regions._

### Download using CLI

The snapshot repos hold the last **3 weeks of snapshots**. The latest one being referenced by the file `latest.txt` and `latest_compressed.txt`.

To copy-paste the commands below, please update `POCKET_DATA_DIR` appropriately.

```bash
export POCKET_DATA_DIR=<absolute path to your data dir>
```

#### Uncompressed

```bash
wget -O latest.txt https://pocket-snapshot.liquify.com/files/latest.txt
latestFile=$(cat latest.txt)
aria2c -s6 -x6 "https://pocket-snapshot.liquify.com/files/$latestFile"
tar xvf "$latestFile" -C ${POCKET_DATA_DIR}
rm latest.txt
```

#### Uncompressed Inline (slower but smaller disk footprint)

The below snippet will download and extract the snapshot inline. This may be beneficial if you have constrained disk space and cannot afford to store both the temp archive and extracted datadir.

```bash
wget -O latest.txt https://pocket-snapshot.liquify.com/files/latest.txt
latestFile=$(cat latest.txt)
wget -c "https://pocket-snapshot.liquify.com/files/$latestFile" -O - | sudo tar -xz -C {POCKET_DATA_DIR}
rm latest.txt
```

#### Compressed

```bash
wget -O latest.txt https://pocket-snapshot.liquify.com/files/latest_compressed.txt
latestFile=$(cat latest.txt)
aria2c -s6 -x6 "https://pocket-snapshot.liquify.com/files/$latestFile"
lz4 -c -d "$latestFile" | tar -x -C ${POCKET_DATA_DIR}
rm latest.txt
```

#### Compressed Inline (slower but smaller disk footprint)

```bash
wget -O latest.txt https://pocket-snapshot.liquify.com/files/latest_compressed.txt
latestFile=$(cat latest.txt)
wget -O - "https://pocket-snapshot.liquify.com/files/$latestFile" | lz4 -d - | tar -xv -C {POCKET_DATA_DIR}
rm latest.txt
```

### Issues

For any snapshot related issues, please [email Liquify](mailto:contact@liquify.io) or in the [node-chat channel on discord](https://discordapp.com/channels/553741558869131266/564836328202567725).

![Screenshot](https://github.com/pokt-network/pocket-core/assets/1892194/079b8dc5-4536-46b9-be69-7ae6b162c883)
177 changes: 177 additions & 0 deletions doc/guides/testnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# Pocket TestNet <!-- omit in toc -->

## Table of Contents <!-- omit in toc -->

- [Validator List w/ Pocket RPC](#validator-list-w-pocket-rpc)
- [Example Queries](#example-queries)
- [Querying State](#querying-state)
- [Querying Binary Version](#querying-binary-version)
- [Validators w/ Tendermint RPC](#validators-w-tendermint-rpc)
- [Credentials](#credentials)
- [Querying Net Info](#querying-net-info)
- [Querying Status](#querying-status)
- [TestNet Seeds](#testnet-seeds)
- [Pocket TestNet metrics dashboard](#pocket-testnet-metrics-dashboard)
- [Brought to you by NodeFleet](#brought-to-you-by-nodefleet)
- [Helper Examples](#helper-examples)
- [View All Validator Tendermint Versions](#view-all-validator-tendermint-versions)
- [View all Validator Binary Versions](#view-all-validator-binary-versions)
- [View All Validator Heights](#view-all-validator-heights)

## Validator List w/ Pocket RPC

```bash
https://node1.testnet.pokt.network/
https://node2.testnet.pokt.network/
https://node3.testnet.pokt.network/
https://node4.testnet.pokt.network/
https://node5.testnet.pokt.network/
https://node6.testnet.pokt.network/
```

### Example Queries

#### Querying State

```bash
curl -X POST https://node1.testnet.pokt.network/v1/query/state | tee query_state.json | jq
```

Output:

```bash
# {
# "app_hash": "",
# "app_state": {
# "application": {
# "applications": [
# {
# "address": "065013157ffb401642d0418b408474b361ee0836",
# "chains": [
# "004A",
# "004B",
# ...
```

#### Querying Binary Version

```bash
curl https://node1.testnet.pokt.network/v1
```

Output:

```bash
#"BETA-0.10.2"%
```

## Validators w/ Tendermint RPC

```bash
https://node1.tendermint.testnet.pokt.network/
https://node2.tendermint.testnet.pokt.network/
https://node3.tendermint.testnet.pokt.network/
https://node4.tendermint.testnet.pokt.network/
https://node5.tendermint.testnet.pokt.network/
https://node6.tendermint.testnet.pokt.network/
```

### Credentials

These endpoints require authentication and can be accessed at `https://testnet:${NODE_FLEET_PASSWORD}@$node`

You can request TestNet credentials in the [Pocket Node-Chat Discord channel](https://discord.com/channels/553741558869131266/564836328202567725).

### Querying Net Info

```bash
curl https://node1.tendermint.testnet.pokt.network/net_info
```

### Querying Status

```bash
curl https://node1.tendermint.testnet.pokt.network/status
```

## TestNet Seeds

The following seeds can be used to sync with TestNet. Copy-paste the following list of seeds into the `config.json` file on the `seeds` variable:

```bash
d90094952a3a67a99243cca645cdd5bd55fe8d27@seed1.testnet.pokt.network:26668, 2a5258dcdbaa5ca6fd882451f5a725587427a793@seed2.testnet.pokt.network:26669, a37baa84a53f2aab1243986c1cd4eff1591e50d0@seed3.testnet.pokt.network:26668, fb18401cf435bd24a2e8bf75ea7041afcf122acf@seed4.testnet.pokt.network:26669
```

## Pocket TestNet metrics dashboard

TestNet metrics can be viewed at the following links:

- [Loadbalancer metrics](https://monitoring.nodefleet.net/d/O23g2BeWk/testnet-loadbalancer-metrics?orgId=4&var-service=testnet1@file&var-entrypoint=All&from=now-3h&to=now&refresh=5m): Network traffic dashboard
- [Tendermint metrics](https://monitoring.nodefleet.net/d/UJyurCTWz/testnet-validators-tendermint-metrics): Consensus, Blocks, Transactions dashboard information and so on
- [Node exporter metrics](https://monitoring.nodefleet.net/d/Gm5yJc94z/testnet-validators-telegraf-metrics): Instance metrics
- [Loki dashboard](https://monitoring.nodefleet.net/d/_j0yAcrVz/testnet-validators-loki): Testnet Logs and explorer search

You can request TestNet credentials in the [Pocket Node-Chat Discord channel](https://discord.com/channels/553741558869131266/564836328202567725).

### Brought to you by NodeFleet

The support for Testnet infrastructure is given by[nodefleet.org](https://nodefleet.org/), a Web3 blockchain and node running company focused on delivering value for investors &builders on multi-chain ecosystem. Nodefleet provides top quality engineering and quality infrastructure around all of its products.

Reach out to the team about TestNet directly on [Discord](https://discord.com/channels/553741558869131266/564836328202567725) tagging **Lowell | nodefleet.org#7301** (148983981134577665) and **Steven94 | nodefleet.org** (357688204566069248).

## Helper Examples

### View All Validator Tendermint Versions

```bash
#!/bin/bash
declare -a nodes=("node1.tendermint.testnet.pokt.network/status"
"node2.tendermint.testnet.pokt.network/status"
"node3.tendermint.testnet.pokt.network/status"
"node4.tendermint.testnet.pokt.network/status"
"node5.tendermint.testnet.pokt.network/status"
"node6.tendermint.testnet.pokt.network/status")

for node in "${nodes[@]}"
do
url="https://testnet:${NODE_FLEET_PASSWORD}@$node"
curl -s $url | jq '.result.node_info.version'
done
```

### View all Validator Binary Versions

```bash
#!/bin/bash
declare -a nodes=("node1.testnet.pokt.network/v1"
"node2.testnet.pokt.network/v1"
"node3.testnet.pokt.network/v1"
"node4.testnet.pokt.network/v1"
"node5.testnet.pokt.network/v1"
"node6.testnet.pokt.network/v1")

for node in "${nodes[@]}"
do
url="https://$node"
curl -X GET $url
echo ""
done
```

### View All Validator Heights

```bash
#!/bin/bash
declare -a nodes=("node1.testnet.pokt.network/v1/query/height"
"node2.testnet.pokt.network/v1/query/height"
"node3.testnet.pokt.network/v1/query/height"
"node4.testnet.pokt.network/v1/query/height"
"node5.testnet.pokt.network/v1/query/height"
"node6.testnet.pokt.network/v1/query/height")

for node in "${nodes[@]}"
do
url="https://$node"
curl -X POST $url
done
```
6 changes: 4 additions & 2 deletions types/config.go
Original file line number Diff line number Diff line change
@@ -166,8 +166,10 @@ func DefaultConfig(dataDir string) Config {
c.TendermintConfig.DBBackend = string(db.GoLevelDBBackend)
c.TendermintConfig.RPC.GRPCMaxOpenConnections = 2500
c.TendermintConfig.RPC.MaxOpenConnections = 2500
c.TendermintConfig.Mempool.Size = 9000
c.TendermintConfig.Mempool.CacheSize = 9000
c.TendermintConfig.Mempool.Size = 18000
c.TendermintConfig.Mempool.CacheSize = 18000
c.TendermintConfig.Mempool.MaxTxsBytes = 2147483648
c.TendermintConfig.Mempool.MaxTxBytes = 2097152
c.TendermintConfig.FastSync = &config.FastSyncConfig{
Version: "v1",
}