From 8d3718e696f27e93883f48fbac7d076abd3c7628 Mon Sep 17 00:00:00 2001 From: vid277 Date: Wed, 25 Jun 2025 10:19:11 -0700 Subject: [PATCH 1/4] feature: faster docker builds using blacksmith --- .github/workflows/integ-tests.yml | 164 +++++++++++++++++++----------- 1 file changed, 104 insertions(+), 60 deletions(-) diff --git a/.github/workflows/integ-tests.yml b/.github/workflows/integ-tests.yml index 6414ee1..b5747ca 100644 --- a/.github/workflows/integ-tests.yml +++ b/.github/workflows/integ-tests.yml @@ -29,20 +29,30 @@ jobs: - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang - - name: Build Docker image - run: | - docker build -t thevalut-node:test . + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: trieve/threshold + tags: | + type=raw,value=latest + type=ref,event=pr + type=sha - - name: Save Docker image - run: | - docker save thevalut-node:test | gzip > thevalut-node-test.tar.gz + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Upload Docker image artifact - uses: actions/upload-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: thevalut-node-test.tar.gz - retention-days: 1 + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: useblacksmith/build-push-action@v1 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} dkg_test-12: runs-on: blacksmith-16vcpu-ubuntu-2204 @@ -69,15 +79,19 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Load Docker image + - name: Pull Docker image run: | - gunzip -c thevalut-node-test.tar.gz | docker load + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang @@ -137,15 +151,19 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Load Docker image + - name: Pull Docker image run: | - gunzip -c thevalut-node-test.tar.gz | docker load + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang @@ -197,15 +215,19 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Load Docker image + - name: Pull Docker image run: | - gunzip -c thevalut-node-test.tar.gz | docker load + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi - name: Clean cargo run: cargo clean @@ -262,19 +284,26 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull Docker image + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi + + - name: Clean cargo + run: cargo clean - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang - - name: Load Docker image - run: | - gunzip -c thevalut-node-test.tar.gz | docker load - - name: Create NodeCluster (3 nodes) run: ./scripts/clear_dkg_keys.sh @@ -327,19 +356,23 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull Docker image + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang - - name: Load Docker image - run: | - gunzip -c thevalut-node-test.tar.gz | docker load - - name: Create NodeCluster (3 nodes) run: ./scripts/clear_dkg_keys.sh @@ -392,15 +425,19 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Load Docker image + - name: Pull Docker image run: | - gunzip -c thevalut-node-test.tar.gz | docker load + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi - name: Clean cargo run: cargo clean @@ -408,6 +445,9 @@ jobs: - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang + - name: Create NodeCluster (3 nodes) + run: ./scripts/clear_dkg_keys.sh + - name: Start 5-node stack with network chaos run: | docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml up -d @@ -457,22 +497,26 @@ jobs: rustup update 1.87 rustup default 1.87 - - name: Download Docker image artifact - uses: actions/download-artifact@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - name: thevalut-node-test-image - path: . + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Load Docker image + - name: Pull Docker image run: | - gunzip -c thevalut-node-test.tar.gz | docker load - - - name: Clean cargo - run: cargo clean + if [ "${{ github.event_name }}" = "pull_request" ]; then + docker pull "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + docker pull trieve/threshold:latest + fi - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang + - name: Create NodeCluster (3 nodes) + run: ./scripts/clear_dkg_keys.sh + - name: Start 5-node stack with node chaos run: | docker compose -f docker-compose.yaml -f docker-compose.chaos-nodes.yaml up -d From 62eba9db379293aaae9979f224d5ab18f8640e89 Mon Sep 17 00:00:00 2001 From: vid277 Date: Wed, 25 Jun 2025 11:19:21 -0700 Subject: [PATCH 2/4] feature: refactor to allow built image for setup nodes --- .github/workflows/integ-tests.yml | 84 ++++++++++++++++--------- setup_nodes.sh | 8 ++- tests/src/bin/integration-tests/main.rs | 5 +- 3 files changed, 64 insertions(+), 33 deletions(-) diff --git a/.github/workflows/integ-tests.yml b/.github/workflows/integ-tests.yml index b5747ca..2efddd2 100644 --- a/.github/workflows/integ-tests.yml +++ b/.github/workflows/integ-tests.yml @@ -101,7 +101,11 @@ jobs: - name: Start 12-node stack (docker-compose) run: | - bash setup_nodes.sh 12 + if [ "${{ github.event_name }}" = "pull_request" ]; then + bash setup_nodes.sh 12 "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + bash setup_nodes.sh 12 "trieve/threshold:latest" + fi - name: Wait for gRPC endpoints run: | @@ -173,14 +177,18 @@ jobs: - name: Start 5-node stack (docker-compose) run: | - docker compose -f docker-compose.yaml up -d + if [ "${{ github.event_name }}" = "pull_request" ]; then + bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + bash setup_nodes.sh 5 "trieve/threshold:latest" + fi - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50057-50061..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50057..50061}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -188,7 +196,7 @@ jobs: done - name: Run end-to-end integration tests - run: cargo run --bin integration-tests check-dkg --port-range 50051-50055 + run: cargo run --bin integration-tests check-dkg --port-range 50057-50061 end-to-end-deposit-withdrawl: runs-on: blacksmith-16vcpu-ubuntu-2204 @@ -237,14 +245,18 @@ jobs: - name: Start 5-node stack (docker-compose) run: | - docker compose -f docker-compose.yaml up -d + if [ "${{ github.event_name }}" = "pull_request" ]; then + bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + bash setup_nodes.sh 5 "trieve/threshold:latest" + fi - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50057-50061..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50057..50061}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -252,7 +264,7 @@ jobs: done - name: Run end-to-end integration tests - run: cargo run --bin integration-tests test + run: cargo run --bin integration-tests test --port-range 50057-50061 - name: Shutdown stack & print logs run: | @@ -309,14 +321,18 @@ jobs: - name: Start 5-node stack with network chaos run: | - docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml up -d + if [ "${{ github.event_name }}" = "pull_request" ]; then + bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + bash setup_nodes.sh 5 "trieve/threshold:latest" + fi - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50057-50061..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50057..50061}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -324,7 +340,7 @@ jobs: done - name: Run end-to-end integration tests with network chaos - run: cargo run --bin integration-tests check-dkg --port-range 50051-50055 + run: cargo run --bin integration-tests check-dkg --port-range 50057-50061 - name: Shutdown stack & print logs run: | @@ -378,14 +394,18 @@ jobs: - name: Start 5-node stack with node chaos run: | - docker compose -f docker-compose.yaml -f docker-compose.chaos-nodes.yaml up -d + if [ "${{ github.event_name }}" = "pull_request" ]; then + bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + bash setup_nodes.sh 5 "trieve/threshold:latest" + fi - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50057-50061..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50057..50061}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -393,7 +413,7 @@ jobs: done - name: Run end-to-end integration tests with node chaos - run: cargo run --bin integration-tests check-dkg --port-range 50051-50055 + run: cargo run --bin integration-tests check-dkg --port-range 50057-50061 - name: Shutdown stack & print logs run: | @@ -450,14 +470,18 @@ jobs: - name: Start 5-node stack with network chaos run: | - docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml up -d + if [ "${{ github.event_name }}" = "pull_request" ]; then + bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" + else + bash setup_nodes.sh 5 "trieve/threshold:latest" + fi - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50057-50061..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50057..50061}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -465,7 +489,7 @@ jobs: done - name: Run end-to-end integration tests with network chaos - run: cargo run --bin integration-tests test + run: cargo run --bin integration-tests test --port-range 50057-50061 - name: Shutdown stack & print logs run: | @@ -523,10 +547,10 @@ jobs: - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50057-50061..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50057..50061}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -534,7 +558,7 @@ jobs: done - name: Run end-to-end integration tests with node chaos - run: cargo run --bin integration-tests test + run: cargo run --bin integration-tests test --port-range 50057-50061 - name: Shutdown stack & print logs run: | diff --git a/setup_nodes.sh b/setup_nodes.sh index 4612ddf..5766fff 100755 --- a/setup_nodes.sh +++ b/setup_nodes.sh @@ -16,6 +16,7 @@ set -euo pipefail # --------------------------- Configuration ----------------------------------- NUM_NODES=${1:-5} +IMAGE_TAG=${2:-trieve/threshold:latest} BASE_DIR="test_artifacts/" CLI_CMD=(cargo run --quiet --bin cli) @@ -137,7 +138,7 @@ for i in $(seq 1 "$NUM_NODES"); do cat >> "$BASE_DIR/test_${NUM_NODES}_nodes/$DOCKER_COMPOSE_FILE" <, + #[arg(long, default_value = "50051-50055")] + port_range: Option, }, /// Run the deposit integration flow DepositTest { @@ -77,11 +79,12 @@ async fn main() -> Result<(), Box> { amount, endpoint, use_testnet, + port_range, } => { println!("🧪 Running all integration tests...\n"); println!("🔄 Running dkg test..."); - check_if_dkg_keys_exist("50051-50055".to_string()).await?; + check_if_dkg_keys_exist(port_range.unwrap_or("50051-50055".to_string())).await?; println!("✅ DKG test completed\n"); println!("⏳ Waiting for DKG deposit intents to settle (max 60s)..."); From fdfeed53dbf7e368cb0c92b80f363b1c7f10daf8 Mon Sep 17 00:00:00 2001 From: cdxker Date: Wed, 25 Jun 2025 13:24:18 -0700 Subject: [PATCH 3/4] feature: make dkg-end-to-end test use the local docker-compose with pregenerated keys --- .github/workflows/integ-tests.yml | 25 ++++++++++--------------- docker-compose.yaml | 10 +++++----- setup_nodes.sh | 10 +++------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/.github/workflows/integ-tests.yml b/.github/workflows/integ-tests.yml index 2efddd2..41c5263 100644 --- a/.github/workflows/integ-tests.yml +++ b/.github/workflows/integ-tests.yml @@ -264,7 +264,7 @@ jobs: done - name: Run end-to-end integration tests - run: cargo run --bin integration-tests test --port-range 50057-50061 + run: cargo run --bin integration-tests test --port-range 50051-50055 - name: Shutdown stack & print logs run: | @@ -465,22 +465,17 @@ jobs: - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang - - name: Create NodeCluster (3 nodes) - run: ./scripts/clear_dkg_keys.sh - - name: Start 5-node stack with network chaos run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" - else - bash setup_nodes.sh 5 "trieve/threshold:latest" - fi + # Modify docker-compose.yaml to the correct tag + sed -i "s/trieve\/threshold:latest/trieve\/threshold:pr-${{ github.event.pull_request.number }}/g" docker-compose.yaml + docker compose -f docker-compose.yaml up -d - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50057-50061..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost {50057..50061}; then + if nc -z localhost {50051..50055}; then echo "Port 50057-50061 is open." break fi @@ -489,12 +484,12 @@ jobs: done - name: Run end-to-end integration tests with network chaos - run: cargo run --bin integration-tests test --port-range 50057-50061 + run: cargo run --bin integration-tests test --port-range 50051-50055 - name: Shutdown stack & print logs run: | - docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml logs --no-color || true - docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml down --volumes --remove-orphans || true + docker compose -f docker-compose.yaml logs --no-color || true + docker compose -f docker-compose.yaml down --volumes --remove-orphans || true end-to-end-deposit-withdrawl-chaos-nodes: runs-on: blacksmith-16vcpu-ubuntu-2204 @@ -558,7 +553,7 @@ jobs: done - name: Run end-to-end integration tests with node chaos - run: cargo run --bin integration-tests test --port-range 50057-50061 + run: cargo run --bin integration-tests test --port-range 50051-50055 - name: Shutdown stack & print logs run: | diff --git a/docker-compose.yaml b/docker-compose.yaml index f55715f..64abc05 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -21,7 +21,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -39,7 +39,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -57,7 +57,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -75,7 +75,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true diff --git a/setup_nodes.sh b/setup_nodes.sh index 5766fff..45d5fde 100755 --- a/setup_nodes.sh +++ b/setup_nodes.sh @@ -165,11 +165,10 @@ DOCKER_COMPOSE_FILE_PATH="$BASE_DIR/test_${NUM_NODES}_nodes/$DOCKER_COMPOSE_FILE echo "Successfully generated '$BASE_DIR/test_${NUM_NODES}_nodes/$DOCKER_COMPOSE_FILE'." # ------------------- Build Docker Image Once ---------------------------- -echo -e "\nBuilding Docker image..." - -cd "$BASE_DIR/test_${NUM_NODES}_nodes" - if [ -z "$2" ]; then + echo -e "\nBuilding Docker image..." + cd "$BASE_DIR/test_${NUM_NODES}_nodes" + docker build -t threshold-node -f ../../Dockerfile ../.. fi @@ -178,7 +177,4 @@ echo -e "\nStarting Docker Compose for $NUM_NODES nodes..." docker compose -f "$DOCKER_COMPOSE_FILE" up -d -# Wait 10 seconds for dkg to complete -sleep 20s - echo "All nodes started." From 5a8ed80c309efab981183143faea83179be888e2 Mon Sep 17 00:00:00 2001 From: cdxker Date: Wed, 25 Jun 2025 14:11:06 -0700 Subject: [PATCH 4/4] feature: replace setup_nodes.sh with predefined configs. This removes the extra need to call cargo run --bin cli setup --- .github/workflows/integ-tests.yml | 73 ++++----- crates/node/src/config.rs | 21 ++- docker-compose-12.yaml | 208 ++++++++++++++++++++++++++ docker-compose.yaml | 20 +-- keys/12_nodes/node_1/node_1.json | 12 ++ keys/12_nodes/node_1/node_1.yaml | 34 +++++ keys/12_nodes/node_10/node_10.json | 12 ++ keys/12_nodes/node_10/node_10.yaml | 34 +++++ keys/12_nodes/node_11/node_11.json | 12 ++ keys/12_nodes/node_11/node_11.yaml | 34 +++++ keys/12_nodes/node_12/node_12.json | 12 ++ keys/12_nodes/node_12/node_12.yaml | 34 +++++ keys/12_nodes/node_2/node_2.json | 12 ++ keys/12_nodes/node_2/node_2.yaml | 34 +++++ keys/12_nodes/node_3/node_3.json | 12 ++ keys/12_nodes/node_3/node_3.yaml | 34 +++++ keys/12_nodes/node_4/node_4.json | 12 ++ keys/12_nodes/node_4/node_4.yaml | 34 +++++ keys/12_nodes/node_5/node_5.json | 12 ++ keys/12_nodes/node_5/node_5.yaml | 34 +++++ keys/12_nodes/node_6/node_6.json | 12 ++ keys/12_nodes/node_6/node_6.yaml | 34 +++++ keys/12_nodes/node_7/node_7.json | 12 ++ keys/12_nodes/node_7/node_7.yaml | 34 +++++ keys/12_nodes/node_8/node_8.json | 12 ++ keys/12_nodes/node_8/node_8.yaml | 34 +++++ keys/12_nodes/node_9/node_9.json | 12 ++ keys/12_nodes/node_9/node_9.yaml | 34 +++++ keys/{ => 5_nodes}/node_1/node_1.json | 0 keys/{ => 5_nodes}/node_1/node_1.yaml | 1 + keys/{ => 5_nodes}/node_2/node_2.json | 0 keys/{ => 5_nodes}/node_2/node_2.yaml | 1 + keys/{ => 5_nodes}/node_3/node_3.json | 0 keys/{ => 5_nodes}/node_3/node_3.yaml | 1 + keys/{ => 5_nodes}/node_4/node_4.json | 0 keys/{ => 5_nodes}/node_4/node_4.yaml | 1 + keys/{ => 5_nodes}/node_5/node_5.json | 0 keys/{ => 5_nodes}/node_5/node_5.yaml | 1 + tests/src/config.rs | 3 +- 39 files changed, 826 insertions(+), 56 deletions(-) create mode 100644 docker-compose-12.yaml create mode 100644 keys/12_nodes/node_1/node_1.json create mode 100644 keys/12_nodes/node_1/node_1.yaml create mode 100644 keys/12_nodes/node_10/node_10.json create mode 100644 keys/12_nodes/node_10/node_10.yaml create mode 100644 keys/12_nodes/node_11/node_11.json create mode 100644 keys/12_nodes/node_11/node_11.yaml create mode 100644 keys/12_nodes/node_12/node_12.json create mode 100644 keys/12_nodes/node_12/node_12.yaml create mode 100644 keys/12_nodes/node_2/node_2.json create mode 100644 keys/12_nodes/node_2/node_2.yaml create mode 100644 keys/12_nodes/node_3/node_3.json create mode 100644 keys/12_nodes/node_3/node_3.yaml create mode 100644 keys/12_nodes/node_4/node_4.json create mode 100644 keys/12_nodes/node_4/node_4.yaml create mode 100644 keys/12_nodes/node_5/node_5.json create mode 100644 keys/12_nodes/node_5/node_5.yaml create mode 100644 keys/12_nodes/node_6/node_6.json create mode 100644 keys/12_nodes/node_6/node_6.yaml create mode 100644 keys/12_nodes/node_7/node_7.json create mode 100644 keys/12_nodes/node_7/node_7.yaml create mode 100644 keys/12_nodes/node_8/node_8.json create mode 100644 keys/12_nodes/node_8/node_8.yaml create mode 100644 keys/12_nodes/node_9/node_9.json create mode 100644 keys/12_nodes/node_9/node_9.yaml rename keys/{ => 5_nodes}/node_1/node_1.json (100%) rename keys/{ => 5_nodes}/node_1/node_1.yaml (97%) rename keys/{ => 5_nodes}/node_2/node_2.json (100%) rename keys/{ => 5_nodes}/node_2/node_2.yaml (97%) rename keys/{ => 5_nodes}/node_3/node_3.json (100%) rename keys/{ => 5_nodes}/node_3/node_3.yaml (97%) rename keys/{ => 5_nodes}/node_4/node_4.json (100%) rename keys/{ => 5_nodes}/node_4/node_4.yaml (97%) rename keys/{ => 5_nodes}/node_5/node_5.json (100%) rename keys/{ => 5_nodes}/node_5/node_5.yaml (97%) diff --git a/.github/workflows/integ-tests.yml b/.github/workflows/integ-tests.yml index 41c5263..00ac040 100644 --- a/.github/workflows/integ-tests.yml +++ b/.github/workflows/integ-tests.yml @@ -101,11 +101,8 @@ jobs: - name: Start 12-node stack (docker-compose) run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - bash setup_nodes.sh 12 "trieve/threshold:pr-${{ github.event.pull_request.number }}" - else - bash setup_nodes.sh 12 "trieve/threshold:latest" - fi + sed -i "s/trieve\/threshold:latest/trieve\/threshold:pr-${{ github.event.pull_request.number }}/g" docker-compose-12.yaml + docker compose -f docker-compose-12.yaml up -d - name: Wait for gRPC endpoints run: | @@ -172,22 +169,19 @@ jobs: - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libclang-dev clang - - name: Create NodeCluster (3 nodes) + - name: Create NodeCluster (5 nodes) run: ./scripts/clear_dkg_keys.sh - name: Start 5-node stack (docker-compose) run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" - else - bash setup_nodes.sh 5 "trieve/threshold:latest" - fi + sed -i "s/trieve\/threshold:latest/trieve\/threshold:pr-${{ github.event.pull_request.number }}/g" docker-compose.yaml + docker compose -f docker-compose.yaml up -d - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50057-50061..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost {50057..50061}; then + if nc -z localhost {50051..50055}; then echo "Port 50057-50061 is open." break fi @@ -196,7 +190,7 @@ jobs: done - name: Run end-to-end integration tests - run: cargo run --bin integration-tests check-dkg --port-range 50057-50061 + run: cargo run --bin integration-tests check-dkg --port-range 50051-50055 end-to-end-deposit-withdrawl: runs-on: blacksmith-16vcpu-ubuntu-2204 @@ -245,18 +239,15 @@ jobs: - name: Start 5-node stack (docker-compose) run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" - else - bash setup_nodes.sh 5 "trieve/threshold:latest" - fi + sed -i "s/trieve\/threshold:latest/trieve\/threshold:pr-${{ github.event.pull_request.number }}/g" docker-compose.yaml + docker compose -f docker-compose.yaml up -d - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50057-50061..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost {50057..50061}; then - echo "Port 50057-50061 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -321,18 +312,15 @@ jobs: - name: Start 5-node stack with network chaos run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" - else - bash setup_nodes.sh 5 "trieve/threshold:latest" - fi + sed -i "s/trieve\/threshold:latest/trieve\/threshold:pr-${{ github.event.pull_request.number }}/g" docker-compose.yaml + docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml up -d - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50057-50061..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost {50057..50061}; then - echo "Port 50057-50061 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -340,7 +328,7 @@ jobs: done - name: Run end-to-end integration tests with network chaos - run: cargo run --bin integration-tests check-dkg --port-range 50057-50061 + run: cargo run --bin integration-tests check-dkg --port-range 50051-50055 - name: Shutdown stack & print logs run: | @@ -394,18 +382,15 @@ jobs: - name: Start 5-node stack with node chaos run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then - bash setup_nodes.sh 5 "trieve/threshold:pr-${{ github.event.pull_request.number }}" - else - bash setup_nodes.sh 5 "trieve/threshold:latest" - fi + sed -i "s/trieve\/threshold:latest/trieve\/threshold:pr-${{ github.event.pull_request.number }}/g" docker-compose.yaml + docker compose -f docker-compose.yaml -f docker-compose.chaos-nodes.yaml up -d - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50057-50061..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost {50057..50061}; then - echo "Port 50057-50061 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -413,7 +398,7 @@ jobs: done - name: Run end-to-end integration tests with node chaos - run: cargo run --bin integration-tests check-dkg --port-range 50057-50061 + run: cargo run --bin integration-tests check-dkg --port-range 50051-50055 - name: Shutdown stack & print logs run: | @@ -476,7 +461,7 @@ jobs: echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do if nc -z localhost {50051..50055}; then - echo "Port 50057-50061 is open." + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -542,10 +527,10 @@ jobs: - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50057-50061..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost {50057..50061}; then - echo "Port 50057-50061 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" diff --git a/crates/node/src/config.rs b/crates/node/src/config.rs index 7d51086..5df5a8e 100644 --- a/crates/node/src/config.rs +++ b/crates/node/src/config.rs @@ -33,6 +33,7 @@ pub struct NodeConfig { pub monitor_start_block: u32, pub min_signers: Option, pub max_signers: Option, + pub save_keys: bool, } #[derive(Serialize, Deserialize)] @@ -54,6 +55,7 @@ pub struct ConfigStore { pub monitor_start_block: u32, pub min_signers: Option, pub max_signers: Option, + pub save_keys: bool, } #[derive(Clone, Serialize, Deserialize)] @@ -147,6 +149,7 @@ impl NodeConfig { monitor_start_block: 0, min_signers: None, max_signers: None, + save_keys: true, }) } @@ -189,6 +192,7 @@ impl NodeConfig { monitor_start_block: self.monitor_start_block, min_signers: self.min_signers, max_signers: self.max_signers, + save_keys: self.save_keys, }; let config_str: String = serde_yaml::to_string(&config_store).unwrap(); @@ -271,6 +275,7 @@ impl NodeConfig { monitor_start_block: config_store.monitor_start_block, min_signers: config_store.min_signers, max_signers: config_store.max_signers, + save_keys: config_store.save_keys, }; Ok(node_config) @@ -312,7 +317,9 @@ impl NodeConfig { }; self.dkg_keys = Some(dkg_keys); - self.save_to_keys_file()?; + if self.save_keys { + self.save_to_keys_file()?; + } Ok(()) } @@ -370,6 +377,7 @@ pub struct NodeConfigBuilder { monitor_start_block: Option, min_signers: Option, max_signers: Option, + save_keys: Option, } impl Default for NodeConfigBuilder { @@ -398,6 +406,7 @@ impl NodeConfigBuilder { monitor_start_block: None, min_signers: None, max_signers: None, + save_keys: None, } } #[must_use] @@ -490,6 +499,12 @@ impl NodeConfigBuilder { self } + #[must_use] + pub const fn save_keys(mut self, save_keys: bool) -> Self { + self.save_keys = Some(save_keys); + self + } + pub fn build(self) -> Result { let key_file_path = self.key_file_path.ok_or_else(|| { NodeError::Error("key_file_path must be provided when building NodeConfig".into()) @@ -511,6 +526,10 @@ impl NodeConfigBuilder { ) .map_err(|e| NodeError::Error(format!("Failed to create NodeConfig: {e}")))?; + if let Some(save_keys) = self.save_keys { + cfg.save_keys = save_keys; + } + if let Some(data) = self.key_data { cfg.key_data = data; } diff --git a/docker-compose-12.yaml b/docker-compose-12.yaml new file mode 100644 index 0000000..2e34ace --- /dev/null +++ b/docker-compose-12.yaml @@ -0,0 +1,208 @@ +services: + node1: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_1.json --config-file-path /app/configs/node_1.yaml --use-mock-oracle" + ports: + - "50057:50051" + volumes: + - ./keys/12_nodes/node_1/node_1.json:/app/configs/node_1.json + - ./keys/12_nodes/node_1/node_1.yaml:/app/configs/node_1.yaml + networks: + - threshold + node2: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_2.json --config-file-path /app/configs/node_2.yaml --use-mock-oracle" + ports: + - "50058:50051" + volumes: + - ./keys/12_nodes/node_2/node_2.json:/app/configs/node_2.json + - ./keys/12_nodes/node_2/node_2.yaml:/app/configs/node_2.yaml + networks: + - threshold + node3: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_3.json --config-file-path /app/configs/node_3.yaml --use-mock-oracle" + ports: + - "50059:50051" + volumes: + - ./keys/12_nodes/node_3/node_3.json:/app/configs/node_3.json + - ./keys/12_nodes/node_3/node_3.yaml:/app/configs/node_3.yaml + networks: + - threshold + node4: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_4.json --config-file-path /app/configs/node_4.yaml --use-mock-oracle" + ports: + - "50060:50051" + volumes: + - ./keys/12_nodes/node_4/node_4.json:/app/configs/node_4.json + - ./keys/12_nodes/node_4/node_4.yaml:/app/configs/node_4.yaml + networks: + - threshold + node5: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_5.json --config-file-path /app/configs/node_5.yaml --use-mock-oracle" + ports: + - "50061:50051" + volumes: + - ./keys/12_nodes/node_5/node_5.json:/app/configs/node_5.json + - ./keys/12_nodes/node_5/node_5.yaml:/app/configs/node_5.yaml + networks: + - threshold + node6: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_6.json --config-file-path /app/configs/node_6.yaml --use-mock-oracle" + ports: + - "50062:50051" + volumes: + - ./keys/12_nodes/node_6/node_6.json:/app/configs/node_6.json + - ./keys/12_nodes/node_6/node_6.yaml:/app/configs/node_6.yaml + networks: + - threshold + node7: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_7.json --config-file-path /app/configs/node_7.yaml --use-mock-oracle" + ports: + - "50063:50051" + volumes: + - ./keys/12_nodes/node_7/node_7.json:/app/configs/node_7.json + - ./keys/12_nodes/node_7/node_7.yaml:/app/configs/node_7.yaml + networks: + - threshold + node8: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_8.json --config-file-path /app/configs/node_8.yaml --use-mock-oracle" + ports: + - "50064:50051" + volumes: + - ./keys/12_nodes/node_8/node_8.json:/app/configs/node_8.json + - ./keys/12_nodes/node_8/node_8.yaml:/app/configs/node_8.yaml + networks: + - threshold + node9: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_9.json --config-file-path /app/configs/node_9.yaml --use-mock-oracle" + ports: + - "50065:50051" + volumes: + - ./keys/12_nodes/node_9/node_9.json:/app/configs/node_9.json + - ./keys/12_nodes/node_9/node_9.yaml:/app/configs/node_9.yaml + networks: + - threshold + node10: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_10.json --config-file-path /app/configs/node_10.yaml --use-mock-oracle" + ports: + - "50066:50051" + volumes: + - ./keys/12_nodes/node_10/node_10.json:/app/configs/node_10.json + - ./keys/12_nodes/node_10/node_10.yaml:/app/configs/node_10.yaml + networks: + - threshold + node11: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_11.json --config-file-path /app/configs/node_11.yaml --use-mock-oracle" + ports: + - "50067:50051" + volumes: + - ./keys/12_nodes/node_11/node_11.json:/app/configs/node_11.json + - ./keys/12_nodes/node_11/node_11.yaml:/app/configs/node_11.yaml + networks: + - threshold + node12: + build: + context: . + dockerfile: Dockerfile + image: trieve/threshold + environment: + - KEY_PASSWORD=supersecret + - IS_TESTNET=true + - RUST_LOG=info + entrypoint: "/app/cli run --key-file-path /app/configs/node_12.json --config-file-path /app/configs/node_12.yaml --use-mock-oracle" + ports: + - "50068:50051" + volumes: + - ./keys/12_nodes/node_12/node_12.json:/app/configs/node_12.json + - ./keys/12_nodes/node_12/node_12.yaml:/app/configs/node_12.yaml + networks: + - threshold +networks: + threshold: + driver: bridge diff --git a/docker-compose.yaml b/docker-compose.yaml index 64abc05..462635e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -12,8 +12,8 @@ services: ports: - "50051:50051" volumes: - - ./keys/node_1/node_1.json:/app/configs/node_1.json - - ./keys/node_1/node_1.yaml:/app/configs/node_1.yaml + - ./keys/5_nodes/node_1/node_1.json:/app/configs/node_1.json + - ./keys/5_nodes/node_1/node_1.yaml:/app/configs/node_1.yaml - ./nodedb_1.db:/app/nodedb.db networks: - vaultnet @@ -30,8 +30,8 @@ services: ports: - "50052:50051" volumes: - - ./keys/node_2/node_2.json:/app/configs/node_2.json - - ./keys/node_2/node_2.yaml:/app/configs/node_2.yaml + - ./keys/5_nodes/node_2/node_2.json:/app/configs/node_2.json + - ./keys/5_nodes/node_2/node_2.yaml:/app/configs/node_2.yaml - ./nodedb_2.db:/app/nodedb.db networks: - vaultnet @@ -48,8 +48,8 @@ services: ports: - "50053:50051" volumes: - - ./keys/node_3/node_3.json:/app/configs/node_3.json - - ./keys/node_3/node_3.yaml:/app/configs/node_3.yaml + - ./keys/5_nodes/node_3/node_3.json:/app/configs/node_3.json + - ./keys/5_nodes/node_3/node_3.yaml:/app/configs/node_3.yaml - ./nodedb_3.db:/app/nodedb.db networks: - vaultnet @@ -66,8 +66,8 @@ services: ports: - "50054:50051" volumes: - - ./keys/node_4/node_4.json:/app/configs/node_4.json - - ./keys/node_4/node_4.yaml:/app/configs/node_4.yaml + - ./keys/5_nodes/node_4/node_4.json:/app/configs/node_4.json + - ./keys/5_nodes/node_4/node_4.yaml:/app/configs/node_4.yaml - ./nodedb_4.db:/app/nodedb.db networks: - vaultnet @@ -84,8 +84,8 @@ services: ports: - "50055:50051" volumes: - - ./keys/node_5/node_5.json:/app/configs/node_5.json - - ./keys/node_5/node_5.yaml:/app/configs/node_5.yaml + - ./keys/5_nodes/node_5/node_5.json:/app/configs/node_5.json + - ./keys/5_nodes/node_5/node_5.yaml:/app/configs/node_5.yaml - ./nodedb_5.db:/app/nodedb.db networks: - vaultnet diff --git a/keys/12_nodes/node_1/node_1.json b/keys/12_nodes/node_1/node_1.json new file mode 100644 index 0000000..0d49d37 --- /dev/null +++ b/keys/12_nodes/node_1/node_1.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh", + "encrypted_private_key_b64": "+ymlcezOD9qENLtcz6Y5QZPcAxsi4oW82mLT5qLAdyP6W9wAcIrA+6UykK06I1TTPzylJgfof5nTI4fiF8PWiurIQeoY0yWn8ur6Tn1o5/LGyXi2", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "YtJBMkc/l9altuAoOl8Zlw", + "iv_b64": "GMlWIn2aSkjz9dDx" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_1/node_1.yaml b/keys/12_nodes/node_1/node_1.yaml new file mode 100644 index 0000000..bdd493c --- /dev/null +++ b/keys/12_nodes/node_1/node_1.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_1/node_1.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_10/node_10.json b/keys/12_nodes/node_10/node_10.json new file mode 100644 index 0000000..267279f --- /dev/null +++ b/keys/12_nodes/node_10/node_10.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq", + "encrypted_private_key_b64": "JY+LLVym/p/4oKdTbH31eH63Nlv67F6mZoxOvSOxm2H72V/7P8m4nb8qGliI7ufLx2zVIMrGLDMAjot2Vg1BmcVbSC88GtxdsbZnRAySlQ2FQM63", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "lQ+ascVb/CXxPy9esPSIbw", + "iv_b64": "3ZMpZ+fl2bP3hUDs" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_10/node_10.yaml b/keys/12_nodes/node_10/node_10.yaml new file mode 100644 index 0000000..7dce36b --- /dev/null +++ b/keys/12_nodes/node_10/node_10.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_10/node_10.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_11/node_11.json b/keys/12_nodes/node_11/node_11.json new file mode 100644 index 0000000..620b600 --- /dev/null +++ b/keys/12_nodes/node_11/node_11.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT", + "encrypted_private_key_b64": "lyXW3clF5Nhmr5+rM1zhPc5AFmX4jYb/C6dmZoAyGEsTtyTlqIjwjLTtqIKYAgrhEvhpojgSTx76RIz/D8YU+jDYcds4CL7cW0polQRlM9DSkcEZ", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "eWgPq5igqu9Ohll5BdPJ6Q", + "iv_b64": "R3V9x1XSE8+HYd6b" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_11/node_11.yaml b/keys/12_nodes/node_11/node_11.yaml new file mode 100644 index 0000000..cc73336 --- /dev/null +++ b/keys/12_nodes/node_11/node_11.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_11/node_11.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_12/node_12.json b/keys/12_nodes/node_12/node_12.json new file mode 100644 index 0000000..c10612d --- /dev/null +++ b/keys/12_nodes/node_12/node_12.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk", + "encrypted_private_key_b64": "fj6csy5nPQAFhKIsgeBsl4EN4y8saDTsckCxj9TopFYn3JsI/Bio9vz85xCi5ErJAA8VL3GEfZAwa6f4NtbZlKcmZYQFvv5oLCMFcDxFjzz0d9Lk", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "uQi5Eku762Gp4BfROV0sCw", + "iv_b64": "LxcLsN2QcLGoCFig" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_12/node_12.yaml b/keys/12_nodes/node_12/node_12.yaml new file mode 100644 index 0000000..a971f25 --- /dev/null +++ b/keys/12_nodes/node_12/node_12.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_12/node_12.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_2/node_2.json b/keys/12_nodes/node_2/node_2.json new file mode 100644 index 0000000..b93e10b --- /dev/null +++ b/keys/12_nodes/node_2/node_2.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF", + "encrypted_private_key_b64": "ZGyxyfQZlvHpobcJvpHSOPtV07yVSlfDzNltMl7K/4KT2rttjo3M3cDprWqA8fuVcspJZQVrxQc+thJzPaRuLwoSPVfHUtncesP6QepIGDquBWgg", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "whlXAqC6YjjJ2f9HLSy9bg", + "iv_b64": "z/QOBPYZ/mqQdkq+" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_2/node_2.yaml b/keys/12_nodes/node_2/node_2.yaml new file mode 100644 index 0000000..bee4bcc --- /dev/null +++ b/keys/12_nodes/node_2/node_2.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_2/node_2.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_3/node_3.json b/keys/12_nodes/node_3/node_3.json new file mode 100644 index 0000000..c50f664 --- /dev/null +++ b/keys/12_nodes/node_3/node_3.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8", + "encrypted_private_key_b64": "Am+LRroZIbU0ZkvCeQICFfU2U1TYwJQIGyRNq04M894/0DEBkjDBsElwfc1VMWN7+JLpZ19l25qX8lgi1VbaDtyJASYAmCQL05z91gvu1l1yUMMS", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "pqt+s6+tW22OSkW74GuLjg", + "iv_b64": "udi/LlCKO/k0+Z15" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_3/node_3.yaml b/keys/12_nodes/node_3/node_3.yaml new file mode 100644 index 0000000..90f4592 --- /dev/null +++ b/keys/12_nodes/node_3/node_3.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_3/node_3.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_4/node_4.json b/keys/12_nodes/node_4/node_4.json new file mode 100644 index 0000000..94e5cb4 --- /dev/null +++ b/keys/12_nodes/node_4/node_4.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh", + "encrypted_private_key_b64": "dbc6unAn2Hki/Re8cIb9YyBOUhM2HMIhVRdosuAswwwJvYtxki4Wq8hPBSmBF1Xv0PDUwu5BKDxOy/KKgk8fTTkvPWdEhMsyYvvHErxO3x0XgILE", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "4SpJLJl3IqdLyejjrOzAqQ", + "iv_b64": "qC1haXiuTYVHPnAX" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_4/node_4.yaml b/keys/12_nodes/node_4/node_4.yaml new file mode 100644 index 0000000..64c332f --- /dev/null +++ b/keys/12_nodes/node_4/node_4.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_4/node_4.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_5/node_5.json b/keys/12_nodes/node_5/node_5.json new file mode 100644 index 0000000..6f8f404 --- /dev/null +++ b/keys/12_nodes/node_5/node_5.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx", + "encrypted_private_key_b64": "IVOa1NDFmbYNjzC2DlEUiEOTatyvhwuFRlkDuglkoRWfBrnH7LNOYxGC3ckzmUwE/eza/HmNpDXZWYH99EXvOGusy19FbdFXF1WcLxhFba3vPTQV", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "9IofejhFx8gcGm+UvszdMA", + "iv_b64": "54PuW6VLEaAfVyff" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_5/node_5.yaml b/keys/12_nodes/node_5/node_5.yaml new file mode 100644 index 0000000..cb470c4 --- /dev/null +++ b/keys/12_nodes/node_5/node_5.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_5/node_5.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_6/node_6.json b/keys/12_nodes/node_6/node_6.json new file mode 100644 index 0000000..aeeeeda --- /dev/null +++ b/keys/12_nodes/node_6/node_6.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4", + "encrypted_private_key_b64": "9v8sUeCAy5TbK+lvWQs/FULBZykW1Q88XVXSNVJ3EeBfSzyw5DU4Mxl1vLLei2bWI+L/MoBuReuUxgUbrivlIS1t0BiivM+jOLGqK3ns7hX2RhCx", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "V6hD09mjKO8UIo5ME9N/lg", + "iv_b64": "wYxsVm+4dmvEMs6o" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_6/node_6.yaml b/keys/12_nodes/node_6/node_6.yaml new file mode 100644 index 0000000..8230853 --- /dev/null +++ b/keys/12_nodes/node_6/node_6.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_6/node_6.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_7/node_7.json b/keys/12_nodes/node_7/node_7.json new file mode 100644 index 0000000..28687fb --- /dev/null +++ b/keys/12_nodes/node_7/node_7.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D", + "encrypted_private_key_b64": "97CmmWRwVELGqnAS8tThr82xA0C/OOSPwk9+7bBNlyN6JWEeV2hVjgnU+EoTmshWvJ9EtFu2umEftPC5nG9XpMgxb7485EK04L2YZ82uY9iVrYcV", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "DVhUcoVe4xmF/gxfjqwYVw", + "iv_b64": "sOwc9HNpwLPZsNbd" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_7/node_7.yaml b/keys/12_nodes/node_7/node_7.yaml new file mode 100644 index 0000000..1f9689d --- /dev/null +++ b/keys/12_nodes/node_7/node_7.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_7/node_7.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_8/node_8.json b/keys/12_nodes/node_8/node_8.json new file mode 100644 index 0000000..53de249 --- /dev/null +++ b/keys/12_nodes/node_8/node_8.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb", + "encrypted_private_key_b64": "Os4iV+RLaFsU3xfLNLxBTvANUlPMDz1y6y6yl8Doh2xpeFZT+/VEMdUVLATz/fsR6X+EFZu3nZm4iD5taCLDck+0jgSrVMU7OleMHVslBrhjzRxP", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "he7lSgh04a5ZOOPME+d0mA", + "iv_b64": "vbQ9P45w73ZWnnSV" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_8/node_8.yaml b/keys/12_nodes/node_8/node_8.yaml new file mode 100644 index 0000000..7739bdc --- /dev/null +++ b/keys/12_nodes/node_8/node_8.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_9 + public_key: 12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_8/node_8.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/12_nodes/node_9/node_9.json b/keys/12_nodes/node_9/node_9.json new file mode 100644 index 0000000..70782df --- /dev/null +++ b/keys/12_nodes/node_9/node_9.json @@ -0,0 +1,12 @@ +{ + "key_data": { + "public_key_b58": "12D3KooWSdYhmTKQdUkXKLETeaqecuoxfGryqxKwaeZaKc1rQvEg", + "encrypted_private_key_b64": "VYjXoGPRBQyBZgZuqMxEVeQD94cbZfzS+skb7XmJ3axL9joUar98+0QLLpXr9PBj+CCeqLaSvr6jQVoNTW3ZrzX7zKqDslPvalCbUlel+f9ZVsRh", + "encryption_params": { + "kdf": "argon2id", + "salt_b64": "FcgfZwpDs+eRDnV6xZvi7A", + "iv_b64": "B3KDYrDXY94Bzu9S" + } + }, + "dkg_keys": null +} \ No newline at end of file diff --git a/keys/12_nodes/node_9/node_9.yaml b/keys/12_nodes/node_9/node_9.yaml new file mode 100644 index 0000000..a7b2395 --- /dev/null +++ b/keys/12_nodes/node_9/node_9.yaml @@ -0,0 +1,34 @@ +allowed_peers: +- name: node_1 + public_key: 12D3KooWHRWTnjspkUPeBCRP4E7uWPLWjKPZm6zMDAjZh9wWXTkh +- name: node_2 + public_key: 12D3KooWLPixYU1tPHrmrep8KGobwQnjMqZSUoSqgwfD4oStVJWF +- name: node_3 + public_key: 12D3KooWH9tLpTSFNaCikNmetPrYJNXLhJsPViV6uGZCPMf8dRM8 +- name: node_4 + public_key: 12D3KooWBRkFeJTgpX8UiPPkTE9q6s7B9dCC4GT2CmTVcrPC6qjh +- name: node_5 + public_key: 12D3KooWMLXs8HRr8ySikPv5KF725fzAdKuZhEBQTbMF2x16LKhx +- name: node_6 + public_key: 12D3KooWAceML2c2KurUpA3tg6i1dyeiyKucZPKWeSoYdkpiPhw4 +- name: node_7 + public_key: 12D3KooWGnHgQES37t4hxmcXaSRwBjWwtu2MbyyRbDg248EVKE5D +- name: node_8 + public_key: 12D3KooWMVV25dH7GrNEfE3BfYKBcGn8iqujNzZcasAfDZUKzsNb +- name: node_10 + public_key: 12D3KooWDFZLHP5rKqiSZ1cU5cevivcoSUk2LWhiaSxCKXXxU9Gq +- name: node_11 + public_key: 12D3KooWMbAuiQ5wgVS5WTxeLUg5BRiYFeqpBR8LacYxYmAVChjT +- name: node_12 + public_key: 12D3KooWKDXwFZ3eSQRxhv7cWv9TLhxA8PGuvNhZ4mTmZuwzoabk +log_file_path: /home/cdxker/.config/thevault/node.log +key_file_path: /home/cdxker/work/Trieve/threshold/test_artifacts/test_12_nodes/node_9/node_9.json +database_directory: nodedb.db +grpc_port: 50051 +libp2p_udp_port: 0 +libp2p_tcp_port: 0 +confirmation_depth: 6 +monitor_start_block: 0 +min_signers: 8 +max_signers: 12 +save_keys: false diff --git a/keys/node_1/node_1.json b/keys/5_nodes/node_1/node_1.json similarity index 100% rename from keys/node_1/node_1.json rename to keys/5_nodes/node_1/node_1.json diff --git a/keys/node_1/node_1.yaml b/keys/5_nodes/node_1/node_1.yaml similarity index 97% rename from keys/node_1/node_1.yaml rename to keys/5_nodes/node_1/node_1.yaml index 4c24d21..b239cc0 100644 --- a/keys/node_1/node_1.yaml +++ b/keys/5_nodes/node_1/node_1.yaml @@ -17,3 +17,4 @@ confirmation_depth: 6 monitor_start_block: 0 min_signers: 3 max_signers: 5 +save_keys: true diff --git a/keys/node_2/node_2.json b/keys/5_nodes/node_2/node_2.json similarity index 100% rename from keys/node_2/node_2.json rename to keys/5_nodes/node_2/node_2.json diff --git a/keys/node_2/node_2.yaml b/keys/5_nodes/node_2/node_2.yaml similarity index 97% rename from keys/node_2/node_2.yaml rename to keys/5_nodes/node_2/node_2.yaml index f7464b7..1cb6077 100644 --- a/keys/node_2/node_2.yaml +++ b/keys/5_nodes/node_2/node_2.yaml @@ -17,3 +17,4 @@ confirmation_depth: 6 monitor_start_block: 0 min_signers: 3 max_signers: 5 +save_keys: true diff --git a/keys/node_3/node_3.json b/keys/5_nodes/node_3/node_3.json similarity index 100% rename from keys/node_3/node_3.json rename to keys/5_nodes/node_3/node_3.json diff --git a/keys/node_3/node_3.yaml b/keys/5_nodes/node_3/node_3.yaml similarity index 97% rename from keys/node_3/node_3.yaml rename to keys/5_nodes/node_3/node_3.yaml index 6de831d..a9c5bf0 100644 --- a/keys/node_3/node_3.yaml +++ b/keys/5_nodes/node_3/node_3.yaml @@ -17,3 +17,4 @@ confirmation_depth: 6 monitor_start_block: 0 min_signers: 3 max_signers: 5 +save_keys: true diff --git a/keys/node_4/node_4.json b/keys/5_nodes/node_4/node_4.json similarity index 100% rename from keys/node_4/node_4.json rename to keys/5_nodes/node_4/node_4.json diff --git a/keys/node_4/node_4.yaml b/keys/5_nodes/node_4/node_4.yaml similarity index 97% rename from keys/node_4/node_4.yaml rename to keys/5_nodes/node_4/node_4.yaml index 5afa33b..1ff919c 100644 --- a/keys/node_4/node_4.yaml +++ b/keys/5_nodes/node_4/node_4.yaml @@ -17,3 +17,4 @@ confirmation_depth: 6 monitor_start_block: 0 min_signers: 3 max_signers: 5 +save_keys: true diff --git a/keys/node_5/node_5.json b/keys/5_nodes/node_5/node_5.json similarity index 100% rename from keys/node_5/node_5.json rename to keys/5_nodes/node_5/node_5.json diff --git a/keys/node_5/node_5.yaml b/keys/5_nodes/node_5/node_5.yaml similarity index 97% rename from keys/node_5/node_5.yaml rename to keys/5_nodes/node_5/node_5.yaml index 091befd..4701e6a 100644 --- a/keys/node_5/node_5.yaml +++ b/keys/5_nodes/node_5/node_5.yaml @@ -17,3 +17,4 @@ confirmation_depth: 6 monitor_start_block: 0 min_signers: 3 max_signers: 5 +save_keys: true diff --git a/tests/src/config.rs b/tests/src/config.rs index 5032dd6..67f556b 100644 --- a/tests/src/config.rs +++ b/tests/src/config.rs @@ -25,7 +25,8 @@ mod config_test { "libp2p_udp_port": 0, "libp2p_tcp_port": 0, "confirmation_depth": 6, - "monitor_start_block": 0 + "monitor_start_block": 0, + "save_keys": true }"#; let config: NodeConfig = serde_json::from_str(json_str).expect("Failed to deserialize");