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

Conversation

airenas
Copy link
Contributor

@airenas airenas commented Sep 23, 2022

Solves task (building docker on Mac M1) for #742.

It changes dockerfiles to help building filecoin-ffi from source:

  1. adds rust compiled
  2. allows to configure FFI_BUILD_FROM_SOURCE

The complete solution depends on: filecoin-project/lotus#9363
To build images on mac M1:

  1. take lotus having fix: docker: make compatible with arm platform lotus#9363
  2. make docker/all lotus_src_dir=../lotus_with9363 ffi_from_source=1

airenas and others added 30 commits September 22, 2022 14:45
…ct#831)

* remove lotus-test in docker/build target requirements

* add lotus-test to docker/all
* check market protocol before deal

* implement suggestions

* Update cmd/boost/deal_cmd.go

Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>

* use FirstSupportedProtocol method

Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
* booster bitswap MVP executable (filecoin-project#707)

* feat(booster-bitswap): booster bitswap MVP untested

* refactor(booster-bitswap): use API for fetching blocks

* fix(deps): update deps to compile

* feat(booster-bitswap): makefile & fixes

add commands to build booster-bitswap, and very a round tripped successful fetch from
booster-bitswap

* refactor: clean up unused vars etc

* fix: booster-bitsawp - check error when creating libp2p key

* refactor(node): avoid FreeAndUnsealed method

Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>

* booster-bitswap devnet and tracing (filecoin-project#796)

* return ipld ErrNotFound from remote blockstore interface (filecoin-project#798)

* fix: return ipld ErrNotFound from remote blockstore interface

* test: add more tests for ipld ErrNotFound

* test: comment out part of TestDummydealOnline that is flaky due to a bug in latest lotus (filecoin-project#802)

* fix normaliseError nil ptr dereference (filecoin-project#803)

* feat: shard selector (filecoin-project#807)

* LoadBalancer for bitswap (and later, more of libp2p) (filecoin-project#786)

* feat(loadbalancer): add message types

* feat(messages): add utility functions

* feat(loadbalancer): initial load balancer impl

implementation of the load balancer node itself

* feat(loadbalancer): add service node

implements code for running a service node

* feat(loadbalancer): integrate into boost and booster-bitswap

* Update loadbalancer/loadbalancer.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/servicenode.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/servicenode.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/messages/messages.ipldsch

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/messages/messages.ipldsch

Co-authored-by: Rod Vagg <rod@vagg.org>

* refactor(loadbalancer): remove routing protocol

remove the routing protocol, instead relying on a set config. also remove forwarding response for
inbound requests

* fix(loadbalancer): update tests

* refactor(loadbalancer): integrate simplified load balancer

removed pub keys to minimize network traffic, added api's to configure and update bitswap peer id,
added auto config of bitswap peer id in booster-bitswap

* docs(gen): regenerate api docs

* chore(lint): fix lint errors

* fix(loadbalancer): minor bridgestream fix

* Update loadbalancer/servicenode.go

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* refactor(protocolproxy): address PR comments

renames, reconfigured architecture, etc

* refactor(make init print out peer id): remove apis and transparent peer id setting. have init print

Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: dirkmc <dirkmdev@gmail.com>

* Add block filter via BadBits (filecoin-project#825)

* feat(booster-bitswap): add block filter via BadBits

* refactor(booster-bitswap): use bitswap blockfilter for filtering

* feat(blockfilter): only update when list is modified

* feat(blockFilter): add on disk caching

* Update cmd/booster-bitswap/blockfilter/blockfilter.go

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* fix(blockfilter): minor PR fixups

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* Libp2p 0.22 upgrade (filecoin-project#837)

* chore(deps): upgrade to Lotus RC & libp2p v0.22

* chore(deps): update go to 1.18

* ci(circle): update circle to go 1.18

* style(imports): fix imports

* fix(build): update ffi

* fix(lint): fix deprecated strings.Title method

* fix(mod): mod tidy

* Protocol Proxy cleanup (filecoin-project#836)

* refactor(booster-bitswap): minor UI fixes for booster-bitswap UI

* Update cmd/booster-bitswap/init.go

Co-authored-by: dirkmc <dirkmdev@gmail.com>

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* feat: update to dagstore v0.5.5 (filecoin-project#849)

* add booster-bitswap to devnet (filecoin-project#866)

* bump lotus-test version

* add docker/booster-bitswap target in Makefile

Co-authored-by: Hannah Howard <hannah@hannahhoward.net>
Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
* booster bitswap MVP executable (filecoin-project#707)

* feat(booster-bitswap): booster bitswap MVP untested

* refactor(booster-bitswap): use API for fetching blocks

* fix(deps): update deps to compile

* feat(booster-bitswap): makefile & fixes

add commands to build booster-bitswap, and very a round tripped successful fetch from
booster-bitswap

* refactor: clean up unused vars etc

* fix: booster-bitsawp - check error when creating libp2p key

* refactor(node): avoid FreeAndUnsealed method

Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>

* booster-bitswap devnet and tracing (filecoin-project#796)

* return ipld ErrNotFound from remote blockstore interface (filecoin-project#798)

* fix: return ipld ErrNotFound from remote blockstore interface

* test: add more tests for ipld ErrNotFound

* test: comment out part of TestDummydealOnline that is flaky due to a bug in latest lotus (filecoin-project#802)

* fix normaliseError nil ptr dereference (filecoin-project#803)

* feat: shard selector (filecoin-project#807)

* LoadBalancer for bitswap (and later, more of libp2p) (filecoin-project#786)

* feat(loadbalancer): add message types

* feat(messages): add utility functions

* feat(loadbalancer): initial load balancer impl

implementation of the load balancer node itself

* feat(loadbalancer): add service node

implements code for running a service node

* feat(loadbalancer): integrate into boost and booster-bitswap

* Update loadbalancer/loadbalancer.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/servicenode.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/servicenode.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/messages/messages.ipldsch

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update loadbalancer/messages/messages.ipldsch

Co-authored-by: Rod Vagg <rod@vagg.org>

* refactor(loadbalancer): remove routing protocol

remove the routing protocol, instead relying on a set config. also remove forwarding response for
inbound requests

* fix(loadbalancer): update tests

* refactor(loadbalancer): integrate simplified load balancer

removed pub keys to minimize network traffic, added api's to configure and update bitswap peer id,
added auto config of bitswap peer id in booster-bitswap

* docs(gen): regenerate api docs

* chore(lint): fix lint errors

* fix(loadbalancer): minor bridgestream fix

* Update loadbalancer/servicenode.go

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* refactor(protocolproxy): address PR comments

renames, reconfigured architecture, etc

* refactor(make init print out peer id): remove apis and transparent peer id setting. have init print

Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: dirkmc <dirkmdev@gmail.com>

* Add block filter via BadBits (filecoin-project#825)

* feat(booster-bitswap): add block filter via BadBits

* refactor(booster-bitswap): use bitswap blockfilter for filtering

* feat(blockfilter): only update when list is modified

* feat(blockFilter): add on disk caching

* Update cmd/booster-bitswap/blockfilter/blockfilter.go

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* fix(blockfilter): minor PR fixups

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* Libp2p 0.22 upgrade (filecoin-project#837)

* chore(deps): upgrade to Lotus RC & libp2p v0.22

* chore(deps): update go to 1.18

* ci(circle): update circle to go 1.18

* style(imports): fix imports

* fix(build): update ffi

* fix(lint): fix deprecated strings.Title method

* fix(mod): mod tidy

* Protocol Proxy cleanup (filecoin-project#836)

* refactor(booster-bitswap): minor UI fixes for booster-bitswap UI

* Update cmd/booster-bitswap/init.go

Co-authored-by: dirkmc <dirkmdev@gmail.com>

Co-authored-by: dirkmc <dirkmdev@gmail.com>

* feat: update to dagstore v0.5.5 (filecoin-project#849)

* feat: bitswap client

* feat: bitswap client - output car file

* refactor: bitswap client - remove tracing

* feat: debug logs

* fix: write blocks to blockstore

* fix: duration output

* fix: duration output for block received

* feat: add pprof to bitswap client

* feat: protocol proxy logging

* feat: bitswap client - check host supports bitswap protocol

* feat: listen for bitswap requests locally as well as through forwarding protocol

Co-authored-by: Hannah Howard <hannah@hannahhoward.net>
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
* bump lotus docker images to v1.17.2-rc2

* update entrypoint.sh for booster-bitswap to do init on first run

* add random.sh helper script
…ject#867)

* feat: keep connection between booster-bitswap and proxy alive

* fix env var; expand homedir; fix logger env vars

* feat: when opening a stream from routed host, use direct connection if there is one

* booster-bitswap - use explicit proxy address (filecoin-project#871)

* bump lotus docker images to v1.17.2-rc2 (filecoin-project#868)

* bump lotus docker images to v1.17.2-rc2

* update entrypoint.sh for booster-bitswap to do init on first run

* add random.sh helper script

* feat: booster-bitswap - use explicit proxy address

Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>

Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
…ilecoin-project#838)

* feat: add bitswap request and response count metrics to dashboard

* add configurable metrics http port; move http metrics server to main away from bitswap server

Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
Change default host dir for fil-proofs from /var/tmp/filecoin-proof-parameters
to ~/.cache/filecoin-proof-parameters
Make it configurable in .env
* feat(indexprovider): announce on bitswap

support announcing on bitswap when configured to do so

* fix(indexprovider): announce only in correct state

* chore(deps): update to fil-markets v1.24.2
…ject#878)

* fix: update metrics handler error formatting

* feat(monitoring): add prometheus remote write configuration
Make one dockerfile for images of boost, booster-http, booster-bitswap.
It speeds overall build time of images by building boost binaries only once and reusing docker cache
* chore(deps): update go-fil-markets + lotus v9 actors

* feat: update lotus to v1.18.0-rc3

Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
rvagg and others added 16 commits October 20, 2022 09:15
…ject#906)

Closes: filecoin-project#670

Because CarOffsetWriter got copied into boost, it doesn't need to use the
custom branch.
* redesign query URL

* fix typo

* implement suggestions

* improve format check

* add return, improve err msg

* fix format logic, change index
* add throttler to libp2p http server for estuary

* lint

* move defer stmt
…t#929)

* logsDB cleanup

* gen

* fix unrelated lint err

* implement suggestions

* fix config var name
…n-project#932)

* gzip response

* fix go mod

* change test http adddress

* refactor gzip test

* debug gzip test

* fix test, close gzip writer

* fix lint err

* keep the Content-Type header
* retry offline deal after commp err

* implement suggestions

* initial tests

* Retry test: error

* fix: catch import bad file path in the CLI

Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
* wallet list datacap

* set nil for json
@airenas
Copy link
Contributor Author

airenas commented Nov 21, 2022

Moved changes to #979

@airenas airenas closed this Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants