Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/integration-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,26 @@ jobs:

# Note: Using specific features instead of --all-features to avoid sp1-sdk
# build issues (linker OOM on Linux, C++20 on Windows).
# adaptive-ml is required for these tests.
- name: Build tests
run: cargo build --tests --features "default,mocks,h2_greedy,test-utils"
run: cargo build --tests --features "default,adaptive-ml,mocks,h2_greedy,test-utils"

- name: Clean incremental artifacts
run: |
find target -name "incremental" -type d -exec rm -rf {} + 2>/dev/null || true
df -h

- name: Adaptive Components
run: cargo nextest run --test adaptive_components_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast
run: cargo nextest run --test adaptive_components_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Adaptive Integration
run: cargo nextest run --test adaptive_integration_tests --features "default,mocks,h2_greedy,test-utils" --no-fail-fast
run: cargo nextest run --test adaptive_integration_tests --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Multi-Armed Bandit
run: cargo nextest run --test multi_armed_bandit_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast
run: cargo nextest run --test multi_armed_bandit_integration_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Q-Learning Cache
run: cargo nextest run --test q_learning_cache_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast
run: cargo nextest run --test q_learning_cache_integration_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Hyperbolic Routing
run: cargo nextest run --test hyperbolic_routing_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast
run: cargo nextest run --test hyperbolic_routing_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast
8 changes: 6 additions & 2 deletions .github/workflows/integration-identity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
# Note: Using specific features instead of --all-features to avoid sp1-sdk
# build issues (linker OOM on Linux, C++20 on Windows).
# Using -j2 to reduce parallel linking and avoid linker memory exhaustion.
- name: Build tests
- name: Build tests (default features)
run: cargo build --tests --features "default,mocks,h2_greedy,test-utils" -j2

- name: Clean incremental artifacts
Expand All @@ -146,5 +146,9 @@ jobs:
- name: Validation Tests
run: cargo nextest run --test validation_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast

# adaptive-ml is only required for EigenTrust tests
- name: Build EigenTrust test (adaptive-ml)
run: cargo build --tests --features "default,adaptive-ml,mocks,h2_greedy,test-utils" -j2

- name: EigenTrust
run: cargo nextest run --test eigentrust_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast
run: cargo nextest run --test eigentrust_integration_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast
18 changes: 11 additions & 7 deletions .github/workflows/integration-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,26 @@ jobs:

# Note: Using specific features instead of --all-features to avoid sp1-sdk
# build issues (linker OOM on Linux, C++20 on Windows).
- name: Build tests
- name: Build tests (default features)
run: cargo build --tests --features "default,mocks,h2_greedy,test-utils"

- name: Clean incremental artifacts
run: |
find target -name "incremental" -type d -exec rm -rf {} + 2>/dev/null || true
df -h

- name: Gossipsub
run: cargo nextest run --test gossipsub_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Four Word Integration
run: cargo nextest run --test four_word_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Coordinator Integration
run: cargo nextest run --test coordinator_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Health Integration
run: cargo nextest run --test health_integration_test --features "default,mocks,h2_greedy,test-utils" --no-fail-fast

# adaptive-ml is only required for gossipsub and coordinator tests
- name: Build adaptive-ml tests
run: cargo build --tests --features "default,adaptive-ml,mocks,h2_greedy,test-utils"

- name: Gossipsub
run: cargo nextest run --test gossipsub_integration_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast

- name: Coordinator Integration
run: cargo nextest run --test coordinator_integration_test --features "default,adaptive-ml,mocks,h2_greedy,test-utils" --no-fail-fast
54 changes: 54 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,51 @@ h2_greedy = []
# Test utilities including mock DHT for integration tests
test-utils = []

# ============================================================================
# Optional Features (production-ready with fallbacks)
# ============================================================================
#
# These features enhance functionality but are NOT required for core operation.
# All code paths have fallback implementations when these features are disabled.
# Enable them for enhanced trust-weighted routing and ML-based optimization.

# Machine learning components: Thompson Sampling, Q-Learning, EigenTrust, LSTM
# Enables trust-weighted peer selection, EigenTrust reputation tracking, and ML-based optimization.
# When disabled: DHT uses standard Kademlia routing without trust weighting.
adaptive-ml = []

# Trust-weighted peer selection using EigenTrust in routing decisions
trust-routing = []

# Region-aware routing and geographic peer selection
geographic = []

# Sybil attack detection for DHT protection
sybil-detection = []

# Collusion detection for witness validation
collusion-detection = []

# S/Kademlia security extensions (requires trust-routing)
skademlia = ["trust-routing"]

# Storage orchestration and placement engine (requires adaptive-ml)
placement = ["adaptive-ml"]

# Enable all experimental features
experimental = [
"adaptive-ml",
"trust-routing",
"geographic",
"sybil-detection",
"collusion-detection",
"skademlia",
"placement",
]

# Backwards compatibility alias
full = ["experimental"]

[dependencies]
# Core async and serialization
tokio = { version = "1.49", features = ["full"] }
Expand Down Expand Up @@ -158,6 +203,15 @@ path = "tests/eigentrust_integration_test.rs"
name = "gossipsub_integration_test"
path = "tests/gossipsub_integration_test.rs"

# Examples requiring adaptive-ml feature
[[example]]
name = "security_example"
required-features = ["adaptive-ml"]

[[example]]
name = "adaptive_network_monitor"
required-features = ["adaptive-ml"]

# Platform-specific dependencies for secure memory management
[target.'cfg(unix)'.dependencies]
libc = "0.2"
Expand Down
Loading