2020-03-05 18:56:07 +01:00
|
|
|
# Copyright (c) 2019-2020 Status Research & Development GmbH. Licensed under
|
2019-03-28 16:18:59 +01:00
|
|
|
# either of:
|
|
|
|
# - Apache License, version 2.0
|
|
|
|
# - MIT license
|
|
|
|
# at your option. This file may not be copied, modified, or distributed except
|
|
|
|
# according to those terms.
|
|
|
|
|
2019-09-10 02:50:09 +02:00
|
|
|
SHELL := bash # the shell used internally by "make"
|
|
|
|
|
2019-08-21 14:45:24 +02:00
|
|
|
# used inside the included makefiles
|
|
|
|
BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2020-08-27 13:29:23 +02:00
|
|
|
# we set its default value before LOG_LEVEL is used in "variables.mk"
|
|
|
|
LOG_LEVEL := DEBUG
|
|
|
|
|
2020-04-19 01:25:21 +02:00
|
|
|
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
2019-08-21 14:45:24 +02:00
|
|
|
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2020-07-10 01:41:51 +03:00
|
|
|
NODE_ID := 0
|
|
|
|
BASE_PORT := 9000
|
|
|
|
BASE_RPC_PORT := 9190
|
|
|
|
BASE_METRICS_PORT := 8008
|
2020-08-03 03:59:45 +03:00
|
|
|
GOERLI_WEB3_URL := "wss://goerli.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a"
|
2020-07-10 18:18:14 +03:00
|
|
|
VALIDATORS := 1
|
2020-08-22 00:05:37 +03:00
|
|
|
CPU_LIMIT := 0
|
|
|
|
|
|
|
|
ifeq ($(CPU_LIMIT), 0)
|
|
|
|
CPU_LIMIT_CMD :=
|
|
|
|
else
|
|
|
|
CPU_LIMIT_CMD := cpulimit --limit=$(CPU_LIMIT) --foreground --
|
|
|
|
endif
|
2020-07-10 01:41:51 +03:00
|
|
|
|
2019-12-04 15:40:36 +01:00
|
|
|
# unconditionally built by the default Make target
|
2020-07-29 21:19:36 +00:00
|
|
|
# TODO re-enable ncli_query if/when it works again
|
2019-12-04 15:40:36 +01:00
|
|
|
TOOLS := \
|
|
|
|
beacon_node \
|
2020-06-11 19:41:43 +03:00
|
|
|
block_sim \
|
|
|
|
deposit_contract \
|
2019-12-15 18:46:20 +01:00
|
|
|
inspector \
|
2020-03-11 02:39:58 +02:00
|
|
|
logtrace \
|
2020-06-11 19:41:43 +03:00
|
|
|
nbench \
|
|
|
|
nbench_spec_scenarios \
|
2020-07-29 21:19:36 +00:00
|
|
|
ncli \
|
2020-06-11 19:41:43 +03:00
|
|
|
ncli_db \
|
2020-04-28 10:08:32 +02:00
|
|
|
process_dashboard \
|
2020-05-04 07:38:14 +02:00
|
|
|
stack_sizes \
|
2020-05-01 17:51:24 +02:00
|
|
|
state_sim \
|
2020-06-23 18:49:41 +02:00
|
|
|
validator_client
|
2020-06-24 00:41:38 +02:00
|
|
|
|
|
|
|
# bench_bls_sig_agggregation TODO reenable after bls v0.10.1 changes
|
2020-06-11 19:41:43 +03:00
|
|
|
|
2019-12-04 15:40:36 +01:00
|
|
|
TOOLS_DIRS := \
|
|
|
|
beacon_chain \
|
|
|
|
benchmarks \
|
|
|
|
ncli \
|
2020-05-15 00:54:10 +02:00
|
|
|
nbench \
|
2019-12-04 15:40:36 +01:00
|
|
|
research \
|
2020-06-10 17:21:32 +02:00
|
|
|
tools
|
2019-04-13 00:15:38 +02:00
|
|
|
TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS))
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2019-12-04 15:40:36 +01:00
|
|
|
.PHONY: \
|
|
|
|
all \
|
|
|
|
deps \
|
|
|
|
update \
|
|
|
|
test \
|
|
|
|
$(TOOLS) \
|
2020-06-16 22:45:52 +03:00
|
|
|
clean_eth2_network_simulation_all \
|
2019-12-04 15:40:36 +01:00
|
|
|
eth2_network_simulation \
|
|
|
|
clean-testnet0 \
|
|
|
|
testnet0 \
|
|
|
|
clean-testnet1 \
|
|
|
|
testnet1 \
|
2020-02-13 13:19:12 +01:00
|
|
|
clean \
|
2020-05-02 16:30:34 +02:00
|
|
|
libbacktrace \
|
|
|
|
book \
|
|
|
|
publish-book
|
2019-08-21 14:45:24 +02:00
|
|
|
|
2019-12-03 19:52:54 +01:00
|
|
|
ifeq ($(NIM_PARAMS),)
|
2020-04-19 01:25:21 +02:00
|
|
|
# "variables.mk" was not included, so we update the submodules.
|
|
|
|
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
|
|
|
|
.DEFAULT:
|
|
|
|
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
|
2020-04-19 13:36:11 +02:00
|
|
|
$(GIT_SUBMODULE_UPDATE) && \
|
2020-04-19 01:25:21 +02:00
|
|
|
echo
|
|
|
|
# Now that the included *.mk files appeared, and are newer than this file, Make will restart itself:
|
|
|
|
# https://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles
|
|
|
|
#
|
|
|
|
# After restarting, it will execute its original goal, so we don't have to start a child Make here
|
|
|
|
# with "$(MAKE) $(MAKECMDGOALS)". Isn't hidden control flow great?
|
|
|
|
|
|
|
|
else # "variables.mk" was included. Business as usual until the end of this file.
|
|
|
|
|
|
|
|
# default target, because it's the first one that doesn't start with '.'
|
|
|
|
all: | $(TOOLS) libnfuzz.so libnfuzz.a
|
2019-08-21 14:45:24 +02:00
|
|
|
|
|
|
|
# must be included after the default target
|
|
|
|
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
|
|
|
|
|
2020-06-14 04:25:19 +02:00
|
|
|
ifeq ($(OS), Windows_NT)
|
|
|
|
ifeq ($(ARCH), x86)
|
|
|
|
# 32-bit Windows is not supported by libbacktrace/libunwind
|
|
|
|
USE_LIBBACKTRACE := 0
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-07-28 23:37:12 +03:00
|
|
|
DEPOSITS_DELAY := 0
|
2020-07-10 01:41:51 +03:00
|
|
|
|
2020-03-31 14:53:41 +02:00
|
|
|
# "--define:release" implies "--stacktrace:off" and it cannot be added to config.nims
|
2020-02-20 17:41:10 +01:00
|
|
|
ifeq ($(USE_LIBBACKTRACE), 0)
|
2020-08-27 13:29:23 +02:00
|
|
|
NIM_PARAMS := $(NIM_PARAMS) -d:debug -d:disable_libbacktrace
|
2020-02-20 17:41:10 +01:00
|
|
|
else
|
2020-08-27 13:29:23 +02:00
|
|
|
NIM_PARAMS := $(NIM_PARAMS) -d:release
|
2020-02-20 17:41:10 +01:00
|
|
|
endif
|
2020-02-13 13:19:12 +01:00
|
|
|
|
2020-06-22 16:30:14 +02:00
|
|
|
deps: | deps-common nat-libs beacon_chain.nims
|
2020-02-20 17:41:10 +01:00
|
|
|
ifneq ($(USE_LIBBACKTRACE), 0)
|
|
|
|
deps: | libbacktrace
|
|
|
|
endif
|
2019-08-21 14:45:24 +02:00
|
|
|
|
2020-08-28 14:50:50 +02:00
|
|
|
clean-cross:
|
|
|
|
+ [[ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc ]] && $(MAKE) -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc clean $(HANDLE_OUTPUT) || true
|
|
|
|
+ [[ -e vendor/nim-nat-traversal/vendor/libnatpmp ]] && $(MAKE) -C vendor/nim-nat-traversal/vendor/libnatpmp clean $(HANDLE_OUTPUT) || true
|
|
|
|
|
2019-08-21 14:45:24 +02:00
|
|
|
#- deletes and recreates "beacon_chain.nims" which on Windows is a copy instead of a proper symlink
|
|
|
|
update: | update-common
|
2019-12-04 15:40:36 +01:00
|
|
|
rm -f beacon_chain.nims && \
|
2020-04-16 00:20:27 +02:00
|
|
|
$(MAKE) beacon_chain.nims $(HANDLE_OUTPUT)
|
2019-08-21 14:45:24 +02:00
|
|
|
|
|
|
|
# symlink
|
|
|
|
beacon_chain.nims:
|
|
|
|
ln -s beacon_chain.nimble $@
|
|
|
|
|
2020-02-13 13:19:12 +01:00
|
|
|
# nim-libbacktrace
|
|
|
|
libbacktrace:
|
2020-04-19 01:25:21 +02:00
|
|
|
+ $(MAKE) -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
2020-02-13 13:19:12 +01:00
|
|
|
|
2019-04-11 16:01:28 +02:00
|
|
|
# Windows 10 with WSL enabled, but no distro installed, fails if "../../nimble.sh" is executed directly
|
|
|
|
# in a Makefile recipe but works when prefixing it with `bash`. No idea how the PATH is overridden.
|
2019-11-22 14:21:16 +01:00
|
|
|
DISABLE_TEST_FIXTURES_SCRIPT := 0
|
2019-09-05 10:50:38 +02:00
|
|
|
test: | build deps
|
2019-11-22 14:21:16 +01:00
|
|
|
ifeq ($(DISABLE_TEST_FIXTURES_SCRIPT), 0)
|
2019-11-01 09:44:16 +01:00
|
|
|
V=$(V) scripts/setup_official_tests.sh
|
2019-08-14 23:53:48 +02:00
|
|
|
endif
|
2019-08-21 14:45:24 +02:00
|
|
|
$(ENV_SCRIPT) nim test $(NIM_PARAMS) beacon_chain.nims && rm -f 0000-*.json
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2019-09-05 10:50:38 +02:00
|
|
|
$(TOOLS): | build deps
|
2019-03-28 16:18:59 +01:00
|
|
|
for D in $(TOOLS_DIRS); do [ -e "$${D}/$@.nim" ] && TOOL_DIR="$${D}" && break; done && \
|
2019-03-29 18:21:14 +01:00
|
|
|
echo -e $(BUILD_MSG) "build/$@" && \
|
2020-02-14 13:35:23 +01:00
|
|
|
$(ENV_SCRIPT) nim c -o:build/$@ $(NIM_PARAMS) "$${TOOL_DIR}/$@.nim"
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2020-06-16 22:45:52 +03:00
|
|
|
clean_eth2_network_simulation_data:
|
2020-06-19 20:42:28 +03:00
|
|
|
rm -rf tests/simulation/data
|
2020-06-16 22:45:52 +03:00
|
|
|
|
|
|
|
clean_eth2_network_simulation_all:
|
2019-04-17 17:54:28 +02:00
|
|
|
rm -rf tests/simulation/{data,validators}
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2020-07-10 01:41:51 +03:00
|
|
|
GOERLI_TESTNETS_PARAMS := \
|
|
|
|
--web3-url=$(GOERLI_WEB3_URL) \
|
|
|
|
--tcp-port=$$(( $(BASE_PORT) + $(NODE_ID) )) \
|
|
|
|
--udp-port=$$(( $(BASE_PORT) + $(NODE_ID) )) \
|
|
|
|
--metrics \
|
|
|
|
--metrics-port=$$(( $(BASE_METRICS_PORT) + $(NODE_ID) )) \
|
|
|
|
--rpc \
|
|
|
|
--rpc-port=$$(( $(BASE_RPC_PORT) +$(NODE_ID) ))
|
|
|
|
|
2020-07-23 17:58:54 +02:00
|
|
|
eth2_network_simulation: | build deps clean_eth2_network_simulation_all
|
2020-06-16 21:38:51 +03:00
|
|
|
+ GIT_ROOT="$$PWD" NIMFLAGS="$(NIMFLAGS)" LOG_LEVEL="$(LOG_LEVEL)" tests/simulation/start-in-tmux.sh
|
2020-07-23 17:58:54 +02:00
|
|
|
killall prometheus &>/dev/null
|
2019-03-28 16:18:59 +01:00
|
|
|
|
2019-03-28 23:19:12 +01:00
|
|
|
clean-testnet0:
|
2020-06-11 18:42:58 +02:00
|
|
|
rm -rf build/data/testnet0*
|
2019-03-28 23:19:12 +01:00
|
|
|
|
|
|
|
clean-testnet1:
|
2020-06-11 18:42:58 +02:00
|
|
|
rm -rf build/data/testnet1*
|
2019-03-28 23:19:12 +01:00
|
|
|
|
2020-07-11 03:02:57 +02:00
|
|
|
testnet0 testnet1: | beacon_node
|
2020-07-10 17:31:24 +03:00
|
|
|
build/beacon_node \
|
|
|
|
--network=$@ \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
|
|
|
--data-dir=build/data/$@_$(NODE_ID) \
|
|
|
|
$(GOERLI_TESTNETS_PARAMS) $(NODE_PARAMS)
|
2020-05-28 06:28:10 +02:00
|
|
|
|
2020-07-28 18:14:13 +03:00
|
|
|
medalla: | beacon_node
|
2020-08-06 15:21:07 +03:00
|
|
|
mkdir -p build/data/shared_medalla_$(NODE_ID)
|
|
|
|
|
2020-08-05 15:51:55 +03:00
|
|
|
scripts/make_prometheus_config.sh \
|
|
|
|
--nodes 1 \
|
|
|
|
--base-metrics-port $$(($(BASE_METRICS_PORT) + $(NODE_ID))) \
|
|
|
|
--config-file "build/data/shared_medalla_$(NODE_ID)/prometheus.yml"
|
|
|
|
|
2020-08-22 00:05:37 +03:00
|
|
|
$(CPU_LIMIT_CMD) build/beacon_node \
|
2020-07-28 18:14:13 +03:00
|
|
|
--network=medalla \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
|
|
|
--log-file=build/data/shared_medalla_$(NODE_ID)/nbc_bn_$$(date +"%Y%m%d%H%M%S").log \
|
|
|
|
--data-dir=build/data/shared_medalla_$(NODE_ID) \
|
|
|
|
$(GOERLI_TESTNETS_PARAMS) $(NODE_PARAMS)
|
2020-04-27 22:03:03 +03:00
|
|
|
|
2020-07-28 18:14:13 +03:00
|
|
|
medalla-vc: | beacon_node validator_client
|
|
|
|
# if launching a VC as well - send the BN looking nowhere for validators/secrets
|
2020-08-06 15:23:01 +03:00
|
|
|
mkdir -p build/data/shared_medalla_$(NODE_ID)/empty_dummy_folder
|
2020-08-05 15:51:55 +03:00
|
|
|
|
|
|
|
scripts/make_prometheus_config.sh \
|
|
|
|
--nodes 1 \
|
|
|
|
--base-metrics-port $$(($(BASE_METRICS_PORT) + $(NODE_ID))) \
|
|
|
|
--config-file "build/data/shared_medalla_$(NODE_ID)/prometheus.yml"
|
|
|
|
|
2020-08-22 00:05:37 +03:00
|
|
|
$(CPU_LIMIT_CMD) build/beacon_node \
|
2020-07-28 18:14:13 +03:00
|
|
|
--network=medalla \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
2020-07-28 20:13:53 +03:00
|
|
|
--log-file=build/data/shared_medalla_$(NODE_ID)/nbc_bn_$$(date +"%Y%m%d%H%M%S").log \
|
2020-07-28 18:14:13 +03:00
|
|
|
--data-dir=build/data/shared_medalla_$(NODE_ID) \
|
|
|
|
--validators-dir=build/data/shared_medalla_$(NODE_ID)/empty_dummy_folder \
|
|
|
|
--secrets-dir=build/data/shared_medalla_$(NODE_ID)/empty_dummy_folder \
|
|
|
|
$(GOERLI_TESTNETS_PARAMS) $(NODE_PARAMS) &
|
2020-08-05 15:51:55 +03:00
|
|
|
|
2020-07-28 18:14:13 +03:00
|
|
|
sleep 4
|
2020-08-05 15:51:55 +03:00
|
|
|
|
2020-07-28 18:14:13 +03:00
|
|
|
build/validator_client \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
2020-07-28 20:13:53 +03:00
|
|
|
--log-file=build/data/shared_medalla_$(NODE_ID)/nbc_vc_$$(date +"%Y%m%d%H%M%S").log \
|
2020-07-28 18:14:13 +03:00
|
|
|
--data-dir=build/data/shared_medalla_$(NODE_ID) \
|
|
|
|
--rpc-port=$$(( $(BASE_RPC_PORT) +$(NODE_ID) ))
|
|
|
|
|
2020-08-27 14:32:13 +02:00
|
|
|
ifneq ($(LOG_LEVEL), TRACE)
|
|
|
|
medalla-dev:
|
|
|
|
+ $(MAKE) LOG_LEVEL=TRACE $@
|
|
|
|
else
|
2020-07-28 18:14:13 +03:00
|
|
|
medalla-dev: | beacon_node
|
2020-08-10 21:49:45 +03:00
|
|
|
mkdir -p build/data/shared_medalla_$(NODE_ID)
|
|
|
|
|
|
|
|
scripts/make_prometheus_config.sh \
|
|
|
|
--nodes 1 \
|
|
|
|
--base-metrics-port $$(($(BASE_METRICS_PORT) + $(NODE_ID))) \
|
|
|
|
--config-file "build/data/shared_medalla_$(NODE_ID)/prometheus.yml"
|
|
|
|
|
2020-08-22 00:05:37 +03:00
|
|
|
$(CPU_LIMIT_CMD) build/beacon_node \
|
2020-07-28 18:14:13 +03:00
|
|
|
--network=medalla \
|
|
|
|
--log-level="DEBUG; TRACE:discv5,networking; REQUIRED:none; DISABLED:none" \
|
|
|
|
--data-dir=build/data/shared_medalla_$(NODE_ID) \
|
2020-08-04 10:13:22 +02:00
|
|
|
$(GOERLI_TESTNETS_PARAMS) --dump $(NODE_PARAMS)
|
2020-08-27 14:32:13 +02:00
|
|
|
endif
|
2020-07-28 18:14:13 +03:00
|
|
|
|
|
|
|
medalla-deposit-data: | beacon_node deposit_contract
|
2020-07-10 18:18:14 +03:00
|
|
|
build/beacon_node deposits create \
|
2020-07-28 18:14:13 +03:00
|
|
|
--network=medalla \
|
|
|
|
--new-wallet-file=build/data/shared_medalla_$(NODE_ID)/wallet.json \
|
2020-08-01 21:32:41 +03:00
|
|
|
--out-validators-dir=build/data/shared_medalla_$(NODE_ID)/validators \
|
2020-07-28 18:14:13 +03:00
|
|
|
--out-secrets-dir=build/data/shared_medalla_$(NODE_ID)/secrets \
|
|
|
|
--out-deposits-file=medalla-deposits_data-$$(date +"%Y%m%d%H%M%S").json \
|
2020-07-17 23:59:50 +03:00
|
|
|
--count=$(VALIDATORS)
|
|
|
|
|
2020-07-28 23:37:12 +03:00
|
|
|
medalla-deposit: | beacon_node deposit_contract
|
|
|
|
build/beacon_node deposits create \
|
|
|
|
--network=medalla \
|
|
|
|
--out-deposits-file=nbc-medalla-deposits.json \
|
|
|
|
--new-wallet-file=build/data/shared_medalla_$(NODE_ID)/wallet.json \
|
2020-08-01 21:32:41 +03:00
|
|
|
--out-validators-dir=build/data/shared_medalla_$(NODE_ID)/validators \
|
2020-07-28 23:37:12 +03:00
|
|
|
--out-secrets-dir=build/data/shared_medalla_$(NODE_ID)/secrets \
|
|
|
|
--count=$(VALIDATORS)
|
|
|
|
|
|
|
|
build/deposit_contract sendDeposits \
|
|
|
|
--web3-url=$(GOERLI_WEB3_URL) \
|
|
|
|
--deposit-contract=$$(cat vendor/eth2-testnets/shared/medalla/deposit_contract.txt) \
|
|
|
|
--deposits-file=nbc-medalla-deposits.json \
|
|
|
|
--min-delay=$(DEPOSITS_DELAY) \
|
|
|
|
--ask-for-key
|
|
|
|
|
2020-07-28 18:14:13 +03:00
|
|
|
clean-medalla:
|
2020-08-21 21:50:46 +03:00
|
|
|
rm -rf build/data/shared_medalla*/db
|
|
|
|
rm -rf build/data/shared_medalla*/dump
|
|
|
|
rm -rf build/data/shared_medalla*/*.log
|
2020-07-10 01:41:51 +03:00
|
|
|
|
2020-07-11 03:02:57 +02:00
|
|
|
altona: | beacon_node
|
2020-08-22 00:05:37 +03:00
|
|
|
$(CPU_LIMIT_CMD) build/beacon_node \
|
2020-07-10 01:41:51 +03:00
|
|
|
--network=altona \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
2020-07-21 13:29:22 +03:00
|
|
|
--log-file=build/data/shared_altona_$(NODE_ID)/nbc_bn_$$(date +"%Y%m%d%H%M%S").log \
|
2020-07-10 16:23:11 +03:00
|
|
|
--data-dir=build/data/shared_altona_$(NODE_ID) \
|
2020-07-10 01:41:51 +03:00
|
|
|
$(GOERLI_TESTNETS_PARAMS) $(NODE_PARAMS)
|
|
|
|
|
2020-07-15 16:15:25 +03:00
|
|
|
altona-vc: | beacon_node validator_client
|
|
|
|
# if launching a VC as well - send the BN looking nowhere for validators/secrets
|
2020-08-06 15:27:03 +03:00
|
|
|
mkdir -p build/data/shared_altona_$(NODE_ID)/empty_dummy_folder
|
2020-08-22 00:05:37 +03:00
|
|
|
$(CPU_LIMIT_CMD) build/beacon_node \
|
2020-07-15 16:15:25 +03:00
|
|
|
--network=altona \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
2020-07-28 20:13:53 +03:00
|
|
|
--log-file=build/data/shared_altona_$(NODE_ID)/nbc_bn_$$(date +"%Y%m%d%H%M%S").log \
|
2020-07-15 16:15:25 +03:00
|
|
|
--data-dir=build/data/shared_altona_$(NODE_ID) \
|
|
|
|
--validators-dir=build/data/shared_altona_$(NODE_ID)/empty_dummy_folder \
|
|
|
|
--secrets-dir=build/data/shared_altona_$(NODE_ID)/empty_dummy_folder \
|
|
|
|
$(GOERLI_TESTNETS_PARAMS) $(NODE_PARAMS) &
|
|
|
|
sleep 4
|
|
|
|
build/validator_client \
|
|
|
|
--log-level="$(LOG_LEVEL)" \
|
2020-07-28 20:13:53 +03:00
|
|
|
--log-file=build/data/shared_altona_$(NODE_ID)/nbc_vc_$$(date +"%Y%m%d%H%M%S").log \
|
2020-07-15 16:15:25 +03:00
|
|
|
--data-dir=build/data/shared_altona_$(NODE_ID) \
|
|
|
|
--rpc-port=$$(( $(BASE_RPC_PORT) +$(NODE_ID) ))
|
|
|
|
|
2020-07-11 03:02:57 +02:00
|
|
|
altona-dev: | beacon_node
|
2020-08-22 00:05:37 +03:00
|
|
|
$(CPU_LIMIT_CMD) build/beacon_node \
|
2020-07-10 01:41:51 +03:00
|
|
|
--network=altona \
|
|
|
|
--log-level="DEBUG; TRACE:discv5,networking; REQUIRED:none; DISABLED:none" \
|
2020-07-10 16:23:11 +03:00
|
|
|
--data-dir=build/data/shared_altona_$(NODE_ID) \
|
2020-08-04 10:13:22 +02:00
|
|
|
$(GOERLI_TESTNETS_PARAMS) --dump $(NODE_PARAMS)
|
2020-05-28 06:28:10 +02:00
|
|
|
|
2020-07-28 18:14:13 +03:00
|
|
|
altona-deposit: | beacon_node deposit_contract
|
|
|
|
build/beacon_node deposits create \
|
2020-07-28 23:37:12 +03:00
|
|
|
--network=altona \
|
2020-07-28 18:14:13 +03:00
|
|
|
--out-deposits-file=nbc-altona-deposits.json \
|
2020-08-04 04:12:51 -04:00
|
|
|
--new-wallet-file=build/data/shared_altona_$(NODE_ID)/wallet.json \
|
2020-07-28 23:37:12 +03:00
|
|
|
--out-deposits-dir=build/data/shared_altona_$(NODE_ID)/validators \
|
|
|
|
--out-secrets-dir=build/data/shared_altona_$(NODE_ID)/secrets \
|
2020-07-28 18:14:13 +03:00
|
|
|
--count=$(VALIDATORS)
|
|
|
|
|
|
|
|
build/deposit_contract sendDeposits \
|
|
|
|
--web3-url=$(GOERLI_WEB3_URL) \
|
|
|
|
--deposit-contract=$$(cat vendor/eth2-testnets/shared/altona/deposit_contract.txt) \
|
|
|
|
--deposits-file=nbc-altona-deposits.json \
|
2020-07-28 23:37:12 +03:00
|
|
|
--min-delay=$(DEPOSITS_DELAY) \
|
|
|
|
--ask-for-key
|
2020-07-28 18:14:13 +03:00
|
|
|
|
|
|
|
clean-altona:
|
|
|
|
rm -rf build/data/shared_altona*
|
|
|
|
|
2020-06-11 19:41:43 +03:00
|
|
|
ctail: | build deps
|
|
|
|
mkdir -p vendor/.nimble/bin/
|
|
|
|
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ctail c vendor/nim-chronicles-tail/ctail.nim
|
|
|
|
|
|
|
|
ntu: | build deps
|
|
|
|
mkdir -p vendor/.nimble/bin/
|
|
|
|
$(ENV_SCRIPT) nim -d:danger -o:vendor/.nimble/bin/ntu c vendor/nim-testutils/ntu.nim
|
|
|
|
|
2019-08-21 14:45:24 +02:00
|
|
|
clean: | clean-common
|
2020-06-11 18:42:58 +02:00
|
|
|
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_*,block_sim,state_sim,transition*}
|
2020-02-20 17:41:10 +01:00
|
|
|
ifneq ($(USE_LIBBACKTRACE), 0)
|
2020-02-13 13:19:12 +01:00
|
|
|
+ $(MAKE) -C vendor/nim-libbacktrace clean $(HANDLE_OUTPUT)
|
2020-02-20 17:41:10 +01:00
|
|
|
endif
|
2019-11-27 21:43:02 +01:00
|
|
|
|
2020-03-05 18:56:07 +01:00
|
|
|
libnfuzz.so: | build deps
|
2019-11-27 21:43:02 +01:00
|
|
|
echo -e $(BUILD_MSG) "build/$@" && \
|
2020-02-14 13:35:23 +01:00
|
|
|
$(ENV_SCRIPT) nim c -d:release --app:lib --noMain --nimcache:nimcache/libnfuzz -o:build/$@.0 $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
|
2019-11-27 21:43:02 +01:00
|
|
|
rm -f build/$@ && \
|
|
|
|
ln -s $@.0 build/$@
|
|
|
|
|
2020-03-05 18:56:07 +01:00
|
|
|
libnfuzz.a: | build deps
|
2019-11-27 21:43:02 +01:00
|
|
|
echo -e $(BUILD_MSG) "build/$@" && \
|
|
|
|
rm -f build/$@ && \
|
2020-02-14 13:35:23 +01:00
|
|
|
$(ENV_SCRIPT) nim c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
|
2019-11-27 21:43:02 +01:00
|
|
|
[[ -e "$@" ]] && mv "$@" build/ # workaround for https://github.com/nim-lang/Nim/issues/12745
|
2020-04-19 01:25:21 +02:00
|
|
|
|
2020-05-02 16:30:34 +02:00
|
|
|
book:
|
2020-07-01 10:37:04 +02:00
|
|
|
cd docs/the_nimbus_book && \
|
2020-05-02 16:30:34 +02:00
|
|
|
mdbook build
|
|
|
|
|
2020-07-07 10:44:21 +02:00
|
|
|
auditors-book:
|
|
|
|
cd docs/the_auditors_handbook && \
|
|
|
|
mdbook build
|
|
|
|
|
2020-07-13 12:46:42 +02:00
|
|
|
publish-book: | book auditors-book
|
|
|
|
git branch -D gh-pages && \
|
|
|
|
git branch --track gh-pages origin/gh-pages && \
|
2020-07-07 10:44:21 +02:00
|
|
|
git worktree add tmp-book gh-pages && \
|
2020-07-13 12:46:42 +02:00
|
|
|
rm -rf tmp-book/* && \
|
2020-07-07 10:44:21 +02:00
|
|
|
mkdir -p tmp-book/auditors-book && \
|
2020-07-13 12:46:42 +02:00
|
|
|
cp -a docs/the_nimbus_book/book/* tmp-book/ && \
|
2020-07-07 10:44:21 +02:00
|
|
|
cp -a docs/the_auditors_handbook/book/* tmp-book/auditors-book/ && \
|
|
|
|
cd tmp-book && \
|
|
|
|
git add . && { \
|
2020-07-13 12:46:42 +02:00
|
|
|
git commit -m "make publish-book" && \
|
2020-07-07 10:44:21 +02:00
|
|
|
git push origin gh-pages || true; } && \
|
|
|
|
cd .. && \
|
|
|
|
git worktree remove -f tmp-book && \
|
|
|
|
rm -rf tmp-book
|
|
|
|
|
2020-04-19 01:25:21 +02:00
|
|
|
endif # "variables.mk" was not included
|