diff --git a/.github/workflows/integ-tests.yml b/.github/workflows/integ-tests.yml index 6414ee17..00ac0400 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: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - - name: Upload Docker image artifact - uses: actions/upload-artifact@v4 + - name: Build and push Docker image + uses: useblacksmith/build-push-action@v1 with: - name: thevalut-node-test-image - path: thevalut-node-test.tar.gz - retention-days: 1 + 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 @@ -87,7 +101,8 @@ jobs: - name: Start 12-node stack (docker-compose) run: | - bash setup_nodes.sh 12 + 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: | @@ -137,32 +152,37 @@ 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 - - name: Create NodeCluster (3 nodes) + - name: Create NodeCluster (5 nodes) run: ./scripts/clear_dkg_keys.sh - name: Start 5-node stack (docker-compose) run: | + 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 50051..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50057-50061 is open." break fi echo "Port not ready yet – retry #$i" @@ -197,15 +217,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 @@ -215,14 +239,15 @@ jobs: - name: Start 5-node stack (docker-compose) run: | + 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 50051..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -230,7 +255,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 50051-50055 - name: Shutdown stack & print logs run: | @@ -262,32 +287,40 @@ 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 - name: Start 5-node stack with network chaos run: | + 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 50051..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -327,32 +360,37 @@ 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 - name: Start 5-node stack with node chaos run: | + 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 50051..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -392,15 +430,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 @@ -410,14 +452,16 @@ jobs: - name: Start 5-node stack with network chaos run: | - docker compose -f docker-compose.yaml -f docker-compose.chaos-network.yaml up -d + # 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 50051..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -425,12 +469,12 @@ 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 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 @@ -457,32 +501,36 @@ 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 - name: Wait for gRPC endpoint run: | - echo "Waiting for node to expose port 50051..." + echo "Waiting for node to expose port 50051-50055..." for i in {1..30}; do - if nc -z localhost 50051; then - echo "Port 50051 is open." + if nc -z localhost {50051..50055}; then + echo "Port 50051-50055 is open." break fi echo "Port not ready yet – retry #$i" @@ -490,7 +538,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 50051-50055 - name: Shutdown stack & print logs run: | diff --git a/crates/node/src/config.rs b/crates/node/src/config.rs index 7d510862..5df5a8ea 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 00000000..2e34ace1 --- /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 f55715f4..462635e0 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 @@ -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 @@ -21,7 +21,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -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 @@ -39,7 +39,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -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 @@ -57,7 +57,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -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 @@ -75,7 +75,7 @@ services: build: context: . dockerfile: Dockerfile - image: vault-node + image: trieve/threshold environment: - KEY_PASSWORD=supersecret - IS_TESTNET=true @@ -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 00000000..0d49d37d --- /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 00000000..bdd493c3 --- /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 00000000..267279f0 --- /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 00000000..7dce36b6 --- /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 00000000..620b6005 --- /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 00000000..cc733361 --- /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 00000000..c10612d6 --- /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 00000000..a971f254 --- /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 00000000..b93e10b0 --- /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 00000000..bee4bcc2 --- /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 00000000..c50f6645 --- /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 00000000..90f4592e --- /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 00000000..94e5cb49 --- /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 00000000..64c332fc --- /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 00000000..6f8f4047 --- /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 00000000..cb470c4d --- /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 00000000..aeeeeda6 --- /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 00000000..82308537 --- /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 00000000..28687fbc --- /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 00000000..1f9689d9 --- /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 00000000..53de2493 --- /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 00000000..7739bdca --- /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 00000000..70782df8 --- /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 00000000..a7b2395b --- /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 4c24d21a..b239cc08 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 f7464b7b..1cb6077a 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 6de831d8..a9c5bf0d 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 5afa33bc..1ff919cf 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 091befd8..4701e6aa 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/setup_nodes.sh b/setup_nodes.sh index 4612ddf1..45d5fded 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)..."); diff --git a/tests/src/config.rs b/tests/src/config.rs index 5032dd65..67f556b4 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");