Textile's Filecoin swiss army knife for developers
Join us on our public Slack channel for news, discussions, and status updates. Check out our blog for the latest posts and announcements.
Warning This project is still pre-release and is only meant for testing.
Powergate communicates with a Lotus node to interact with the filecoin network. If you want to run Powergate targeting the current testnet, you should be running a fully-synced Lotus node in the same host as Powergate. For steps to install Lotus, refer to https://lotu.sh/ taking special attention to its dependencies.
Since bootstrapping a Lotus node from scratch and getting it synced may take too long, Powergate allows an --embedded flag, which
auto-creates a fake local testnet with a single miner, and auto-connects to it. This means, only running the Powergate server with the flag enabled, allows to use it in some reasonable context with almost no extra setup.
For both building the CLI and the Server, run:
make buildThis will create powd (server) and pow (CLI) of Powergate.
To build the CLI, run:
make build-cliTry pow --help.
To build the Server, run:
make build-serverThe server connects to Lotus and enables multiple modules, such as:
- Reputations module:
- Miners index: with on-chain and metadata information.
- Ask index: with an up-to-date information about available Storage Ask in the network.
- Slashing index: contains a history of all miner-slashes.
- Deals Module:
- Contain helper features for making and watching deals.
- FFS:
- A powerful level of abstraction to pin Cids in Hot and Cold storages, more details soon!
The server can run in Embedded mode which auto-creates a fake devnet with a single miner and connects to it. The simplest way to run it is:
cd docker
make embedThis creates an ephemeral server with all working for CLI interaction.
Running the full mode can be done by:
cd docker
make freshThis will spinup and auto-wire:
- Prometheus ,endpoint for metrics
- Grafana, for metrics dashboard
- cAdvisor, for container metrics
- Lotus node configured for testnet.
- Powergate, wired with all of above components.
Recall that you should wait for Lotus to be fully-synced which might take a long time now. If you're running the Lotus node in the host and want to leverage its fully synced, you could:
- Bind the
.lotusfolder to the Lotus node in the docker-compose file. - Or, just
docker cpit. In any option, you should stop the original Lotus node.
If you don't have a fully-synced Lotus node and don't want to wait, consider using our archives.
For running tests: make test
This project is a work in progress. As such, there's a few things you can do right now to help out:
- Ask questions! We'll try to help. Be sure to drop a note (on the above issue) if there is anything you'd like to work on and we'll update the issue to let others know. Also get in touch on Slack.
- Open issues, file issues, submit pull requests!
- Perform code reviews. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
- Take a look at the code. Contributions here that would be most helpful are top-level comments about how it should look based on your understanding. Again, the more eyes the better.
- Add tests. There can never be enough tests.
Before you get started, be sure to read our contributors guide and our contributor covenant code of conduct.