bd10bdf99a
* build: Bump version to v1.17.3-dev * build: set version to v1.18.0-dev * chore: actors: Allow builtin-actors to return a map of methods (#9342) * Allow builtin-actors to return a map of methods * go mod * Fix tests * Fix tests, check carefully please * Delete lotus-pond (#9352) * feat: add StateNetworkVersion to mpool API * chore: refactor: rename NewestNetworkVersion * feat: actors: Integrate datacap actor into lotus (#9348) * Integrate datacap actor * Implement datacap actor in chain/builtin * feat: support typed errors over RPC * chore: deps: update to go-jsonrpc 0.1.8 * remove duplicate import * fix: itest: check for closed connection * chore: refactor: move retry test to API * address magik supernit * Add ability to only have single partition per msg for partitions with recovery sectors * doc gen * Address comments * Return beneficiary info from miner state Info() * Update builtin-actors to dev/20220922-v9 which includes FIP-0045 changes in progress * Integrate verifreg changes to lotus * Setup datacap actor * Update builtin-actors to dev/20220922-v9-1 * Update datacap actor to query datacap instead of verifreg * update gst * update markets * update actors with hamt fix * update gst * Update datacap to parse tokens * Update bundles * datacap and verifreg actors use ID addresses without protocol byte * update builtin-actors to rc1 * update go-fil-markets * Update bundles to rc2 * Integrate the v9 migration * Add api for getting allocation * Add upgrade epoch for butterfly * Tweak PreSeal struct to be infra-friendly * docsgen * More tweaking of PreSeal for genesis * review fixes * Use fake cid for test * add butterfly artifacts for oct 5 upgrade * check datacaps for v8 verifreg match v9 datacap actor * Remove print statements * Update to go-state-types master * Update to go-state-types v0.9.0-rc1 * review fixes * use go-fil-markets v1.24.0-v17 * Add accessors for allocations and claims maps * fix: missing permissions tag * butterfly * update butterfly artifacts * sealing pipeline: Prepare deal assigning logic for FIP-45 * sealing pipeline: Get allocationId with StateApi * use NoAllocationID instead of nil AllocationId * address review * Add datacap actor to registry.go * Add cli for listing allocations and removing expired allocations * Update to go-state-types master * deps: upgrade go-merkledag to 0.8.0 * shark params * Update cli/filplus.go Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com> * revert change to verifreg util * docsgen-cli * miss the stuff * Update FFI * Update go-state-types to v0.9.0 * Update builtin-actors to v9.0.0 * add calib upgrade epcoh * update the upgrade envvar * kill shark * Remove fvm splash banner from nv17 upgrade * check invariance for pending deals and allocations * check pending verified deal proposal migrated to allocation * Add check for unsealed CID in precommit sectors * Fix counting of allocations in nv17 migration test * make gen * pass state trees as pointers * Add assertion that migrations with & without cache are the same * compare allocation to verified deal proposal * Fix miner state precommit info * fix migration test tool * add changelog * Update to go-state-types v0.9.1 * Integrate builtin-actors v9.0.1 * chore: ver: bump version for rc3 (#9512) * Bump version to 1.18.0-rc3 * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com> * Update CHANGELOG.md Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com> Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com> * Migration: Use autobatch bs * Fix autobatch Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai> * Invoker: Use MethodMeta from go-state-types * Add a second premigration for nv17 * Add more shed tools for migration checking * address review * Lotus release v1.18.0-rc4 * fix: ci: fix app-image build on ci (#9527) * Remove old go version first * Add GO_VERSION file * Use GO_VERSION to set / verify go version * mv GO_VERSION GO_VERSION_MIN * Use GO_VERSION_MIN in Makefile check Co-authored-by: Ian Davis <jungziege@gmail.com> * Update to latest go-state-types for migration fixes * go mod tidy * fix: use api.ErrActorNotFound instead of types.ErrActorNotFound * fix: add fields to ForkUpgradeParams * docs: update actors_version_checklist.md * chore: fix lint * update to go state type v0.9.6 with market migration fix (#9545) * update go-state-types to v-0.9.7 * Add invariant checks to migration * fix invariant check: number of entries in datacap actor should include verifreg * Invariant checks: Only include not-activated deals * test: nv17 migration * Address review * add lotus-shed invariance method * Migration cli takes a stateroot cid and a height * make gen * Update to builtin-actors v9.0.2 * Failing test that shows that notaries can remove datacap from the verifreg actor * Test that should pass when the problem is solved * make gen * Review fixes * statemanager call function will return call information even if call errors * update go-state-types * update builtin-actors * bubble up errors properly from ApplyImplicitMessage * bump to rc5 * set new upgrade heights for calibnet * set new upgrade height for butterfly * tweak calibnet upgrade schedule * clarify changelog note about calibnet * butterfly * update calibnet artifacts * Allow setting local bundles for Debug FVM for av 9+ * fix: autobatch: remove potential deadlock when a block is missing Check the _underlying_ blockstore instead of recursing. Also, drop the lock before we do that. * fix imports * build: set shark mainnet epoch (#9640) * chore: build: Lotus release v1.18.0 (#9641) * Lotus release v1.18.0 * add changelog * address review * changelog improvement Co-authored-by: Jennifer Wang <jiayingw703@gmail.com> Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai> Co-authored-by: Łukasz Magiera <magik6k@gmail.com> Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com> Co-authored-by: Aayush <arajasek94@gmail.com> Co-authored-by: Geoff Stuart <geoff.vball@gmail.com> Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai> Co-authored-by: simlecode <69969590+simlecode@users.noreply.github.com> Co-authored-by: Rod Vagg <rod@vagg.org> Co-authored-by: Jakub Sztandera <kubuxu@protocol.ai> Co-authored-by: Ian Davis <jungziege@gmail.com> Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com> Co-authored-by: Steven Allen <steven@stebalien.com>
382 lines
10 KiB
Makefile
382 lines
10 KiB
Makefile
SHELL=/usr/bin/env bash
|
|
|
|
all: build
|
|
.PHONY: all
|
|
|
|
unexport GOFLAGS
|
|
|
|
GOCC?=go
|
|
|
|
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
|
GOVERSIONMIN:=$(shell cat GO_VERSION_MIN | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
|
|
|
|
ifeq ($(shell expr $(GOVERSION) \< $(GOVERSIONMIN)), 1)
|
|
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
|
|
$(error Update Golang to version to at least $(shell cat GO_VERSION_MIN))
|
|
endif
|
|
|
|
# git modules that need to be loaded
|
|
MODULES:=
|
|
|
|
CLEAN:=
|
|
BINS:=
|
|
|
|
ldflags=-X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null))
|
|
ifneq ($(strip $(LDFLAGS)),)
|
|
ldflags+=-extldflags=$(LDFLAGS)
|
|
endif
|
|
|
|
GOFLAGS+=-ldflags="$(ldflags)"
|
|
|
|
|
|
## FFI
|
|
|
|
FFI_PATH:=extern/filecoin-ffi/
|
|
FFI_DEPS:=.install-filcrypto
|
|
FFI_DEPS:=$(addprefix $(FFI_PATH),$(FFI_DEPS))
|
|
|
|
$(FFI_DEPS): build/.filecoin-install ;
|
|
|
|
build/.filecoin-install: $(FFI_PATH)
|
|
$(MAKE) -C $(FFI_PATH) $(FFI_DEPS:$(FFI_PATH)%=%)
|
|
@touch $@
|
|
|
|
MODULES+=$(FFI_PATH)
|
|
BUILD_DEPS+=build/.filecoin-install
|
|
CLEAN+=build/.filecoin-install
|
|
|
|
ffi-version-check:
|
|
@[[ "$$(awk '/const Version/{print $$5}' extern/filecoin-ffi/version.go)" -eq 3 ]] || (echo "FFI version mismatch, update submodules"; exit 1)
|
|
BUILD_DEPS+=ffi-version-check
|
|
|
|
.PHONY: ffi-version-check
|
|
|
|
$(MODULES): build/.update-modules ;
|
|
# dummy file that marks the last time modules were updated
|
|
build/.update-modules:
|
|
git submodule update --init --recursive
|
|
touch $@
|
|
|
|
# end git modules
|
|
|
|
## MAIN BINARIES
|
|
|
|
CLEAN+=build/.update-modules
|
|
|
|
deps: $(BUILD_DEPS)
|
|
.PHONY: deps
|
|
|
|
build-devnets: build lotus-seed lotus-shed
|
|
.PHONY: build-devnets
|
|
|
|
debug: GOFLAGS+=-tags=debug
|
|
debug: build-devnets
|
|
|
|
2k: GOFLAGS+=-tags=2k
|
|
2k: build-devnets
|
|
|
|
calibnet: GOFLAGS+=-tags=calibnet
|
|
calibnet: build-devnets
|
|
|
|
butterflynet: GOFLAGS+=-tags=butterflynet
|
|
butterflynet: build-devnets
|
|
|
|
interopnet: GOFLAGS+=-tags=interopnet
|
|
interopnet: build-devnets
|
|
|
|
wallabynet: GOFLAGS+=-tags=wallabynet
|
|
wallabynet: build-devnets
|
|
|
|
lotus: $(BUILD_DEPS)
|
|
rm -f lotus
|
|
$(GOCC) build $(GOFLAGS) -o lotus ./cmd/lotus
|
|
|
|
.PHONY: lotus
|
|
BINS+=lotus
|
|
|
|
lotus-miner: $(BUILD_DEPS)
|
|
rm -f lotus-miner
|
|
$(GOCC) build $(GOFLAGS) -o lotus-miner ./cmd/lotus-miner
|
|
.PHONY: lotus-miner
|
|
BINS+=lotus-miner
|
|
|
|
lotus-worker: $(BUILD_DEPS)
|
|
rm -f lotus-worker
|
|
$(GOCC) build $(GOFLAGS) -o lotus-worker ./cmd/lotus-worker
|
|
.PHONY: lotus-worker
|
|
BINS+=lotus-worker
|
|
|
|
lotus-shed: $(BUILD_DEPS)
|
|
rm -f lotus-shed
|
|
$(GOCC) build $(GOFLAGS) -o lotus-shed ./cmd/lotus-shed
|
|
.PHONY: lotus-shed
|
|
BINS+=lotus-shed
|
|
|
|
lotus-gateway: $(BUILD_DEPS)
|
|
rm -f lotus-gateway
|
|
$(GOCC) build $(GOFLAGS) -o lotus-gateway ./cmd/lotus-gateway
|
|
.PHONY: lotus-gateway
|
|
BINS+=lotus-gateway
|
|
|
|
build: lotus lotus-miner lotus-worker
|
|
@[[ $$(type -P "lotus") ]] && echo "Caution: you have \
|
|
an existing lotus binary in your PATH. This may cause problems if you don't run 'sudo make install'" || true
|
|
|
|
.PHONY: build
|
|
|
|
install: install-daemon install-miner install-worker
|
|
|
|
install-daemon:
|
|
install -C ./lotus /usr/local/bin/lotus
|
|
|
|
install-miner:
|
|
install -C ./lotus-miner /usr/local/bin/lotus-miner
|
|
|
|
install-worker:
|
|
install -C ./lotus-worker /usr/local/bin/lotus-worker
|
|
|
|
install-app:
|
|
install -C ./$(APP) /usr/local/bin/$(APP)
|
|
|
|
uninstall: uninstall-daemon uninstall-miner uninstall-worker
|
|
.PHONY: uninstall
|
|
|
|
uninstall-daemon:
|
|
rm -f /usr/local/bin/lotus
|
|
|
|
uninstall-miner:
|
|
rm -f /usr/local/bin/lotus-miner
|
|
|
|
uninstall-worker:
|
|
rm -f /usr/local/bin/lotus-worker
|
|
|
|
# TOOLS
|
|
|
|
lotus-seed: $(BUILD_DEPS)
|
|
rm -f lotus-seed
|
|
$(GOCC) build $(GOFLAGS) -o lotus-seed ./cmd/lotus-seed
|
|
|
|
.PHONY: lotus-seed
|
|
BINS+=lotus-seed
|
|
|
|
benchmarks:
|
|
$(GOCC) run github.com/whyrusleeping/bencher ./... > bench.json
|
|
@echo Submitting results
|
|
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
|
|
.PHONY: benchmarks
|
|
|
|
lotus-fountain:
|
|
rm -f lotus-fountain
|
|
$(GOCC) build $(GOFLAGS) -o lotus-fountain ./cmd/lotus-fountain
|
|
$(GOCC) run github.com/GeertJohan/go.rice/rice append --exec lotus-fountain -i ./cmd/lotus-fountain -i ./build
|
|
.PHONY: lotus-fountain
|
|
BINS+=lotus-fountain
|
|
|
|
lotus-bench:
|
|
rm -f lotus-bench
|
|
$(GOCC) build $(GOFLAGS) -o lotus-bench ./cmd/lotus-bench
|
|
.PHONY: lotus-bench
|
|
BINS+=lotus-bench
|
|
|
|
lotus-stats:
|
|
rm -f lotus-stats
|
|
$(GOCC) build $(GOFLAGS) -o lotus-stats ./cmd/lotus-stats
|
|
.PHONY: lotus-stats
|
|
BINS+=lotus-stats
|
|
|
|
lotus-pcr:
|
|
rm -f lotus-pcr
|
|
$(GOCC) build $(GOFLAGS) -o lotus-pcr ./cmd/lotus-pcr
|
|
.PHONY: lotus-pcr
|
|
BINS+=lotus-pcr
|
|
|
|
lotus-health:
|
|
rm -f lotus-health
|
|
$(GOCC) build -o lotus-health ./cmd/lotus-health
|
|
.PHONY: lotus-health
|
|
BINS+=lotus-health
|
|
|
|
lotus-wallet:
|
|
rm -f lotus-wallet
|
|
$(GOCC) build $(GOFLAGS) -o lotus-wallet ./cmd/lotus-wallet
|
|
.PHONY: lotus-wallet
|
|
BINS+=lotus-wallet
|
|
|
|
lotus-keygen:
|
|
rm -f lotus-keygen
|
|
$(GOCC) build -o lotus-keygen ./cmd/lotus-keygen
|
|
.PHONY: lotus-keygen
|
|
BINS+=lotus-keygen
|
|
|
|
testground:
|
|
$(GOCC) build -tags testground -o /dev/null ./cmd/lotus
|
|
.PHONY: testground
|
|
BINS+=testground
|
|
|
|
|
|
tvx:
|
|
rm -f tvx
|
|
$(GOCC) build -o tvx ./cmd/tvx
|
|
.PHONY: tvx
|
|
BINS+=tvx
|
|
|
|
lotus-sim: $(BUILD_DEPS)
|
|
rm -f lotus-sim
|
|
$(GOCC) build $(GOFLAGS) -o lotus-sim ./cmd/lotus-sim
|
|
.PHONY: lotus-sim
|
|
BINS+=lotus-sim
|
|
|
|
# SYSTEMD
|
|
|
|
install-daemon-service: install-daemon
|
|
mkdir -p /etc/systemd/system
|
|
mkdir -p /var/log/lotus
|
|
install -C -m 0644 ./scripts/lotus-daemon.service /etc/systemd/system/lotus-daemon.service
|
|
systemctl daemon-reload
|
|
@echo
|
|
@echo "lotus-daemon service installed. Don't forget to run 'sudo systemctl start lotus-daemon' to start it and 'sudo systemctl enable lotus-daemon' for it to be enabled on startup."
|
|
|
|
install-miner-service: install-miner install-daemon-service
|
|
mkdir -p /etc/systemd/system
|
|
mkdir -p /var/log/lotus
|
|
install -C -m 0644 ./scripts/lotus-miner.service /etc/systemd/system/lotus-miner.service
|
|
systemctl daemon-reload
|
|
@echo
|
|
@echo "lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup."
|
|
|
|
install-main-services: install-miner-service
|
|
|
|
install-all-services: install-main-services
|
|
|
|
install-services: install-main-services
|
|
|
|
clean-daemon-service: clean-miner-service
|
|
-systemctl stop lotus-daemon
|
|
-systemctl disable lotus-daemon
|
|
rm -f /etc/systemd/system/lotus-daemon.service
|
|
systemctl daemon-reload
|
|
|
|
clean-miner-service:
|
|
-systemctl stop lotus-miner
|
|
-systemctl disable lotus-miner
|
|
rm -f /etc/systemd/system/lotus-miner.service
|
|
systemctl daemon-reload
|
|
|
|
clean-main-services: clean-daemon-service
|
|
|
|
clean-all-services: clean-main-services
|
|
|
|
clean-services: clean-all-services
|
|
|
|
# MISC
|
|
|
|
buildall: $(BINS)
|
|
|
|
install-completions:
|
|
mkdir -p /usr/share/bash-completion/completions /usr/local/share/zsh/site-functions/
|
|
install -C ./scripts/bash-completion/lotus /usr/share/bash-completion/completions/lotus
|
|
install -C ./scripts/zsh-completion/lotus /usr/local/share/zsh/site-functions/_lotus
|
|
|
|
clean:
|
|
rm -rf $(CLEAN) $(BINS)
|
|
-$(MAKE) -C $(FFI_PATH) clean
|
|
.PHONY: clean
|
|
|
|
dist-clean:
|
|
git clean -xdff
|
|
git submodule deinit --all -f
|
|
.PHONY: dist-clean
|
|
|
|
type-gen: api-gen
|
|
$(GOCC) run ./gen/main.go
|
|
$(GOCC) generate -x ./...
|
|
goimports -w api/
|
|
|
|
actors-code-gen:
|
|
$(GOCC) run ./gen/inline-gen . gen/inlinegen-data.json
|
|
$(GOCC) run ./chain/actors/agen
|
|
$(GOCC) fmt ./...
|
|
|
|
actors-gen: actors-code-gen fiximports
|
|
.PHONY: actors-gen
|
|
|
|
bundle-gen:
|
|
$(GOCC) run ./gen/bundle
|
|
$(GOCC) fmt ./build/...
|
|
.PHONY: bundle-gen
|
|
|
|
|
|
api-gen:
|
|
$(GOCC) run ./gen/api
|
|
goimports -w api
|
|
goimports -w api
|
|
.PHONY: api-gen
|
|
|
|
cfgdoc-gen:
|
|
$(GOCC) run ./node/config/cfgdocgen > ./node/config/doc_gen.go
|
|
|
|
appimage: lotus
|
|
rm -rf appimage-builder-cache || true
|
|
rm AppDir/io.filecoin.lotus.desktop || true
|
|
rm AppDir/icon.svg || true
|
|
rm Appdir/AppRun || true
|
|
mkdir -p AppDir/usr/bin
|
|
cp ./lotus AppDir/usr/bin/
|
|
appimage-builder
|
|
|
|
docsgen: docsgen-md docsgen-openrpc fiximports
|
|
|
|
docsgen-md-bin: api-gen actors-gen
|
|
$(GOCC) build $(GOFLAGS) -o docgen-md ./api/docgen/cmd
|
|
docsgen-openrpc-bin: api-gen actors-gen
|
|
$(GOCC) build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd
|
|
|
|
docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker
|
|
|
|
docsgen-md-full: docsgen-md-bin
|
|
./docgen-md "api/api_full.go" "FullNode" "api" "./api" > documentation/en/api-v1-unstable-methods.md
|
|
./docgen-md "api/v0api/full.go" "FullNode" "v0api" "./api/v0api" > documentation/en/api-v0-methods.md
|
|
docsgen-md-storage: docsgen-md-bin
|
|
./docgen-md "api/api_storage.go" "StorageMiner" "api" "./api" > documentation/en/api-v0-methods-miner.md
|
|
docsgen-md-worker: docsgen-md-bin
|
|
./docgen-md "api/api_worker.go" "Worker" "api" "./api" > documentation/en/api-v0-methods-worker.md
|
|
|
|
docsgen-openrpc: docsgen-openrpc-full docsgen-openrpc-storage docsgen-openrpc-worker docsgen-openrpc-gateway
|
|
|
|
docsgen-openrpc-full: docsgen-openrpc-bin
|
|
./docgen-openrpc "api/api_full.go" "FullNode" "api" "./api" -gzip > build/openrpc/full.json.gz
|
|
docsgen-openrpc-storage: docsgen-openrpc-bin
|
|
./docgen-openrpc "api/api_storage.go" "StorageMiner" "api" "./api" -gzip > build/openrpc/miner.json.gz
|
|
docsgen-openrpc-worker: docsgen-openrpc-bin
|
|
./docgen-openrpc "api/api_worker.go" "Worker" "api" "./api" -gzip > build/openrpc/worker.json.gz
|
|
docsgen-openrpc-gateway: docsgen-openrpc-bin
|
|
./docgen-openrpc "api/api_gateway.go" "Gateway" "api" "./api" -gzip > build/openrpc/gateway.json.gz
|
|
|
|
.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin
|
|
|
|
fiximports:
|
|
./scripts/fiximports
|
|
|
|
gen: actors-code-gen type-gen cfgdoc-gen docsgen api-gen circleci bundle-gen fiximports
|
|
@echo ">>> IF YOU'VE MODIFIED THE CLI OR CONFIG, REMEMBER TO ALSO MAKE docsgen-cli"
|
|
.PHONY: gen
|
|
|
|
jen: gen
|
|
|
|
snap: lotus lotus-miner lotus-worker
|
|
snapcraft
|
|
# snapcraft upload ./lotus_*.snap
|
|
|
|
# separate from gen because it needs binaries
|
|
docsgen-cli: lotus lotus-miner lotus-worker
|
|
python ./scripts/generate-lotus-cli.py
|
|
./lotus config default > documentation/en/default-lotus-config.toml
|
|
./lotus-miner config default > documentation/en/default-lotus-miner-config.toml
|
|
.PHONY: docsgen-cli
|
|
|
|
print-%:
|
|
@echo $*=$($*)
|
|
|
|
circleci:
|
|
go generate -x ./.circleci
|