mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-06-08 15:10:02 +00:00
refactor: introduce proper logos_delivery layers folder structure (#3935)
Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
This commit is contained in:
parent
38d951a2fd
commit
3b03ca29b1
4
.github/ISSUE_TEMPLATE/bump_dependencies.md
vendored
4
.github/ISSUE_TEMPLATE/bump_dependencies.md
vendored
@ -11,8 +11,8 @@ assignees: ''
|
||||
|
||||
### Bumped items
|
||||
- [ ] Update nimble dependencies
|
||||
1. Edit manually waku.nimble. For some dependencies, we want to bump versions manually and use a pinned version, f.e., nim-libp2p and all its dependencies.
|
||||
2. Run `nimble lock` (make sure `nimble --version` shows the Nimble version pinned in waku.nimble)
|
||||
1. Edit manually logos_delivery.nimble. For some dependencies, we want to bump versions manually and use a pinned version, f.e., nim-libp2p and all its dependencies.
|
||||
2. Run `nimble lock` (make sure `nimble --version` shows the Nimble version pinned in logos_delivery.nimble)
|
||||
3. Run `./tools/gen-nix-deps.sh nimble.lock nix/deps.nix` to update nix deps
|
||||
|
||||
- [ ] Update vendor/zerokit dependency.
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/prepare_release.md
vendored
2
.github/ISSUE_TEMPLATE/prepare_release.md
vendored
@ -18,7 +18,7 @@ For detailed info on the release process refer to https://github.com/logos-messa
|
||||
All items below are to be completed by the owner of the given release.
|
||||
|
||||
- [ ] Create release branch with major and minor only ( e.g. release/v0.X ) if it doesn't exist.
|
||||
- [ ] Update the `version` field in `waku.nimble` to match the release version (e.g. `version = "0.X.0"`) **and merge it before assigning any tag** - the `release-assets` workflow gates artifact build/upload.
|
||||
- [ ] Update the `version` field in `logos_delivery.nimble` to match the release version (e.g. `version = "0.X.0"`) **and merge it before assigning any tag** - the `release-assets` workflow gates artifact build/upload.
|
||||
- [ ] Assign release candidate tag to the release branch HEAD (e.g. `v0.X.0-rc.0`, `v0.X.0-rc.1`, ... `v0.X.0-rc.N`).
|
||||
- [ ] Generate and edit release notes in CHANGELOG.md.
|
||||
|
||||
|
||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
common:
|
||||
- '.github/workflows/**'
|
||||
- 'nimble.lock'
|
||||
- 'waku.nimble'
|
||||
- 'logos_delivery.nimble'
|
||||
- 'Makefile'
|
||||
- 'scripts/**'
|
||||
- 'flake.nix'
|
||||
@ -42,12 +42,11 @@ jobs:
|
||||
- 'library/**'
|
||||
- 'liblogosdelivery/**'
|
||||
v2:
|
||||
- 'waku/**'
|
||||
- 'logos_delivery/**'
|
||||
- 'apps/**'
|
||||
- 'tools/**'
|
||||
- 'tests/all_tests_v2.nim'
|
||||
- 'tests/**'
|
||||
- 'channels/**'
|
||||
docker:
|
||||
- 'docker/**'
|
||||
|
||||
@ -235,5 +234,5 @@ jobs:
|
||||
shopt -s extglob # Enable extended globbing
|
||||
NPH=$(make print-nph-path)
|
||||
echo "using nph at ${NPH}"
|
||||
"${NPH}" examples waku tests tools apps *.@(nim|nims|nimble)
|
||||
"${NPH}" examples logos_delivery tests tools apps *.@(nim|nims|nimble)
|
||||
git diff --exit-code
|
||||
|
||||
2
.github/workflows/container-image.yml
vendored
2
.github/workflows/container-image.yml
vendored
@ -15,7 +15,7 @@ env:
|
||||
NPROC: 2
|
||||
MAKEFLAGS: "-j${NPROC}"
|
||||
NIMFLAGS: "--parallelBuild:${NPROC}"
|
||||
# waku.nimble reads compile flags from NIM_PARAMS, not NIMFLAGS. Without
|
||||
# logos_delivery.nimble reads compile flags from NIM_PARAMS, not NIMFLAGS. Without
|
||||
# -d:disableMarchNative here, config.nims applies -march=native and
|
||||
# secp256k1 fails to compile.
|
||||
NIM_PARAMS: "-d:disableMarchNative"
|
||||
|
||||
4
.github/workflows/pr-lint.yml
vendored
4
.github/workflows/pr-lint.yml
vendored
@ -26,8 +26,8 @@ jobs:
|
||||
- 'apps/chat2bridge/config_chat2bridge.nim'
|
||||
|
||||
db_schema:
|
||||
- 'waku/waku_archive/driver/postgres_driver/postgres_driver.nim'
|
||||
- 'waku/waku_archive/driver/sqlite_driver/queries.nim'
|
||||
- 'logos_delivery/waku/waku_archive/driver/postgres_driver/postgres_driver.nim'
|
||||
- 'logos_delivery/waku/waku_archive/driver/sqlite_driver/queries.nim'
|
||||
- name: Comment config change
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
if: ${{steps.filter.outputs.config == 'true'}}
|
||||
|
||||
14
.github/workflows/release-assets.yml
vendored
14
.github/workflows/release-assets.yml
vendored
@ -11,7 +11,7 @@ env:
|
||||
NPROC: 2
|
||||
|
||||
jobs:
|
||||
# Release gate: the pushed tag MUST exactly match waku.nimble's version,
|
||||
# Release gate: the pushed tag MUST exactly match logos_delivery.nimble's version,
|
||||
# so every published artifact reports the correct getNodeInfo Version.
|
||||
# CI cannot reject/remove a tag, so we gate artifact build & upload on
|
||||
# this instead: a mismatched tag yields no released artifacts.
|
||||
@ -19,24 +19,24 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Assert pushed tag equals waku.nimble version
|
||||
- name: Assert pushed tag equals logos_delivery.nimble version
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
run: |
|
||||
set -euo pipefail
|
||||
NIMBLE_VERSION=$(grep -m1 '^version = ' waku.nimble | sed -E 's/version = "([^"]+)"/\1/')
|
||||
NIMBLE_VERSION=$(grep -m1 '^version = ' logos_delivery.nimble | sed -E 's/version = "([^"]+)"/\1/')
|
||||
# Strip leading v and any prerelease suffix (e.g. v0.38.0-rc.1 ->
|
||||
# 0.38.0) so release-candidate tags build against the same
|
||||
# waku.nimble version as the final tag.
|
||||
# logos_delivery.nimble version as the final tag.
|
||||
TAG_VERSION="${GITHUB_REF_NAME#v}"
|
||||
BASE_VERSION="${TAG_VERSION%%-*}"
|
||||
echo "tag: ${GITHUB_REF_NAME} (base ${BASE_VERSION})"
|
||||
echo "waku.nimble version: ${NIMBLE_VERSION}"
|
||||
echo "logos_delivery.nimble version: ${NIMBLE_VERSION}"
|
||||
if [ "${BASE_VERSION}" != "${NIMBLE_VERSION}" ]; then
|
||||
echo "::error::Tag ${GITHUB_REF_NAME} (base ${BASE_VERSION}) does not match"
|
||||
echo "::error::waku.nimble version (${NIMBLE_VERSION}). Bump waku.nimble before tagging."
|
||||
echo "::error::logos_delivery.nimble version (${NIMBLE_VERSION}). Bump logos_delivery.nimble before tagging."
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: tag base matches waku.nimble."
|
||||
echo "OK: tag base matches logos_delivery.nimble."
|
||||
|
||||
build-and-upload:
|
||||
needs: verify-version
|
||||
|
||||
16
.github/workflows/version-check.yml
vendored
16
.github/workflows/version-check.yml
vendored
@ -7,12 +7,12 @@ on:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
# PR check: waku.nimble version must be >= the nearest tag reachable from
|
||||
# PR check: logos_delivery.nimble version must be >= the nearest tag reachable from
|
||||
# this branch (`git describe --tags --abbrev=0`, i.e. ancestor-aware).
|
||||
# Because we check out the PR HEAD (not the simulated merge ref), a branch
|
||||
# that predates a release tag does not see that tag in its history, so a
|
||||
# newly pushed tag does NOT break in-flight PRs. Once the branch merges/
|
||||
# rebases past the tag, the bump is then enforced. This keeps waku.nimble
|
||||
# rebases past the tag, the bump is then enforced. This keeps logos_delivery.nimble
|
||||
# fixed as early as possible, independent of whether a release is cut.
|
||||
# The exact tag==nimble guarantee at release time lives in
|
||||
# release-assets.yml, which gates artifact publishing on it.
|
||||
@ -23,10 +23,10 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Compare waku.nimble version with nearest ancestor tag
|
||||
- name: Compare logos_delivery.nimble version with nearest ancestor tag
|
||||
run: |
|
||||
set -euo pipefail
|
||||
NIMBLE_VERSION=$(grep -m1 '^version = ' waku.nimble | sed -E 's/version = "([^"]+)"/\1/')
|
||||
NIMBLE_VERSION=$(grep -m1 '^version = ' logos_delivery.nimble | sed -E 's/version = "([^"]+)"/\1/')
|
||||
# Nearest tag reachable from HEAD; --abbrev=0 drops the -<n>-g<sha>
|
||||
# suffix so we get the bare tag (e.g. v0.38.0). `--match 'v*'` skips
|
||||
# the moving `nightly` tag (auto-updated by the daily CI to point at
|
||||
@ -36,7 +36,7 @@ jobs:
|
||||
BASE_TAG=${BASE_TAG#v}
|
||||
# Compare on the base version, ignoring any -rc.N prerelease suffix.
|
||||
BASE_TAG=${BASE_TAG%%-*}
|
||||
echo "waku.nimble version: ${NIMBLE_VERSION}"
|
||||
echo "logos_delivery.nimble version: ${NIMBLE_VERSION}"
|
||||
echo "ancestor git tag: ${BASE_TAG:-<none>}"
|
||||
if [ -z "${BASE_TAG}" ]; then
|
||||
echo "No ancestor release tag; skipping."
|
||||
@ -45,8 +45,8 @@ jobs:
|
||||
# lowest of the two by version sort must be the tag => nimble >= tag
|
||||
LOWEST=$(printf '%s\n%s\n' "${NIMBLE_VERSION}" "${BASE_TAG}" | sort -V | head -1)
|
||||
if [ "${LOWEST}" != "${BASE_TAG}" ] && [ "${NIMBLE_VERSION}" != "${BASE_TAG}" ]; then
|
||||
echo "::error::waku.nimble version (${NIMBLE_VERSION}) is behind its"
|
||||
echo "::error::ancestor git tag (v${BASE_TAG}). Bump 'version' in waku.nimble."
|
||||
echo "::error::logos_delivery.nimble version (${NIMBLE_VERSION}) is behind its"
|
||||
echo "::error::ancestor git tag (v${BASE_TAG}). Bump 'version' in logos_delivery.nimble."
|
||||
exit 1
|
||||
fi
|
||||
echo "OK: waku.nimble is not behind its ancestor tag."
|
||||
echo "OK: logos_delivery.nimble is not behind its ancestor tag."
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@
|
||||
/tags
|
||||
|
||||
# a symlink that can't be added to the repo because of Windows
|
||||
/logos_delivery.nims
|
||||
/waku.nims
|
||||
|
||||
# Ignore dynamic, static libs and libtool archive files
|
||||
|
||||
10
AGENTS.md
10
AGENTS.md
@ -78,7 +78,7 @@ type WakuFilter* = ref object of LPProtocol
|
||||
## Development Essentials
|
||||
|
||||
### Build Requirements
|
||||
- Nim 2.x (check `waku.nimble` for minimum version)
|
||||
- Nim 2.x (check `logos_delivery.nimble` for minimum version)
|
||||
- Rust toolchain (required for RLN dependencies)
|
||||
- Build system: Make driven by Nimble (dependencies pinned in `nimble.lock`)
|
||||
|
||||
@ -94,7 +94,7 @@ make wakunode2
|
||||
make wakunode2 NIMFLAGS="-d:chronicles_log_level=DEBUG"
|
||||
```
|
||||
|
||||
Note: The build uses `--mm:refc` memory management (passed automatically by the Nimble tasks in `waku.nimble`). Only relevant if compiling outside the standard build system.
|
||||
Note: The build uses `--mm:refc` memory management (passed automatically by the Nimble tasks in `logos_delivery.nimble`). Only relevant if compiling outside the standard build system.
|
||||
|
||||
### Common Make Targets
|
||||
```bash
|
||||
@ -476,7 +476,7 @@ nim c -r \
|
||||
|
||||
### Memory Management
|
||||
- Uses `refc` (reference counting with cycle collection)
|
||||
- Automatically enforced by the build system (hardcoded in `waku.nimble`)
|
||||
- Automatically enforced by the build system (hardcoded in `logos_delivery.nimble`)
|
||||
- Do not override unless absolutely necessary, as it breaks compatibility
|
||||
|
||||
### RLN Dependencies
|
||||
@ -489,7 +489,7 @@ Language: Nim 2.x | License: MIT or Apache 2.0
|
||||
|
||||
### Important Files
|
||||
- `Makefile` - Primary build interface
|
||||
- `waku.nimble` - Package definition and build tasks (invoked by the Makefile via Nimble)
|
||||
- `logos_delivery.nimble` - Package definition and build tasks (invoked by the Makefile via Nimble)
|
||||
- `nimble.lock` - Pinned dependency versions resolved into `nimbledeps/`
|
||||
- `waku/node/waku_node.nim` - Core node implementation
|
||||
- `apps/wakunode2/wakunode2.nim` - Main CLI application
|
||||
@ -511,7 +511,7 @@ Language: Nim 2.x | License: MIT or Apache 2.0
|
||||
- `presto` - REST server
|
||||
- `nimcrypto` - Cryptographic primitives
|
||||
|
||||
Note: For specific version requirements, check `waku.nimble`.
|
||||
Note: For specific version requirements, check `logos_delivery.nimble`.
|
||||
|
||||
<!-- gitnexus:start -->
|
||||
# GitNexus — Code Intelligence
|
||||
|
||||
31
Makefile
31
Makefile
@ -24,9 +24,14 @@ export PATH := $(HOME)/.nimble/bin:$(PATH)
|
||||
# NIM binary location
|
||||
NIM_BINARY := $(shell which nim 2>/dev/null)
|
||||
NPH := $(HOME)/.nimble/bin/nph
|
||||
|
||||
NIMBLE := nimble
|
||||
ifeq ($(detected_OS),Windows)
|
||||
# Resolve nimble via PATH (Windows has no $(HOME)/.nimble/bin); --useSystemNim
|
||||
# reuses the nim on PATH so nimble never re-clones the locked nim.
|
||||
NIMBLE := nimble --useSystemNim
|
||||
NIMBLE := nimble --useSystemNim
|
||||
endif
|
||||
|
||||
NIMBLEDEPS_STAMP := nimbledeps/.nimble-setup
|
||||
|
||||
# Compilation parameters
|
||||
@ -70,10 +75,10 @@ endif
|
||||
%:
|
||||
@true
|
||||
|
||||
waku.nims:
|
||||
ln -s waku.nimble $@
|
||||
logos_delivery.nims:
|
||||
ln -s logos_delivery.nimble $@
|
||||
|
||||
$(NIMBLEDEPS_STAMP): nimble.lock | install-nimble build-nph waku.nims
|
||||
$(NIMBLEDEPS_STAMP): nimble.lock | install-nimble build-nph logos_delivery.nims
|
||||
$(NIMBLE) setup --localdeps
|
||||
touch $@
|
||||
|
||||
@ -91,8 +96,8 @@ clean:
|
||||
rm nimble.paths 2> /dev/null || true
|
||||
nimble clean
|
||||
|
||||
REQUIRED_NIM_VERSION := $(shell grep -E '^const RequiredNimVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"')
|
||||
REQUIRED_NIMBLE_VERSION := $(shell grep -E '^const RequiredNimbleVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"')
|
||||
REQUIRED_NIM_VERSION := $(shell grep -E '^const RequiredNimVersion\s*=' logos_delivery.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"')
|
||||
REQUIRED_NIMBLE_VERSION := $(shell grep -E '^const RequiredNimbleVersion\s*=' logos_delivery.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"')
|
||||
|
||||
install-nim:
|
||||
ifneq ($(detected_OS),Windows)
|
||||
@ -218,7 +223,7 @@ testwaku: | build-deps build rln-deps librln
|
||||
$(NIMBLE) test
|
||||
|
||||
# Windows: build with nim directly — `nimble <task>` re-clones git deps every
|
||||
# build and they intermittently hang on the MSYS2 runner. Flags mirror waku.nimble.
|
||||
# build and they intermittently hang on the MSYS2 runner. Flags mirror logos_delivery.nimble.
|
||||
wakunode2: | build-deps build deps librln
|
||||
ifeq ($(detected_OS),Windows)
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
@ -266,7 +271,7 @@ lightpushwithmix: | build-deps build deps librln
|
||||
|
||||
api_example: | build-deps build deps librln
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(ENV_SCRIPT) nim api_example $(NIM_PARAMS) waku.nims
|
||||
$(ENV_SCRIPT) nim api_example $(NIM_PARAMS) logos_delivery.nims
|
||||
|
||||
build/%: | build-deps build deps librln
|
||||
echo -e $(BUILD_MSG) "build/$*" && \
|
||||
@ -336,7 +341,7 @@ clean:
|
||||
|
||||
docs: | build deps
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(NIMBLE) doc --run --index:on --project --out:.gh-pages waku/waku.nim waku.nims
|
||||
$(NIMBLE) doc --run --index:on --project --out:.gh-pages logos-delivery/logos-delivery.nim logos_delivery.nims
|
||||
|
||||
coverage:
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
@ -432,16 +437,16 @@ else ifeq ($(detected_OS),Linux)
|
||||
BUILD_COMMAND := $(BUILD_COMMAND)Linux
|
||||
endif
|
||||
|
||||
# Windows: build with nim directly (see wakunode2). Flags mirror waku.nimble.
|
||||
# Windows: build with nim directly (see wakunode2). Flags mirror logos_delivery.nimble.
|
||||
libwaku: | build-deps librln
|
||||
ifeq ($(detected_OS),Windows)
|
||||
nim c --out:build/libwaku.dll --threads:on --app:lib --opt:speed --noMain --mm:refc --header -d:metrics --nimMainPrefix:libwaku --skipParentCfg:off -d:discv5_protocol_id=d5waku --cpu:amd64 $(NIM_PARAMS) library/libwaku.nim
|
||||
else
|
||||
$(NIMBLE) --verbose libwaku$(BUILD_COMMAND) waku.nimble
|
||||
$(NIMBLE) --verbose libwaku$(BUILD_COMMAND) logos_delivery.nimble
|
||||
endif
|
||||
|
||||
liblogosdelivery: | build-deps librln
|
||||
$(NIMBLE) --verbose liblogosdelivery$(BUILD_COMMAND) waku.nimble
|
||||
$(NIMBLE) --verbose liblogosdelivery$(BUILD_COMMAND) logos_delivery.nimble
|
||||
|
||||
logosdelivery_example: | build liblogosdelivery
|
||||
@echo -e $(BUILD_MSG) "build/$@"
|
||||
@ -603,4 +608,4 @@ release-notes:
|
||||
-u $(shell id -u) \
|
||||
docker.io/wakuorg/sv4git:latest \
|
||||
release-notes |\
|
||||
sed -E 's@#([0-9]+)@[#\1](https://github.com/waku-org/nwaku/issues/\1)@g'
|
||||
sed -E 's@#([0-9]+)@[#\1](https://github.com/logos-messaging/logos-delivery/issues/\1)@g'
|
||||
|
||||
@ -2,7 +2,7 @@ import
|
||||
std/[strutils, times, sequtils, osproc], math, results, options, testutils/unittests
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_rln_relay/protocol_types,
|
||||
waku_rln_relay/rln,
|
||||
waku_rln_relay,
|
||||
|
||||
@ -31,7 +31,7 @@ import
|
||||
nameresolving/dnsresolver,
|
||||
] # define DNS resolution
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
waku_lightpush_legacy/common,
|
||||
waku_lightpush_legacy/rpc,
|
||||
@ -48,7 +48,7 @@ import
|
||||
./config_chat2
|
||||
|
||||
import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub
|
||||
import ../../waku/waku_rln_relay
|
||||
import ../../logos_delivery/waku/waku_rln_relay
|
||||
|
||||
const Help = """
|
||||
Commands: /[?|help|connect|nick|exit]
|
||||
|
||||
@ -10,7 +10,7 @@ import
|
||||
nimcrypto/utils,
|
||||
std/strutils,
|
||||
regex
|
||||
import waku/waku_core
|
||||
import logos_delivery/waku/waku_core
|
||||
|
||||
type
|
||||
Fleet* = enum
|
||||
|
||||
@ -15,7 +15,7 @@ import
|
||||
# Waku v2 imports
|
||||
libp2p/crypto/crypto,
|
||||
libp2p/errors,
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
waku_node,
|
||||
node/peer_manager,
|
||||
@ -242,7 +242,8 @@ proc stop*(cmb: Chat2MatterBridge) {.async: (raises: [Exception]).} =
|
||||
{.pop.}
|
||||
# @TODO confutils.nim(775, 17) Error: can raise an unlisted exception: ref IOError
|
||||
when isMainModule:
|
||||
import waku/common/utils/nat, waku/rest_api/message_cache
|
||||
import
|
||||
logos_delivery/waku/common/utils/nat, logos_delivery/waku/rest_api/message_cache
|
||||
|
||||
let
|
||||
rng = newRng()
|
||||
|
||||
@ -33,7 +33,7 @@ import
|
||||
protocols/mix/mix_protocol,
|
||||
] # define DNS resolution
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
waku_lightpush/common,
|
||||
waku_lightpush/rpc,
|
||||
@ -52,7 +52,7 @@ import
|
||||
./config_chat2mix
|
||||
|
||||
import libp2p/protocols/pubsub/rpc/messages, libp2p/protocols/pubsub/pubsub
|
||||
import ../../waku/waku_rln_relay
|
||||
import ../../logos_delivery/waku/waku_rln_relay
|
||||
|
||||
logScope:
|
||||
topics = "chat2 mix"
|
||||
|
||||
@ -12,7 +12,7 @@ import
|
||||
confutils/defs,
|
||||
confutils/std/net
|
||||
|
||||
import waku/waku_core, waku/waku_mix
|
||||
import logos_delivery/waku/waku_core, logos_delivery/waku/waku_mix
|
||||
|
||||
type
|
||||
Fleet* = enum
|
||||
|
||||
@ -8,14 +8,13 @@ import
|
||||
chronicles,
|
||||
chronos,
|
||||
metrics,
|
||||
libbacktrace,
|
||||
libp2p/crypto/crypto,
|
||||
confutils,
|
||||
libp2p/wire
|
||||
|
||||
import
|
||||
tools/confutils/cli_args,
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
node/peer_manager,
|
||||
waku_lightpush/common,
|
||||
waku_relay,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import chronos, results, options
|
||||
import waku/[waku_node, waku_core]
|
||||
import logos_delivery/waku/[waku_node, waku_core]
|
||||
import publisher_base
|
||||
|
||||
type LegacyPublisher* = ref object of PublisherBase
|
||||
|
||||
@ -5,14 +5,13 @@ import
|
||||
chronicles,
|
||||
chronos,
|
||||
metrics,
|
||||
libbacktrace,
|
||||
system/ansi_c,
|
||||
libp2p/crypto/crypto,
|
||||
confutils
|
||||
|
||||
import
|
||||
tools/confutils/cli_args,
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/enr,
|
||||
common/logging,
|
||||
factory/waku as waku_factory,
|
||||
@ -156,7 +155,7 @@ when isMainModule:
|
||||
when defined(posix):
|
||||
proc handleSigsegv(signal: cint) {.noconv.} =
|
||||
# Require --debugger:native
|
||||
fatal "Shutting down after receiving SIGSEGV", stacktrace = getBacktrace()
|
||||
fatal "Shutting down after receiving SIGSEGV"
|
||||
|
||||
# Not available in -d:release mode
|
||||
writeStackTrace()
|
||||
|
||||
@ -8,7 +8,7 @@ import
|
||||
results,
|
||||
json_serialization as js
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
waku_node,
|
||||
node/peer_manager,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import chronos, results
|
||||
import waku/[waku_node, waku_core]
|
||||
import logos_delivery/waku/[waku_node, waku_core]
|
||||
|
||||
type PublisherBase* = ref object of RootObj
|
||||
wakuNode*: WakuNode
|
||||
|
||||
@ -13,7 +13,7 @@ import
|
||||
json_serialization as js
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
waku_node,
|
||||
|
||||
@ -5,14 +5,13 @@ import
|
||||
chronicles,
|
||||
chronos,
|
||||
metrics,
|
||||
libbacktrace,
|
||||
libp2p/crypto/crypto,
|
||||
confutils,
|
||||
libp2p/wire
|
||||
|
||||
import
|
||||
tools/confutils/cli_args,
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/enr,
|
||||
waku_node,
|
||||
node/peer_manager,
|
||||
|
||||
@ -14,7 +14,7 @@ import
|
||||
import
|
||||
../../tools/confutils/
|
||||
[cli_args, envvar as confEnvvarDefs, envvar_net as confEnvvarNet],
|
||||
waku/[common/logging, waku_core, waku_core/topics/pubsub_topic]
|
||||
logos_delivery/waku/[common/logging, waku_core, waku_core/topics/pubsub_topic]
|
||||
|
||||
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import
|
||||
json_serialization/std/options,
|
||||
json_serialization/lexer
|
||||
|
||||
import waku/rest_api/endpoint/serdes
|
||||
import logos_delivery/waku/rest_api/endpoint/serdes
|
||||
|
||||
type ProtocolTesterMessage* = object
|
||||
sender*: string
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import results, options, chronos
|
||||
import waku/[waku_node, waku_core, waku_lightpush, waku_lightpush/common]
|
||||
import logos_delivery/waku/[waku_node, waku_core, waku_lightpush, waku_lightpush/common]
|
||||
import publisher_base
|
||||
|
||||
type V3Publisher* = ref object of PublisherBase
|
||||
|
||||
@ -17,7 +17,7 @@ import
|
||||
metrics/chronos_httpserver,
|
||||
presto/[route, server, client]
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
node/peer_manager,
|
||||
waku_node,
|
||||
|
||||
@ -12,10 +12,11 @@ import
|
||||
libp2p/multicodec
|
||||
import
|
||||
./certsgenerator,
|
||||
waku/[waku_enr, node/peer_manager, waku_core, waku_node, factory/builder],
|
||||
waku/net/net_config,
|
||||
waku/waku_metadata/protocol,
|
||||
waku/common/callbacks
|
||||
logos_delivery/waku/
|
||||
[waku_enr, node/peer_manager, waku_core, waku_node, factory/builder],
|
||||
logos_delivery/waku/net/net_config,
|
||||
logos_delivery/waku/waku_metadata/protocol,
|
||||
logos_delivery/waku/common/callbacks
|
||||
|
||||
# protocols and their tag
|
||||
const ProtocolsTable = {
|
||||
|
||||
@ -9,7 +9,7 @@ import
|
||||
libp2p/crypto/crypto
|
||||
import
|
||||
../../tools/[rln_keystore_generator/rln_keystore_generator, confutils/cli_args],
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
factory/waku,
|
||||
node/health_monitor,
|
||||
|
||||
@ -124,13 +124,13 @@ def versionWasChanged(version) {
|
||||
script: "git diff --name-only origin/${env.CHANGE_TARGET}",
|
||||
returnStdout: true
|
||||
)
|
||||
if (changes =~ "(?m)^(Makefile|waku.nimble|config.nims|vendor|ci|shell.nix).*") {
|
||||
if (changes =~ "(?m)^(Makefile|logos_delivery.nimble|config.nims|vendor|ci|shell.nix).*") {
|
||||
return true
|
||||
}
|
||||
if (version == 'v2' && changes =~ "(?m)^(apps|tools)/.*") {
|
||||
return true
|
||||
}
|
||||
if (changes =~ "(?m)^(waku|tests|examples)/(${version}|common)/.*") {
|
||||
if (changes =~ "(?m)^(logos_delivery|tests|examples)/(${version}|common)/.*") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import std/options
|
||||
import chronos, results, confutils, confutils/defs
|
||||
import waku
|
||||
import logos_delivery
|
||||
|
||||
type CliArgs = object
|
||||
ethRpcEndpoint* {.
|
||||
|
||||
@ -9,7 +9,7 @@ import
|
||||
eth/p2p/discoveryv5/enr
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
waku_core,
|
||||
|
||||
@ -16,7 +16,7 @@ import
|
||||
metrics/chronos_httpserver
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
waku_core,
|
||||
|
||||
@ -5,7 +5,7 @@ import
|
||||
libp2p/multicodec,
|
||||
nimcrypto/utils as ncrutils
|
||||
|
||||
import waku/waku_mix
|
||||
import logos_delivery/waku/waku_mix
|
||||
|
||||
type LightPushMixConf* = object
|
||||
destPeerAddr* {.desc: "Destination peer address with peerId.", name: "dp-addr".}:
|
||||
|
||||
@ -10,7 +10,7 @@ import
|
||||
eth/p2p/discoveryv5/enr
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
waku_core,
|
||||
|
||||
@ -9,7 +9,7 @@ import
|
||||
eth/p2p/discoveryv5/enr
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
waku_core,
|
||||
|
||||
@ -9,7 +9,7 @@ import
|
||||
eth/p2p/discoveryv5/enr
|
||||
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
common/logging,
|
||||
node/peer_manager,
|
||||
waku_core,
|
||||
|
||||
@ -1,18 +1,17 @@
|
||||
{.push raises: [].}
|
||||
|
||||
import tools/confutils/cli_args
|
||||
import waku/[common/logging, factory/[waku, networks_config]]
|
||||
import logos_delivery/waku/[common/logging, factory/[waku, networks_config]]
|
||||
import
|
||||
std/[options, strutils, os, sequtils],
|
||||
chronicles,
|
||||
chronos,
|
||||
metrics,
|
||||
libbacktrace,
|
||||
libp2p/crypto/crypto
|
||||
|
||||
export
|
||||
networks_config, waku, logging, options, strutils, os, sequtils, stewNet, chronicles,
|
||||
chronos, metrics, libbacktrace, crypto
|
||||
chronos, metrics, crypto
|
||||
|
||||
proc setup*(): Waku =
|
||||
const versionString = "version / git commit hash: " & waku.git_version
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import
|
||||
results,
|
||||
waku/[common/logging, waku_node, waku_rln_relay],
|
||||
logos_delivery/waku/[common/logging, waku_node, waku_rln_relay],
|
||||
./erc_5564_interface as StealthCommitmentFFI,
|
||||
./node_spec,
|
||||
./wire_spec
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import std/[times, options]
|
||||
import confutils, chronicles, chronos, results
|
||||
|
||||
import waku/[waku_core, common/protobuf]
|
||||
import logos_delivery/waku/[waku_core, common/protobuf]
|
||||
import libp2p/protobuf/minprotobuf
|
||||
|
||||
export
|
||||
|
||||
@ -32,11 +32,11 @@
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
# Single source of truth for the semver: the `version` field of
|
||||
# waku.nimble. Kept in sync with git tags by the version-check CI.
|
||||
# logos_delivery.nimble. Kept in sync with git tags by the version-check CI.
|
||||
nimbleVersion =
|
||||
let line = lib.findFirst (l: lib.hasPrefix "version = " l)
|
||||
"version = \"unknown\""
|
||||
(lib.splitString "\n" (builtins.readFile ./waku.nimble));
|
||||
(lib.splitString "\n" (builtins.readFile ./logos_delivery.nimble));
|
||||
in lib.removeSuffix "\"" (lib.removePrefix "version = \"" line);
|
||||
|
||||
# A flake sandbox has no .git, so `git describe` is impossible; the
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import ffi
|
||||
import std/locks
|
||||
import waku/factory/waku
|
||||
import logos_delivery/waku/factory/waku
|
||||
|
||||
declareLibrary("logosdelivery")
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import std/[atomics, options]
|
||||
import chronicles, chronos, chronos/threadsync, ffi
|
||||
import waku/factory/waku, waku/node/waku_node, ./declare_lib
|
||||
import
|
||||
logos_delivery/waku/factory/waku, logos_delivery/waku/node/waku_node, ./declare_lib
|
||||
|
||||
################################################################################
|
||||
## Include different APIs, i.e. all procs with {.ffi.} pragma
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import std/[json, strutils]
|
||||
import waku/factory/waku_state_info
|
||||
import logos_delivery/waku/factory/waku_state_info
|
||||
import tools/confutils/[cli_args, config_option_meta]
|
||||
|
||||
proc logosdelivery_get_available_node_info_ids(
|
||||
|
||||
@ -2,10 +2,10 @@ import std/[json]
|
||||
import chronos, results, ffi
|
||||
import stew/byteutils
|
||||
import
|
||||
waku/common/base64,
|
||||
waku/factory/waku,
|
||||
waku/waku_core/topics/content_topic,
|
||||
waku/api/[api, types],
|
||||
logos_delivery/waku/common/base64,
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/waku_core/topics/content_topic,
|
||||
logos_delivery/waku/api/[api, types],
|
||||
../declare_lib
|
||||
|
||||
proc logosdelivery_subscribe(
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import std/[json, strutils, tables]
|
||||
import chronos, chronicles, results, confutils, confutils/std/net, ffi
|
||||
import
|
||||
waku/factory/waku,
|
||||
waku/node/waku_node,
|
||||
waku/api/[api, types],
|
||||
waku/events/[message_events, health_events],
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/node/waku_node,
|
||||
logos_delivery/waku/api/[api, types],
|
||||
logos_delivery/waku/events/[message_events, health_events],
|
||||
tools/confutils/cli_args,
|
||||
../declare_lib,
|
||||
../json_event
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import ffi
|
||||
import waku/factory/waku
|
||||
import logos_delivery/waku/factory/waku
|
||||
|
||||
declareLibrary("waku")
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import system, std/json, libp2p/[connmanager, peerid]
|
||||
|
||||
import ../../waku/common/base64, ./json_base_event
|
||||
import ../../logos_delivery/waku/common/base64, ./json_base_event
|
||||
|
||||
type JsonConnectionChangeEvent* = ref object of JsonEvent
|
||||
peerId*: string
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
import system, std/json
|
||||
import ./json_base_event
|
||||
import ../../waku/api/types
|
||||
import ../../logos_delivery/waku/api/types
|
||||
|
||||
type JsonConnectionStatusChangeEvent* = ref object of JsonEvent
|
||||
status*: ConnectionStatus
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import system, results, std/json, std/strutils
|
||||
import stew/byteutils
|
||||
import
|
||||
../../waku/common/base64,
|
||||
../../waku/waku_core/message,
|
||||
../../waku/waku_core/message/message,
|
||||
../../logos_delivery/waku/common/base64,
|
||||
../../logos_delivery/waku/waku_core/message,
|
||||
../../logos_delivery/waku/waku_core/message/message,
|
||||
../utils,
|
||||
./json_base_event
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import system, results, std/json
|
||||
import stew/byteutils
|
||||
import ../../waku/common/base64, ./json_base_event
|
||||
import ../../waku/waku_relay
|
||||
import ../../logos_delivery/waku/common/base64, ./json_base_event
|
||||
import ../../logos_delivery/waku/waku_relay
|
||||
|
||||
type JsonTopicHealthChangeEvent* = ref object of JsonEvent
|
||||
pubsubTopic*: string
|
||||
|
||||
@ -9,7 +9,10 @@ import
|
||||
metrics,
|
||||
ffi
|
||||
import
|
||||
waku/factory/waku, waku/node/waku_node, waku/node/health_monitor, library/declare_lib
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/node/waku_node,
|
||||
logos_delivery/waku/node/health_monitor,
|
||||
library/declare_lib
|
||||
|
||||
proc getMultiaddresses(node: WakuNode): seq[string] =
|
||||
return node.info().listenAddresses
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import std/json
|
||||
import chronos, chronicles, results, strutils, libp2p/multiaddress, ffi
|
||||
import
|
||||
waku/factory/waku,
|
||||
waku/discovery/waku_dnsdisc,
|
||||
waku/discovery/waku_discv5,
|
||||
waku/waku_core/peers,
|
||||
waku/waku_node,
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/discovery/waku_dnsdisc,
|
||||
logos_delivery/waku/discovery/waku_discv5,
|
||||
logos_delivery/waku/waku_core/peers,
|
||||
logos_delivery/waku/waku_node,
|
||||
library/declare_lib
|
||||
|
||||
proc retrieveBootstrapNodes(
|
||||
|
||||
@ -2,12 +2,12 @@ import std/[options, json, strutils, net]
|
||||
import chronos, chronicles, results, confutils, confutils/std/net, ffi
|
||||
|
||||
import
|
||||
waku/node/peer_manager/peer_manager,
|
||||
logos_delivery/waku/node/peer_manager/peer_manager,
|
||||
tools/confutils/cli_args,
|
||||
waku/factory/waku,
|
||||
waku/factory/node_factory,
|
||||
waku/factory/app_callbacks,
|
||||
waku/rest_api/endpoint/builder,
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/factory/node_factory,
|
||||
logos_delivery/waku/factory/app_callbacks,
|
||||
logos_delivery/waku/rest_api/endpoint/builder,
|
||||
library/declare_lib
|
||||
|
||||
proc createWaku(
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
import std/[sequtils, strutils, tables]
|
||||
import chronicles, chronos, results, options, json, ffi
|
||||
import waku/factory/waku, waku/node/waku_node, waku/node/peer_manager, ../declare_lib
|
||||
import
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/node/waku_node,
|
||||
logos_delivery/waku/node/peer_manager,
|
||||
../declare_lib
|
||||
|
||||
type PeerInfo = object
|
||||
protocols: seq[string]
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import std/[json, strutils]
|
||||
import chronos, results, ffi
|
||||
import libp2p/[protocols/ping, switch, multiaddress, multicodec]
|
||||
import waku/[factory/waku, waku_core/peers, node/waku_node], library/declare_lib
|
||||
import
|
||||
logos_delivery/waku/[factory/waku, waku_core/peers, node/waku_node],
|
||||
library/declare_lib
|
||||
|
||||
proc waku_ping_peer(
|
||||
ctx: ptr FFIContext[Waku],
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
import options, std/[strutils, sequtils]
|
||||
import chronicles, chronos, results, ffi
|
||||
import
|
||||
waku/waku_filter_v2/client,
|
||||
waku/waku_core/message/message,
|
||||
waku/factory/waku,
|
||||
waku/waku_relay,
|
||||
waku/waku_filter_v2/common,
|
||||
waku/waku_core/subscription/push_handler,
|
||||
waku/node/peer_manager/peer_manager,
|
||||
waku/waku_node,
|
||||
waku/waku_core/topics/pubsub_topic,
|
||||
waku/waku_core/topics/content_topic,
|
||||
logos_delivery/waku/waku_filter_v2/client,
|
||||
logos_delivery/waku/waku_core/message/message,
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/waku_relay,
|
||||
logos_delivery/waku/waku_filter_v2/common,
|
||||
logos_delivery/waku/waku_core/subscription/push_handler,
|
||||
logos_delivery/waku/node/peer_manager/peer_manager,
|
||||
logos_delivery/waku/waku_node,
|
||||
logos_delivery/waku/waku_core/topics/pubsub_topic,
|
||||
logos_delivery/waku/waku_core/topics/content_topic,
|
||||
library/events/json_message_event,
|
||||
library/declare_lib
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import options, std/[json, strformat]
|
||||
import chronicles, chronos, results, ffi
|
||||
import
|
||||
waku/waku_core/message/message,
|
||||
waku/waku_core/codecs,
|
||||
waku/factory/waku,
|
||||
waku/waku_core/message,
|
||||
waku/waku_core/topics/pubsub_topic,
|
||||
waku/waku_lightpush_legacy/client,
|
||||
waku/node/peer_manager/peer_manager,
|
||||
logos_delivery/waku/waku_core/message/message,
|
||||
logos_delivery/waku/waku_core/codecs,
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/waku_core/message,
|
||||
logos_delivery/waku/waku_core/topics/pubsub_topic,
|
||||
logos_delivery/waku/waku_lightpush_legacy/client,
|
||||
logos_delivery/waku/node/peer_manager/peer_manager,
|
||||
library/events/json_message_event,
|
||||
library/declare_lib
|
||||
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
import std/[net, sequtils, strutils, json], strformat
|
||||
import chronicles, chronos, stew/byteutils, results, ffi
|
||||
import
|
||||
waku/waku_core/message/message,
|
||||
waku/factory/[validator_signed, waku],
|
||||
logos_delivery/waku/waku_core/message/message,
|
||||
logos_delivery/waku/factory/[validator_signed, waku],
|
||||
tools/confutils/cli_args,
|
||||
waku/waku_core/message,
|
||||
waku/waku_core/topics/pubsub_topic,
|
||||
waku/waku_core/topics,
|
||||
waku/node/waku_node/relay,
|
||||
waku/waku_relay/protocol,
|
||||
waku/node/peer_manager,
|
||||
logos_delivery/waku/waku_core/message,
|
||||
logos_delivery/waku/waku_core/topics/pubsub_topic,
|
||||
logos_delivery/waku/waku_core/topics,
|
||||
logos_delivery/waku/node/waku_node/relay,
|
||||
logos_delivery/waku/waku_relay/protocol,
|
||||
logos_delivery/waku/node/peer_manager,
|
||||
library/events/json_message_event,
|
||||
library/declare_lib
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import std/[json, sugar, strutils, options]
|
||||
import chronos, chronicles, results, stew/byteutils, ffi
|
||||
import
|
||||
waku/factory/waku,
|
||||
logos_delivery/waku/factory/waku,
|
||||
library/utils,
|
||||
waku/waku_core/peers,
|
||||
waku/waku_core/message/digest,
|
||||
waku/waku_store/common,
|
||||
waku/waku_store/client,
|
||||
waku/common/paging,
|
||||
logos_delivery/waku/waku_core/peers,
|
||||
logos_delivery/waku/waku_core/message/digest,
|
||||
logos_delivery/waku/waku_store/common,
|
||||
logos_delivery/waku/waku_store/client,
|
||||
logos_delivery/waku/common/paging,
|
||||
library/declare_lib
|
||||
|
||||
func fromJsonNode(jsonContent: JsonNode): Result[StoreQueryRequest, string] =
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import std/[atomics, options, atomics, macros]
|
||||
import chronicles, chronos, chronos/threadsync, ffi
|
||||
import
|
||||
waku/waku_core/message/message,
|
||||
waku/waku_core/topics/pubsub_topic,
|
||||
waku/waku_relay,
|
||||
logos_delivery/waku/waku_core/message/message,
|
||||
logos_delivery/waku/waku_core/topics/pubsub_topic,
|
||||
logos_delivery/waku/waku_relay,
|
||||
./events/json_message_event,
|
||||
./events/json_topic_health_change_event,
|
||||
./events/json_connection_change_event,
|
||||
./events/json_connection_status_change_event,
|
||||
../waku/factory/app_callbacks,
|
||||
waku/factory/waku,
|
||||
waku/node/waku_node,
|
||||
waku/node/health_monitor/health_status,
|
||||
../logos_delivery/waku/factory/app_callbacks,
|
||||
logos_delivery/waku/factory/waku,
|
||||
logos_delivery/waku/node/waku_node,
|
||||
logos_delivery/waku/node/health_monitor/health_status,
|
||||
./declare_lib
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
## This module re-exports the public API for creating and managing Waku nodes
|
||||
## when using nwaku as a library dependency.
|
||||
|
||||
import waku/api
|
||||
import logos_delivery/waku/api
|
||||
export api
|
||||
|
||||
import waku/factory/waku
|
||||
import logos_delivery/waku/factory/waku
|
||||
export waku
|
||||
@ -6,8 +6,9 @@ mode = ScriptMode.Verbose
|
||||
### Package
|
||||
version = "0.38.1"
|
||||
author = "Status Research & Development GmbH"
|
||||
description = "Waku, Private P2P Messaging for Resource-Restricted Devices"
|
||||
description = "Logos-delivery, Private P2P Messaging for Resource-Restricted Devices"
|
||||
license = "MIT or Apache License 2.0"
|
||||
skipDirs = @["tests", "examples", "tools", "apps", "simulations", "metrics"]
|
||||
|
||||
const RequiredNimVersion = "2.2.4"
|
||||
## This is the nim compiler version that we are working on. Other versions may behave differently.
|
||||
@ -9,7 +9,7 @@
|
||||
## no analogue in the lower layer (reassembled application payload,
|
||||
## senderId, channelId), so it lives here.
|
||||
|
||||
import waku/events/message_events as waku_message_events
|
||||
import logos_delivery/waku/events/message_events as waku_message_events
|
||||
import brokers/event_broker
|
||||
|
||||
import ./types as channel_types
|
||||
@ -20,9 +20,9 @@ import bearssl/rand
|
||||
import stew/byteutils
|
||||
import libp2p/crypto/crypto as libp2p_crypto
|
||||
|
||||
import waku/api/types
|
||||
import waku/node/delivery_service/send_service
|
||||
import waku/waku_core/topics
|
||||
import logos_delivery/waku/api/types
|
||||
import logos_delivery/messaging/delivery_service/send_service
|
||||
import logos_delivery/waku/waku_core/topics
|
||||
|
||||
import ./events
|
||||
import ./segmentation/segmentation
|
||||
@ -277,7 +277,9 @@ proc onReadyToSend(
|
||||
MessageErrorEvent.emit(
|
||||
self.brokerCtx,
|
||||
MessageErrorEvent(
|
||||
requestId: channelReqId, messageHash: "", error: "messaging send failed: " & error
|
||||
requestId: channelReqId,
|
||||
messageHash: "",
|
||||
error: "messaging send failed: " & error,
|
||||
),
|
||||
)
|
||||
self.markSegmentFailed(channelReqId)
|
||||
@ -12,9 +12,9 @@ import stew/byteutils
|
||||
|
||||
import brokers/broker_context
|
||||
|
||||
import waku/events/message_events as waku_message_events
|
||||
import waku/messaging_client
|
||||
import waku/waku_core/topics
|
||||
import logos_delivery/waku/events/message_events as waku_message_events
|
||||
import logos_delivery/messaging/messaging_client
|
||||
import logos_delivery/waku/waku_core/topics
|
||||
|
||||
import ./reliable_channel
|
||||
import ./encryption/noop_encryption
|
||||
@ -23,8 +23,7 @@ export reliable_channel
|
||||
|
||||
type ReliableChannelManager* = ref object
|
||||
channels: Table[ChannelId, ReliableChannel]
|
||||
messagingClient: MessagingClient
|
||||
## Borrowed from the owning `Waku`.
|
||||
messagingClient: MessagingClient ## Borrowed from the owning `Waku`.
|
||||
sendHandler: SendHandler
|
||||
## Default egress dispatch for channels created through this manager.
|
||||
## Constructed at mount time as a closure over `MessagingClient.send`
|
||||
@ -97,11 +96,7 @@ proc createReliableChannel*(
|
||||
epochPeriodSec: DefaultEpochPeriodSec, messagesPerEpoch: DefaultMessagesPerEpoch
|
||||
)
|
||||
|
||||
let effectiveSendHandler =
|
||||
if sendHandler.isNil():
|
||||
self.sendHandler
|
||||
else:
|
||||
sendHandler
|
||||
let effectiveSendHandler = if sendHandler.isNil(): self.sendHandler else: sendHandler
|
||||
|
||||
let chn = ReliableChannel.new(
|
||||
sendHandler = effectiveSendHandler,
|
||||
@ -1,7 +1,7 @@
|
||||
## Core identifier types for the Reliable Channel API.
|
||||
|
||||
import std/hashes
|
||||
import waku/api/types as api_types
|
||||
import logos_delivery/waku/api/types as api_types
|
||||
|
||||
import ./scalable_data_sync/scalable_data_sync
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
{.push raises: [].}
|
||||
|
||||
import std/[tables, strutils, os], results, chronicles
|
||||
import ../../../common/databases/db_sqlite, ../../../common/databases/common
|
||||
import
|
||||
logos_delivery/waku/common/databases/db_sqlite,
|
||||
logos_delivery/waku/common/databases/common
|
||||
|
||||
logScope:
|
||||
topics = "waku node delivery_service"
|
||||
@ -9,9 +9,9 @@
|
||||
|
||||
import results
|
||||
import
|
||||
../../../common/databases/db_sqlite,
|
||||
../../../waku_core/message/message,
|
||||
../../../node/delivery_service/not_delivered_storage/migrations
|
||||
logos_delivery/waku/common/databases/db_sqlite,
|
||||
logos_delivery/waku/waku_core/message/message,
|
||||
./migrations
|
||||
|
||||
const NotDeliveredMessagesDbUrl = "not-delivered-messages.db"
|
||||
|
||||
@ -6,7 +6,7 @@ import std/[tables, sequtils, options, sets]
|
||||
import chronos, chronicles, libp2p/utility
|
||||
import brokers/broker_context
|
||||
import
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
waku_core/topics,
|
||||
waku_store/client,
|
||||
@ -1,6 +1,9 @@
|
||||
import std/[options, times], chronos
|
||||
import brokers/broker_context
|
||||
import waku/waku_core, waku/api/types, waku/requests/node_requests
|
||||
import
|
||||
logos_delivery/waku/waku_core,
|
||||
logos_delivery/waku/api/types,
|
||||
logos_delivery/waku/requests/node_requests
|
||||
|
||||
type DeliveryState* {.pure.} = enum
|
||||
Entry
|
||||
@ -1,7 +1,10 @@
|
||||
import chronicles, chronos, results
|
||||
import std/options
|
||||
import brokers/broker_context
|
||||
import waku/node/peer_manager, waku/waku_core, waku/waku_lightpush/[common, client, rpc]
|
||||
import
|
||||
logos_delivery/waku/node/peer_manager,
|
||||
logos_delivery/waku/waku_core,
|
||||
logos_delivery/waku/waku_lightpush/[common, client, rpc]
|
||||
|
||||
import ./[delivery_task, send_processor]
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import std/options
|
||||
import chronos, chronicles
|
||||
import brokers/broker_context
|
||||
import waku/[waku_core], waku/waku_lightpush/[common, rpc]
|
||||
import waku/requests/health_requests
|
||||
import waku/api/types
|
||||
import logos_delivery/waku/[waku_core], logos_delivery/waku/waku_lightpush/[common, rpc]
|
||||
import logos_delivery/waku/requests/health_requests
|
||||
import logos_delivery/waku/api/types
|
||||
import ./[delivery_task, send_processor]
|
||||
|
||||
logScope:
|
||||
@ -1,12 +1,12 @@
|
||||
## This module reinforces the publish operation with regular store-v3 requests.
|
||||
##
|
||||
|
||||
import std/[sequtils, tables, options]
|
||||
import std/[sequtils, tables, options, typetraits]
|
||||
import chronos, chronicles, libp2p/utility
|
||||
import brokers/broker_context
|
||||
import
|
||||
./[send_processor, relay_processor, lightpush_processor, delivery_task],
|
||||
waku/[
|
||||
logos_delivery/waku/[
|
||||
waku_core,
|
||||
node/waku_node,
|
||||
node/subscription_manager,
|
||||
@ -1,14 +1,10 @@
|
||||
import results, chronos
|
||||
import chronicles
|
||||
import
|
||||
./api/types,
|
||||
./node/[
|
||||
waku_node,
|
||||
subscription_manager,
|
||||
delivery_service/recv_service,
|
||||
delivery_service/send_service,
|
||||
delivery_service/send_service/delivery_task,
|
||||
]
|
||||
logos_delivery/waku/api/types,
|
||||
logos_delivery/waku/node/[waku_node, subscription_manager],
|
||||
logos_delivery/messaging/delivery_service/[recv_service, send_service],
|
||||
logos_delivery/messaging/delivery_service/send_service/delivery_task
|
||||
|
||||
type MessagingClient* = ref object
|
||||
node: WakuNode
|
||||
@ -1,12 +1,12 @@
|
||||
import chronicles, chronos, results
|
||||
|
||||
import waku/factory/waku
|
||||
import waku/messaging_client
|
||||
import waku/[requests/health_requests, waku_core, waku_node]
|
||||
import waku/node/delivery_service/send_service
|
||||
import waku/node/subscription_manager
|
||||
import logos_delivery/waku/factory/waku
|
||||
import logos_delivery/messaging/messaging_client
|
||||
import logos_delivery/waku/[requests/health_requests, waku_core, waku_node]
|
||||
import logos_delivery/messaging/delivery_service/send_service
|
||||
import logos_delivery/waku/node/subscription_manager
|
||||
import libp2p/peerid
|
||||
import ../../tools/confutils/cli_args
|
||||
import tools/confutils/cli_args
|
||||
import ./[api_conf, types]
|
||||
|
||||
export cli_args
|
||||
@ -4,11 +4,11 @@ import results
|
||||
import json_serialization, json_serialization/std/options as json_options
|
||||
|
||||
import
|
||||
waku/common/utils/parse_size_units,
|
||||
waku/common/logging,
|
||||
waku/factory/waku_conf,
|
||||
waku/factory/conf_builder/conf_builder,
|
||||
waku/factory/networks_config,
|
||||
logos_delivery/waku/common/utils/parse_size_units,
|
||||
logos_delivery/waku/common/logging,
|
||||
logos_delivery/waku/factory/waku_conf,
|
||||
logos_delivery/waku/factory/conf_builder/conf_builder,
|
||||
logos_delivery/waku/factory/networks_config,
|
||||
tools/confutils/entry_nodes
|
||||
|
||||
export json_serialization, json_options
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
import bearssl/rand, std/times, chronos
|
||||
import stew/byteutils
|
||||
import waku/utils/requests as request_utils
|
||||
import waku/waku_core/[topics/content_topic, message/message, time]
|
||||
import waku/requests/requests
|
||||
import logos_delivery/waku/utils/requests as request_utils
|
||||
import logos_delivery/waku/waku_core/[topics/content_topic, message/message, time]
|
||||
import logos_delivery/waku/requests/requests
|
||||
|
||||
type
|
||||
MessageEnvelope* = object
|
||||
@ -1,4 +1,6 @@
|
||||
import waku/waku_enr/capabilities, waku/waku_rendezvous/waku_peer_record
|
||||
import
|
||||
logos_delivery/waku/waku_enr/capabilities,
|
||||
logos_delivery/waku/waku_rendezvous/waku_peer_record
|
||||
|
||||
type GetShards* = proc(): seq[uint16] {.closure, gcsafe, raises: [].}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user