mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
Remove older files
This commit is contained in:
Binary file not shown.
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Set up paths
|
||||
DATA_DIR="$HOME/.luxd-converted"
|
||||
CHAIN_DATA="/home/z/work/lux/genesis/chaindata/C/db/ethdb"
|
||||
|
||||
echo "🚀 Launching Lux Node with Converted Mainnet Data"
|
||||
echo "================================================"
|
||||
echo "Database: $CHAIN_DATA"
|
||||
echo "Data dir: $DATA_DIR"
|
||||
|
||||
# Create data directory structure
|
||||
mkdir -p "$DATA_DIR/chainData/C/db"
|
||||
|
||||
# Create symlink to our converted database
|
||||
rm -f "$DATA_DIR/chainData/C/db/ethdb"
|
||||
ln -s "$CHAIN_DATA" "$DATA_DIR/chainData/C/db/ethdb"
|
||||
|
||||
# Launch using netrunner
|
||||
./build/netrunner server \
|
||||
--network-id=96369 \
|
||||
--data-dir="$DATA_DIR" \
|
||||
--http-host=0.0.0.0 \
|
||||
--http-port=9630 \
|
||||
--staking-enabled=false \
|
||||
--network-peer-list-gossip-frequency=250ms \
|
||||
--network-max-reconnect-delay=1s \
|
||||
--public-ip=127.0.0.1 \
|
||||
--health-check-frequency=2s \
|
||||
--api-admin-enabled \
|
||||
--api-metrics-enabled \
|
||||
--index-enabled \
|
||||
--log-level=info
|
||||
@@ -1,23 +0,0 @@
|
||||
[12-03|22:46:02.640] UNKNO local/network.go:429 creating network {"node-num": 5}
|
||||
[12-03|22:46:04.139] UNKNO local/network.go:597 adding node {"node-name": "node1", "node-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1", "log-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/logs", "db-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/db", "p2p-port": 9631, "api-port": 9630}
|
||||
[12-03|22:46:04.139] UNKNO local/network.go:607 starting node {"name": "node1", "binaryPath": "/Users/z/work/lux/node/build/luxd", "args": ["--health-check-frequency=2s", "--db-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/db", "--http-port=9630", "--genesis-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/genesis.json", "--public-ip=127.0.0.1", "--log-level=DEBUG", "--network-id=1337", "--bootstrap-ips=", "--staking-tls-cert-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/staking.crt", "--subnet-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/netConfigs", "--log-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/logs", "--bootstrap-ids=", "--staking-tls-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/staking.key", "--staking-signer-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/signer.key", "--chain-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1/chainConfigs", "--log-display-level=ERROR", "--data-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node1", "--staking-port=9631", "--api-admin-enabled=true", "--index-enabled=true", "--network-max-reconnect-delay=1s"]}
|
||||
[12-03|22:46:06.788] UNKNO local/network.go:597 adding node {"node-name": "node2", "node-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2", "log-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/logs", "db-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/db", "p2p-port": 9633, "api-port": 9632}
|
||||
[12-03|22:46:06.801] UNKNO local/network.go:607 starting node {"name": "node2", "binaryPath": "/Users/z/work/lux/node/build/luxd", "args": ["--staking-tls-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/staking.key", "--log-level=DEBUG", "--api-admin-enabled=true", "--network-max-reconnect-delay=1s", "--network-id=1337", "--data-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2", "--bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg", "--staking-tls-cert-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/staking.crt", "--staking-signer-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/signer.key", "--health-check-frequency=2s", "--public-ip=127.0.0.1", "--db-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/db", "--http-port=9632", "--subnet-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/netConfigs", "--index-enabled=true", "--log-display-level=ERROR", "--bootstrap-ips=[::1]:9631", "--chain-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/chainConfigs", "--log-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/logs", "--staking-port=9633", "--genesis-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node2/genesis.json"]}
|
||||
[12-03|22:46:09.675] UNKNO local/network.go:597 adding node {"node-name": "node3", "node-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3", "log-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/logs", "db-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/db", "p2p-port": 9635, "api-port": 9634}
|
||||
[12-03|22:46:09.675] UNKNO local/network.go:607 starting node {"name": "node3", "binaryPath": "/Users/z/work/lux/node/build/luxd", "args": ["--db-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/db", "--staking-port=9635", "--genesis-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/genesis.json", "--network-max-reconnect-delay=1s", "--public-ip=127.0.0.1", "--api-admin-enabled=true", "--log-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/logs", "--http-port=9634", "--staking-tls-cert-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/staking.crt", "--subnet-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/netConfigs", "--health-check-frequency=2s", "--data-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3", "--bootstrap-ips=[::1]:9631,[::1]:9633", "--staking-signer-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/signer.key", "--log-level=DEBUG", "--log-display-level=ERROR", "--network-id=1337", "--bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ", "--chain-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/chainConfigs", "--staking-tls-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node3/staking.key", "--index-enabled=true"]}
|
||||
[12-03|22:46:12.257] UNKNO local/network.go:597 adding node {"node-name": "node4", "node-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4", "log-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/logs", "db-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/db", "p2p-port": 9637, "api-port": 9636}
|
||||
[12-03|22:46:12.272] UNKNO local/network.go:607 starting node {"name": "node4", "binaryPath": "/Users/z/work/lux/node/build/luxd", "args": ["--data-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4", "--bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ,NodeID-NFBbbJ4qCmNaCzeW7sxErhvWqvEQMnYcN", "--staking-tls-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/staking.key", "--staking-port=9637", "--chain-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/chainConfigs", "--genesis-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/genesis.json", "--health-check-frequency=2s", "--log-level=DEBUG", "--api-admin-enabled=true", "--index-enabled=true", "--db-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/db", "--bootstrap-ips=[::1]:9631,[::1]:9633,[::1]:9635", "--staking-tls-cert-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/staking.crt", "--network-max-reconnect-delay=1s", "--network-id=1337", "--log-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/logs", "--http-port=9636", "--subnet-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/netConfigs", "--staking-signer-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node4/signer.key", "--log-display-level=ERROR", "--public-ip=127.0.0.1"]}
|
||||
[12-03|22:46:13.845] UNKNO local/network.go:597 adding node {"node-name": "node5", "node-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5", "log-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/logs", "db-dir": "/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/db", "p2p-port": 9639, "api-port": 9638}
|
||||
[12-03|22:46:13.851] UNKNO local/network.go:607 starting node {"name": "node5", "binaryPath": "/Users/z/work/lux/node/build/luxd", "args": ["--api-admin-enabled=true", "--bootstrap-ips=[::1]:9631,[::1]:9633,[::1]:9635,[::1]:9637", "--chain-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/chainConfigs", "--staking-signer-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/signer.key", "--index-enabled=true", "--network-id=1337", "--data-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5", "--db-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/db", "--log-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/logs", "--staking-port=9639", "--bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg,NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ,NodeID-NFBbbJ4qCmNaCzeW7sxErhvWqvEQMnYcN,NodeID-GWPcbFJZFfZreETSoWjPimr846mXEKCtu", "--log-level=DEBUG", "--network-max-reconnect-delay=1s", "--subnet-config-dir=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/netConfigs", "--staking-tls-key-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/staking.key", "--log-display-level=ERROR", "--staking-tls-cert-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/staking.crt", "--http-port=9638", "--genesis-file=/var/folders/xh/_fpw0c6d7rs1sn8nwx93t7gw0000gn/T/network-runner-root-data/network_20251203_224602/node5/genesis.json", "--health-check-frequency=2s", "--public-ip=127.0.0.1"]}
|
||||
[12-03|22:46:13.851] UNKNO local/network.go:654 checking local network healthiness {"num-of-nodes": 5}
|
||||
[12-03|22:49:13.853] UNKNO local/network.go:800 removing node {"name": "node1"}
|
||||
[12-03|22:49:13.933] UNKNO local/node_process.go:125 node process finished {"node": "node1"}
|
||||
[12-03|22:49:13.933] UNKNO local/network.go:800 removing node {"name": "node2"}
|
||||
[12-03|22:49:13.988] UNKNO local/node_process.go:125 node process finished {"node": "node2"}
|
||||
[12-03|22:49:13.989] UNKNO local/network.go:800 removing node {"name": "node3"}
|
||||
[12-03|22:49:14.049] UNKNO local/node_process.go:125 node process finished {"node": "node3"}
|
||||
[12-03|22:49:14.049] UNKNO local/network.go:800 removing node {"name": "node4"}
|
||||
[12-03|22:49:14.108] UNKNO local/node_process.go:125 node process finished {"node": "node4"}
|
||||
[12-03|22:49:14.108] UNKNO local/network.go:800 removing node {"name": "node5"}
|
||||
[12-03|22:49:14.223] UNKNO local/node_process.go:125 node process finished {"node": "node5"}
|
||||
[12-03|22:49:14.223] UNKNO local/network.go:783 done stopping network
|
||||
@@ -1,143 +0,0 @@
|
||||
// Copyright (C) 2021-2025, Lux Industries Inc. All rights reserved.
|
||||
// See the file LICENSE for licensing terms.
|
||||
|
||||
// Simple standalone test to verify 5-node network deployment
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/luxfi/netrunner/local"
|
||||
"github.com/luxfi/netrunner/network/node"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Configuration
|
||||
nodePath := "/Users/z/work/lux/node/build/luxd"
|
||||
numNodes := 5
|
||||
networkID := uint32(12345)
|
||||
|
||||
// Check binary exists
|
||||
if _, err := os.Stat(nodePath); os.IsNotExist(err) {
|
||||
log.Fatalf("Node binary not found at %s", nodePath)
|
||||
}
|
||||
|
||||
fmt.Printf("Starting %d-node network deployment test...\n", numNodes)
|
||||
fmt.Printf("Binary: %s\n", nodePath)
|
||||
fmt.Printf("Network ID: %d\n", networkID)
|
||||
fmt.Println()
|
||||
|
||||
// Create network configuration
|
||||
config := local.Config{
|
||||
NodeConfig: node.Config{
|
||||
BinaryPath: nodePath,
|
||||
ConfigFile: "",
|
||||
},
|
||||
NumNodes: uint32(numNodes),
|
||||
NetworkID: networkID,
|
||||
BaseHTTPPort: 9630,
|
||||
BaseStakingPort: 9631,
|
||||
LogLevel: "info",
|
||||
}
|
||||
|
||||
// Create network
|
||||
network, err := local.NewNetwork(config)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create network: %v", err)
|
||||
}
|
||||
|
||||
// Start network
|
||||
fmt.Println("=== Starting Network ===")
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
|
||||
defer cancel()
|
||||
|
||||
startTime := time.Now()
|
||||
err = network.Start(ctx)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to start network: %v", err)
|
||||
}
|
||||
startDuration := time.Since(startTime)
|
||||
fmt.Printf("✓ Network started in %v\n\n", startDuration)
|
||||
|
||||
// Wait for nodes to become healthy
|
||||
fmt.Println("=== Waiting for Nodes to Become Healthy ===")
|
||||
healthCtx, healthCancel := context.WithTimeout(context.Background(), 3*time.Minute)
|
||||
defer healthCancel()
|
||||
|
||||
healthStart := time.Now()
|
||||
err = network.Healthy(healthCtx)
|
||||
if err != nil {
|
||||
log.Fatalf("Network failed to become healthy: %v", err)
|
||||
}
|
||||
healthDuration := time.Since(healthStart)
|
||||
fmt.Printf("✓ All nodes healthy in %v\n\n", healthDuration)
|
||||
|
||||
// Get node information
|
||||
fmt.Println("=== Node Information ===")
|
||||
nodeNames := network.GetNodeNames()
|
||||
fmt.Printf("Total nodes: %d\n", len(nodeNames))
|
||||
|
||||
for _, name := range nodeNames {
|
||||
node, err := network.GetNode(name)
|
||||
if err != nil {
|
||||
fmt.Printf("✗ Failed to get node %s: %v\n", name, err)
|
||||
continue
|
||||
}
|
||||
|
||||
nodeConfig := node.GetConfig()
|
||||
fmt.Printf(" %s:\n", name)
|
||||
fmt.Printf(" HTTP Port: %d\n", nodeConfig.HTTPPort)
|
||||
fmt.Printf(" Staking Port: %d\n", nodeConfig.StakingPort)
|
||||
fmt.Printf(" API URI: http://127.0.0.1:%d\n", nodeConfig.HTTPPort)
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
// Check bootstrap status via info API
|
||||
fmt.Println("=== Bootstrap Status ===")
|
||||
for _, name := range nodeNames {
|
||||
node, err := network.GetNode(name)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
nodeConfig := node.GetConfig()
|
||||
uri := fmt.Sprintf("http://127.0.0.1:%d", nodeConfig.HTTPPort)
|
||||
|
||||
// Try to query info API (simplified check)
|
||||
fmt.Printf(" %s (%s): Ready\n", name, uri)
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
// Test results
|
||||
fmt.Println("=== Test Results ===")
|
||||
fmt.Printf("✓ Network deployment: SUCCESS\n")
|
||||
fmt.Printf("✓ Network start time: %v\n", startDuration)
|
||||
fmt.Printf("✓ Health check time: %v\n", healthDuration)
|
||||
fmt.Printf("✓ Total time: %v\n", time.Since(startTime))
|
||||
fmt.Printf("✓ Nodes deployed: %d/%d\n", len(nodeNames), numNodes)
|
||||
|
||||
// Keep network running for a bit to allow manual inspection
|
||||
fmt.Println("\n=== Network Running ===")
|
||||
fmt.Println("Press Ctrl+C to stop (or wait 30 seconds for automatic shutdown)")
|
||||
|
||||
shutdownTimer := time.NewTimer(30 * time.Second)
|
||||
<-shutdownTimer.C
|
||||
|
||||
// Cleanup
|
||||
fmt.Println("\n=== Shutting Down Network ===")
|
||||
stopCtx, stopCancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer stopCancel()
|
||||
|
||||
err = network.Stop(stopCtx)
|
||||
if err != nil {
|
||||
log.Printf("Warning: Error stopping network: %v\n", err)
|
||||
} else {
|
||||
fmt.Println("✓ Network stopped successfully")
|
||||
}
|
||||
|
||||
fmt.Println("\n=== Test Complete ===")
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Test script for netrunner multi-consensus orchestration
|
||||
|
||||
set -e
|
||||
|
||||
# Colors for output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo -e "${BLUE}=== Netrunner Multi-Consensus Orchestration Test ===${NC}"
|
||||
echo
|
||||
|
||||
# Build netrunner
|
||||
echo -e "${GREEN}Building netrunner...${NC}"
|
||||
cd /home/z/work/lux/netrunner
|
||||
go build -o bin/netrunner ./cmd/netrunner
|
||||
|
||||
# Test 1: Start Lux engine
|
||||
echo
|
||||
echo -e "${BLUE}Test 1: Starting Lux engine...${NC}"
|
||||
./bin/netrunner engine start lux-test lux \
|
||||
--network-id 99999 \
|
||||
--http-port 29650 \
|
||||
--staking-port 29651 \
|
||||
--data-dir /tmp/netrunner-lux &
|
||||
|
||||
LUX_PID=$!
|
||||
sleep 5
|
||||
|
||||
# Check if Lux is running
|
||||
if kill -0 $LUX_PID 2>/dev/null; then
|
||||
echo -e "${GREEN}✓ Lux engine started${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ Lux engine failed to start${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test 2: Start Geth engine
|
||||
echo
|
||||
echo -e "${BLUE}Test 2: Starting Geth engine...${NC}"
|
||||
./bin/netrunner engine start geth-test geth \
|
||||
--network-id 99998 \
|
||||
--http-port 29545 \
|
||||
--ws-port 29546 \
|
||||
--data-dir /tmp/netrunner-geth &
|
||||
|
||||
GETH_PID=$!
|
||||
sleep 5
|
||||
|
||||
# Check if Geth is running
|
||||
if kill -0 $GETH_PID 2>/dev/null; then
|
||||
echo -e "${GREEN}✓ Geth engine started${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ Geth engine failed to start${NC}"
|
||||
kill $LUX_PID 2>/dev/null
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test 3: List engines
|
||||
echo
|
||||
echo -e "${BLUE}Test 3: Listing engines...${NC}"
|
||||
./bin/netrunner engine list
|
||||
|
||||
# Test 4: Check engine status
|
||||
echo
|
||||
echo -e "${BLUE}Test 4: Checking engine status...${NC}"
|
||||
./bin/netrunner engine status lux-test
|
||||
./bin/netrunner engine status geth-test
|
||||
|
||||
# Test 5: Start OP Stack (will fail without L1, but tests the setup)
|
||||
echo
|
||||
echo -e "${BLUE}Test 5: Testing OP Stack setup...${NC}"
|
||||
./bin/netrunner engine start op-test op \
|
||||
--network-id 99997 \
|
||||
--http-port 29645 \
|
||||
--data-dir /tmp/netrunner-op \
|
||||
--extra l1_rpc=http://localhost:29545 \
|
||||
--extra sequencer=true &
|
||||
|
||||
OP_PID=$!
|
||||
sleep 3
|
||||
|
||||
# OP Stack may fail without proper L1 setup, that's expected
|
||||
if kill -0 $OP_PID 2>/dev/null; then
|
||||
echo -e "${YELLOW}⚠ OP Stack started (may not be fully functional)${NC}"
|
||||
kill $OP_PID 2>/dev/null
|
||||
else
|
||||
echo -e "${YELLOW}⚠ OP Stack failed (expected without L1 setup)${NC}"
|
||||
fi
|
||||
|
||||
# Test 6: Start Eth2 setup
|
||||
echo
|
||||
echo -e "${BLUE}Test 6: Testing Eth2 setup...${NC}"
|
||||
./bin/netrunner engine start eth2-test eth2 \
|
||||
--network-id 99996 \
|
||||
--http-port 29745 \
|
||||
--data-dir /tmp/netrunner-eth2 \
|
||||
--extra consensus_client=lighthouse \
|
||||
--extra execution_client=geth &
|
||||
|
||||
ETH2_PID=$!
|
||||
sleep 3
|
||||
|
||||
if kill -0 $ETH2_PID 2>/dev/null; then
|
||||
echo -e "${YELLOW}⚠ Eth2 started (may not be fully functional)${NC}"
|
||||
kill $ETH2_PID 2>/dev/null
|
||||
else
|
||||
echo -e "${YELLOW}⚠ Eth2 failed (expected without genesis setup)${NC}"
|
||||
fi
|
||||
|
||||
# Test 7: Test stack manifest
|
||||
echo
|
||||
echo -e "${BLUE}Test 7: Creating stack manifest...${NC}"
|
||||
cat > /tmp/test-stack.yaml << EOF
|
||||
name: test-stack
|
||||
version: 1.0.0
|
||||
description: Test multi-consensus stack
|
||||
|
||||
engines:
|
||||
- name: lux-l1
|
||||
type: lux
|
||||
network_id: 96369
|
||||
http_port: 30650
|
||||
staking_port: 30651
|
||||
wait_healthy: true
|
||||
|
||||
- name: geth-l2
|
||||
type: geth
|
||||
network_id: 200200
|
||||
http_port: 30545
|
||||
depends_on: [lux-l1]
|
||||
|
||||
bridge:
|
||||
type: native
|
||||
source: lux-l1
|
||||
destination: geth-l2
|
||||
EOF
|
||||
|
||||
echo -e "${GREEN}✓ Stack manifest created${NC}"
|
||||
|
||||
# Cleanup
|
||||
echo
|
||||
echo -e "${BLUE}Cleaning up...${NC}"
|
||||
kill $LUX_PID 2>/dev/null || true
|
||||
kill $GETH_PID 2>/dev/null || true
|
||||
rm -rf /tmp/netrunner-*
|
||||
|
||||
echo
|
||||
echo -e "${GREEN}=== Orchestration Test Complete ===${NC}"
|
||||
echo
|
||||
echo "Summary:"
|
||||
echo " ✓ Lux engine: Functional"
|
||||
echo " ✓ Geth engine: Functional"
|
||||
echo " ⚠ OP Stack: Requires L1 setup"
|
||||
echo " ⚠ Eth2: Requires genesis setup"
|
||||
echo " ✓ Multi-engine orchestration: Working"
|
||||
echo
|
||||
echo "Next steps:"
|
||||
echo "1. Configure proper genesis for Eth2"
|
||||
echo "2. Set up L1 for OP Stack testing"
|
||||
echo "3. Test bridge functionality"
|
||||
echo "4. Run production stack with real data"
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "🔍 Verifying Converted Database"
|
||||
echo "================================"
|
||||
|
||||
DB_PATH="/home/z/work/lux/genesis/chaindata/C/db/ethdb"
|
||||
|
||||
echo "Database location: $DB_PATH"
|
||||
echo ""
|
||||
|
||||
# Check database size
|
||||
SIZE=$(du -sh "$DB_PATH" 2>/dev/null | cut -f1)
|
||||
echo "✅ Database size: $SIZE"
|
||||
|
||||
# Count files
|
||||
FILES=$(find "$DB_PATH" -type f | wc -l)
|
||||
echo "✅ Total files: $FILES"
|
||||
|
||||
echo ""
|
||||
echo "📊 Database Contents:"
|
||||
echo "- 27 million state trie nodes"
|
||||
echo "- 1.08 million blocks"
|
||||
echo "- LastBlock: 0x32dede1fc8e0f11ecde12fb42aef7933fc6c5fcf863bc277b5eac08ae4d461f0"
|
||||
echo "- Block height: 1082780"
|
||||
echo ""
|
||||
echo "✅ Database is ready for node launch!"
|
||||
echo ""
|
||||
echo "To query balances, a working luxd node binary is needed."
|
||||
echo "The converted database contains all account balances and can be used with:"
|
||||
echo "- luxd (once built)"
|
||||
echo "- Any Ethereum-compatible node that supports BadgerDB"
|
||||
Reference in New Issue
Block a user