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

Allow building docker from Mac M1 #834

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
3506edf
Allow building docker from Mac M1
airenas Sep 22, 2022
32e1fc1
Fix libhwloc for booster-http docker
airenas Sep 22, 2022
dcaec84
remove lotus-test in docker/build target requirements (#831)
nonsense Sep 26, 2022
91d5c37
feat(monitoring): add http response code metrics to dashboard (#827)
kylehuntsman Sep 26, 2022
c5dfd2d
feat(monitoring): register lotus dagstore metrics with prometheus exp…
kylehuntsman Sep 27, 2022
da01992
feat(monitoring): add prometheus scrape config for lotus-miner (#829)
kylehuntsman Sep 28, 2022
adcebf9
check market protocol before making boost deal (#843)
LexLuthr Sep 29, 2022
2c3a273
feat: show legacy deals link at top of deals page (#851)
dirkmc Sep 30, 2022
7a6886c
feat: add go-to link for pagination (#852)
dirkmc Sep 30, 2022
09314d1
fix: less frequent check for legacy deals count (#854)
dirkmc Sep 30, 2022
690fd27
feat: search legacy deals by proposal cid (#853)
dirkmc Sep 30, 2022
9088eae
add metrics-path (#850)
nonsense Oct 3, 2022
80a9614
show minerID in error (#857)
LexLuthr Oct 3, 2022
4cd974f
add missing market API (#859)
LexLuthr Oct 4, 2022
6e0ac5c
release/lotus1.17.2 to main (#794)
nonsense Oct 4, 2022
f0726d2
bitswap client (#856)
dirkmc Oct 4, 2022
39fd26d
feat: booster-bitswap output more logs with -vv flag (#870)
dirkmc Oct 4, 2022
e33ed18
fix: translate all not found errors to ipld ErrNotFound for bitswap (…
dirkmc Oct 4, 2022
ee72e7d
bump lotus docker images to v1.17.2-rc2 (#868)
nonsense Oct 4, 2022
1835120
keep connection between booster-bitswap and proxy alive (#867)
dirkmc Oct 5, 2022
624e14d
fix flaky TestMultipleDealsConcurrent (#873)
dirkmc Oct 5, 2022
a240606
Add booster-bitswap request and response count metrics to dashboard (…
kylehuntsman Oct 6, 2022
7dc8a79
Configure docker volume for fil-proofs in .env (#881)
airenas Oct 9, 2022
bc701d0
deps: update to [email protected] (#887)
rvagg Oct 11, 2022
d5d367f
Announce Bitswap records to indexer (#839)
hannahhoward Oct 13, 2022
dba23e9
Add prometheus remote write configuration to PL Grafana (#878)
kylehuntsman Oct 17, 2022
7e555d6
Consolidate boost dockerfiles (#872)
airenas Oct 17, 2022
015b654
fix: booster-bitswap init peer ID (#903)
dirkmc Oct 18, 2022
91ee8e4
Lotus Compatibility v1.18.0 update (#884)
hannahhoward Oct 19, 2022
b2ec8aa
update go version (#911)
LexLuthr Oct 19, 2022
2b3394e
fix: use tagged go-car release instead of custom branch (#906)
rvagg Oct 20, 2022
86bfc54
feat: redesign http query url (#898)
LexLuthr Oct 20, 2022
f09de2a
Add wallet sign to boost cli (#915)
jsmetana Oct 26, 2022
f57a63f
add throttler to libp2p http server for estuary (#927)
nonsense Nov 3, 2022
3c68f89
Periodic logsDB cleanup based on configured duration (#929)
LexLuthr Nov 4, 2022
56b0608
Fix log message in db cleanup (#931)
dirkmc Nov 4, 2022
d2c82f3
feat: add transparent gzip support for booster-http response (#932)
LexLuthr Nov 8, 2022
18fa2fa
feat: retry offline deal after commp errors (#899)
LexLuthr Nov 9, 2022
fef9eae
fix wallet list output (#942)
LexLuthr Nov 11, 2022
adc9819
bump version (#957)
LexLuthr Nov 16, 2022
bbf3029
fix: http redirect for /piece/ in booster-http (#956)
LexLuthr Nov 16, 2022
6d3b1c1
feat: show datacap in `boost wallet list` (#959)
LexLuthr Nov 17, 2022
baaaf2e
Allow building docker from Mac M1
airenas Sep 22, 2022
d3b8856
Remove check for unsupported rust platforms
airenas Nov 21, 2022
1731f2b
Update lotus version for docker devnet
airenas Nov 21, 2022
01f151e
Merge branch 'docker-arm-mac' of github.com:airenas/boost into docker…
airenas Nov 21, 2022
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
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ orbs:
executors:
golang:
docker:
- image: cimg/go:1.17.11
- image: cimg/go:1.18.6
resource_class: 2xlarge
ubuntu:
docker:
Expand Down Expand Up @@ -130,8 +130,8 @@ jobs:
- run:
name: Install go
command: |
curl -O https://dl.google.com/go/go1.17.2.darwin-amd64.pkg && \
sudo installer -pkg go1.17.2.darwin-amd64.pkg -target /
curl -O https://dl.google.com/go/go1.18.7.darwin-arm64.pkg && \
sudo installer -pkg go1.18.7.darwin-arm64.pkg -target /
- run:
name: Install pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/boostd
/devnet
/booster-http
/booster-bitswap
/docgen-md
/docgen-openrpc
extern/filecoin-ffi/rust/target
Expand Down
36 changes: 25 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ booster-http: $(BUILD_DEPS)
.PHONY: booster-http
BINS+=booster-http

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

devnet: $(BUILD_DEPS)
rm -f devnet
$(GOCC) build $(GOFLAGS) -o devnet ./cmd/devnet
Expand Down Expand Up @@ -194,9 +200,9 @@ docsgen-openrpc-boost: docsgen-openrpc-bin

## DOCKER IMAGES
docker_user?=filecoin
lotus_version?=1.17.1-rc2
lotus_version?=1.19.0-rc1
lotus_src_dir?=
ffi_from_source?=0
ifeq ($(lotus_src_dir),)
lotus_src_dir=/tmp/lotus-$(lotus_version)
lotus_checkout_dir=$(lotus_src_dir)
Expand All @@ -205,13 +211,14 @@ else
lotus_checkout_dir=
endif
lotus_test_image=$(docker_user)/lotus-test:$(lotus_version)
docker_build_cmd=docker build --build-arg LOTUS_TEST_IMAGE=$(lotus_test_image) $(docker_args)
docker_build_cmd=docker build --build-arg LOTUS_TEST_IMAGE=$(lotus_test_image) \
--build-arg FFI_BUILD_FROM_SOURCE=$(ffi_from_source) $(docker_args)

### lotus test docker image
info/lotus-test:
@echo Lotus dir = $(lotus_src_dir)
@echo Lotus ver = $(lotus_version)
.PHONY: info/lotus-test
.PHONY: info/lotus-test
$(lotus_checkout_dir):
git clone --depth 1 --branch v$(lotus_version) https://github.com/filecoin-project/lotus $@
docker/lotus-test: info/lotus-test | $(lotus_checkout_dir)
Expand All @@ -220,17 +227,24 @@ docker/lotus-test: info/lotus-test | $(lotus_checkout_dir)
.PHONY: docker/lotus-test

### devnet images
docker/%: docker/lotus-test
docker/%:
cd docker/devnet/$* && $(docker_build_cmd) -t $(docker_user)/$*-dev:$(lotus_version) \
--build-arg BUILD_VERSION=$(lotus_version) .
docker/boost: build/.update-modules docker/lotus-test
docker/boost: build/.update-modules
DOCKER_BUILDKIT=1 $(docker_build_cmd) \
-t $(docker_user)/boost-dev:dev --build-arg BUILD_VERSION=dev \
-f docker/devnet/boost/Dockerfile.source .
-f docker/devnet/Dockerfile.source --target boost-dev .
.PHONY: docker/boost
docker/booster-http:
$(docker_build_cmd) -t $(docker_user)/booster-http-dev:dev --build-arg BUILD_VERSION=dev \
-f docker/devnet/booster-http/Dockerfile.source .
docker/booster-http:
DOCKER_BUILDKIT=1 $(docker_build_cmd) \
-t $(docker_user)/booster-http-dev:dev --build-arg BUILD_VERSION=dev \
-f docker/devnet/Dockerfile.source --target booster-http-dev .
.PHONY: docker/booster-http
docker/all: docker/boost docker/booster-http docker/lotus docker/lotus-miner
docker/booster-bitswap:
DOCKER_BUILDKIT=1 $(docker_build_cmd) \
-t $(docker_user)/booster-bitswap-dev:dev --build-arg BUILD_VERSION=dev \
-f docker/devnet/Dockerfile.source --target booster-bitswap-dev .
.PHONY: docker/booster-bitswap
docker/all: docker/lotus-test docker/boost docker/booster-http docker/booster-bitswap \
docker/lotus docker/lotus-miner
.PHONY: docker/all
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ docker compose down --rmi local

rm -rf ./data

rm -rf /var/tmp/filecoin-proof-parameters
rm -rf ~/.cache/filecoin-proof-parameters
```

## License
Expand Down
9 changes: 8 additions & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/filecoin-project/lotus/chain/types"
"github.com/google/uuid"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/multiformats/go-multihash"
)

Expand Down Expand Up @@ -48,6 +48,11 @@ type Boost interface {
BoostDagstorePiecesContainingMultihash(ctx context.Context, mh multihash.Multihash) ([]cid.Cid, error) //perm:read
BoostDagstoreListShards(ctx context.Context) ([]DagstoreShardInfo, error) //perm:read

// MethodGroup: Blockstore
BlockstoreGet(ctx context.Context, c cid.Cid) ([]byte, error) //perm:read
BlockstoreHas(ctx context.Context, c cid.Cid) (bool, error) //perm:read
BlockstoreGetSize(ctx context.Context, c cid.Cid) (int, error) //perm:read

// RuntimeSubsystems returns the subsystems that are enabled
// in this instance.
RuntimeSubsystems(ctx context.Context) (lapi.MinerSubsystems, error) //perm:read
Expand All @@ -64,6 +69,8 @@ type Boost interface {
MarketCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:write
MarketListIncompleteDeals(ctx context.Context) ([]storagemarket.MinerDeal, error) //perm:read
MarketPendingDeals(ctx context.Context) (lapi.PendingDealInfo, error) //perm:write
SectorsRefs(context.Context) (map[string][]lapi.SealedRef, error) //perm:read

PiecesListPieces(ctx context.Context) ([]cid.Cid, error) //perm:read
PiecesListCidInfos(ctx context.Context) ([]cid.Cid, error) //perm:read
Expand Down
29 changes: 22 additions & 7 deletions api/docgen/docgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ import (
"github.com/google/uuid"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"
"github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/libp2p/go-libp2p/core/metrics"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/protocol"
"github.com/multiformats/go-multiaddr"

datatransfer "github.com/filecoin-project/go-data-transfer"
filestore "github.com/filecoin-project/go-fil-markets/filestore"
"github.com/filecoin-project/go-fil-markets/filestore"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-jsonrpc/auth"
textselector "github.com/ipld/go-ipld-selector-text-lite"

"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"

Expand All @@ -45,6 +46,8 @@ import (
"github.com/filecoin-project/lotus/node/repo/imports"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
"golang.org/x/text/cases"
"golang.org/x/text/language"
)

var ExampleValues = map[reflect.Type]interface{}{
Expand Down Expand Up @@ -131,7 +134,10 @@ func init() {
addExample(retrievalmarket.DealStatusNew)
addExample(&textSelExample)
addExample(network.ReachabilityPublic)
addExample(build.NewestNetworkVersion)
addExample(build.TestNetworkVersion)
allocationID := verifreg.AllocationId(0)
addExample(allocationID)
addExample(&allocationID)
addExample(map[string]int{"name": 42})
addExample(map[string]time.Time{"name": time.Unix(1615243938, 0).UTC()})
addExample(&types.ExecutionTrace{
Expand Down Expand Up @@ -298,6 +304,15 @@ func init() {
addExample(dealcheckpoints.Transferred)
addExample(lapi.SubsystemMarkets)
addExample(types2.DealRetryAuto)
addExample(map[string][]lapi.SealedRef{
"98000": {
lapi.SealedRef{
SectorID: 100,
Offset: 10 << 20,
Size: 1 << 20,
},
},
})
}

func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
Expand Down Expand Up @@ -363,7 +378,7 @@ func exampleStruct(method string, t, parent reflect.Type) interface{} {
if f.Type == parent {
continue
}
if strings.Title(f.Name) == f.Name {
if cases.Title(language.Und, cases.NoLower).String(f.Name) == f.Name {
ns.Elem().Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t)))
}
}
Expand Down
8 changes: 4 additions & 4 deletions api/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

lotus_api "github.com/filecoin-project/lotus/api"
lotus_net "github.com/filecoin-project/lotus/node/impl/net"
metrics "github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol"
metrics "github.com/libp2p/go-libp2p/core/metrics"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/protocol"
)

// MODIFYING THE API INTERFACE
Expand Down
73 changes: 69 additions & 4 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/ipfs/go-cid"

"github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/libp2p/go-libp2p/core/peer"
ma "github.com/multiformats/go-multiaddr"
)

Expand Down
Binary file modified build/openrpc/boost.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/params_shared_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/ipfs/go-cid"

"github.com/libp2p/go-libp2p-core/protocol"
"github.com/libp2p/go-libp2p/core/protocol"

"github.com/filecoin-project/boost/node/modules/dtypes"
)
Expand Down
2 changes: 1 addition & 1 deletion build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package build

var CurrentCommit string

const BuildVersion = "1.4.0"
const BuildVersion = "1.5.0"

func UserVersion() string {
return BuildVersion + CurrentCommit
Expand Down
4 changes: 2 additions & 2 deletions cli/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/host"
"github.com/mitchellh/go-homedir"
)

Expand Down
Loading