Skip to content

Commit f87ca7d

Browse files
committed
chore: rename after project migration
1 parent 8036805 commit f87ca7d

File tree

19 files changed

+76
-76
lines changed

19 files changed

+76
-76
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ RUN go mod download
1313

1414
COPY . .
1515

16-
RUN go build -o filsnap ./cmd/filsnap
16+
RUN go build -o filecoin-chain-archiver ./cmd/filecoin-chain-archiver
1717

1818
FROM debian:buster
1919

20-
COPY --from=builder /build/filsnap /usr/local/bin
20+
COPY --from=builder /build/filecoin-chain-archiver /usr/local/bin
2121

22-
ENTRYPOINT ["/usr/local/bin/filsnap"]
22+
ENTRYPOINT ["/usr/local/bin/filecoin-chain-archiver"]
2323
CMD ["-help"]

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ unexport GOFLAGS
44

55
GOCC?=go
66

7-
ldflags=-X=github.com/filecoin-project/filecoin-snapshot-mvp/build.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))
7+
ldflags=-X=github.com/filecoin-project/filecoin-chain-archiver/build.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))
88

99
ifneq ($(strip $(LDFLAGS)),)
1010
ldflags+=-extldflags=$(LDFLAGS)
@@ -14,14 +14,14 @@ GOFLAGS+=-ldflags="$(ldflags)"
1414

1515
BINS:=
1616

17-
all: filsnap
17+
all: filecoin-chain-archiver
1818
.PHONY: all
1919

2020
clean:
2121
rm -rf $(BINS)
2222
.PHONY: clean
2323

24-
filsnap:
25-
$(GOCC) build $(GOFLAGS) -o filsnap ./cmd/filsnap/
26-
.PHONY: filsnap
27-
BINS+=filsnap
24+
filecoin-chain-archiver:
25+
$(GOCC) build $(GOFLAGS) -o filecoin-chain-archiver ./cmd/filecoin-chain-archiver/
26+
.PHONY: filecoin-chain-archiver
27+
BINS+=filecoin-chain-archiver

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# filsnap
1+
# Filecoin Chain Archiver
22

3-
filsnap is a software tool for creating chain exports / snapshots using the lotus filecoin node.
3+
Filecoin chain archiver is a software tool for creating chain exports / snapshots using the lotus filecoin node.
44

55
## Background
66

@@ -39,11 +39,11 @@ EOF
3939
```
4040

4141
```
42-
./filsnap nodelocker run
42+
./filecoin-chain-archiver nodelocker run
4343
```
4444

4545
```
46-
./filsnap create --height <height> --discard
46+
./filecoin-chain-archiver create --height <height> --discard
4747
```
4848

4949
## Contributing
@@ -52,4 +52,4 @@ PRs accepted.
5252

5353
## License
5454

55-
Dual-licensed under [MIT](https://github.com/travisperson/filsnap/blob/master/LICENSE-MIT) + [Apache 2.0](https://github.com/travisperson/filsnap/blob/master/LICENSE-APACHE)
55+
Dual-licensed under [MIT](https://github.com/filecoin-project/filecoin-chain-archiver/blob/master/LICENSE-MIT) + [Apache 2.0](https://github.com/filecoin-project/filecoin-chain-archiver/blob/master/LICENSE-APACHE)

cmd/filsnap/cmds/cmds.go renamed to cmd/filecoin-chain-archiver/cmds/cmds.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/urfave/cli/v2"
88
)
99

10-
var logger = log.Logger("filsnap/cmds")
10+
var logger = log.Logger("filecoin-chain-archiver/cmds")
1111

1212
var Commands = []*cli.Command{cmdCreate, cmdDefaultConfig, cmdService}
1313

cmd/filsnap/cmds/config.go renamed to cmd/filecoin-chain-archiver/cmds/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmds
33
import (
44
"fmt"
55

6-
"github.com/travisperson/filsnap/pkg/config"
6+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/config"
77
"github.com/urfave/cli/v2"
88
)
99

cmd/filsnap/cmds/create.go renamed to cmd/filecoin-chain-archiver/cmds/create.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
"github.com/filecoin-project/go-state-types/abi"
1515
"github.com/minio/minio-go/v7"
1616
"github.com/minio/minio-go/v7/pkg/credentials"
17-
"github.com/travisperson/filsnap/pkg/config"
18-
"github.com/travisperson/filsnap/pkg/consensus"
19-
"github.com/travisperson/filsnap/pkg/export"
20-
"github.com/travisperson/filsnap/pkg/nodelocker/client"
17+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/config"
18+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/consensus"
19+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/export"
20+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/nodelocker/client"
2121
"github.com/urfave/cli/v2"
2222
"golang.org/x/xerrors"
2323

@@ -52,74 +52,74 @@ var cmdCreate = &cli.Command{
5252
Name: "nodelocker-api",
5353
Usage: "host and port of nodelocker api",
5454
Value: "http://127.0.0.1:5100",
55-
EnvVars: []string{"FILSNAP_CREATE_NODELOCKER_API"},
55+
EnvVars: []string{"FCA_CREATE_NODELOCKER_API"},
5656
},
5757
&cli.StringFlag{
5858
Name: "bucket",
5959
Usage: "bucket name for export upload",
60-
EnvVars: []string{"FILSNAP_CREATE_BUCKET"},
60+
EnvVars: []string{"FCA_CREATE_BUCKET"},
6161
},
6262
&cli.StringFlag{
6363
Name: "bucket-endpoint",
6464
Usage: "bucket host and port for upload",
65-
EnvVars: []string{"FILSNAP_CREATE_BUCKET_ENDPOINT"},
65+
EnvVars: []string{"FCA_CREATE_BUCKET_ENDPOINT"},
6666
},
6767
&cli.StringFlag{
6868
Name: "access-key",
6969
Usage: "access key for upload",
70-
EnvVars: []string{"FILSNAP_CREATE_ACCESS_KEY"},
70+
EnvVars: []string{"FCA_CREATE_ACCESS_KEY"},
7171
},
7272
&cli.StringFlag{
7373
Name: "secret-key",
7474
Usage: "secret key for upload",
75-
EnvVars: []string{"FILSNAP_CREATE_SECRET_KEY"},
75+
EnvVars: []string{"FCA_CREATE_SECRET_KEY"},
7676
},
7777
&cli.BoolFlag{
7878
Name: "discard",
7979
Usage: "discard output, do not upload",
80-
EnvVars: []string{"FILSNAP_CREATE_DISCARD"},
80+
EnvVars: []string{"FCA_CREATE_DISCARD"},
8181
Value: false,
8282
},
8383
&cli.StringFlag{
8484
Name: "config-path",
8585
Usage: "path to configuration file",
86-
EnvVars: []string{"FILSNAP_CONFIG_PATH"},
86+
EnvVars: []string{"FCA_CONFIG_PATH"},
8787
Value: "./config.toml",
8888
},
8989
&cli.IntFlag{
9090
Name: "interval",
9191
Usage: "interval used to determine next export height",
92-
EnvVars: []string{"FILSNAP_CREATE_INTERVAL"},
92+
EnvVars: []string{"FCA_CREATE_INTERVAL"},
9393
Value: 120,
9494
},
9595
&cli.IntFlag{
9696
Name: "confidence",
9797
Usage: "number of tipsets that should exist after the determine export height",
98-
EnvVars: []string{"FILSNAP_CREATE_CONFIDENCE"},
98+
EnvVars: []string{"FCA_CREATE_CONFIDENCE"},
9999
Value: 15,
100100
},
101101
&cli.IntFlag{
102102
Name: "after",
103103
Usage: "use interval height after this height",
104-
EnvVars: []string{"FILSNAP_CREATE_AFTER"},
104+
EnvVars: []string{"FCA_CREATE_AFTER"},
105105
Value: 0,
106106
},
107107
&cli.IntFlag{
108108
Name: "height",
109109
Usage: "create a snapshot from the given height",
110-
EnvVars: []string{"FILSNAP_CREATE_HEIGHT"},
110+
EnvVars: []string{"FCA_CREATE_HEIGHT"},
111111
Value: 0,
112112
},
113113
&cli.IntFlag{
114114
Name: "stateroot-count",
115115
Usage: "number of stateroots to included in snapshot",
116-
EnvVars: []string{"FILSNAP_CREATE_STATEROOT_COUNT"},
116+
EnvVars: []string{"FCA_CREATE_STATEROOT_COUNT"},
117117
Value: 2000,
118118
},
119119
&cli.DurationFlag{
120120
Name: "progress-update",
121121
Usage: "how frequenty to provide provide update logs",
122-
EnvVars: []string{"FILSNAP_CREATE_PROGRESS_UPDATE"},
122+
EnvVars: []string{"FCA_CREATE_PROGRESS_UPDATE"},
123123
Value: 60 * time.Second,
124124
},
125125
},

cmd/filsnap/cmds/locker.go renamed to cmd/filecoin-chain-archiver/cmds/locker.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import (
1515
"github.com/urfave/cli/v2"
1616
"golang.org/x/xerrors"
1717

18-
"github.com/travisperson/filsnap/build"
19-
"github.com/travisperson/filsnap/pkg/nodelocker/api"
20-
"github.com/travisperson/filsnap/pkg/nodelocker/api/apiclient"
21-
"github.com/travisperson/filsnap/pkg/nodelocker/service"
18+
"github.com/filecoin-project/filecoin-chain-archiver/build"
19+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/nodelocker/api"
20+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/nodelocker/api/apiclient"
21+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/nodelocker/service"
2222
)
2323

2424
var (
@@ -42,12 +42,12 @@ var cmdService = &cli.Command{
4242
&cli.StringFlag{
4343
Name: "operator-api",
4444
Usage: "host and port of operator api",
45-
EnvVars: []string{"FILSNAP_NODELOCKER_OPERATOR_API"},
45+
EnvVars: []string{"FCA_NODELOCKER_OPERATOR_API"},
4646
Value: "http://localhost:5101",
4747
},
4848
&cli.StringFlag{
4949
Name: "api-info",
50-
EnvVars: []string{"FILSNAP_NODELOCKER_OPERATOR_API_INFO"},
50+
EnvVars: []string{"FCA_NODELOCKER_OPERATOR_API_INFO"},
5151
Hidden: true,
5252
},
5353
},
@@ -213,13 +213,13 @@ var cmdService = &cli.Command{
213213
&cli.StringFlag{
214214
Name: "service-listen",
215215
Usage: "host and port to listen on",
216-
EnvVars: []string{"FILSNAP_NODELOCKER_SERVICE_LISTEN"},
216+
EnvVars: []string{"FCA_NODELOCKER_SERVICE_LISTEN"},
217217
Value: "localhost:5100",
218218
},
219219
&cli.StringFlag{
220220
Name: "operator-listen",
221221
Usage: "host and port to listen on",
222-
EnvVars: []string{"FILSNAP_NODELOCKER_OPERATOR_LISTEN"},
222+
EnvVars: []string{"FCA_NODELOCKER_OPERATOR_LISTEN"},
223223
Value: "localhost:5101",
224224
},
225225
},

cmd/filsnap/cmds/utils.go renamed to cmd/filecoin-chain-archiver/cmds/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/filecoin-project/go-jsonrpc"
1212

1313
cliutil "github.com/filecoin-project/lotus/cli/util"
14-
"github.com/travisperson/filsnap/pkg/config"
14+
"github.com/filecoin-project/filecoin-chain-archiver/pkg/config"
1515
)
1616

1717
func NodeMultiaddrs(cfg *config.Config) ([]string, error) {

cmd/filsnap/main.go renamed to cmd/filecoin-chain-archiver/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ import (
44
"os"
55
"strings"
66

7-
"github.com/travisperson/filsnap/build"
8-
"github.com/travisperson/filsnap/cmd/filsnap/cmds"
7+
"github.com/filecoin-project/filecoin-chain-archiver/build"
8+
"github.com/filecoin-project/filecoin-chain-archiver/cmd/filecoin-chain-archiver/cmds"
99

1010
"github.com/ipfs/go-log/v2"
1111
"github.com/urfave/cli/v2"
1212
"golang.org/x/xerrors"
1313
)
1414

15-
var logger = log.Logger("filsnap")
15+
var logger = log.Logger("filecoin-chain-archiver")
1616

1717
func main() {
1818
app := &cli.App{
19-
Name: "filsnap",
19+
Name: "filecoin-chain-archiver",
2020
Usage: "simple chain export mvp",
2121
Version: build.Version(),
2222
Flags: []cli.Flag{
2323
&cli.StringFlag{
2424
Name: "log-level-named",
2525
Usage: "common delimiated list of named loggers and log levels formatted as name:level",
26-
EnvVars: []string{"FILSNAP_LOG_LEVEL_NAMED"},
26+
EnvVars: []string{"FCA_LOG_LEVEL_NAMED"},
2727
Value: "",
2828
},
2929
&cli.StringFlag{
3030
Name: "log-level",
31-
Usage: "set all filsnap loggers to level",
32-
EnvVars: []string{"FILSNAP_LOG_LEVEL"},
31+
Usage: "set all filecoin-chain-archiver loggers to level",
32+
EnvVars: []string{"FCA_LOG_LEVEL"},
3333
Value: "warn",
3434
},
3535
},
@@ -48,7 +48,7 @@ func main() {
4848

4949
func setupLogging(cctx *cli.Context) error {
5050
ll := cctx.String("log-level")
51-
if err := log.SetLogLevelRegex("filsnap/*", ll); err != nil {
51+
if err := log.SetLogLevelRegex("filecoin-chain-archiver/*", ll); err != nil {
5252
return xerrors.Errorf("set log level: %w", err)
5353
}
5454

docs/DEVELOPMENT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ http://minio.minio.svc.cluster.local
2424

2525
Lotus API Multiaddrs
2626
```
27-
/dns/lotus-a-lotus-daemon.ntwk-butterflynet-filsnap.svc.cluster.local/tcp/1234
28-
/dns/lotus-b-lotus-daemon.ntwk-butterflynet-filsnap.svc.cluster.local/tcp/1234
29-
/dns/lotus-c-lotus-daemon.ntwk-butterflynet-filsnap.svc.cluster.local/tcp/1234
27+
/dns/lotus-a-lotus-daemon.ntwk-butterflynet-filecoin-chain-archiver.svc.cluster.local/tcp/1234
28+
/dns/lotus-b-lotus-daemon.ntwk-butterflynet-filecoin-chain-archiver.svc.cluster.local/tcp/1234
29+
/dns/lotus-c-lotus-daemon.ntwk-butterflynet-filecoin-chain-archiver.svc.cluster.local/tcp/1234
3030
```
3131

3232
## Requirements
@@ -85,7 +85,7 @@ kind create cluster --config cluster.yaml
8585
When building the docker container, you will need to move it into the cluster. Kind provides an easy way to do this.
8686

8787
```shell
88-
kind load docker-image filsnap:latest
88+
kind load docker-image filecoin-chain-archiver:latest
8989
```
9090

9191
### Install Monitoring Stack
@@ -177,14 +177,14 @@ kubectl port-forward service/minio-console 9090:9090 -n minio
177177

178178
Open the console http://localhost:9090 and login using the Console Credentials.
179179

180-
Create a bucket called `filsnap` with all options disabled.
180+
Create a bucket called `filecoin-chain-archiver` with all options disabled.
181181

182182
### Creating Lotus Nodes
183183

184184
Create a namespace for the lotus daemons
185185

186186
```shell
187-
kubectl create namespace ntwk-butterflynet-filsnap
187+
kubectl create namespace ntwk-butterflynet-filecoin-chain-archiver
188188
```
189189

190190
Note: This is the same namespace you will develop in, not technically required, but it's easier
@@ -210,7 +210,7 @@ kubectl create secret generic lotus-jwt \
210210
--from-file=jwt-ro-privs-token=/tmp/secrets/jwt-ro-privs-token \
211211
--from-file=jwt-rw-privs-token=/tmp/secrets/jwt-rw-privs-token \
212212
--from-file=jwt-so-privs-token=/tmp/secrets/jwt-so-privs-token \
213-
--output=name --namespace ntwk-butterflynet-filsnap
213+
--output=name --namespace ntwk-butterflynet-filecoin-chain-archiver
214214

215215
rm -rf /tmp/secrets
216216
rm jwt-node.jwts jwt-node.token
@@ -261,7 +261,7 @@ persistence:
261261
EOF
262262
```
263263
```shell
264-
helm install lotus-a filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filsnap
265-
helm install lotus-b filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filsnap
266-
helm install lotus-c filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filsnap
264+
helm install lotus-a filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filecoin-chain-archiver
265+
helm install lotus-b filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filecoin-chain-archiver
266+
helm install lotus-c filecoin/lotus-fullnode --values values-lotus.yaml --namespace ntwk-butterflynet-filecoin-chain-archiver
267267
```

0 commit comments

Comments
 (0)