chore: sync submodule state (parent ref update)

Made-with: Cursor
This commit is contained in:
defiQUG
2026-03-02 12:14:09 -08:00
parent 50ab378da9
commit 5efe36b1e0
1100 changed files with 155024 additions and 8674 deletions

View File

@@ -6,11 +6,18 @@
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
CONFIG_DIR="$PROJECT_ROOT/config"
GENESIS_FILE="$CONFIG_DIR/genesis.json"
# Minimal logging (used if init.sh is not sourced or fails)
log_success() { echo -e "\033[0;32m[✓]\033[0m $*"; }
log_error() { echo -e "\033[0;31m[✗]\033[0m $*" >&2; }
log_warn() { echo -e "\033[0;33m[⚠]\033[0m $*"; }
# Optional: load lib (may fail if .env or Azure deps are missing)
if [ -f "$SCRIPT_DIR/../lib/init.sh" ]; then
SCRIPT_DIR="$SCRIPT_DIR" source "$SCRIPT_DIR/../lib/init.sh" 2>/dev/null || true
fi
log_success "Validating Genesis File..."
@@ -60,29 +67,28 @@ else
exit 1
fi
# Check IBFT configuration
log_warn "Checking IBFT configuration..."
IBFT_CONFIG=$(jq -r '.config.ibft2' "$GENESIS_FILE")
# Check IBFT 2 / QBFT configuration
log_warn "Checking IBFT 2 / QBFT configuration..."
IBFT_CONFIG=$(jq -r '.config.ibft2 // .config.qbft // "null"' "$GENESIS_FILE")
if [ "$IBFT_CONFIG" != "null" ]; then
log_success "✓ IBFT 2.0 configuration exists"
# Check block period
BLOCK_PERIOD=$(jq -r '.config.ibft2.blockperiodseconds' "$GENESIS_FILE")
log_success "✓ IBFT 2.0 / QBFT configuration exists"
# Prefer qbft for Chain 138
BLOCK_KEY=".config.qbft.blockperiodseconds // .config.ibft2.blockperiodseconds"
EPOCH_KEY=".config.qbft.epochlength // .config.ibft2.epochlength"
BLOCK_PERIOD=$(jq -r "$BLOCK_KEY" "$GENESIS_FILE")
EPOCH_LENGTH=$(jq -r "$EPOCH_KEY" "$GENESIS_FILE")
if [ "$BLOCK_PERIOD" == "2" ]; then
log_success "✓ Block period is correct: $BLOCK_PERIOD seconds"
else
log_warn "⚠ Block period is $BLOCK_PERIOD (expected 2)"
fi
# Check epoch length
EPOCH_LENGTH=$(jq -r '.config.ibft2.epochlength' "$GENESIS_FILE")
if [ "$EPOCH_LENGTH" == "30000" ]; then
log_success "✓ Epoch length is correct: $EPOCH_LENGTH"
else
log_warn "⚠ Epoch length is $EPOCH_LENGTH (expected 30000)"
fi
else
log_error "✗ IBFT 2.0 configuration not found"
log_error "✗ IBFT 2.0 / QBFT configuration not found"
exit 1
fi