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

fix(mainnet): update powergate docs for mainnet #230

Merged
merged 1 commit into from
Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion docs/buckets/archiving.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Bucket Archiving

Bucket archiving is one of the latest features to arrive at Textile. Archiving is the process of taking the existing snapshot of your bucket content and storing it on [Filecoin](https://filecoin.io/). Filecoin is still considered experimental, but it is ready to be tested and built on by the right app developers. So, what is bucket archiving?
Bucket archiving is one of the latest features to arrive at Textile. Archiving is the process of taking the existing snapshot of your bucket content and storing it on [Filecoin](https://filecoin.io/). While the Hub is ready to be tested and built on by the right app developers, use it with caution.

So, what is bucket archiving?

Bucket archiving allows you to leverage the purely decentralized nature of Filecoin for the storage of your buckets. Check out this [video](https://www.youtube.com/watch?v=jiBUxIi1zko&feature=emb_title&ab_channel=IgnacioHagopian) from a [blog post](https://blog.textile.io/buckets-diffing-syncing-archiving/) demonstrating Filecoin bucket recovery using the Lotus client.

Expand Down
4 changes: 2 additions & 2 deletions docs/powergate/faq.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Filecoin Testnet
# Filecoin Questions

Here are some questions that usually get asked by the community.

Expand Down Expand Up @@ -79,7 +79,7 @@ You could ignore those errors since Powergate is not relying on the Lotus client

We preferred not to completely hide errors this external package just in case we discover new problems.

### I've made a deal in Testnet/SR2, how can I know everything is working okay?
### I've made a deal in Mainnet/Testnet/SR2, how can I know everything is working okay?

We recommend using the `pow ffs -t <ffs-token> log <pushed-cid>` which provides a human-friendy output.
Creating deals on any Filecoin network can take more than 10hrs in the usual case, and many things can go wrong since Powergate is being relatively open to miners that provide storage in the network, so they might go offline at any time, be unreliable, or have network problems.
Expand Down
14 changes: 5 additions & 9 deletions docs/powergate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ hero_img: ../images/powergate-hero.png
The Powergate is an API driven solution for deploying multitiered storage across [Filecoin](https://filecoin.io/) and [IPFS](https://ipfs.io/). Persistent storage on Filecoin allows rich storage configuration for data such as replication factor, miner selection, deal renewal, and repair. Network available storage is configurable and provided through a connected IPFS peer or pinning network.

!!!Warning
The Powergate will remain in rapid development until close to the Filecoin Mainnet launch. During this time, will likely encounter bugs and unannounced API changes. Do not run the Powergate in production systems.
The Powergate will remain in rapid development until a formal release. During this time, will likely encounter bugs and unannounced API changes. Do not run the Powergate in production systems and please join the powergate-users channel in the[ Filecoin community Slack](https://filecoin.io/slack) for announcements and support.

## Overview

Expand Down Expand Up @@ -118,23 +118,23 @@ The Powergate APIs are available as gRPC endpoints. There are three ways to get

The Powergate comes packed with a number of additional tools that will be useful to you as you integrate it into your system.

- [Lotus](https://lotu.sh/). A Lotus node running on the current Testnet.
- [Lotus](https://lotu.sh/). A Lotus node running on the Filecoin network.
- [IPFS](https://ipfs.io/). A full IPFS node running to back Powergate FFS.
- [Prometheus](https://prometheus.io/). The backend for metrics processing.
- [Grafana](https://grafana.com/). Providing metrics dashboard.
- [cAdvisor](https://github.com/google/cadvisor). Providing container metrics.

### Running the Powergate

You can run the Powergate on the Filecoin testnet or using an embedded localnet we make available as part of the Powergate stack. We recommend starting out with the localnet as you'll get access to the full set of APIs and capabilities without having to start syncing the network right away. When ready, you can update your Powergate to connect to the live _testnet_ and in the future _mainnet_.
You can run the Powergate on the Filecoin mainnet or using an embedded localnet we make available as part of the Powergate stack. We recommend starting out with the localnet as you'll get access to the full set of APIs and capabilities without having to start syncing the network right away. When ready, you can update your Powergate to connect to the live _mainnet_.

#### Localnet

The localnet provides a fast, fully functional, embedded Filecoin network that can be used for testing, building, or running continuous integratin. Read more about [running the Powergate on localnet or running the localnet to use the Lotus client directly](localnet.md).

#### Testnet
#### Mainnet

Once you are ready to start using the Powergate with the Filecoin Testnet, it's just a single line.
Once you are ready to start using the Powergate with the Filecoin Mainnet, it's just a single line.

```bash
git clone git@github.com:textileio/powergate.git
Expand All @@ -144,10 +144,6 @@ make up

[Read the latest setup instructions](https://github.com/textileio/powergate/#production-setup).

#### Mainnet

When Filecoin Mainnet launches, we'll provide setup steps like the Testnet steps above.

## Learn more

#### Walk-through Video
Expand Down
22 changes: 11 additions & 11 deletions docs/powergate/testnet.md → docs/powergate/mainnet.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Filecoin Testnet
# Filecoin Mainnet

If you are ready to run on Testnet, the Powergate should make it as easy as possible. Note that running a fully synced [Lotus](https://lotu.sh/) node can take a considerable amount of time and resources. The required effort is normal on live blockchain networks. It may take more than a day to properly sync the current chain the first time your run the Powergate.
If you are ready to run on Mainnet, the Powergate should make it as easy as possible. Note that running a fully synced [Lotus](https://lotu.sh/) node can take a considerable amount of time and resources. The required effort is normal on live blockchain networks. It may take more than a day to properly sync the current chain the first time your run the Powergate.

## Getting Started

Expand All @@ -10,7 +10,7 @@ There are a few resources you'll need before you start running any nodes.
- [Powergate](https://github.com/textileio/powergate).
- - [Golang](https://golang.org/). Building the Powergate CLI from code requires that you can run commands with Go. Other sections of the tutorials below don't have any Go requirement.

## Testnet with Powergate
## Mainnet with Powergate

### Installation

Expand All @@ -23,7 +23,7 @@ cd powergate

### Setup

A default setup is available in a `docker-compose` configuration shipped with the Powergate. With the default setup, you will run Powergate connected to live Filecoin testnet.
A default setup is available in a `docker-compose` configuration shipped with the Powergate. With the default setup, you will run Powergate connected to live Filecoin Mainnet.

**Run the docker-compose**

Expand All @@ -34,9 +34,9 @@ cd docker
make up
```

If this is your first time running the Powergate, Docker will download the required instances before any Powergate setup begins. Downloads are dependent on your bandwidth and may take **a few minutes**, but wont be required for subsequent runs of the Powergate.
If this is your first time running the Powergate, Docker will download the required instances before any Powergate setup begins. Downloads are dependent on your bandwidth and may take **a few minutes**, but won't be required for subsequent runs of the Powergate.

If this is the first time you are running the Powergate on the testnet, or if you have been offline for any amount of time, you will need to wait for the chain to properly sync. This will likely take more than a day.
If this is the first time you are running the Powergate on the mainnet, or if you have been offline for any amount of time, you will need to wait for the chain to properly sync. This will likely take more than a day.

Once running, you will begin to see log outputs.

Expand All @@ -46,27 +46,27 @@ mined block in the past {"block-time": "2009-01-01T04:44:30.000Z",\
"time": "2020-05-29T20:35:08.644Z", "duration": 359999438.64444387}
```

When complete, you will have a fully functional Powergate (`powd`), a Lotus node, and an IPFS node wired correctly together to start using the Testnet!
When complete, you will have a fully functional Powergate (`powd`), a Lotus node, and an IPFS node wired correctly together to start using the Mainnet!

### Bootstrap from a snapshot

Syncing a new Lotus node from genesis can take a considerable time. The current `testnet` network is providing snapshots of the VM state every 6hrs, which means, in the worst case, syncing 6hs of new blocks.
Syncing a new Lotus node from genesis can take a considerable time. The current `mainnet` network is providing snapshots of the VM state every 6hrs, which means, in the worst case, syncing 6hs of new blocks.
Bootstraping the Lotus node from a snapshot implies complete trust in the party who generated the snapshot, so this is a pragmatic solution for getting up to speed fast. Depending on your use case you should consider the security risks of accepting snapshots from trusted parties.

In order to boostrap from a snapshot in `testnet`, download the [snapshot CAR file](https://very-temporary-spacerace-chain-snapshot.s3.amazonaws.com/Spacerace_pruned_stateroots_snapshot_latest.car). This file is maintained up to date by Protocol Labs.
In order to boostrap from a snapshot in `mainnet`, download the [snapshot CAR file](https://very-temporary-spacerace-chain-snapshot.s3.amazonaws.com/Spacerace_pruned_stateroots_snapshot_latest.car). This file is maintained up to date by Protocol Labs.
We're going to assume this CAR file was downloaded to your local path: `/home/myuser/snapshots/Spacerace_pruned_stateroots_snapshot_latest.car`.

You should edit the `docker/docker-compose.yaml` file adding two lines:
![image](https://user-images.githubusercontent.com/6136245/93375329-6383fd80-f82e-11ea-9850-2970f30a793c.png)

Then run `make up`. If you inspect the Lotus node with `docker logs testnet_lotus_1`, you will see a message that is importing chain information, and a bunch of Badger compaction messages. After the importing is done, the Lotus node will continue to sync as usual showing the typical logs. At this point you should `make down` (you don't need to wait to full syncing), revert `docker/docker-compose.yaml` to the original content, and `make up` again.
Then run `make up`. If you inspect the Lotus node with `docker logs mainnet_lotus_1`, you will see a message that is importing chain information, and many Badger compaction messages. After the importing is done, the Lotus node will continue to sync as usual showing the typical logs. At this point you should `make down` (you don't need to wait to full syncing), revert `docker/docker-compose.yaml` to the original content, and `make up` again.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't test this live, flagging for a check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, no. Needs some extra change un the Makefile in Powergate 'docker' folder.
Can do soon.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, so will push this to docs for the time-being. let me know if you want a quick pr there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Targeted here.


Congratulations! You're now syncing from a trusted checkpoint.


### Create a deal and store a file

Now that your Powergate is running on testnet, all the CLI and API commands are the same as if you had run it on localnet before.
Now that your Powergate is running on mainnet, all the CLI and API commands are the same as if you had run it on localnet before.

#### Install the CLI

Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ plugins:
"hub/buckets.md": "buckets/index.md"
"threads/introduction.md": "threads/index.md"
"powergate/introduction.md": "powergate/index.md"
"powergate/testnet.md": "powergate/mainnet.md"
"powergate/devnet.md": "powergate/localnet.md"
"tutorials/hub/user-login-endpoint.md": "tutorials/hub/production-auth.md"
"tutorials/hub/libp2p-identities.md": "tutorials/hub/pki-identities.md"
Expand Down Expand Up @@ -100,7 +101,7 @@ nav:
- Powergate (Filecoin):
- Introduction: powergate/index.md
- Localnet: powergate/localnet.md
- Testnet: powergate/testnet.md
- Mainnet: powergate/mainnet.md
- Store Data:
- Intro to FFS: powergate/ffs.md
- Storage Configs: powergate/storageconfig.md
Expand Down