Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost release/v2 #1520

Merged
merged 87 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
7b745c3
feat: add local index directory
jacobheun Mar 17, 2023
2172161
refactor: merge from main into lid branch (#1339)
dirkmc Mar 29, 2023
d9923e6
merge: main to lid (#1370)
jacobheun Apr 13, 2023
2606bb0
fix: make devnet work for lid (#1375)
jacobheun Apr 15, 2023
caf39ac
merge: remote-tracking branch 'origin/main' into nonsense/piece-store
jacobheun Apr 16, 2023
55a719c
feat: fail deal if start epoch passed (#1319)
LexLuthr Apr 13, 2023
c451816
merge: remote-tracking branch 'origin/main' into nonsense/piece-store
jacobheun Apr 17, 2023
624f3ea
fix: makefile
jacobheun Apr 17, 2023
1e4fa15
fix: db migration ordering
jacobheun Apr 17, 2023
c48a8fa
fix: correct rootcid formatting
jacobheun Apr 17, 2023
80dcdc9
merge: remote-tracking branch 'origin/main' into nonsense/piece-store
jacobheun Apr 24, 2023
0a72cc7
fix: prevent accidental removal of valid sector index announcements
jacobheun Apr 26, 2023
6d50bcf
merge: remote-tracking branch 'origin/main' into nonsense/piece-store
jacobheun Apr 26, 2023
2bb534a
merge: remote-tracking branch 'origin/main' into nonsense/piece-store
jacobheun Apr 27, 2023
3d54850
chore: go mod tidy
jacobheun Apr 28, 2023
a4fdb4d
merge: remote-tracking branch 'origin/main' into nonsense/piece-store
jacobheun Apr 28, 2023
dac04ee
fix: download block (#1440)
dirkmc May 9, 2023
f5de340
LID yugabyte db impl (#1391)
dirkmc May 10, 2023
aeb34d3
script to migrate from couchbase to yugabyte (#1445)
dirkmc May 12, 2023
1316ee5
Merge branch 'main' of github.com:filecoin-project/boost into nonsens…
dirkmc May 12, 2023
2b4de7c
Change service GetIndex / AddIndex to return channel instead of array…
dirkmc May 17, 2023
3dc7e5a
local index directory: recover tool (#1410)
nonsense May 19, 2023
4ef9a56
LID benchmarking tool (#1276)
dirkmc May 19, 2023
a80b6e3
fix: failing tests due to bad merge
dirkmc May 19, 2023
e61fd62
fix: flaky TestMultipleDealsConcurrent
dirkmc May 19, 2023
93e3346
more logs
nonsense May 22, 2023
5fe0bfd
piece doctor and sector state manager refactor (#1463)
nonsense Jun 1, 2023
5e511a8
Merge from main to lid branch (#1483)
dirkmc Jun 1, 2023
a614b3d
update local index directory ui (#1477)
dirkmc Jun 5, 2023
a071a03
feat: surface indexing errors (#1490)
dirkmc Jun 5, 2023
a9953ff
feat: log panic (instead of just printing to stdout) (#1491)
dirkmc Jun 5, 2023
a5340e9
split flagged pieces into unsealed/sealed tables (#1493)
nonsense Jun 6, 2023
815ddea
refactor: remove couchbase tests (#1496)
dirkmc Jun 7, 2023
3f79cda
refactor: remove piece directory couchbase tests (#1497)
dirkmc Jun 7, 2023
4e14ce0
GraphQL resolvers for LID (#1494)
nonsense Jun 7, 2023
b8626da
fix: piece directory tests (#1498)
dirkmc Jun 7, 2023
f71b0ff
log line for only sealed sectors
nonsense Jun 8, 2023
3d64fb6
more logs
nonsense Jun 8, 2023
5d2b6ff
feat: flagged pieces (#1501)
dirkmc Jun 8, 2023
c4e0b01
check that sector has deals for unsealed sectors (#1502)
nonsense Jun 8, 2023
54edf11
rename heading
nonsense Jun 8, 2023
e9e236d
piece doctor to ignore expired/slashed deals (#1503)
nonsense Jun 9, 2023
4000480
fix pagination
nonsense Jun 9, 2023
969f934
LID landing page: add stats around Flagged and non-Flagged pieces (#1…
nonsense Jun 9, 2023
a5d29f0
feat: split flagged pieces page into flagged / flagged because unseal…
dirkmc Jun 9, 2023
4ee35f1
fix: display of no flagged pieces (#1511)
dirkmc Jun 9, 2023
2ea1ed9
disable dummy panels - block stats; deal data (#1510)
nonsense Jun 12, 2023
aaf67ec
fix unsealed field in flagged piece (#1515)
nonsense Jun 12, 2023
b2bf8ce
Merge branch 'main' into nonsense/piece-store
Jun 12, 2023
f73cf3d
update ffi
Jun 12, 2023
5caa93b
fix main merge issue
Jun 12, 2023
cdc40ec
fix go mod
Jun 12, 2023
1edb02e
Add info boxes on LID UI page (#1516)
dirkmc Jun 12, 2023
b256c2e
feat: replace migrate couchbase command with migrate yugavbyte (#1518)
dirkmc Jun 13, 2023
966a385
remove redundant makefile (#1519)
nonsense Jun 13, 2023
2a7ed2c
merge nonsense/piece-store to release/v2
nonsense Jun 14, 2023
0859578
Merge branch 'main' into release/v2
nonsense Jun 14, 2023
7ef2aa8
fix: inspect page - dont try to fetch root cid (#1525)
dirkmc Jun 14, 2023
33ba7de
feat: add send epoch, time, elapsed epoch and elapsed time for each m…
LexLuthr Jun 15, 2023
8a34ce9
add logs
nonsense Jun 15, 2023
55c086b
fix devnet: use ws instead of http to connect to boostd-data
nonsense Jun 15, 2023
6b9ffed
feat: make legacy deals optional (#1524)
LexLuthr Jun 20, 2023
248dae4
refactor: remove couchbase implementation (#1535)
dirkmc Jun 23, 2023
f1cec09
Update lotus and boxo versions (#1466) (#1537)
dirkmc Jun 26, 2023
d2a7df9
feat: update boost-gfm to v1.26.7 (#1538)
dirkmc Jun 26, 2023
6d812ee
fix: piece doctor tests (#1540)
dirkmc Jun 27, 2023
ecbc081
refactor: build indexes for legacy deals (#1539)
dirkmc Jun 28, 2023
01e731c
feat: http index announcements (#1418)
jacobheun Jun 28, 2023
7263642
feat: check unseal status of piece through both apis (#1548)
dirkmc Jun 30, 2023
14a454d
fix: metrics and Grafana (#1546)
LexLuthr Jun 30, 2023
7409f90
fix: add missing PieceDeal (PieceCid) index (#1551)
dirkmc Jul 3, 2023
16c6310
fix: iterate all deals to index piece (#1549)
LexLuthr Jul 3, 2023
497472d
refactor: separate yugabyte / leveldb tests for easier local testing …
dirkmc Jul 3, 2023
5d903fa
feat: refactor mpool page in UI (#1530)
LexLuthr Jul 7, 2023
540b41b
migrate config to v5 (#1560)
LexLuthr Jul 11, 2023
f69945e
chore: release v2.0.0-rc1 (#1561)
LexLuthr Jul 11, 2023
01a5a35
Upgrade to index-provider v0.13.4 (#1559)
masih Jul 11, 2023
d715f70
feat: add IPNI itest (#1563)
LexLuthr Jul 12, 2023
6e858b9
IPNI UX (#1562)
dirkmc Jul 13, 2023
ab19c38
add peerID to multiaddresses returned by boost provider retrieval-tra…
LexLuthr Jul 18, 2023
67b61a7
fix: rename indexer config to index provider config (#1573)
dirkmc Jul 19, 2023
b566d2e
fix retrieve output path (#1574)
LexLuthr Jul 19, 2023
e4ff69d
update README.md (#1576)
nonsense Jul 19, 2023
32c37ff
update description (#1580)
LexLuthr Jul 20, 2023
2f4d48b
Merge branch 'main' into release/v2
Jul 20, 2023
1340ee7
tempo: increase max trace size (#1579)
nonsense Jul 20, 2023
0b0662a
use go-block-format
Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
go: gotest/tools@0.0.13
go: gotest/tools@0.0.14

executors:
golang:
Expand Down Expand Up @@ -83,6 +83,19 @@ jobs:
paths:
- linux

lid-docker-compose:
description: 'Run LID integration tests'
machine:
image: ubuntu-2004:202104-01
resource_class: xlarge
steps:
- checkout
- run:
name: local index directory docker compose tests
command: |
set -x
make test-lid

test:
description: |
Run go tests
Expand All @@ -98,6 +111,10 @@ jobs:
type: string
default: "./..."
description: Import paths of packages to be tested.
cwd:
type: string
default: "."
description: Directory in which to run the test command
suite:
type: string
default: unit
Expand All @@ -110,9 +127,16 @@ jobs:
command: make boostci
no_output_timeout: 30m
- download-params
# Note: setup_remote_docker takes about 10s and it's only needed for
# local index directory tests so it may be worth refactoring so that it's
# only included for local index directory
- setup_remote_docker:
version: 20.10.18
docker_layer_caching: true
- run:
name: go test
command: |
cd << parameters.cwd >>
go test \
<< parameters.go-test-flags >> \
<< parameters.target >>
Expand Down Expand Up @@ -306,7 +330,20 @@ workflows:
suite: itest-markets_v1_offline_deal
target: "./itests/markets_v1_offline_deal_test.go"

- test:
name: test-itest-disabled_markets_v1_deal
suite: itest-disabled_markets_v1_deal
target: "./itests/disabled_markets_v1_deal_test.go"

- test:
name: test-all
suite: all
target: "`go list ./... | grep -v boost/itests`"

- test:
name: test-itest-ipni
suite: itest-ipni
target: "./itests/ipni_publish_test.go"

- lid-docker-compose

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
/boost
/boostx
/boostd
/boostd-data
/migrate-lid
/devnet
/booster-http
/booster-bitswap
/docgen-md
/docgen-openrpc
extern/filecoin-ffi/rust/target
extern/boostd-data/boostd-data
**/*.a
**/*.pc
/**/*/.DS_STORE
Expand Down
36 changes: 30 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ unexport GOFLAGS

GOCC?=go

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

migrate-lid: $(BUILD_DEPS)
rm -f migrate-lid
$(GOCC) build $(GOFLAGS) -o migrate-lid ./cmd/migrate-lid
.PHONY: migrate-lid
BINS+=migrate-lid

boostx: $(BUILD_DEPS)
rm -f boostx
$(GOCC) build $(GOFLAGS) -o boostx ./cmd/boostx
.PHONY: boostx
BINS+=boostx

boost: $(BUILD_DEPS)
rm -f boost boostd boostx
rm -f boost
$(GOCC) build $(GOFLAGS) -o boost ./cmd/boost
$(GOCC) build $(GOFLAGS) -o boostx ./cmd/boostx
$(GOCC) build $(GOFLAGS) -o boostd ./cmd/boostd
.PHONY: boost
BINS+=boost boostx boostd
BINS+=boost

boostd: $(BUILD_DEPS)
rm -f boostd
$(GOCC) build $(GOFLAGS) -o boostd ./cmd/boostd
.PHONY: boostd
BINS+=boostd

boostd-data:
$(MAKE) -C ./extern/boostd-data
install -C ./extern/boostd-data/boostd-data ./boostd-data
.PHONY: boostd-data
BINS+=boostd-data

booster-http: $(BUILD_DEPS)
rm -f booster-http
Expand Down Expand Up @@ -126,7 +143,7 @@ update-react: validate-node-version
npm run --prefix react build
.PHONY: react

build-go: boost devnet
build-go: boost boostd boostx boostd-data booster-http booster-bitswap devnet migrate-lid
.PHONY: build-go

build: react build-go
Expand All @@ -141,6 +158,10 @@ install-boost:
install -C ./boost /usr/local/bin/boost
install -C ./boostd /usr/local/bin/boostd
install -C ./boostx /usr/local/bin/boostx
install -C ./boostd-data /usr/local/bin/boostd-data
install -C ./booster-http /usr/local/bin/booster-http
install -C ./booster-bitswap /usr/local/bin/booster-bitswap
install -C ./migrate-lid /usr/local/bin/migrate-lid

install-devnet:
install -C ./devnet /usr/local/bin/devnet
Expand Down Expand Up @@ -196,7 +217,7 @@ docsgen-openrpc-boost: docsgen-openrpc-bin

## DOCKER IMAGES
docker_user?=filecoin
lotus_version?=v1.23.0-rc1
lotus_version?=v1.23.2
ffi_from_source?=0
build_lotus?=0
ifeq ($(build_lotus),1)
Expand Down Expand Up @@ -252,6 +273,9 @@ docker/all: $(lotus_build_cmd) docker/boost docker/booster-http docker/booster-b
docker/lotus docker/lotus-miner
.PHONY: docker/all

test-lid:
cd ./extern/boostd-data && ARCH=$(ARCH) docker-compose up --build --exit-code-from go-tests

devnet/up:
rm -rf ./docker/devnet/data && docker compose -f ./docker/devnet/docker-compose.yaml up -d

Expand Down
190 changes: 2 additions & 188 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,194 +15,8 @@ See the docs at [https://boost.filecoin.io](https://boost.filecoin.io/getting-st

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

## Running Boost for development
## Running Boost devnet in Docker for development

To run Boost on your development machine, you will need to set up a devnet:

1. Remove any existing Lotus and Boost repositories
```
rm -rf ~/.lotusmarkets ~/.lotus ~/.lotusminer ~/.genesis_sectors
rm -rf ~/.boost
```

2. Build Lotus in debug mode

The version of lotus needs to match the version in Boost's go.mod
```
cd lotus
git checkout <tag>
make debug
```

3. Install Lotus

The devnet script uses the installed `lotus` and `lotus-miner` binaries to run the miner and daemon.
```
make install
install -C ./lotus-seed /usr/local/bin/lotus-seed
```

4. Build Boost in debug mode

Double check if environment variables are set:
```
export LIBRARY_PATH=/opt/homebrew/lib
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
```

Build and install
```
cd boost
make debug
make install
```

5. Start the devnet

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.
```
cd boost
./devnet
```

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.

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`:
```
rm -rf ~/.lotusmarkets && rm -rf ~/.lotus && rm -rf ~/.lotusminer && rm -rf ~/.genesis_sectors
```

6. Wait for `lotus-miner` to come up (through the command above)

Unset these variables as they interfere with the `lotus-miner` command.
```
unset MINER_API_INFO
unset FULLNODE_API_INFO
```

Then repeatedly run this command until it succeeds:
```
lotus-miner auth api-info --perm=admin
```

7. Get the authentication tokens to connect to the lotus daemon and miner:

```
export ENV_MINER_API_INFO=`lotus-miner auth api-info --perm=admin`
export ENV_FULLNODE_API_INFO=`lotus auth api-info --perm=admin`

export MINER_API_INFO=`echo $ENV_MINER_API_INFO | awk '{split($0,a,"="); print a[2]}'`
export FULLNODE_API_INFO=`echo $ENV_FULLNODE_API_INFO | awk '{split($0,a,"="); print a[2]}'`

echo MINER_API_INFO=$MINER_API_INFO
echo FULLNODE_API_INFO=$FULLNODE_API_INFO
```

8. Create the wallets needed for Boost

```
export DEFAULT_WALLET=`lotus wallet list | tail -1 | awk '{print $1}'`
export COLLAT_WALLET=`lotus wallet new bls`
export PUBMSG_WALLET=`lotus wallet new bls`
export CLIENT_WALLET=`lotus wallet new bls`
```

9. Add funds to the wallets

```
lotus send --from $DEFAULT_WALLET $COLLAT_WALLET 10
lotus send --from $DEFAULT_WALLET $PUBMSG_WALLET 10
lotus send --from $DEFAULT_WALLET $CLIENT_WALLET 10
```

Run this command repeatedly until each wallet you created has 10 FIL:
```
lotus wallet list
```

This should take about 10 seconds.

10. Set the Publish Message Wallet as a control address on the miner

```
lotus-miner actor control set --really-do-it $PUBMSG_WALLET
```

11. Add funds into the Market Actor escrow for the client and Collateral wallets

```
lotus wallet market add --from $DEFAULT_WALLET --address $CLIENT_WALLET 5
lotus wallet market add --address $COLLAT_WALLET 5
```

12. Initialize Boost / Create Boost repository

```
boostd -vv init \
--api-sealer=$MINER_API_INFO \
--api-sector-index=$MINER_API_INFO \
--wallet-publish-storage-deals=$PUBMSG_WALLET \
--wallet-deal-collateral=$COLLAT_WALLET \
--max-staging-deals-bytes=2000000000
```

13. Build the Web UI
```
make react
```

14. Edit config to set a fixed listen address

Edit `~/.boost/config.toml`

Set the port in the `ListenAddresses` key to `50000`
```
[Libp2p]
ListenAddresses = ["/ip4/0.0.0.0/tcp/50000", "/ip6/::/tcp/0"]
```

15. Run Boost
```
boostd -vv run
```

Note the peer ID of the boost instance:
```
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]}"}
```
In this example: `12D3KooWQNNWNiJ1mieEk9EHjDVF2qBc1FSjJGEzwjnMJzteApaW`

14. Set the peer ID and multi-address of the miner on chain
```
lotus-miner actor set-peer-id <peer id>
lotus-miner actor set-addrs /ip4/127.0.0.1/tcp/50000
```

16. Open the Web UI

Open http://localhost:8080 to see the Boost UI

### Make a deal with Boost

1. Initialize the Boost client
```
boost init
```

This will output the address of the wallet (it's safe to run the init command repeatedly).

2. Send funds to the client wallet
```
lotus send --from=$DEFAULT_WALLET <client wallet> 10
```

3. Follow the guide at https://boost.filecoin.io/tutorials/how-to-store-files-with-boost-on-filecoin

Note that above you already ran a command to export FULLNODE_API (and point it to your local devnet lotus daemon).

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.

## Running Boost devnet in Docker
### Prerequisites
* Install Docker - https://docs.docker.com/get-docker/

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

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).

### Start devnet docker stack
### Start devnet Docker stack

1. Run

Expand Down
Loading