Skip to content

Commit 08ec616

Browse files
nonsensejacobheundirkmcLexLuthrrvagg
authored
Boost release/v2 (#1520)
* feat: add local index directory Internally this is still refered to as the piece directory Co-authored-by: dirkmc <[email protected]> Co-authored-by: Anton Evangelatov <[email protected]> * refactor: merge from main into lid branch (#1339) * merge: main to lid (#1370) * add free check (#1315) * chore: bump version to 1.6.1 (#1317) * fix legacy deal verified status (#1324) * fix: update go-unixfsnode enough to make sure unixfs-preload is available (#1323) * release v1.6.2-rc1 (#1328) * use full path (#1330) * fix bug (#1332) * use forks of graphsync, go-data-transfer and go-fil-markets (#1333) * refactor: use forks of graphsync, go-data-transfer and go-fil-markets * refactor: convert from data transfer v1 to v2 voucher type * fix: index provider validation voucher type * fix: pass index provider engine link system through to graphsync's transport configurer * feat: use tagged version of boost-gfm * fix: retrieval client imports * feat: tagged version of lotus * feat: require go 1.19 * lint: fix lint errors * fix: itests * fix: cbor-gen, docsgen * fix: update CI lint version * fix: lint * fix: docgen * fix: go mod tidy * fix: protocol proxy TestOutboundForwarding * fix: docsgen * fix: update filecoin-ffi submodule * fix: prometheus duplicate register panic * fix: cleanup imports * fix: legs voucher processing * chore: release v1.6.2-rc2 (#1340) * release v1.6.2-rc2 * fix test * fix: flaky TestLibp2pCarServerNewTransferCancelsPreviousTransfer (#1350) * fix: flaky TestDealCompletionOnProcessResumption (#1351) * fix: occasional panic on shutdown (#1353) * feat: query UI (#1352) * log insert * fix display error * refactor code * shorten status strings * remove comment * apply suggestion * feat: add download block link to inspect page (#1312) * fix(devnet): update golang and lotus default versions (#1354) * fix(devnet): bump golang to 1.19 * chore(devnet): bump lotus default version * chore(devnet): remove unused stable env * booster-http: implement IPFS HTTP gateway (#1225) * feat: implement http api gateway * feat: use go-libipfs lib (instead of copying to extern) * feat: bump booster-bitswap info minor version * feat: http gateway metrics * fix: TestHttpInfo * feat: by default only serve blocks and CARs, with option to serve original files (jpg, mov etc) * fix: correct link for download root block (#1355) * feat: option to cleanup data for offline deals after add piece (#1341) * chore: add support for multiple node.js versions in makefile (#1356) * chore: release v.1.7.0-rc1 (#1357) * release v.1.7.0-rc1 * fix version * fix: dagstore initialize-all parameter (#1363) * fix: show verifying commp state for offline deals (#1364) * fix: boost run missing staging-area dir (#1368) * merge(wip): main to lid TODO: remoteblockstore needs to handle nil metrics * fix: flaky TestNewHttpServer (#1372) * feat: group agent version by binary name (#1369) * fix: wrap stats in nil checks for now we should probably revisit how stats are handled now that we have all 3 transports being tracked * test(fix): incorrect test urls --------- Co-authored-by: LexLuthr <[email protected]> Co-authored-by: Rod Vagg <[email protected]> Co-authored-by: dirkmc <[email protected]> * fix: make devnet work for lid (#1375) * feat: support full addr config in boostd-data * chore: fix linting for boostd-data * feat: use addr instead of port for lid chore: update devnet to work with lid setup * chore: resolve feedback on lint changes * feat: fail deal if start epoch passed (#1319) * fail deal if start epoch passed * add suggestion * test: add deal expiry on startup test --------- Co-authored-by: Dirk McCormick <[email protected]> * fix: makefile * fix: db migration ordering * fix: correct rootcid formatting * fix: prevent accidental removal of valid sector index announcements fix: add cache tests and dont announce cache state fix: add unique index to sector state db fix: sealed and unsealed sector state conflict fix: ensure index provider wrapper starts after db migration has completed * chore: go mod tidy * fix: download block (#1440) * LID yugabyte db impl (#1391) * feat: yugabyte db impl * feat: run yugabyte tests against a dockerized yugabyte * fix: use out own yugabyte docker image * fix: use yugabyte 2.17.2.0 docker image * feat: piece doctor yugabyte impl * fix: go mod tidy * refactor: remove SetCarSize as its not longer being used * refactor: remove functionality to mark index as errored (not being used) * feat: implement delete commands * refactor: consolidate test params * feat: add lid yugabyte config * fix: port map yugabyte postgres to standard port * Fix yugabyte CI (#1433) * fix: yugabyte tests in CI * docker-compose.yml ; Dockerfile.test ; connect to `yugabyte` and not localhost * add tag * test lid * make gen * fixup * move couchbase settings under build tag --------- Co-authored-by: Anton Evangelatov <[email protected]> --------- Co-authored-by: Anton Evangelatov <[email protected]> * script to migrate from couchbase to yugabyte (#1445) * feat: script to migrate from couchbase to yugabyte * fix: reduce batch size for yugabyte inserts * Change service GetIndex / AddIndex to return channel instead of array (#1444) * feat: yugabyte db impl * feat: run yugabyte tests against a dockerized yugabyte * fix: use out own yugabyte docker image * fix: use yugabyte 2.17.2.0 docker image * feat: piece doctor yugabyte impl * fix: go mod tidy * refactor: remove SetCarSize as its not longer being used * refactor: remove functionality to mark index as errored (not being used) * feat: implement delete commands * refactor: consolidate test params * feat: add lid yugabyte config * fix: port map yugabyte postgres to standard port * Fix yugabyte CI (#1433) * fix: yugabyte tests in CI * docker-compose.yml ; Dockerfile.test ; connect to `yugabyte` and not localhost * add tag * test lid * make gen * fixup * move couchbase settings under build tag --------- Co-authored-by: Anton Evangelatov <[email protected]> * wip: service GetIndex returns channel of records instead of array * feat: return channel from AddIndex and GetIndex --------- Co-authored-by: Anton Evangelatov <[email protected]> * local index directory: recover tool (#1410) * initial disaster recovery tool for LID * wip * do not block on individual error * instantiate lid * report * catch signal * fixup * comment out sector already in progress * fixup * start containers with init: true * record that we dont have an unsealed copy * match deals with boost sqlite db and piece store * fixup * fixup * use logger * fixup * disable stacktrace * fixup * extract piece store away from disaster recovery struct * add more sanity checks * compare IsUnsealed vs storage find * improve safeIsUnseal * fixup * better logs * expand repodir * calc properly next offset * fixup * add sector id to logs * incr offset * break after finding expired deal * more logs * fewer logs * better logs * better error * refactor * refactor minerApi * better logs * add time around add index * pd.Start * LID benchmarking tool (#1276) * feat: LID benchmarking tool * fix: bench thread safety * refactor: structured logging * refactor: postgres bulk insert * lid bench: Add foundationdb impl * lid fdb: Fix Tx sizing, parallel chunk puts * lid fdb: More efficient sample generation * feat: array of piece count / blocks per piece (#1314) * lid bench: print add rate * lid bench: Add retry to postgres put (#1316) * lid bench: Make cassandra put much more robust (#1318) * instrumentation for bench tool (#1337) * instrument postgres * more instrumentation * check for err getoffsetsize * emit metrics every 10sec * ignore errors * add postgres-drop * use directly tables * fix: go mod tidy * use INSERT INTO instead of tmp tables * try to catch sig * remove transaction commit * fixup * add postgres-init * fixuop * split create and init * fixup * remove if not exist --------- Co-authored-by: Dirk McCormick <[email protected]> * feat: batch insert queries for postgres * feat: add flag to insert into postgres using tmp table * refactor: merge changes from nonsense/lid-bench * refactor: just use one database (dont create bench database) * refactor: remove unused params * refactor: command structure * fix: cassandra - dont use batch insert for PayloadToPieces * fix: create tables CQL * fix: increase payload to pieces insert parallelism * fix: use simple replication strategy * feat: use yugabyte cassandra driver * fix: remove bench binary * update metrics endpoint * fix random generated piece cid * fixup * fix: cassandra bitswap benchmark * remove foundationdb --------- Co-authored-by: Łukasz Magiera <[email protected]> Co-authored-by: Łukasz Magiera <[email protected]> Co-authored-by: Anton Evangelatov <[email protected]> * fix: failing tests due to bad merge * fix: flaky TestMultipleDealsConcurrent * more logs * piece doctor and sector state manager refactor (#1463) * fix timer.Reset and improve logs * revert randomization * piece doc: handle errors * adjust piece check * refactor unsealsectormanager * refactor piece doctor * add random ports * ignore tests * add version to boostd-data * fix ctx in Start * fix: add reader mock to fix tests * fix: pass new piece directory to provider on test restart * fix synchronisation * note that panics are not propagated in tests * carv1 panics piece directory * print panics * fix: use reader that supports Seek in piece reader mock * fix: reset mock car reader on each invocation * fix: TestOfflineDealDataCleanup * add check for nil cancel func * bump min check period for LevelDB to 5 minutes * check if sector state mgr is initialised * debug line for unflagging * commenting out TestMultipleDealsConcurrent -- flaky test -- works locally * add SectorStateUpdates pubsub * add close for pubsub * add mock sectorstatemgr * add wrapper tests * fixup * cleanup * cleanup * better names * t.Skip for test * remove TODO above println for panic * add unit tests for refreshState * rename tests * more cases * more tests * update description * better comment * better names and comments --------- Co-authored-by: Dirk McCormick <[email protected]> * Merge from main to lid branch (#1483) * fix statx output string (#1451) * fix: flaky TestMultipleDealsConcurrent (#1458) * Add option to serve index provider ads over http (#1452) * feat: option to serve index provider ads over http * fix: config naming, hostname parsing * fix: update docsgen * fix: log announce address * feat: add config for indexer direct announce urls * refactor: always announce over pubsub * fix: docsgen * test: add test case for empty announce address hostname * Add `boostd index announce-latest` command (#1456) * feat: boostd index announce-latest * feat: add announce-latest-http command * fix: default direct announce url * feat: update to index-provider v0.11.2 * Signal to index provider to skip announcements (#1457) * fix: signal to index provider to skip announcements * fix: ensure multihash lister skip error is of type ipld.ErrNotExists --------- Co-authored-by: LexLuthr <[email protected]> * release v1.7.3-rc2 (#1460) * fix: improve stalled retrieval cancellation (#1449) * refactor stalled retrieval cancel * add ctx with timeout * implement suggestions * update err wrapping * fix: set short cancel timeout for unpaid retrievals only --------- Co-authored-by: Dirk McCormick <[email protected]> * feat: enable listen address for booster-http (#1461) * enable listen address * modify tests * fix nil ptr (#1470) * fix: incorrect check when import offline deal data using proposal CID (#1473) * fix incorrect early check * update error msg * fix(server): properly cancel graphsync requests (#1475) * set UI default listen address to localhost (#1476) * feat: display msg params in the mpool UI (#1471) * show msg params * fix: mpool nil pointer * fix width --------- Co-authored-by: Dirk McCormick <[email protected]> * Reset read deadline after reading deal proposal message (#1479) * fix: reset read deadline after reading deal proposal message * fix: increase client request deadline * feat: Show elapsed epoch and PSD wait epochs in UI (#1480) * show epochs * fix devnet UI, use BlockdDelaySecs * fix lint err * Update gql/resolver.go Co-authored-by: dirkmc <[email protected]> --------- Co-authored-by: dirkmc <[email protected]> * release v1.7.3-rc3 (#1481) --------- Co-authored-by: LexLuthr <[email protected]> Co-authored-by: LexLuthr <[email protected]> Co-authored-by: Hannah Howard <[email protected]> * update local index directory ui (#1477) * feat: update local index directory ui * comment out wrench as docker doesnt build * rearrange menu * refactor: remove sectors list --------- Co-authored-by: Anton Evangelatov <[email protected]> * feat: surface indexing errors (#1490) * feat: log panic (instead of just printing to stdout) (#1491) * split flagged pieces into unsealed/sealed tables (#1493) * refactor: remove couchbase tests (#1496) * refactor: remove piece directory couchbase tests (#1497) * GraphQL resolvers for LID (#1494) * wip * rename * sectorUnsealedCopies and SectorProvingState * fix: piece directory tests (#1498) * log line for only sealed sectors * more logs * feat: flagged pieces (#1501) * check that sector has deals for unsealed sectors (#1502) * check that sector has deals for unsealed sectors * simplify * rename heading * piece doctor to ignore expired/slashed deals (#1503) * ignore expired/slashed deals * fix mocks * add timer for checkPiece * move ChainHead away from checkPiece * add nil check for fullnodeApi * add debug line * fix pagination * LID landing page: add stats around Flagged and non-Flagged pieces (#1508) * wip * fixup * add debug line * fixup * feat: split flagged pieces page into flagged / flagged because unsealed (#1509) * fix: display of no flagged pieces (#1511) * disable dummy panels - block stats; deal data (#1510) * fix unsealed field in flagged piece (#1515) * update ffi * fix main merge issue * fix go mod * Add info boxes on LID UI page (#1516) * feat: add info boxes on LID UI page * Update react/src/LID.js Co-authored-by: Anton Evangelatov <[email protected]> * Update react/src/LID.js Co-authored-by: Anton Evangelatov <[email protected]> --------- Co-authored-by: Anton Evangelatov <[email protected]> * feat: replace migrate couchbase command with migrate yugavbyte (#1518) * remove redundant makefile (#1519) * remove redundant makefile * add migrate-lid to Makefile * update gitignore * move booster-bitswap and booster-http to make and make install * fix: inspect page - dont try to fetch root cid (#1525) * feat: add send epoch, time, elapsed epoch and elapsed time for each message in mpool to UI (#1523) * add message epoch/time details * implement suggestion * use moment lib * fix alerting bug * update polling interval * add logs * fix devnet: use ws instead of http to connect to boostd-data * feat: make legacy deals optional (#1524) * make legacy deals optional * fix gen * modify itests, create new * handle legacy stream explicitly * separate out the protocols * fix lint error * enable itest in CI * fix ci * apply suggestions * fix error after conflict resolution * refactor: simplify legacy deal response code --------- Co-authored-by: Dirk McCormick <[email protected]> * refactor: remove couchbase implementation (#1535) * Update lotus and boxo versions (#1466) (#1537) * Update to use packages in go-libipni * feat: update lotus version * update boxo (#1492) * feat: update boxo * refactor: depend on repo:Jorropo/lotus branch:boxo2 * chore: temporarily update go-fil-markets with replace directive * feat: switch itests framework ExtractFileFromCAR to use non-global IPLD registry * feat: switch booster-bitswap client fetch to use the go-ipld-prime globals via go-ipld-legacy * go fmt * chore: update dependencies and migrate to boxo * fix: update boost-gfm * fix: stop itests framework from prematurely setting listenaddrs via go-libp2p defaults that conflict with lotus * fix: docs gen * chore(deps): update deps for boxo v0.10.0 * chore(deps): update boost-gfm * fix(booster-http): update for boxo v0.10.0 * chore(deps): update to remove kubo dependency * fix(gen): update docs gen * feat: update boost-gfm to v1.26.6 * chore(deps): update lotus to master --------- --------- Co-authored-by: gammazero <[email protected]> Co-authored-by: Adin Schmahmann <[email protected]> Co-authored-by: hannahhoward <[email protected]> * feat: update boost-gfm to v1.26.7 (#1538) * fix: piece doctor tests (#1540) * refactor: build indexes for legacy deals (#1539) * feat: http index announcements (#1418) * feat(indexprovider): announce http transport refactor: isolate extended provider logic feat: announce http indexes refactor(indexprovider): use metadata.Default fix(wrapper): fix compile error * fix http ep signing bug * update comment --------- Co-authored-by: LexLuthr <[email protected]> * feat: check unseal status of piece through both apis (#1548) * fix: metrics and Grafana (#1546) * fix grafna, metrics * remove dagstore from name * fix: add missing PieceDeal (PieceCid) index (#1551) * fix: iterate all deals to index piece (#1549) * fix: iterate all deals to index piece * add test, use multierror * add and update comments * refactor: separate yugabyte / leveldb tests for easier local testing (#1553) * feat: refactor mpool page in UI (#1530) * modify GQL * fix count type * fix locks * fix js * migrate config to v5 (#1560) * migrate config to v5 * change default version * chore: release v2.0.0-rc1 (#1561) * Upgrade to index-provider v0.13.4 (#1559) Upgrade to the latest index-provider library. * feat: add IPNI itest (#1563) * ipni itest * refactor test * add to circleCI * add indexer topic * Print protocol IDs exposed by f.Boost * generate topic name dynamically --------- Co-authored-by: Masih H. Derkani <[email protected]> * IPNI UX (#1562) * feat: IPNI UX * Update react/src/Ipni.js Co-authored-by: LexLuthr <[email protected]> * feat: server side config --------- Co-authored-by: LexLuthr <[email protected]> * add peerID to multiaddresses returned by boost provider retrieval-transports query (#1568) * add peerID to multiaddress * fix error typos * undo http-libp2p on vanilla http * fix: rename indexer config to index provider config (#1573) * fix retrieve output path (#1574) * update README.md (#1576) * update description (#1580) * tempo: increase max trace size (#1579) * use go-block-format --------- Co-authored-by: Jacob Heun <[email protected]> Co-authored-by: dirkmc <[email protected]> Co-authored-by: Jacob Heun <[email protected]> Co-authored-by: LexLuthr <[email protected]> Co-authored-by: Rod Vagg <[email protected]> Co-authored-by: Łukasz Magiera <[email protected]> Co-authored-by: Łukasz Magiera <[email protected]> Co-authored-by: LexLuthr <[email protected]> Co-authored-by: Hannah Howard <[email protected]> Co-authored-by: gammazero <[email protected]> Co-authored-by: Adin Schmahmann <[email protected]> Co-authored-by: Masih H. Derkani <[email protected]>
1 parent caea26a commit 08ec616

File tree

186 files changed

+17443
-5751
lines changed

Some content is hidden

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

186 files changed

+17443
-5751
lines changed

.circleci/config.yml

+38-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22
orbs:
3-
go: gotest/[email protected].13
3+
go: gotest/[email protected].14
44

55
executors:
66
golang:
@@ -83,6 +83,19 @@ jobs:
8383
paths:
8484
- linux
8585

86+
lid-docker-compose:
87+
description: 'Run LID integration tests'
88+
machine:
89+
image: ubuntu-2004:202104-01
90+
resource_class: xlarge
91+
steps:
92+
- checkout
93+
- run:
94+
name: local index directory docker compose tests
95+
command: |
96+
set -x
97+
make test-lid
98+
8699
test:
87100
description: |
88101
Run go tests
@@ -98,6 +111,10 @@ jobs:
98111
type: string
99112
default: "./..."
100113
description: Import paths of packages to be tested.
114+
cwd:
115+
type: string
116+
default: "."
117+
description: Directory in which to run the test command
101118
suite:
102119
type: string
103120
default: unit
@@ -110,9 +127,16 @@ jobs:
110127
command: make boostci
111128
no_output_timeout: 30m
112129
- download-params
130+
# Note: setup_remote_docker takes about 10s and it's only needed for
131+
# local index directory tests so it may be worth refactoring so that it's
132+
# only included for local index directory
133+
- setup_remote_docker:
134+
version: 20.10.18
135+
docker_layer_caching: true
113136
- run:
114137
name: go test
115138
command: |
139+
cd << parameters.cwd >>
116140
go test \
117141
<< parameters.go-test-flags >> \
118142
<< parameters.target >>
@@ -306,7 +330,20 @@ workflows:
306330
suite: itest-markets_v1_offline_deal
307331
target: "./itests/markets_v1_offline_deal_test.go"
308332

333+
- test:
334+
name: test-itest-disabled_markets_v1_deal
335+
suite: itest-disabled_markets_v1_deal
336+
target: "./itests/disabled_markets_v1_deal_test.go"
337+
309338
- test:
310339
name: test-all
311340
suite: all
312341
target: "`go list ./... | grep -v boost/itests`"
342+
343+
- test:
344+
name: test-itest-ipni
345+
suite: itest-ipni
346+
target: "./itests/ipni_publish_test.go"
347+
348+
- lid-docker-compose
349+

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
/boost
22
/boostx
33
/boostd
4+
/boostd-data
5+
/migrate-lid
46
/devnet
57
/booster-http
68
/booster-bitswap
79
/docgen-md
810
/docgen-openrpc
911
extern/filecoin-ffi/rust/target
12+
extern/boostd-data/boostd-data
1013
**/*.a
1114
**/*.pc
1215
/**/*/.DS_STORE

Makefile

+30-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ unexport GOFLAGS
77

88
GOCC?=go
99

10+
ARCH?=$(shell arch)
1011
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
1112
ifeq ($(shell expr $(GOVERSION) \< 1016000), 1)
1213
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
@@ -79,19 +80,35 @@ calibnet-go: build-go
7980
deps: $(BUILD_DEPS)
8081
.PHONY: deps
8182

83+
migrate-lid: $(BUILD_DEPS)
84+
rm -f migrate-lid
85+
$(GOCC) build $(GOFLAGS) -o migrate-lid ./cmd/migrate-lid
86+
.PHONY: migrate-lid
87+
BINS+=migrate-lid
88+
8289
boostx: $(BUILD_DEPS)
8390
rm -f boostx
8491
$(GOCC) build $(GOFLAGS) -o boostx ./cmd/boostx
8592
.PHONY: boostx
8693
BINS+=boostx
8794

8895
boost: $(BUILD_DEPS)
89-
rm -f boost boostd boostx
96+
rm -f boost
9097
$(GOCC) build $(GOFLAGS) -o boost ./cmd/boost
91-
$(GOCC) build $(GOFLAGS) -o boostx ./cmd/boostx
92-
$(GOCC) build $(GOFLAGS) -o boostd ./cmd/boostd
9398
.PHONY: boost
94-
BINS+=boost boostx boostd
99+
BINS+=boost
100+
101+
boostd: $(BUILD_DEPS)
102+
rm -f boostd
103+
$(GOCC) build $(GOFLAGS) -o boostd ./cmd/boostd
104+
.PHONY: boostd
105+
BINS+=boostd
106+
107+
boostd-data:
108+
$(MAKE) -C ./extern/boostd-data
109+
install -C ./extern/boostd-data/boostd-data ./boostd-data
110+
.PHONY: boostd-data
111+
BINS+=boostd-data
95112

96113
booster-http: $(BUILD_DEPS)
97114
rm -f booster-http
@@ -126,7 +143,7 @@ update-react: validate-node-version
126143
npm run --prefix react build
127144
.PHONY: react
128145

129-
build-go: boost devnet
146+
build-go: boost boostd boostx boostd-data booster-http booster-bitswap devnet migrate-lid
130147
.PHONY: build-go
131148

132149
build: react build-go
@@ -141,6 +158,10 @@ install-boost:
141158
install -C ./boost /usr/local/bin/boost
142159
install -C ./boostd /usr/local/bin/boostd
143160
install -C ./boostx /usr/local/bin/boostx
161+
install -C ./boostd-data /usr/local/bin/boostd-data
162+
install -C ./booster-http /usr/local/bin/booster-http
163+
install -C ./booster-bitswap /usr/local/bin/booster-bitswap
164+
install -C ./migrate-lid /usr/local/bin/migrate-lid
144165

145166
install-devnet:
146167
install -C ./devnet /usr/local/bin/devnet
@@ -196,7 +217,7 @@ docsgen-openrpc-boost: docsgen-openrpc-bin
196217

197218
## DOCKER IMAGES
198219
docker_user?=filecoin
199-
lotus_version?=v1.23.0-rc1
220+
lotus_version?=v1.23.2
200221
ffi_from_source?=0
201222
build_lotus?=0
202223
ifeq ($(build_lotus),1)
@@ -252,6 +273,9 @@ docker/all: $(lotus_build_cmd) docker/boost docker/booster-http docker/booster-b
252273
docker/lotus docker/lotus-miner
253274
.PHONY: docker/all
254275

276+
test-lid:
277+
cd ./extern/boostd-data && ARCH=$(ARCH) docker-compose up --build --exit-code-from go-tests
278+
255279
devnet/up:
256280
rm -rf ./docker/devnet/data && docker compose -f ./docker/devnet/docker-compose.yaml up -d
257281

README.md

+2-188
Original file line numberDiff line numberDiff line change
@@ -15,194 +15,8 @@ See the docs at [https://boost.filecoin.io](https://boost.filecoin.io/getting-st
1515

1616
Compile and install using the instructions at the `Building and installing` section in [the docs](https://boost.filecoin.io/getting-started#building-and-installing).
1717

18-
## Running Boost for development
18+
## Running Boost devnet in Docker for development
1919

20-
To run Boost on your development machine, you will need to set up a devnet:
21-
22-
1. Remove any existing Lotus and Boost repositories
23-
```
24-
rm -rf ~/.lotusmarkets ~/.lotus ~/.lotusminer ~/.genesis_sectors
25-
rm -rf ~/.boost
26-
```
27-
28-
2. Build Lotus in debug mode
29-
30-
The version of lotus needs to match the version in Boost's go.mod
31-
```
32-
cd lotus
33-
git checkout <tag>
34-
make debug
35-
```
36-
37-
3. Install Lotus
38-
39-
The devnet script uses the installed `lotus` and `lotus-miner` binaries to run the miner and daemon.
40-
```
41-
make install
42-
install -C ./lotus-seed /usr/local/bin/lotus-seed
43-
```
44-
45-
4. Build Boost in debug mode
46-
47-
Double check if environment variables are set:
48-
```
49-
export LIBRARY_PATH=/opt/homebrew/lib
50-
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
51-
```
52-
53-
Build and install
54-
```
55-
cd boost
56-
make debug
57-
make install
58-
```
59-
60-
5. Start the devnet
61-
62-
The following command will use the binaries that you built and installed above, and will run `lotus`, `lotus-miner` and `lotus-seed`. The `lotus` version must match the version in Boost's go.mod.
63-
```
64-
cd boost
65-
./devnet
66-
```
67-
68-
The first time you run it, it will download the Filecoin proof parameters. It will take at least 10 minutes depending on your connection speed. You may need to restart the command multiple times as your terminal will probably timeout before it finishes downloading everything.
69-
70-
The devnet isn't designed to be restartable. After it has been successfully run once, you'll have to clear out the previous data before re-running `./devnet`:
71-
```
72-
rm -rf ~/.lotusmarkets && rm -rf ~/.lotus && rm -rf ~/.lotusminer && rm -rf ~/.genesis_sectors
73-
```
74-
75-
6. Wait for `lotus-miner` to come up (through the command above)
76-
77-
Unset these variables as they interfere with the `lotus-miner` command.
78-
```
79-
unset MINER_API_INFO
80-
unset FULLNODE_API_INFO
81-
```
82-
83-
Then repeatedly run this command until it succeeds:
84-
```
85-
lotus-miner auth api-info --perm=admin
86-
```
87-
88-
7. Get the authentication tokens to connect to the lotus daemon and miner:
89-
90-
```
91-
export ENV_MINER_API_INFO=`lotus-miner auth api-info --perm=admin`
92-
export ENV_FULLNODE_API_INFO=`lotus auth api-info --perm=admin`
93-
94-
export MINER_API_INFO=`echo $ENV_MINER_API_INFO | awk '{split($0,a,"="); print a[2]}'`
95-
export FULLNODE_API_INFO=`echo $ENV_FULLNODE_API_INFO | awk '{split($0,a,"="); print a[2]}'`
96-
97-
echo MINER_API_INFO=$MINER_API_INFO
98-
echo FULLNODE_API_INFO=$FULLNODE_API_INFO
99-
```
100-
101-
8. Create the wallets needed for Boost
102-
103-
```
104-
export DEFAULT_WALLET=`lotus wallet list | tail -1 | awk '{print $1}'`
105-
export COLLAT_WALLET=`lotus wallet new bls`
106-
export PUBMSG_WALLET=`lotus wallet new bls`
107-
export CLIENT_WALLET=`lotus wallet new bls`
108-
```
109-
110-
9. Add funds to the wallets
111-
112-
```
113-
lotus send --from $DEFAULT_WALLET $COLLAT_WALLET 10
114-
lotus send --from $DEFAULT_WALLET $PUBMSG_WALLET 10
115-
lotus send --from $DEFAULT_WALLET $CLIENT_WALLET 10
116-
```
117-
118-
Run this command repeatedly until each wallet you created has 10 FIL:
119-
```
120-
lotus wallet list
121-
```
122-
123-
This should take about 10 seconds.
124-
125-
10. Set the Publish Message Wallet as a control address on the miner
126-
127-
```
128-
lotus-miner actor control set --really-do-it $PUBMSG_WALLET
129-
```
130-
131-
11. Add funds into the Market Actor escrow for the client and Collateral wallets
132-
133-
```
134-
lotus wallet market add --from $DEFAULT_WALLET --address $CLIENT_WALLET 5
135-
lotus wallet market add --address $COLLAT_WALLET 5
136-
```
137-
138-
12. Initialize Boost / Create Boost repository
139-
140-
```
141-
boostd -vv init \
142-
--api-sealer=$MINER_API_INFO \
143-
--api-sector-index=$MINER_API_INFO \
144-
--wallet-publish-storage-deals=$PUBMSG_WALLET \
145-
--wallet-deal-collateral=$COLLAT_WALLET \
146-
--max-staging-deals-bytes=2000000000
147-
```
148-
149-
13. Build the Web UI
150-
```
151-
make react
152-
```
153-
154-
14. Edit config to set a fixed listen address
155-
156-
Edit `~/.boost/config.toml`
157-
158-
Set the port in the `ListenAddresses` key to `50000`
159-
```
160-
[Libp2p]
161-
ListenAddresses = ["/ip4/0.0.0.0/tcp/50000", "/ip6/::/tcp/0"]
162-
```
163-
164-
15. Run Boost
165-
```
166-
boostd -vv run
167-
```
168-
169-
Note the peer ID of the boost instance:
170-
```
171-
2022-06-10T09:32:28.819Z INFO boostd boostd/run.go:114 Boost libp2p node listening {"maddr": "{12D3KooWQNNWNiJ1mieEk9EHjDVF2qBc1FSjJGEzwjnMJzteApaW: [/ip4/172.17.0.2/tcp/50000 /ip4/127.0.0.1/tcp/50000]}"}
172-
```
173-
In this example: `12D3KooWQNNWNiJ1mieEk9EHjDVF2qBc1FSjJGEzwjnMJzteApaW`
174-
175-
14. Set the peer ID and multi-address of the miner on chain
176-
```
177-
lotus-miner actor set-peer-id <peer id>
178-
lotus-miner actor set-addrs /ip4/127.0.0.1/tcp/50000
179-
```
180-
181-
16. Open the Web UI
182-
183-
Open http://localhost:8080 to see the Boost UI
184-
185-
### Make a deal with Boost
186-
187-
1. Initialize the Boost client
188-
```
189-
boost init
190-
```
191-
192-
This will output the address of the wallet (it's safe to run the init command repeatedly).
193-
194-
2. Send funds to the client wallet
195-
```
196-
lotus send --from=$DEFAULT_WALLET <client wallet> 10
197-
```
198-
199-
3. Follow the guide at https://boost.filecoin.io/tutorials/how-to-store-files-with-boost-on-filecoin
200-
201-
Note that above you already ran a command to export FULLNODE_API (and point it to your local devnet lotus daemon).
202-
203-
Note also that the provider address is `t01000` and you will need to supply an appropriate `--storage-price` when using `boost deal` since the devnet has a minimum price. Alternatively, using "Settings" in the Boost web UI to set the deal price to zero.
204-
205-
## Running Boost devnet in Docker
20620
### Prerequisites
20721
* Install Docker - https://docs.docker.com/get-docker/
20822

@@ -221,7 +35,7 @@ make clean docker/all ffi_from_source=1 build_lotus=1
22135

22236
If you need to build containers using a specific version of lotus then provide the version as a parameter, e.g. `make clean docker/all lotus_version=v1.20.0-rc2 build_lotus=1`. The version must be a tag or a remote branch name of [Lotus git repo](https://github.com/filecoin-project/lotus).
22337

224-
### Start devnet docker stack
38+
### Start devnet Docker stack
22539

22640
1. Run
22741

0 commit comments

Comments
 (0)