mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-08-04 10:53:19 +00:00
WIP folder restructure to make it a true logos_delivery library: main source folder is now logos_delivery that includes waku, messaging, channles. - NOTICE it not yet builds
This commit is contained in:
parent
18e17d2ddd
commit
2b09c42d81
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.
|
||||
|
||||
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
common:
|
||||
- '.github/workflows/**'
|
||||
- 'nimble.lock'
|
||||
- 'waku.nimble'
|
||||
- 'logos_delivery.nimble'
|
||||
- 'Makefile'
|
||||
- 'scripts/**'
|
||||
- 'flake.nix'
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
|
||||
24
Makefile
24
Makefile
@ -70,10 +70,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 +91,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 +218,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 +266,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 +336,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 +432,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 +603,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'
|
||||
|
||||
@ -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,7 +124,7 @@ 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)/.*") {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
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