mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 06:53:12 +00:00
chore: initial commit of deprecte vendor
This commit is contained in:
parent
dafdee9f5f
commit
0c91004615
180
.gitmodules
vendored
180
.gitmodules
vendored
@ -1,184 +1,12 @@
|
|||||||
[submodule "vendor/nim-eth"]
|
# Only zerokit, waku-rlnv2-contract, and nim-ffi are kept as vendor submodules.
|
||||||
path = vendor/nim-eth
|
# nim-ffi is kept because it has an invalid .nimble file that breaks nimble dependency resolution.
|
||||||
url = https://github.com/status-im/nim-eth.git
|
# All other dependencies are managed via Nimble.
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-secp256k1"]
|
|
||||||
path = vendor/nim-secp256k1
|
|
||||||
url = https://github.com/status-im/nim-secp256k1.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-libp2p"]
|
|
||||||
path = vendor/nim-libp2p
|
|
||||||
url = https://github.com/vacp2p/nim-libp2p.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-stew"]
|
|
||||||
path = vendor/nim-stew
|
|
||||||
url = https://github.com/status-im/nim-stew.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nimbus-build-system"]
|
|
||||||
path = vendor/nimbus-build-system
|
|
||||||
url = https://github.com/status-im/nimbus-build-system.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-nat-traversal"]
|
|
||||||
path = vendor/nim-nat-traversal
|
|
||||||
url = https://github.com/status-im/nim-nat-traversal.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-libbacktrace"]
|
|
||||||
path = vendor/nim-libbacktrace
|
|
||||||
url = https://github.com/status-im/nim-libbacktrace.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-confutils"]
|
|
||||||
path = vendor/nim-confutils
|
|
||||||
url = https://github.com/status-im/nim-confutils.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-chronicles"]
|
|
||||||
path = vendor/nim-chronicles
|
|
||||||
url = https://github.com/status-im/nim-chronicles.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-faststreams"]
|
|
||||||
path = vendor/nim-faststreams
|
|
||||||
url = https://github.com/status-im/nim-faststreams.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-chronos"]
|
|
||||||
path = vendor/nim-chronos
|
|
||||||
url = https://github.com/status-im/nim-chronos.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-json-serialization"]
|
|
||||||
path = vendor/nim-json-serialization
|
|
||||||
url = https://github.com/status-im/nim-json-serialization.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-serialization"]
|
|
||||||
path = vendor/nim-serialization
|
|
||||||
url = https://github.com/status-im/nim-serialization.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nimcrypto"]
|
|
||||||
path = vendor/nimcrypto
|
|
||||||
url = https://github.com/cheatfate/nimcrypto.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-metrics"]
|
|
||||||
path = vendor/nim-metrics
|
|
||||||
url = https://github.com/status-im/nim-metrics.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-stint"]
|
|
||||||
path = vendor/nim-stint
|
|
||||||
url = https://github.com/status-im/nim-stint.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-json-rpc"]
|
|
||||||
path = vendor/nim-json-rpc
|
|
||||||
url = https://github.com/status-im/nim-json-rpc.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-http-utils"]
|
|
||||||
path = vendor/nim-http-utils
|
|
||||||
url = https://github.com/status-im/nim-http-utils.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-bearssl"]
|
|
||||||
path = vendor/nim-bearssl
|
|
||||||
url = https://github.com/status-im/nim-bearssl.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-sqlite3-abi"]
|
|
||||||
path = vendor/nim-sqlite3-abi
|
|
||||||
url = https://github.com/arnetheduck/nim-sqlite3-abi.git
|
|
||||||
ignore = dirty
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-web3"]
|
|
||||||
path = vendor/nim-web3
|
|
||||||
url = https://github.com/status-im/nim-web3.git
|
|
||||||
[submodule "vendor/nim-testutils"]
|
|
||||||
path = vendor/nim-testutils
|
|
||||||
url = https://github.com/status-im/nim-testutils.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-unittest2"]
|
|
||||||
path = vendor/nim-unittest2
|
|
||||||
url = https://github.com/status-im/nim-unittest2.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-websock"]
|
|
||||||
path = vendor/nim-websock
|
|
||||||
url = https://github.com/status-im/nim-websock.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = main
|
|
||||||
[submodule "vendor/nim-zlib"]
|
|
||||||
path = vendor/nim-zlib
|
|
||||||
url = https://github.com/status-im/nim-zlib.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-dnsdisc"]
|
|
||||||
path = vendor/nim-dnsdisc
|
|
||||||
url = https://github.com/status-im/nim-dnsdisc.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = main
|
|
||||||
[submodule "vendor/dnsclient.nim"]
|
|
||||||
path = vendor/dnsclient.nim
|
|
||||||
url = https://github.com/ba0f3/dnsclient.nim.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-toml-serialization"]
|
|
||||||
path = vendor/nim-toml-serialization
|
|
||||||
url = https://github.com/status-im/nim-toml-serialization.git
|
|
||||||
[submodule "vendor/nim-presto"]
|
|
||||||
path = vendor/nim-presto
|
|
||||||
url = https://github.com/status-im/nim-presto.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/zerokit"]
|
[submodule "vendor/zerokit"]
|
||||||
path = vendor/zerokit
|
path = vendor/zerokit
|
||||||
url = https://github.com/vacp2p/zerokit.git
|
url = https://github.com/vacp2p/zerokit.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
branch = v0.5.1
|
branch = v0.5.1
|
||||||
[submodule "vendor/nim-regex"]
|
|
||||||
path = vendor/nim-regex
|
|
||||||
url = https://github.com/nitely/nim-regex.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-unicodedb"]
|
|
||||||
path = vendor/nim-unicodedb
|
|
||||||
url = https://github.com/nitely/nim-unicodedb.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-taskpools"]
|
|
||||||
path = vendor/nim-taskpools
|
|
||||||
url = https://github.com/status-im/nim-taskpools.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = stable
|
|
||||||
[submodule "vendor/nim-results"]
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
path = vendor/nim-results
|
|
||||||
url = https://github.com/arnetheduck/nim-results.git
|
|
||||||
[submodule "vendor/db_connector"]
|
|
||||||
path = vendor/db_connector
|
|
||||||
url = https://github.com/nim-lang/db_connector.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = devel
|
|
||||||
[submodule "vendor/nph"]
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
path = vendor/nph
|
|
||||||
url = https://github.com/arnetheduck/nph.git
|
|
||||||
[submodule "vendor/nim-minilru"]
|
|
||||||
path = vendor/nim-minilru
|
|
||||||
url = https://github.com/status-im/nim-minilru.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/waku-rlnv2-contract"]
|
[submodule "vendor/waku-rlnv2-contract"]
|
||||||
path = vendor/waku-rlnv2-contract
|
path = vendor/waku-rlnv2-contract
|
||||||
url = https://github.com/logos-messaging/waku-rlnv2-contract.git
|
url = https://github.com/logos-messaging/waku-rlnv2-contract.git
|
||||||
|
|||||||
154
Makefile
154
Makefile
@ -4,42 +4,55 @@
|
|||||||
# - MIT license
|
# - MIT license
|
||||||
# at your option. This file may not be copied, modified, or distributed except
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
# according to those terms.
|
# according to those terms.
|
||||||
export BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
|
||||||
export EXCLUDED_NIM_PACKAGES := vendor/nim-dnsdisc/vendor
|
# Nimble-only build system (no vendor dependencies except zerokit)
|
||||||
|
SHELL := bash
|
||||||
LINK_PCRE := 0
|
LINK_PCRE := 0
|
||||||
FORMAT_MSG := "\\x1B[95mFormatting:\\x1B[39m"
|
FORMAT_MSG := "\\x1B[95mFormatting:\\x1B[39m"
|
||||||
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
BUILD_MSG := "\\x1B[92mBuilding:\\x1B[39m"
|
||||||
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
|
||||||
|
|
||||||
|
# Compiler settings
|
||||||
|
CC ?= gcc
|
||||||
|
NIMC ?= nim
|
||||||
|
NIM_PARAMS := $(NIMFLAGS)
|
||||||
|
|
||||||
ifeq ($(NIM_PARAMS),)
|
# Verbosity
|
||||||
# "variables.mk" was not included, so we update the submodules.
|
V := 0
|
||||||
GIT_SUBMODULE_UPDATE := git submodule update --init --recursive
|
NIM_PARAMS := $(NIM_PARAMS) --verbosity:$(V)
|
||||||
.DEFAULT:
|
HANDLE_OUTPUT :=
|
||||||
+@ echo -e "Git submodules not found. Running '$(GIT_SUBMODULE_UPDATE)'.\n"; \
|
ifeq ($(V), 0)
|
||||||
$(GIT_SUBMODULE_UPDATE); \
|
NIM_PARAMS := $(NIM_PARAMS) --hints:off
|
||||||
echo
|
HANDLE_OUTPUT := >/dev/null
|
||||||
# Now that the included *.mk files appeared, and are newer than this file, Make will restart itself:
|
endif
|
||||||
# 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.
|
# Chronicles log level
|
||||||
|
ifdef LOG_LEVEL
|
||||||
|
NIM_PARAMS := $(NIM_PARAMS) -d:chronicles_log_level="$(LOG_LEVEL)"
|
||||||
|
endif
|
||||||
|
|
||||||
# Determine the OS
|
# OS detection
|
||||||
detected_OS := $(shell uname -s)
|
detected_OS := $(shell uname -s)
|
||||||
ifneq (,$(findstring MINGW,$(detected_OS)))
|
ifneq (,$(findstring MINGW,$(detected_OS)))
|
||||||
detected_OS := Windows
|
detected_OS := Windows
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OS), Windows_NT)
|
||||||
|
EXE_SUFFIX := .exe
|
||||||
|
else
|
||||||
|
EXE_SUFFIX :=
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(detected_OS),Windows)
|
ifeq ($(detected_OS),Windows)
|
||||||
# Update MINGW_PATH to standard MinGW location
|
# Update MINGW_PATH to standard MinGW location
|
||||||
MINGW_PATH = /mingw64
|
MINGW_PATH = /mingw64
|
||||||
NIM_PARAMS += --passC:"-I$(MINGW_PATH)/include"
|
NIM_PARAMS += --passC:"-I$(MINGW_PATH)/include"
|
||||||
NIM_PARAMS += --passL:"-L$(MINGW_PATH)/lib"
|
NIM_PARAMS += --passL:"-L$(MINGW_PATH)/lib"
|
||||||
NIM_PARAMS += --passL:"-Lvendor/nim-nat-traversal/vendor/miniupnp/miniupnpc"
|
# NAT libs paths resolved via nimble packages
|
||||||
NIM_PARAMS += --passL:"-Lvendor/nim-nat-traversal/vendor/libnatpmp-upstream"
|
NAT_TRAVERSAL_PKG := $(shell nimble path nat_traversal 2>/dev/null)
|
||||||
|
ifneq ($(NAT_TRAVERSAL_PKG),)
|
||||||
|
NIM_PARAMS += --passL:"-L$(NAT_TRAVERSAL_PKG)/vendor/miniupnp/miniupnpc"
|
||||||
|
NIM_PARAMS += --passL:"-L$(NAT_TRAVERSAL_PKG)/vendor/libnatpmp-upstream"
|
||||||
|
endif
|
||||||
|
|
||||||
LIBS = -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp -lpq
|
LIBS = -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp -lpq
|
||||||
NIM_PARAMS += $(foreach lib,$(LIBS),--passL:"$(lib)")
|
NIM_PARAMS += $(foreach lib,$(LIBS),--passL:"$(lib)")
|
||||||
@ -75,7 +88,8 @@ endif
|
|||||||
waku.nims:
|
waku.nims:
|
||||||
ln -s waku.nimble $@
|
ln -s waku.nimble $@
|
||||||
|
|
||||||
update: | update-common
|
update:
|
||||||
|
nimble install -y
|
||||||
rm -rf waku.nims && \
|
rm -rf waku.nims && \
|
||||||
$(MAKE) waku.nims $(HANDLE_OUTPUT)
|
$(MAKE) waku.nims $(HANDLE_OUTPUT)
|
||||||
$(MAKE) build-nph
|
$(MAKE) build-nph
|
||||||
@ -83,8 +97,9 @@ update: | update-common
|
|||||||
clean:
|
clean:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
# must be included after the default target
|
# Build directory
|
||||||
-include $(BUILD_SYSTEM_DIR)/makefiles/targets.mk
|
build:
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
## Possible values: prod; debug
|
## Possible values: prod; debug
|
||||||
TARGET ?= prod
|
TARGET ?= prod
|
||||||
@ -134,7 +149,8 @@ endif
|
|||||||
rln-deps: rustup
|
rln-deps: rustup
|
||||||
./scripts/install_rln_tests_dependencies.sh $(FOUNDRY_VERSION) $(PNPM_VERSION)
|
./scripts/install_rln_tests_dependencies.sh $(FOUNDRY_VERSION) $(PNPM_VERSION)
|
||||||
|
|
||||||
deps: | deps-common nat-libs waku.nims
|
deps: | waku.nims
|
||||||
|
nimble install -y
|
||||||
|
|
||||||
|
|
||||||
### nim-libbacktrace
|
### nim-libbacktrace
|
||||||
@ -153,16 +169,9 @@ endif
|
|||||||
# enable experimental exit is dest feature in libp2p mix
|
# enable experimental exit is dest feature in libp2p mix
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:libp2p_mix_experimental_exit_is_dest
|
NIM_PARAMS := $(NIM_PARAMS) -d:libp2p_mix_experimental_exit_is_dest
|
||||||
|
|
||||||
libbacktrace:
|
# libbacktrace is now managed via nimble package
|
||||||
+ $(MAKE) -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
|
||||||
|
|
||||||
clean-libbacktrace:
|
clean-libbacktrace:
|
||||||
+ $(MAKE) -C vendor/nim-libbacktrace clean $(HANDLE_OUTPUT)
|
@true
|
||||||
|
|
||||||
# Extend deps and clean targets
|
|
||||||
ifneq ($(USE_LIBBACKTRACE), 0)
|
|
||||||
deps: | libbacktrace
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(POSTGRES), 1)
|
ifeq ($(POSTGRES), 1)
|
||||||
NIM_PARAMS := $(NIM_PARAMS) -d:postgres -d:nimDebugDlOpen
|
NIM_PARAMS := $(NIM_PARAMS) -d:postgres -d:nimDebugDlOpen
|
||||||
@ -216,7 +225,7 @@ clean: | clean-librln
|
|||||||
|
|
||||||
testcommon: | build deps
|
testcommon: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim testcommon $(NIM_PARAMS) waku.nims
|
nimble testcommon $(NIM_PARAMS)
|
||||||
|
|
||||||
|
|
||||||
##########
|
##########
|
||||||
@ -227,57 +236,56 @@ testcommon: | build deps
|
|||||||
# install rln-deps only for the testwaku target
|
# install rln-deps only for the testwaku target
|
||||||
testwaku: | build deps rln-deps librln
|
testwaku: | build deps rln-deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim test -d:os=$(shell uname) $(NIM_PARAMS) waku.nims
|
nimble test -d:os=$(shell uname) $(NIM_PARAMS)
|
||||||
|
|
||||||
wakunode2: | build deps librln
|
wakunode2: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
\
|
nimble wakunode2 $(NIM_PARAMS)
|
||||||
$(ENV_SCRIPT) nim wakunode2 $(NIM_PARAMS) waku.nims
|
|
||||||
|
|
||||||
benchmarks: | build deps librln
|
benchmarks: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim benchmarks $(NIM_PARAMS) waku.nims
|
nim benchmarks $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
testwakunode2: | build deps librln
|
testwakunode2: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim testwakunode2 $(NIM_PARAMS) waku.nims
|
nim testwakunode2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
example2: | build deps librln
|
example2: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim example2 $(NIM_PARAMS) waku.nims
|
nim example2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
chat2: | build deps librln
|
chat2: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim chat2 $(NIM_PARAMS) waku.nims
|
nim chat2 $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
chat2mix: | build deps librln
|
chat2mix: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim chat2mix $(NIM_PARAMS) waku.nims
|
nim chat2mix $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
rln-db-inspector: | build deps librln
|
rln-db-inspector: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim rln_db_inspector $(NIM_PARAMS) waku.nims
|
nim rln_db_inspector $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
chat2bridge: | build deps librln
|
chat2bridge: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim chat2bridge $(NIM_PARAMS) waku.nims
|
nim chat2bridge $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
liteprotocoltester: | build deps librln
|
liteprotocoltester: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim liteprotocoltester $(NIM_PARAMS) waku.nims
|
nim liteprotocoltester $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
lightpushwithmix: | build deps librln
|
lightpushwithmix: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim lightpushwithmix $(NIM_PARAMS) waku.nims
|
nim lightpushwithmix $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
build/%: | build deps librln
|
build/%: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$*" && \
|
echo -e $(BUILD_MSG) "build/$*" && \
|
||||||
$(ENV_SCRIPT) nim buildone $(NIM_PARAMS) waku.nims $*
|
nim buildone $(NIM_PARAMS) waku.nims $*
|
||||||
|
|
||||||
compile-test: | build deps librln
|
compile-test: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "$(TEST_FILE)" "\"$(TEST_NAME)\"" && \
|
echo -e $(BUILD_MSG) "$(TEST_FILE)" "\"$(TEST_NAME)\"" && \
|
||||||
$(ENV_SCRIPT) nim buildTest $(NIM_PARAMS) waku.nims $(TEST_FILE) && \
|
nim buildTest $(NIM_PARAMS) waku.nims $(TEST_FILE) && \
|
||||||
$(ENV_SCRIPT) nim execTest $(NIM_PARAMS) waku.nims $(TEST_FILE) "\"$(TEST_NAME)\""; \
|
nim execTest $(NIM_PARAMS) waku.nims $(TEST_FILE) "\"$(TEST_NAME)\""; \
|
||||||
|
|
||||||
################
|
################
|
||||||
## Waku tools ##
|
## Waku tools ##
|
||||||
@ -288,25 +296,25 @@ tools: networkmonitor wakucanary
|
|||||||
|
|
||||||
wakucanary: | build deps librln
|
wakucanary: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim wakucanary $(NIM_PARAMS) waku.nims
|
nim wakucanary $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
networkmonitor: | build deps librln
|
networkmonitor: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim networkmonitor $(NIM_PARAMS) waku.nims
|
nim networkmonitor $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
############
|
############
|
||||||
## Format ##
|
## Format ##
|
||||||
############
|
############
|
||||||
.PHONY: build-nph install-nph clean-nph print-nph-path
|
.PHONY: build-nph install-nph clean-nph print-nph-path
|
||||||
|
|
||||||
# Default location for nph binary shall be next to nim binary to make it available on the path.
|
# nph is installed via nimble
|
||||||
NPH:=$(shell dirname $(NIM_BINARY))/nph
|
NPH:=$(shell which nph 2>/dev/null || echo "")
|
||||||
|
|
||||||
build-nph: | build deps
|
build-nph: | build deps
|
||||||
ifeq ("$(wildcard $(NPH))","")
|
ifeq ($(NPH),)
|
||||||
$(ENV_SCRIPT) nim c --skipParentCfg:on vendor/nph/src/nph.nim && \
|
nimble install nph -y
|
||||||
mv vendor/nph/src/nph $(shell dirname $(NPH))
|
$(eval NPH := $(shell which nph))
|
||||||
echo "nph utility is available at " $(NPH)
|
echo "nph utility installed via nimble"
|
||||||
else
|
else
|
||||||
echo "nph utility already exists at " $(NPH)
|
echo "nph utility already exists at " $(NPH)
|
||||||
endif
|
endif
|
||||||
@ -342,11 +350,11 @@ clean: | clean-nph
|
|||||||
# TODO: Remove unused target
|
# TODO: Remove unused target
|
||||||
docs: | build deps
|
docs: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim doc --run --index:on --project --out:.gh-pages waku/waku.nim waku.nims
|
nim doc --run --index:on --project --out:.gh-pages waku/waku.nim waku.nims
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) ./scripts/run_cov.sh -y
|
./scripts/run_cov.sh -y
|
||||||
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
@ -450,7 +458,7 @@ ifeq ($(STATIC), 1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
libwaku: | build deps librln
|
libwaku: | build deps librln
|
||||||
echo -e $(BUILD_MSG) "build/$@.$(LIB_EXT)" && $(ENV_SCRIPT) nim $(BUILD_COMMAND) $(NIM_PARAMS) waku.nims $@.$(LIB_EXT)
|
echo -e $(BUILD_MSG) "build/$@.$(LIB_EXT)" && nim $(BUILD_COMMAND) $(NIM_PARAMS) waku.nims $@.$(LIB_EXT)
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
## Mobile Bindings ##
|
## Mobile Bindings ##
|
||||||
@ -481,7 +489,7 @@ endif
|
|||||||
build-libwaku-for-android-arch:
|
build-libwaku-for-android-arch:
|
||||||
$(MAKE) rebuild-nat-libs CC=$(ANDROID_TOOLCHAIN_DIR)/bin/$(ANDROID_COMPILER) && \
|
$(MAKE) rebuild-nat-libs CC=$(ANDROID_TOOLCHAIN_DIR)/bin/$(ANDROID_COMPILER) && \
|
||||||
./scripts/build_rln_android.sh $(CURDIR)/build $(LIBRLN_BUILDDIR) $(LIBRLN_VERSION) $(CROSS_TARGET) $(ABIDIR) && \
|
./scripts/build_rln_android.sh $(CURDIR)/build $(LIBRLN_BUILDDIR) $(LIBRLN_VERSION) $(CROSS_TARGET) $(ABIDIR) && \
|
||||||
CPU=$(CPU) ABIDIR=$(ABIDIR) ANDROID_ARCH=$(ANDROID_ARCH) ANDROID_COMPILER=$(ANDROID_COMPILER) ANDROID_TOOLCHAIN_DIR=$(ANDROID_TOOLCHAIN_DIR) $(ENV_SCRIPT) nim libWakuAndroid $(NIM_PARAMS) waku.nims
|
CPU=$(CPU) ABIDIR=$(ABIDIR) ANDROID_ARCH=$(ANDROID_ARCH) ANDROID_COMPILER=$(ANDROID_COMPILER) ANDROID_TOOLCHAIN_DIR=$(ANDROID_TOOLCHAIN_DIR) nim libWakuAndroid $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
libwaku-android-arm64: ANDROID_ARCH=aarch64-linux-android
|
libwaku-android-arm64: ANDROID_ARCH=aarch64-linux-android
|
||||||
libwaku-android-arm64: CPU=arm64
|
libwaku-android-arm64: CPU=arm64
|
||||||
@ -541,7 +549,7 @@ endif
|
|||||||
|
|
||||||
# Build for iOS architecture
|
# Build for iOS architecture
|
||||||
build-libwaku-for-ios-arch:
|
build-libwaku-for-ios-arch:
|
||||||
IOS_SDK=$(IOS_SDK) IOS_ARCH=$(IOS_ARCH) IOS_SDK_PATH=$(IOS_SDK_PATH) $(ENV_SCRIPT) nim libWakuIOS $(NIM_PARAMS) waku.nims
|
IOS_SDK=$(IOS_SDK) IOS_ARCH=$(IOS_ARCH) IOS_SDK_PATH=$(IOS_SDK_PATH) nim libWakuIOS $(NIM_PARAMS) waku.nims
|
||||||
|
|
||||||
# iOS device (arm64)
|
# iOS device (arm64)
|
||||||
libwaku-ios-device: IOS_ARCH=arm64
|
libwaku-ios-device: IOS_ARCH=arm64
|
||||||
@ -562,6 +570,10 @@ libwaku-ios:
|
|||||||
$(MAKE) libwaku-ios-device
|
$(MAKE) libwaku-ios-device
|
||||||
$(MAKE) libwaku-ios-simulator
|
$(MAKE) libwaku-ios-simulator
|
||||||
|
|
||||||
|
# Get nimble package paths for C examples
|
||||||
|
NAT_TRAVERSAL_PKG_PATH := $(shell nimble path nat_traversal 2>/dev/null)
|
||||||
|
LIBBACKTRACE_PKG_PATH := $(shell nimble path libbacktrace 2>/dev/null)
|
||||||
|
|
||||||
cwaku_example: | build libwaku
|
cwaku_example: | build libwaku
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
cc -o "build/$@" \
|
cc -o "build/$@" \
|
||||||
@ -569,10 +581,10 @@ cwaku_example: | build libwaku
|
|||||||
./examples/cbindings/base64.c \
|
./examples/cbindings/base64.c \
|
||||||
-lwaku -Lbuild/ \
|
-lwaku -Lbuild/ \
|
||||||
-pthread -ldl -lm \
|
-pthread -ldl -lm \
|
||||||
-lminiupnpc -Lvendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/build/ \
|
-lminiupnpc -L$(NAT_TRAVERSAL_PKG_PATH)/vendor/miniupnp/miniupnpc/build/ \
|
||||||
-lnatpmp -Lvendor/nim-nat-traversal/vendor/libnatpmp-upstream/ \
|
-lnatpmp -L$(NAT_TRAVERSAL_PKG_PATH)/vendor/libnatpmp-upstream/ \
|
||||||
vendor/nim-libbacktrace/libbacktrace_wrapper.o \
|
$(LIBBACKTRACE_PKG_PATH)/libbacktrace_wrapper.o \
|
||||||
vendor/nim-libbacktrace/install/usr/lib/libbacktrace.a
|
$(LIBBACKTRACE_PKG_PATH)/install/usr/lib/libbacktrace.a
|
||||||
|
|
||||||
cppwaku_example: | build libwaku
|
cppwaku_example: | build libwaku
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
@ -581,17 +593,15 @@ cppwaku_example: | build libwaku
|
|||||||
./examples/cpp/base64.cpp \
|
./examples/cpp/base64.cpp \
|
||||||
-lwaku -Lbuild/ \
|
-lwaku -Lbuild/ \
|
||||||
-pthread -ldl -lm \
|
-pthread -ldl -lm \
|
||||||
-lminiupnpc -Lvendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/build/ \
|
-lminiupnpc -L$(NAT_TRAVERSAL_PKG_PATH)/vendor/miniupnp/miniupnpc/build/ \
|
||||||
-lnatpmp -Lvendor/nim-nat-traversal/vendor/libnatpmp-upstream/ \
|
-lnatpmp -L$(NAT_TRAVERSAL_PKG_PATH)/vendor/libnatpmp-upstream/ \
|
||||||
vendor/nim-libbacktrace/libbacktrace_wrapper.o \
|
$(LIBBACKTRACE_PKG_PATH)/libbacktrace_wrapper.o \
|
||||||
vendor/nim-libbacktrace/install/usr/lib/libbacktrace.a
|
$(LIBBACKTRACE_PKG_PATH)/install/usr/lib/libbacktrace.a
|
||||||
|
|
||||||
nodejswaku: | build deps
|
nodejswaku: | build deps
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
node-gyp build --directory=examples/nodejs/
|
node-gyp build --directory=examples/nodejs/
|
||||||
|
|
||||||
endif # "variables.mk" was not included
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Release Targets #
|
# Release Targets #
|
||||||
###################
|
###################
|
||||||
|
|||||||
24
README.md
24
README.md
@ -21,6 +21,12 @@ These instructions are generic. For more detailed instructions, see the source c
|
|||||||
|
|
||||||
The standard developer tools, including a C compiler, GNU Make, Bash, and Git. More information on these installations can be found [here](https://docs.waku.org/guides/nwaku/build-source#install-dependencies).
|
The standard developer tools, including a C compiler, GNU Make, Bash, and Git. More information on these installations can be found [here](https://docs.waku.org/guides/nwaku/build-source#install-dependencies).
|
||||||
|
|
||||||
|
**Nimble 0.99.0** or later is required for dependency management. Verify your version with:
|
||||||
|
```bash
|
||||||
|
nimble -v
|
||||||
|
# Expected output: 0.99.0 or higher
|
||||||
|
```
|
||||||
|
|
||||||
> In some distributions (Fedora linux for example), you may need to install `which` utility separately. Nimbus build system is relying on it.
|
> In some distributions (Fedora linux for example), you may need to install `which` utility separately. Nimbus build system is relying on it.
|
||||||
|
|
||||||
You'll also need an installation of Rust and its toolchain (specifically `rustc` and `cargo`).
|
You'll also need an installation of Rust and its toolchain (specifically `rustc` and `cargo`).
|
||||||
@ -100,17 +106,17 @@ If `wakunode2.exe` isn't generated:
|
|||||||
|
|
||||||
### Developing
|
### Developing
|
||||||
|
|
||||||
#### Nim Runtime
|
#### Dependencies
|
||||||
This repository is bundled with a Nim runtime that includes the necessary dependencies for the project.
|
This project uses **Nimble** for dependency management. All dependencies are automatically installed when you run:
|
||||||
|
|
||||||
Before you can utilize the runtime you'll need to build the project, as detailed in a previous section.
|
|
||||||
This will generate a `vendor` directory containing various dependencies, including the `nimbus-build-system` which has the bundled nim runtime.
|
|
||||||
|
|
||||||
After successfully building the project, you may bring the bundled runtime into scope by running:
|
|
||||||
```bash
|
```bash
|
||||||
source env.sh
|
make deps
|
||||||
|
# or directly:
|
||||||
|
nimble install -y
|
||||||
```
|
```
|
||||||
If everything went well, you should see your prompt suffixed with `[Nimbus env]$`. Now you can run `nim` commands as usual.
|
|
||||||
|
The only vendor submodules kept are:
|
||||||
|
- `vendor/zerokit` - RLN (Rate Limiting Nullifier) library
|
||||||
|
- `vendor/waku-rlnv2-contract` - Smart contract for RLN tests
|
||||||
|
|
||||||
### Test Suite
|
### Test Suite
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import
|
|||||||
chronos/timer as ctime,
|
chronos/timer as ctime,
|
||||||
confutils,
|
confutils,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/nameresolving/dnsresolver,
|
libp2p/nameresolving/dnsresolver,
|
||||||
libp2p/protocols/ping,
|
libp2p/protocols/ping,
|
||||||
|
|||||||
@ -9,11 +9,7 @@ if defined(windows):
|
|||||||
switch("passL", "rln.lib")
|
switch("passL", "rln.lib")
|
||||||
switch("define", "postgres=false")
|
switch("define", "postgres=false")
|
||||||
|
|
||||||
# Automatically add all vendor subdirectories
|
# Dependencies are now managed via nimble, no vendor paths needed
|
||||||
for dir in walkDir("./vendor"):
|
|
||||||
if dir.kind == pcDir:
|
|
||||||
switch("path", dir.path)
|
|
||||||
switch("path", dir.path / "src")
|
|
||||||
|
|
||||||
# disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries
|
# disable timestamps in Windows PE headers - https://wiki.debian.org/ReproducibleBuilds/TimestampsInPEBinaries
|
||||||
switch("passL", "-Wl,--no-insert-timestamp")
|
switch("passL", "-Wl,--no-insert-timestamp")
|
||||||
@ -117,7 +113,6 @@ if defined(android):
|
|||||||
var clang = getEnv("ANDROID_COMPILER")
|
var clang = getEnv("ANDROID_COMPILER")
|
||||||
var ndk_home = getEnv("ANDROID_TOOLCHAIN_DIR")
|
var ndk_home = getEnv("ANDROID_TOOLCHAIN_DIR")
|
||||||
var sysroot = ndk_home & "/sysroot"
|
var sysroot = ndk_home & "/sysroot"
|
||||||
var cincludes = sysroot & "/usr/include/" & getEnv("ANDROID_ARCH")
|
|
||||||
|
|
||||||
switch("clang.path", ndk_home & "/bin")
|
switch("clang.path", ndk_home & "/bin")
|
||||||
switch("clang.exe", clang)
|
switch("clang.exe", clang)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import
|
|||||||
confutils,
|
confutils,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import
|
|||||||
libp2p/protocols/mix/curve25519,
|
libp2p/protocols/mix/curve25519,
|
||||||
libp2p/multiaddress,
|
libp2p/multiaddress,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
metrics,
|
metrics,
|
||||||
metrics/chronos_httpserver
|
metrics/chronos_httpserver
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import
|
|||||||
confutils,
|
confutils,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import
|
|||||||
confutils,
|
confutils,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import
|
|||||||
confutils,
|
confutils,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import
|
|||||||
chronicles,
|
chronicles,
|
||||||
chronos,
|
chronos,
|
||||||
results,
|
results,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
strutils,
|
strutils,
|
||||||
libp2p/peerid,
|
libp2p/peerid,
|
||||||
metrics,
|
metrics,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import
|
|||||||
libp2p/[multiaddress, peerid],
|
libp2p/[multiaddress, peerid],
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
nimcrypto/utils
|
nimcrypto/utils
|
||||||
|
|
||||||
import waku/waku_core/peers, waku/node/peer_manager/peer_store/waku_peer_storage
|
import waku/waku_core/peers, waku/node/peer_manager/peer_store/waku_peer_storage
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import
|
|||||||
libp2p/peerId,
|
libp2p/peerId,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import std/options, testutils/unittests, eth/p2p/discoveryv5/enr, libp2p/crypto/crypto
|
import std/options, testutils/unittests, eth/enr/enr, libp2p/crypto/crypto
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
common/databases/db_sqlite,
|
common/databases/db_sqlite,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import
|
|||||||
libp2p/multistream,
|
libp2p/multistream,
|
||||||
libp2p/muxers/muxer,
|
libp2p/muxers/muxer,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
import
|
import
|
||||||
waku/
|
waku/
|
||||||
[
|
[
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import
|
|||||||
libp2p/protocols/pubsub/pubsub,
|
libp2p/protocols/pubsub/pubsub,
|
||||||
libp2p/protocols/pubsub/gossipsub,
|
libp2p/protocols/pubsub/gossipsub,
|
||||||
libp2p/nameresolving/mockresolver,
|
libp2p/nameresolving/mockresolver,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
eth/net/utils
|
eth/net/utils
|
||||||
import
|
import
|
||||||
waku/[waku_core, waku_node, node/peer_manager], ./testlib/wakucore, ./testlib/wakunode
|
waku/[waku_core, waku_node, node/peer_manager], ./testlib/wakucore, ./testlib/wakunode
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import
|
|||||||
testutils/unittests,
|
testutils/unittests,
|
||||||
libp2p/crypto/crypto as libp2p_keys,
|
libp2p/crypto/crypto as libp2p_keys,
|
||||||
eth/keys as eth_keys,
|
eth/keys as eth_keys,
|
||||||
eth/p2p/discoveryv5/enr as ethEnr,
|
eth/enr/enr as ethEnr,
|
||||||
libp2p/crypto/secp,
|
libp2p/crypto/secp,
|
||||||
libp2p/protocols/rendezvous
|
libp2p/protocols/rendezvous
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import
|
|||||||
libp2p/peerId,
|
libp2p/peerId,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import
|
|||||||
libp2p/peerId,
|
libp2p/peerId,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
waku/[
|
waku/[
|
||||||
|
|||||||
1
vendor/db_connector
vendored
1
vendor/db_connector
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 74aef399e5c232f95c9fc5c987cebac846f09d62
|
|
||||||
1
vendor/dnsclient.nim
vendored
1
vendor/dnsclient.nim
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 23214235d4784d24aceed99bbfe153379ea557c8
|
|
||||||
1
vendor/nim-bearssl
vendored
1
vendor/nim-bearssl
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 11e798b62b8e6beabe958e048e9e24c7e0f9ee63
|
|
||||||
1
vendor/nim-chronicles
vendored
1
vendor/nim-chronicles
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 54f5b726025e8c7385e3a6529d3aa27454c6e6ff
|
|
||||||
1
vendor/nim-chronos
vendored
1
vendor/nim-chronos
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 0646c444fce7c7ed08ef6f2c9a7abfd172ffe655
|
|
||||||
1
vendor/nim-confutils
vendored
1
vendor/nim-confutils
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit e214b3992a31acece6a9aada7d0a1ad37c928f3b
|
|
||||||
1
vendor/nim-dnsdisc
vendored
1
vendor/nim-dnsdisc
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit b71d029f4da4ec56974d54c04518bada00e1b623
|
|
||||||
1
vendor/nim-eth
vendored
1
vendor/nim-eth
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit d9135e6c3c5d6d819afdfb566aa8d958756b73a8
|
|
||||||
1
vendor/nim-faststreams
vendored
1
vendor/nim-faststreams
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit c3ac3f639ed1d62f59d3077d376a29c63ac9750c
|
|
||||||
1
vendor/nim-http-utils
vendored
1
vendor/nim-http-utils
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 79cbab1460f4c0cdde2084589d017c43a3d7b4f1
|
|
||||||
1
vendor/nim-json-rpc
vendored
1
vendor/nim-json-rpc
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 9665c265035f49f5ff94bbffdeadde68e19d6221
|
|
||||||
1
vendor/nim-json-serialization
vendored
1
vendor/nim-json-serialization
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit b65fd6a7e64c864dabe40e7dfd6c7d07db0014ac
|
|
||||||
1
vendor/nim-libbacktrace
vendored
1
vendor/nim-libbacktrace
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit d8bd4ce5c46bb6d2f984f6b3f3d7380897d95ecb
|
|
||||||
1
vendor/nim-libp2p
vendored
1
vendor/nim-libp2p
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit e82080f7b1aa61c6d35fa5311b873f41eff4bb52
|
|
||||||
1
vendor/nim-metrics
vendored
1
vendor/nim-metrics
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit ecf64c6078d1276d3b7d9b3d931fbdb70004db11
|
|
||||||
1
vendor/nim-minilru
vendored
1
vendor/nim-minilru
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 0c4b2bce959591f0a862e9b541ba43c6d0cf3476
|
|
||||||
1
vendor/nim-nat-traversal
vendored
1
vendor/nim-nat-traversal
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 860e18c37667b5dd005b94c63264560c35d88004
|
|
||||||
1
vendor/nim-presto
vendored
1
vendor/nim-presto
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 92b1c7ff141e6920e1f8a98a14c35c1fa098e3be
|
|
||||||
1
vendor/nim-regex
vendored
1
vendor/nim-regex
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 4593305ed1e49731fc75af1dc572dd2559aad19c
|
|
||||||
1
vendor/nim-results
vendored
1
vendor/nim-results
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit df8113dda4c2d74d460a8fa98252b0b771bf1f27
|
|
||||||
1
vendor/nim-secp256k1
vendored
1
vendor/nim-secp256k1
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 9dd3df62124aae79d564da636bb22627c53c7676
|
|
||||||
1
vendor/nim-serialization
vendored
1
vendor/nim-serialization
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 6f525d5447d97256750ca7856faead03e562ed20
|
|
||||||
1
vendor/nim-sqlite3-abi
vendored
1
vendor/nim-sqlite3-abi
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit bdf01cf4236fb40788f0733466cdf6708783cbac
|
|
||||||
1
vendor/nim-stew
vendored
1
vendor/nim-stew
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit e5740014961438610d336cd81706582dbf2c96f0
|
|
||||||
1
vendor/nim-stint
vendored
1
vendor/nim-stint
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 470b7892561b5179ab20bd389a69217d6213fe58
|
|
||||||
1
vendor/nim-taskpools
vendored
1
vendor/nim-taskpools
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 9e8ccc754631ac55ac2fd495e167e74e86293edb
|
|
||||||
1
vendor/nim-testutils
vendored
1
vendor/nim-testutils
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 94d68e796c045d5b37cabc6be32d7bfa168f8857
|
|
||||||
1
vendor/nim-toml-serialization
vendored
1
vendor/nim-toml-serialization
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit fea85b27f0badcf617033ca1bc05444b5fd8aa7a
|
|
||||||
1
vendor/nim-unicodedb
vendored
1
vendor/nim-unicodedb
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 66f2458710dc641dd4640368f9483c8a0ec70561
|
|
||||||
1
vendor/nim-unittest2
vendored
1
vendor/nim-unittest2
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 8b51e99b4a57fcfb31689230e75595f024543024
|
|
||||||
1
vendor/nim-web3
vendored
1
vendor/nim-web3
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 81ee8ce479d86acb73be7c4f365328e238d9b4a3
|
|
||||||
1
vendor/nim-websock
vendored
1
vendor/nim-websock
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit ebe308a79a7b440a11dfbe74f352be86a3883508
|
|
||||||
1
vendor/nim-zlib
vendored
1
vendor/nim-zlib
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit daa8723fd32299d4ca621c837430c29a5a11e19a
|
|
||||||
1
vendor/nimbus-build-system
vendored
1
vendor/nimbus-build-system
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit e6c2c9da39c2d368d9cf420ac22692e99715d22c
|
|
||||||
1
vendor/nimcrypto
vendored
1
vendor/nimcrypto
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit 721fb99ee099b632eb86dfad1f0d96ee87583774
|
|
||||||
1
vendor/nph
vendored
1
vendor/nph
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit c6e03162dc2820d3088660f644818d7040e95791
|
|
||||||
76
waku.nimble
76
waku.nimble
@ -21,6 +21,7 @@ requires "nim >= 2.2.4",
|
|||||||
"libbacktrace",
|
"libbacktrace",
|
||||||
"nimcrypto",
|
"nimcrypto",
|
||||||
"serialization",
|
"serialization",
|
||||||
|
"toml_serialization",
|
||||||
"stew",
|
"stew",
|
||||||
"stint",
|
"stint",
|
||||||
"metrics",
|
"metrics",
|
||||||
@ -31,9 +32,19 @@ requires "nim >= 2.2.4",
|
|||||||
"results",
|
"results",
|
||||||
"db_connector",
|
"db_connector",
|
||||||
"minilru",
|
"minilru",
|
||||||
"ffi"
|
"unittest2",
|
||||||
|
"testutils"
|
||||||
|
|
||||||
### Helper functions
|
### Helper functions
|
||||||
|
|
||||||
|
# Get nimble package paths for compilation
|
||||||
|
proc getNimblePkgDir(): string =
|
||||||
|
# Get nimble's package directory
|
||||||
|
when defined(windows):
|
||||||
|
getEnv("USERPROFILE") / ".nimble" / "pkgs2"
|
||||||
|
else:
|
||||||
|
getEnv("HOME") / ".nimble" / "pkgs2"
|
||||||
|
|
||||||
proc buildModule(filePath, params = "", lang = "c"): bool =
|
proc buildModule(filePath, params = "", lang = "c"): bool =
|
||||||
if not dirExists "build":
|
if not dirExists "build":
|
||||||
mkDir "build"
|
mkDir "build"
|
||||||
@ -55,12 +66,10 @@ proc buildModule(filePath, params = "", lang = "c"): bool =
|
|||||||
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
||||||
if not dirExists "build":
|
if not dirExists "build":
|
||||||
mkDir "build"
|
mkDir "build"
|
||||||
# allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"
|
# Use nimble c command which automatically handles package paths
|
||||||
var extra_params = params
|
# Add vendor/nim-ffi explicitly since it's a submodule
|
||||||
for i in 2 ..< paramCount():
|
let nimbleCmd = "nimble c --out:build/" & name & " --mm:refc --path:vendor/nim-ffi " & params & " " & srcDir & name & ".nim"
|
||||||
extra_params &= " " & paramStr(i)
|
exec nimbleCmd
|
||||||
exec "nim " & lang & " --out:build/" & name & " --mm:refc " & extra_params & " " &
|
|
||||||
srcDir & name & ".nim"
|
|
||||||
|
|
||||||
proc buildLibrary(lib_name: string, srcDir = "./", params = "", `type` = "static") =
|
proc buildLibrary(lib_name: string, srcDir = "./", params = "", `type` = "static") =
|
||||||
if not dirExists "build":
|
if not dirExists "build":
|
||||||
@ -217,6 +226,23 @@ task libWakuAndroid, "Build the mobile bindings for Android":
|
|||||||
### Mobile iOS
|
### Mobile iOS
|
||||||
import std/sequtils
|
import std/sequtils
|
||||||
|
|
||||||
|
# Helper to get nimble package path
|
||||||
|
proc getNimblePkgPath(pkgName: string): string =
|
||||||
|
let (output, exitCode) = gorgeEx("nimble path " & pkgName)
|
||||||
|
if exitCode != 0:
|
||||||
|
quit "Error: Could not find nimble package: " & pkgName
|
||||||
|
result = output.strip()
|
||||||
|
|
||||||
|
# Helper to get Nim lib path
|
||||||
|
proc getNimLibPath(): string =
|
||||||
|
let (output, exitCode) = gorgeEx("nim --verbosity:0 --hints:off dump --dump.format:json 2>/dev/null | grep -o '\"libpath\":\"[^\"]*\"' | cut -d'\"' -f4")
|
||||||
|
if exitCode != 0 or output.strip().len == 0:
|
||||||
|
# Fallback: try to find it relative to nim binary
|
||||||
|
let (nimPath, _) = gorgeEx("which nim")
|
||||||
|
result = nimPath.strip().parentDir().parentDir() / "lib"
|
||||||
|
else:
|
||||||
|
result = output.strip()
|
||||||
|
|
||||||
proc buildMobileIOS(srcDir = ".", params = "") =
|
proc buildMobileIOS(srcDir = ".", params = "") =
|
||||||
echo "Building iOS libwaku library"
|
echo "Building iOS libwaku library"
|
||||||
|
|
||||||
@ -265,12 +291,18 @@ proc buildMobileIOS(srcDir = ".", params = "") =
|
|||||||
" " & extra_params &
|
" " & extra_params &
|
||||||
" " & srcDir & "/libwaku.nim"
|
" " & srcDir & "/libwaku.nim"
|
||||||
|
|
||||||
# Compile vendor C libraries for iOS
|
# Get nimble package paths
|
||||||
|
let bearSslPkgDir = getNimblePkgPath("bearssl")
|
||||||
|
let secp256k1PkgDir = getNimblePkgPath("secp256k1")
|
||||||
|
let natTraversalPkgDir = getNimblePkgPath("nat_traversal")
|
||||||
|
let nimLibDir = getNimLibPath()
|
||||||
|
|
||||||
|
# Compile C libraries for iOS
|
||||||
|
|
||||||
# --- BearSSL ---
|
# --- BearSSL ---
|
||||||
echo "Compiling BearSSL for iOS..."
|
echo "Compiling BearSSL for iOS..."
|
||||||
let bearSslSrcDir = "./vendor/nim-bearssl/bearssl/csources/src"
|
let bearSslSrcDir = bearSslPkgDir / "bearssl/csources/src"
|
||||||
let bearSslIncDir = "./vendor/nim-bearssl/bearssl/csources/inc"
|
let bearSslIncDir = bearSslPkgDir / "bearssl/csources/inc"
|
||||||
for path in walkDirRec(bearSslSrcDir):
|
for path in walkDirRec(bearSslSrcDir):
|
||||||
if path.endsWith(".c"):
|
if path.endsWith(".c"):
|
||||||
let relPath = path.replace(bearSslSrcDir & "/", "").replace("/", "_")
|
let relPath = path.replace(bearSslSrcDir & "/", "").replace("/", "_")
|
||||||
@ -281,7 +313,7 @@ proc buildMobileIOS(srcDir = ".", params = "") =
|
|||||||
|
|
||||||
# --- secp256k1 ---
|
# --- secp256k1 ---
|
||||||
echo "Compiling secp256k1 for iOS..."
|
echo "Compiling secp256k1 for iOS..."
|
||||||
let secp256k1Dir = "./vendor/nim-secp256k1/vendor/secp256k1"
|
let secp256k1Dir = secp256k1PkgDir / "vendor/secp256k1"
|
||||||
let secp256k1Flags = " -I" & secp256k1Dir & "/include" &
|
let secp256k1Flags = " -I" & secp256k1Dir & "/include" &
|
||||||
" -I" & secp256k1Dir & "/src" &
|
" -I" & secp256k1Dir & "/src" &
|
||||||
" -I" & secp256k1Dir &
|
" -I" & secp256k1Dir &
|
||||||
@ -306,9 +338,9 @@ proc buildMobileIOS(srcDir = ".", params = "") =
|
|||||||
|
|
||||||
# --- miniupnpc ---
|
# --- miniupnpc ---
|
||||||
echo "Compiling miniupnpc for iOS..."
|
echo "Compiling miniupnpc for iOS..."
|
||||||
let miniupnpcSrcDir = "./vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/src"
|
let miniupnpcSrcDir = natTraversalPkgDir / "vendor/miniupnp/miniupnpc/src"
|
||||||
let miniupnpcIncDir = "./vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/include"
|
let miniupnpcIncDir = natTraversalPkgDir / "vendor/miniupnp/miniupnpc/include"
|
||||||
let miniupnpcBuildDir = "./vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/build"
|
let miniupnpcBuildDir = natTraversalPkgDir / "vendor/miniupnp/miniupnpc/build"
|
||||||
let miniupnpcFiles = @[
|
let miniupnpcFiles = @[
|
||||||
"addr_is_reserved.c", "connecthostport.c", "igd_desc_parse.c",
|
"addr_is_reserved.c", "connecthostport.c", "igd_desc_parse.c",
|
||||||
"minisoap.c", "minissdpc.c", "miniupnpc.c", "miniwget.c",
|
"minisoap.c", "minissdpc.c", "miniupnpc.c", "miniwget.c",
|
||||||
@ -329,7 +361,7 @@ proc buildMobileIOS(srcDir = ".", params = "") =
|
|||||||
|
|
||||||
# --- libnatpmp ---
|
# --- libnatpmp ---
|
||||||
echo "Compiling libnatpmp for iOS..."
|
echo "Compiling libnatpmp for iOS..."
|
||||||
let natpmpSrcDir = "./vendor/nim-nat-traversal/vendor/libnatpmp-upstream"
|
let natpmpSrcDir = natTraversalPkgDir / "vendor/libnatpmp-upstream"
|
||||||
# Only compile natpmp.c - getgateway.c uses net/route.h which is not available on iOS
|
# Only compile natpmp.c - getgateway.c uses net/route.h which is not available on iOS
|
||||||
let natpmpObj = vendorObjDir / "natpmp_natpmp.o"
|
let natpmpObj = vendorObjDir / "natpmp_natpmp.o"
|
||||||
if not fileExists(natpmpObj):
|
if not fileExists(natpmpObj):
|
||||||
@ -363,13 +395,13 @@ proc buildMobileIOS(srcDir = ".", params = "") =
|
|||||||
let oFile = objDir / baseName
|
let oFile = objDir / baseName
|
||||||
exec clangBase &
|
exec clangBase &
|
||||||
" -DENABLE_STRNATPMPERR" &
|
" -DENABLE_STRNATPMPERR" &
|
||||||
" -I./vendor/nimbus-build-system/vendor/Nim/lib/" &
|
" -I" & nimLibDir & "/" &
|
||||||
" -I./vendor/nim-bearssl/bearssl/csources/inc/" &
|
" -I" & bearSslPkgDir & "/bearssl/csources/inc/" &
|
||||||
" -I./vendor/nim-bearssl/bearssl/csources/tools/" &
|
" -I" & bearSslPkgDir & "/bearssl/csources/tools/" &
|
||||||
" -I./vendor/nim-bearssl/bearssl/abi/" &
|
" -I" & bearSslPkgDir & "/bearssl/abi/" &
|
||||||
" -I./vendor/nim-secp256k1/vendor/secp256k1/include/" &
|
" -I" & secp256k1PkgDir & "/vendor/secp256k1/include/" &
|
||||||
" -I./vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/include/" &
|
" -I" & natTraversalPkgDir & "/vendor/miniupnp/miniupnpc/include/" &
|
||||||
" -I./vendor/nim-nat-traversal/vendor/libnatpmp-upstream/" &
|
" -I" & natTraversalPkgDir & "/vendor/libnatpmp-upstream/" &
|
||||||
" -I" & nimcacheDir &
|
" -I" & nimcacheDir &
|
||||||
" -c " & cFile &
|
" -c " & cFile &
|
||||||
" -o " & oFile
|
" -o " & oFile
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import std/strutils
|
import std/strutils
|
||||||
|
|
||||||
import results, eth/p2p/discoveryv5/enr
|
import results, eth/enr/enr
|
||||||
|
|
||||||
import waku/waku_core/peers
|
import waku/waku_core/peers
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
## An extension wrapper around nim-eth's ENR module
|
## An extension wrapper around nim-eth's ENR module
|
||||||
|
|
||||||
import eth/p2p/discoveryv5/enr
|
import eth/enr/enr
|
||||||
import ./enr/builder, ./enr/typed_record
|
import ./enr/builder, ./enr/typed_record
|
||||||
|
|
||||||
export
|
export
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import
|
|||||||
std/[options, net],
|
std/[options, net],
|
||||||
results,
|
results,
|
||||||
eth/keys as eth_keys,
|
eth/keys as eth_keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto as libp2p_crypto
|
libp2p/crypto/crypto as libp2p_crypto
|
||||||
|
|
||||||
import ./typed_record
|
import ./typed_record
|
||||||
@ -49,7 +49,7 @@ proc addFieldPair*[V](builder: var EnrBuilder, key: string, value: V) =
|
|||||||
|
|
||||||
proc build*(builder: EnrBuilder): EnrResult[enr.Record] =
|
proc build*(builder: EnrBuilder): EnrResult[enr.Record] =
|
||||||
# Note that nim-eth's `Record.init` does not deduplicate the field pairs.
|
# Note that nim-eth's `Record.init` does not deduplicate the field pairs.
|
||||||
# See: https://github.com/status-im/nim-eth/blob/4b22fcd/eth/p2p/discoveryv5/enr.nim#L143-L144
|
# See: https://github.com/status-im/nim-eth/blob/4b22fcd/eth/enr/enr.nim#L143-L144
|
||||||
enr.Record.init(
|
enr.Record.init(
|
||||||
seqNum = builder.seqNumber,
|
seqNum = builder.seqNumber,
|
||||||
pk = builder.privateKey,
|
pk = builder.privateKey,
|
||||||
@ -69,7 +69,7 @@ proc addAddressAndPorts(
|
|||||||
builder.udpPort = udpPort.toOpt()
|
builder.udpPort = udpPort.toOpt()
|
||||||
|
|
||||||
proc addPorts(builder: var EnrBuilder, tcp, udp: Option[Port]) =
|
proc addPorts(builder: var EnrBuilder, tcp, udp: Option[Port]) =
|
||||||
# Based on: https://github.com/status-im/nim-eth/blob/4b22fcd/eth/p2p/discoveryv5/enr.nim#L166
|
# Based on: https://github.com/status-im/nim-eth/blob/4b22fcd/eth/enr/enr.nim#L166
|
||||||
builder.tcpPort = tcp.toOpt()
|
builder.tcpPort = tcp.toOpt()
|
||||||
builder.udpPort = udp.toOpt()
|
builder.udpPort = udp.toOpt()
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import std/options, results, eth/keys as eth_keys, libp2p/crypto/crypto as libp2p_crypto
|
import std/options, results, eth/keys as eth_keys, libp2p/crypto/crypto as libp2p_crypto
|
||||||
|
|
||||||
import eth/p2p/discoveryv5/enr except TypedRecord, toTypedRecord
|
import eth/enr/enr except TypedRecord, toTypedRecord
|
||||||
|
|
||||||
## Since enr changed to result.Opt[T] from Option[T] for intercompatibility introduce a conversion between
|
## Since enr changed to result.Opt[T] from Option[T] for intercompatibility introduce a conversion between
|
||||||
func toOpt*[T](o: Option[T]): Opt[T] =
|
func toOpt*[T](o: Option[T]): Opt[T] =
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import
|
|||||||
chronos,
|
chronos,
|
||||||
metrics,
|
metrics,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/crypto/secp,
|
libp2p/crypto/secp,
|
||||||
libp2p/multiaddress,
|
libp2p/multiaddress,
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import
|
|||||||
libp2p/peerid,
|
libp2p/peerid,
|
||||||
libp2p/discovery/rendezvousinterface,
|
libp2p/discovery/rendezvousinterface,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
presto,
|
presto,
|
||||||
metrics,
|
metrics,
|
||||||
metrics/chronos_httpserver
|
metrics/chronos_httpserver
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import
|
|||||||
stew/byteutils,
|
stew/byteutils,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
nimcrypto,
|
nimcrypto,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/protocols/ping,
|
libp2p/protocols/ping,
|
||||||
libp2p/protocols/pubsub/gossipsub,
|
libp2p/protocols/pubsub/gossipsub,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import
|
|||||||
results,
|
results,
|
||||||
stew/byteutils,
|
stew/byteutils,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/protocols/ping,
|
libp2p/protocols/ping,
|
||||||
libp2p/protocols/pubsub/gossipsub,
|
libp2p/protocols/pubsub/gossipsub,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import
|
|||||||
metrics,
|
metrics,
|
||||||
results,
|
results,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/protocols/ping,
|
libp2p/protocols/ping,
|
||||||
libp2p/protocols/pubsub/gossipsub,
|
libp2p/protocols/pubsub/gossipsub,
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import
|
|||||||
results,
|
results,
|
||||||
stew/byteutils,
|
stew/byteutils,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/protocols/ping,
|
libp2p/protocols/ping,
|
||||||
libp2p/protocols/pubsub/gossipsub,
|
libp2p/protocols/pubsub/gossipsub,
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import
|
|||||||
metrics,
|
metrics,
|
||||||
results,
|
results,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/protocols/ping,
|
libp2p/protocols/ping,
|
||||||
libp2p/protocols/pubsub/gossipsub,
|
libp2p/protocols/pubsub/gossipsub,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import
|
|||||||
std/[sets, options],
|
std/[sets, options],
|
||||||
results,
|
results,
|
||||||
sqlite3_abi,
|
sqlite3_abi,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/protobuf/minprotobuf
|
libp2p/protobuf/minprotobuf
|
||||||
import
|
import
|
||||||
../../../common/databases/db_sqlite,
|
../../../common/databases/db_sqlite,
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import
|
|||||||
std/[tables, sequtils, sets, options, strutils],
|
std/[tables, sequtils, sets, options, strutils],
|
||||||
chronos,
|
chronos,
|
||||||
chronicles,
|
chronicles,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/builders,
|
libp2p/builders,
|
||||||
libp2p/peerstore,
|
libp2p/peerstore,
|
||||||
libp2p/crypto/curve25519
|
libp2p/crypto/curve25519
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import
|
|||||||
nimcrypto,
|
nimcrypto,
|
||||||
bearssl/rand,
|
bearssl/rand,
|
||||||
stew/byteutils,
|
stew/byteutils,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/crypto/curve25519,
|
libp2p/crypto/curve25519,
|
||||||
libp2p/[multiaddress, multicodec],
|
libp2p/[multiaddress, multicodec],
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import
|
|||||||
chronos,
|
chronos,
|
||||||
chronicles,
|
chronicles,
|
||||||
eth/keys,
|
eth/keys,
|
||||||
eth/p2p/discoveryv5/enr,
|
eth/enr/enr,
|
||||||
eth/net/utils,
|
eth/net/utils,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
libp2p/crypto/curve25519,
|
libp2p/crypto/curve25519,
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import
|
|||||||
libp2p/protocols/protocol,
|
libp2p/protocols/protocol,
|
||||||
libp2p/stream/connection,
|
libp2p/stream/connection,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
import ../common/nimchronos, ../waku_core, ./rpc, ../common/callbacks
|
import ../common/nimchronos, ../waku_core, ./rpc, ../common/callbacks
|
||||||
|
|
||||||
from ../waku_core/codecs import WakuMetadataCodec
|
from ../waku_core/codecs import WakuMetadataCodec
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import
|
|||||||
metrics,
|
metrics,
|
||||||
libp2p/protocols/protocol,
|
libp2p/protocols/protocol,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
import
|
import
|
||||||
../common/nimchronos,
|
../common/nimchronos,
|
||||||
../node/peer_manager,
|
../node/peer_manager,
|
||||||
|
|||||||
@ -9,7 +9,7 @@ import
|
|||||||
libp2p/protocols/protocol,
|
libp2p/protocols/protocol,
|
||||||
libp2p/stream/connection,
|
libp2p/stream/connection,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
|
|
||||||
import
|
import
|
||||||
../common/databases/db_sqlite,
|
../common/databases/db_sqlite,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import
|
|||||||
libp2p/protocols/protocol,
|
libp2p/protocols/protocol,
|
||||||
libp2p/stream/connection,
|
libp2p/stream/connection,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
import
|
import
|
||||||
../common/nimchronos,
|
../common/nimchronos,
|
||||||
../common/protobuf,
|
../common/protobuf,
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import
|
|||||||
libp2p/protocols/protocol,
|
libp2p/protocols/protocol,
|
||||||
libp2p/stream/connection,
|
libp2p/stream/connection,
|
||||||
libp2p/crypto/crypto,
|
libp2p/crypto/crypto,
|
||||||
eth/p2p/discoveryv5/enr
|
eth/enr/enr
|
||||||
import
|
import
|
||||||
../common/nimchronos,
|
../common/nimchronos,
|
||||||
../common/protobuf,
|
../common/protobuf,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user