37 lines
1.0 KiB
Bash
Raw Normal View History

feat(mix): integrate mix protocol with extended kademlia + RLN spam protection Rebased poc/mix-spam-protection onto origin/master. Bundles: - Extended kademlia discovery integration for mix node pool (waku/discovery/waku_kademlia.nim, tools/confutils/cli_args.nim) - RLN spam protection plugin (vacp2p/mix-rln-spam-protection) wired in: WakuMix gains mixRlnSpamProtection + publishMessage callback, per-hop proof generation / verification, membership coordination via /mix/rln/metadata/v1 content topic - chat2mix sim app: filter-subscribes to spam-protection coordination topic, defers publishing until mix node pool is populated - Makefile: automated librln_mix_v2.0.0.a build via scripts/build_rln_mix.sh and mix-librln target - simulations/mixnet: 5-node mixnet sim infrastructure (config1-4.toml, run_*.sh, build_setup.sh, setup_credentials.nim, README, roundtrip_check.sh automated round-trip verification) Rebase fixes: - Plugin previously vendored as submodule; now a nimble requires entry pinned to logos-co/mix-rln-spam-protection-plugin@037f8e10 - waku.nimble: zlib < 0.2 pin to keep nimble lock resolution stable (upstream zlib HEAD bumped to 0.2.0) - apps/chat2mix/config_chat2mix.nim: replace `defaultValue: parseIpAddress("...")` with IpAddress literal, works around confutils macro generating `defaultValueHelpName(): string {.raises: [].}` that violates the raises pragma when stringifying a parseIpAddress call - config.nims: nimble setup --noNimblePath reordering Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 13:44:28 +05:30
#!/bin/bash
cd "$(dirname "$0")"
MIXNET_DIR=$(pwd)
cd ../..
ROOT_DIR=$(pwd)
source "$ROOT_DIR/env.sh"
# Prefer explicitly provided RLN library path, otherwise use the one built by `make mix-librln`.
LIBRLN_PATH=${LIBRLN_PATH:-"$ROOT_DIR/build/librln_mix_v2.0.0.a"}
# Clean up old files first
rm -f "$MIXNET_DIR/rln_tree.db" "$MIXNET_DIR"/rln_keystore_*.json
echo "Building and running credentials setup..."
# Compile to temp location, then run from mixnet directory
nim c -d:release --mm:refc \
--passL:"$LIBRLN_PATH" --passL:-lm \
-o:/tmp/setup_credentials_$$ \
"$MIXNET_DIR/setup_credentials.nim" 2>&1 | tail -30
# Run from mixnet directory so files are created there
cd "$MIXNET_DIR"
/tmp/setup_credentials_$$
# Clean up temp binary
rm -f /tmp/setup_credentials_$$
# Verify output
if [ -f "rln_tree.db" ]; then
echo ""
echo "Tree file ready at: $(pwd)/rln_tree.db"
ls -la rln_keystore_*.json 2>/dev/null | wc -l | xargs -I {} echo "Generated {} keystore files"
else
echo "Setup failed - rln_tree.db not found"
exit 1
fi