Skip to content

Commit d8d8a88

Browse files
authored
Merge pull request #4 from travisperson/chore/readme
chore: add basic README with usage
2 parents 6539412 + 34c9dd1 commit d8d8a88

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,50 @@
11
# filsnap
22

3-
filsnap is a software tool for creating chain exports / snapshots from lotus nodes.
3+
filsnap is a software tool for creating chain exports / snapshots using the lotus filecoin node.
4+
5+
## Background
6+
7+
Filecoin network snapshots are a segment of the Filecoin chain exported to a Content Addressable aRchives (CAR) file.
8+
They contain a chain segment large enough to allow the Filecoin network consensus protocol to apply messages
9+
successfully.
10+
11+
## Building & Dependencies
12+
13+
- Go 1.16 or higher
14+
15+
```
16+
make all
17+
```
18+
19+
## Usage
20+
21+
A running lotus node is required with automatic restarts and a jwt token with `admin` privileges.
22+
23+
Setup Daemon
24+
```
25+
$ while true; do lotus daemon; done
26+
```
27+
28+
Create Token
29+
```
30+
lotus auth create-token --perm admin | tr -d '\n' > token
31+
```
32+
33+
```
34+
cat > config.toml <<EOF
35+
[[Nodes]]
36+
Address = "/ip4/127.0.0.1/tcp/1234"
37+
TokenPath = ./token"
38+
EOF
39+
```
40+
41+
```
42+
./filsnap nodelocker run
43+
```
44+
45+
```
46+
./filsnap create --height <height> --discard
47+
```
448

549
## Contributing
650

0 commit comments

Comments
 (0)