Skip to content

Commit 99cd7bb

Browse files
authored
Various updates (textileio#519)
* Updated wallet rpc and client and cli Signed-off-by: Aaron Sutula <hi@asutula.com> * updated deals rpc and client Signed-off-by: Aaron Sutula <hi@asutula.com> * update cli Signed-off-by: Aaron Sutula <hi@asutula.com> * update docs Signed-off-by: Aaron Sutula <hi@asutula.com> * expose --maxminddbfolder flag Signed-off-by: Aaron Sutula <hi@asutula.com> * publish python bindings in ci Signed-off-by: Aaron Sutula <hi@asutula.com> * try uploading from lib dir Signed-off-by: Aaron Sutula <hi@asutula.com> * actually install buildtools protoc Signed-off-by: Aaron Sutula <hi@asutula.com> * remove deals rpc, client, and cli code Signed-off-by: Aaron Sutula <hi@asutula.com> * update cli docs Signed-off-by: Aaron Sutula <hi@asutula.com>
1 parent 1aa4fc0 commit 99cd7bb

50 files changed

Lines changed: 2103 additions & 4902 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
with:
9292
files: 'release/cli/pow_*;iplocation/maxmind/GeoLite2-City.mmdb'
9393
repo-token: ${{ secrets.GITHUB_TOKEN }}
94-
publish_grpc_lib:
94+
publish_js_grpc_lib:
9595
name: Publish JS gRPC bindings
9696
runs-on: ubuntu-latest
9797
steps:
@@ -131,3 +131,38 @@ jobs:
131131
run: |
132132
npm publish --access=public
133133
working-directory: ./js-grpc
134+
publish_py_grpc_lib:
135+
name: Publish Python gRPC bindings
136+
runs-on: ubuntu-latest
137+
steps:
138+
- name: Check out code
139+
uses: actions/checkout@v1
140+
- name: Get latest tag
141+
id: latesttag
142+
uses: "WyriHaximus/github-action-get-previous-tag@master"
143+
env:
144+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
145+
- name: Set up Python 3.7
146+
uses: actions/setup-python@v1
147+
with:
148+
python-version: 3.7
149+
- name: Install protoc
150+
run: make install-protoc
151+
- name: Make version number
152+
id: makeversion
153+
uses: frabert/replace-string-action@v1.1
154+
with:
155+
pattern: 'v'
156+
string: ${{steps.latesttag.outputs.tag}}
157+
replace-with: ''
158+
- name: Generate Python gRPC bindings
159+
run: |
160+
./scripts/gen-py-protos.sh ${{steps.makeversion.outputs.replaced}} . ./py-grpc
161+
- name: Publish Python gRPC bindings
162+
env:
163+
TWINE_USERNAME: __token__
164+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
165+
run: |
166+
python3 -m pip install --user --upgrade twine
167+
python3 -m twine upload dist/*
168+
working-directory: ./py-grpc

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ build-powbench:
1717
.PHONY: build-powbench
1818

1919
docs-pow:
20+
rm -rf ./cli-docs/pow
2021
go run ./cmd/pow/main.go docs ./cli-docs/pow
2122
.PHONY: docs-pow
2223

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ If that's the case, you can refer [here](https://docs.ipfs.io/guides/guides/inst
129129
Since FFS _HotStorage_ is pinning Cids in the IPFS node, Powergate should be the only party controlling the pinset of the node. Other systems can share the same IPFS node if can **guarantee** not unpinning Cids pinned by Powergate FFS instances.
130130

131131
### Geolite database
132-
Powergate needs an offline geo-location database to resolve miners country using their IP address. The same folder in which `powd` is executing, should have the Geolite2 database file `GeoLite2-City.mmdb`.
132+
Powergate needs an offline geo-location database to resolve miners country using their IP address. The same folder in which `powd` is executing, should have the Geolite2 database file `GeoLite2-City.mmdb` or you can pass the `--maxminddbfolder` flag to `powd` to specify the path of the folder containing `GeoLite2-City.mmdb`.
133133
You can copy this file from the GitHub repo at `iplocation/maxmind/GeoLite2-City.mmdb`. If you run Powergate using Docker, this database is bundeled in the image so isn't necessary to have extra considerations.
134134

135135
### Server
@@ -141,7 +141,7 @@ You can run the `-h` flag to see the configurable flags:
141141
```bash
142142
$ powd -h
143143
Usage of ./powd:
144-
--autocreatemasteraddr Automatically creates & funds a master address if none is provided.
144+
--autocreatemasteraddr Automatically creates & funds a master address if none is provided
145145
--debug Enable debug log level in all loggers.
146146
--devnet Indicate that will be running on an ephemeral devnet. --repopath will be autocleaned on exit.
147147
--gatewayhostaddr string Gateway host listening address (default "0.0.0.0:7000")
@@ -152,6 +152,7 @@ Usage of ./powd:
152152
--lotusmasteraddr string Existing wallet address in Lotus to be used as source of funding for new FFS instances. (Optional)
153153
--lotustoken string Lotus API authorization token. This flag or --lotustoken file are mandatory.
154154
--lotustokenfile string Path of a file that contains the Lotus API authorization token.
155+
--maxminddbfolder string Path of the folder containing GeoLite2-City.mmdb (default ".")
155156
--repopath string Path of the repository where Powergate state will be saved. (default "~/.powergate")
156157
--walletinitialfund int FFS initial funding transaction amount in attoFIL received by --lotusmasteraddr. (if set) (default 4000000000000000)
157158
pflag: help requested

api/client/client.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55

66
"github.com/multiformats/go-multiaddr"
7-
dealsRpc "github.com/textileio/powergate/deals/rpc"
87
ffsRpc "github.com/textileio/powergate/ffs/rpc"
98
healthRpc "github.com/textileio/powergate/health/rpc"
109
askRpc "github.com/textileio/powergate/index/ask/rpc"
@@ -22,7 +21,6 @@ type Client struct {
2221
Asks *Asks
2322
Miners *Miners
2423
Faults *Faults
25-
Deals *Deals
2624
Wallet *Wallet
2725
Reputation *Reputation
2826
FFS *FFS
@@ -70,7 +68,6 @@ func NewClient(ma multiaddr.Multiaddr, opts ...grpc.DialOption) (*Client, error)
7068
Asks: &Asks{client: askRpc.NewRPCServiceClient(conn)},
7169
Miners: &Miners{client: minerRpc.NewRPCServiceClient(conn)},
7270
Faults: &Faults{client: faultsRpc.NewRPCServiceClient(conn)},
73-
Deals: &Deals{client: dealsRpc.NewRPCServiceClient(conn)},
7471
Wallet: &Wallet{client: walletRpc.NewRPCServiceClient(conn)},
7572
Reputation: &Reputation{client: reputationRpc.NewRPCServiceClient(conn)},
7673
FFS: &FFS{client: ffsRpc.NewRPCServiceClient(conn)},

0 commit comments

Comments
 (0)