mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-05-11 21:09:27 +00:00
Merge remote-tracking branch 'origin/master' into feat/zero-default-ports
This commit is contained in:
commit
c842eaa9ee
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -36,6 +36,7 @@ jobs:
|
||||
- 'waku.nimble'
|
||||
- 'Makefile'
|
||||
- 'library/**'
|
||||
- 'liblogosdelivery/**'
|
||||
v2:
|
||||
- 'waku/**'
|
||||
- 'apps/**'
|
||||
|
||||
2
.github/workflows/container-image.yml
vendored
2
.github/workflows/container-image.yml
vendored
@ -83,7 +83,7 @@ jobs:
|
||||
id: build
|
||||
if: ${{ steps.secrets.outcome == 'success' }}
|
||||
run: |
|
||||
make -j${NPROC} V=1 NIMFLAGS="-d:disableMarchNative -d:postgres -d:chronicles_colors:none" wakunode2
|
||||
make -j${NPROC} V=1 POSTGRES=1 NIMFLAGS="-d:disableMarchNative -d:chronicles_colors:none" wakunode2
|
||||
|
||||
SHORT_REF=$(git rev-parse --short HEAD)
|
||||
|
||||
|
||||
4
.github/workflows/pre-release.yml
vendored
4
.github/workflows/pre-release.yml
vendored
@ -66,8 +66,8 @@ jobs:
|
||||
make V=1 CI=false NIMFLAGS="-d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" \
|
||||
update
|
||||
|
||||
make V=1 CI=false\
|
||||
NIMFLAGS="-d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}} -d:postgres" \
|
||||
make V=1 CI=false POSTGRES=1\
|
||||
NIMFLAGS="-d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" \
|
||||
wakunode2\
|
||||
chat2\
|
||||
tools
|
||||
|
||||
54
.github/workflows/release-assets.yml
vendored
54
.github/workflows/release-assets.yml
vendored
@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # "e.g. v0.4"
|
||||
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
@ -65,6 +65,16 @@ jobs:
|
||||
|
||||
echo "libwaku=${LIBWAKU_ARTIFACT_NAME}" >> $GITHUB_OUTPUT
|
||||
|
||||
if [[ "${{ runner.os }}" == "Linux" ]]; then
|
||||
LIBLOGOSDELIVERY_ARTIFACT_NAME=$(echo "liblogosdelivery-${VERSION}-${{matrix.arch}}-${{runner.os}}-linux.deb" | tr "[:upper:]" "[:lower:]")
|
||||
fi
|
||||
|
||||
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
LIBLOGOSDELIVERY_ARTIFACT_NAME=$(echo "liblogosdelivery-${VERSION}-${{matrix.arch}}-macos.tar.gz" | tr "[:upper:]" "[:lower:]")
|
||||
fi
|
||||
|
||||
echo "liblogosdelivery=${LIBLOGOSDELIVERY_ARTIFACT_NAME}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
if [[ "${{ runner.os }}" == "Linux" ]]; then
|
||||
@ -76,12 +86,15 @@ jobs:
|
||||
OS=$([[ "${{runner.os}}" == "macOS" ]] && echo "macosx" || echo "linux")
|
||||
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" V=1 update
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}} -d:postgres" CI=false wakunode2
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" POSTGRES=1 CI=false wakunode2
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" CI=false chat2
|
||||
tar -cvzf ${{steps.vars.outputs.waku}} ./build/
|
||||
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}} -d:postgres" CI=false libwaku
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}} -d:postgres" CI=false STATIC=1 libwaku
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" POSTGRES=1 CI=false libwaku
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" POSTGRES=1 CI=false STATIC=1 libwaku
|
||||
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" POSTGRES=1 CI=false liblogosdelivery
|
||||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC} -d:disableMarchNative --os:${OS} --cpu:${{matrix.arch}}" POSTGRES=1 CI=false STATIC=1 liblogosdelivery
|
||||
|
||||
- name: Create distributable libwaku package
|
||||
run: |
|
||||
@ -109,6 +122,32 @@ jobs:
|
||||
tar -cvzf ${{steps.vars.outputs.libwaku}} ./build/libwaku.dylib ./build/libwaku.a ./library/libwaku.h
|
||||
fi
|
||||
|
||||
- name: Create distributable liblogosdelivery package
|
||||
run: |
|
||||
VERSION=${{ steps.version.outputs.version }}
|
||||
|
||||
if [[ "${{ runner.os }}" == "Linux" ]]; then
|
||||
rm -rf pkg
|
||||
mkdir -p pkg/DEBIAN pkg/usr/local/lib pkg/usr/local/include
|
||||
cp build/liblogosdelivery.so pkg/usr/local/lib/
|
||||
cp build/liblogosdelivery.a pkg/usr/local/lib/
|
||||
cp liblogosdelivery/liblogosdelivery.h pkg/usr/local/include/
|
||||
|
||||
echo "Package: logosdelivery" >> pkg/DEBIAN/control
|
||||
echo "Version: ${VERSION}" >> pkg/DEBIAN/control
|
||||
echo "Priority: optional" >> pkg/DEBIAN/control
|
||||
echo "Section: libs" >> pkg/DEBIAN/control
|
||||
echo "Architecture: ${{matrix.arch}}" >> pkg/DEBIAN/control
|
||||
echo "Maintainer: Logos Messaging Team" >> pkg/DEBIAN/control
|
||||
echo "Description: Logos Delivery library" >> pkg/DEBIAN/control
|
||||
|
||||
dpkg-deb --build pkg ${{steps.vars.outputs.liblogosdelivery}}
|
||||
fi
|
||||
|
||||
if [[ "${{ runner.os }}" == "macOS" ]]; then
|
||||
tar -cvzf ${{steps.vars.outputs.liblogosdelivery}} ./build/liblogosdelivery.dylib ./build/liblogosdelivery.a ./liblogosdelivery/liblogosdelivery.h
|
||||
fi
|
||||
|
||||
- name: Upload waku artifact
|
||||
uses: actions/upload-artifact@v4.4.0
|
||||
with:
|
||||
@ -122,3 +161,10 @@ jobs:
|
||||
name: libwaku-${{ steps.version.outputs.version }}-${{ matrix.arch }}-${{ runner.os }}
|
||||
path: ${{ steps.vars.outputs.libwaku }}
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload liblogosdelivery artifact
|
||||
uses: actions/upload-artifact@v4.4.0
|
||||
with:
|
||||
name: liblogosdelivery-${{ steps.version.outputs.version }}-${{ matrix.arch }}-${{ runner.os }}
|
||||
path: ${{ steps.vars.outputs.liblogosdelivery }}
|
||||
if-no-files-found: error
|
||||
|
||||
@ -5,6 +5,7 @@ ARG NIMFLAGS
|
||||
ARG MAKE_TARGET=wakunode2
|
||||
ARG NIM_COMMIT
|
||||
ARG HEAPTRACK_BUILD=0
|
||||
ARG POSTGRES=0
|
||||
|
||||
# Get build tools and required header files
|
||||
RUN apk add --no-cache bash git build-base openssl-dev linux-headers curl jq libbsd-dev
|
||||
@ -26,7 +27,7 @@ RUN if [ "$HEAPTRACK_BUILD" = "1" ]; then \
|
||||
RUN make -j$(nproc) deps QUICK_AND_DIRTY_COMPILER=1 ${NIM_COMMIT}
|
||||
|
||||
# Build the final node binary
|
||||
RUN make -j$(nproc) ${NIM_COMMIT} $MAKE_TARGET NIMFLAGS="${NIMFLAGS}"
|
||||
RUN make -j$(nproc) ${NIM_COMMIT} $MAKE_TARGET NIMFLAGS="${NIMFLAGS}" POSTGRES=${POSTGRES}
|
||||
|
||||
|
||||
# PRODUCTION IMAGE -------------------------------------------------------------
|
||||
|
||||
@ -85,7 +85,8 @@ pipeline {
|
||||
"--label=commit='${git.commit()}' " +
|
||||
"--label=version='${git.describe('--tags')}' " +
|
||||
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
|
||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS} -d:postgres -d:heaptracker ' " +
|
||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS} -d:heaptracker ' " +
|
||||
"--build-arg=POSTGRES='1' " +
|
||||
"--build-arg=LOG_LEVEL='${params.LOWEST_LOG_LEVEL_ALLOWED}' " +
|
||||
"--build-arg=DEBUG='${params.DEBUG ? "1" : "0"} ' " +
|
||||
"--build-arg=NIM_COMMIT='NIM_COMMIT=heaptrack_support_v2.0.12' " +
|
||||
@ -98,7 +99,8 @@ pipeline {
|
||||
"--label=commit='${git.commit()}' " +
|
||||
"--label=version='${git.describe('--tags')}' " +
|
||||
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
|
||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS} -d:postgres ' " +
|
||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS}' " +
|
||||
"--build-arg=POSTGRES='1' " +
|
||||
"--build-arg=LOG_LEVEL='${params.LOWEST_LOG_LEVEL_ALLOWED}' " +
|
||||
"--build-arg=DEBUG='${params.DEBUG ? "1" : "0"} ' " +
|
||||
"--target='prod' ."
|
||||
|
||||
@ -372,7 +372,7 @@ suite "Waku Sync: reconciliation":
|
||||
const
|
||||
msgCount = 400_000
|
||||
diffCount = 100_000
|
||||
tol = 1000
|
||||
tol = 10_000
|
||||
|
||||
var diffMsgHashes: HashSet[WakuMessageHash]
|
||||
var missingIdx: HashSet[int]
|
||||
|
||||
@ -618,7 +618,7 @@ proc subscribe*(w: WakuRelay, pubsubTopic: PubsubTopic, handler: WakuRelayHandle
|
||||
# Otherwise this might lead to unintended behaviour.
|
||||
if not w.topicValidator.hasKey(pubSubTopic):
|
||||
let newValidator = w.generateOrderedValidator()
|
||||
procCall GossipSub(w).addValidator(pubSubTopic, w.generateOrderedValidator())
|
||||
procCall GossipSub(w).addValidator(pubSubTopic, newValidator)
|
||||
w.topicValidator[pubSubTopic] = newValidator
|
||||
|
||||
# set this topic parameters for scoring
|
||||
|
||||
@ -145,7 +145,7 @@ proc preProcessPayload(
|
||||
# convert to skip range before processing
|
||||
for i in 0 ..< payload.ranges.len:
|
||||
let rangeType = payload.ranges[i][1]
|
||||
if rangeType != RangeType.Skip:
|
||||
if rangeType == RangeType.Skip:
|
||||
continue
|
||||
|
||||
let upperBound = payload.ranges[i][0].b.time
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user