# FAQ

Common questions about NCN Network v2.

***

## General Questions

### What is NCN Network?

NCN Network v2 is a decentralized AI inference network that connects clients who need AI computation with compute providers who have GPU/CPU resources. It uses blockchain-based payments and validator consensus to ensure fair and secure computation.

### How does NCN differ from centralized AI services?

| Aspect           | Centralized          | NCN Network        |
| ---------------- | -------------------- | ------------------ |
| **Control**      | Single company       | Decentralized      |
| **Pricing**      | Fixed by provider    | Market-driven      |
| **Availability** | Vendor dependent     | Multiple providers |
| **Censorship**   | Possible             | Resistant          |
| **Payment**      | Subscription/API key | Pay-per-use crypto |

### What AI models are supported?

NCN supports:

* **TorchScript** models (`.pt`, `.pth`)
* **ONNX** models (`.onnx`)
* **Safetensors** models
* **Custom models** with executor scripts

### Is NCN production-ready?

NCN Network v2 is approximately 85% complete. It's suitable for:

* ✅ Development and testing
* ✅ Beta deployments
* ⚠️ Production (with caution)

See [Project Status](https://docs.neurochain.ai/nc/neurochainai-guides/introduction/readme) for current completion status.

***

## Technical Questions

### What programming languages are supported?

**Backend Services**: Rust **Model Execution**: Python (PyTorch, Transformers) **Smart Contracts**: Solidity **Client Libraries**: Currently Rust, others planned

### What are the hardware requirements?

**Gateway Node**:

* CPU: 2+ cores
* RAM: 4 GB
* Storage: 50 GB

**Compute Node**:

* CPU: 4+ cores
* RAM: 8+ GB (16 GB recommended)
* GPU: Optional but recommended for ML workloads
* Storage: 100+ GB

**P2P Registry**:

* CPU: 2+ cores
* RAM: 4 GB
* Storage: 50 GB

### How does the sandbox work?

The compute node sandbox uses multiple Linux security features:

1. **seccomp** - Filters system calls
2. **Namespaces** - Isolates processes, network, filesystem
3. **Landlock** - Controls filesystem access
4. **Resource limits** - Bounds CPU, memory, time

See [Sandbox Security](https://github.com/NeuroChainAi/docs-guides/blob/main/security/sandbox-security.md) for details.

### Can I run NCN on macOS or Windows?

* **Linux**: Full support (recommended for production)
* **macOS**: Development support (limited sandbox features)
* **Windows**: Experimental (sandbox not available)

***

## Payment Questions

### How do payments work?

1. Client submits request
2. Validators sign preprocessing validation
3. Client pays to smart contract (escrow)
4. Compute node executes model
5. Validators sign completion validation
6. Smart contract distributes payment

See [Payment Flow](https://docs.neurochain.ai/nc/neurochainai-guides/architecture/payment-flow) for details.

### What cryptocurrencies are supported?

NCN uses ERC20 tokens on Ethereum-compatible chains:

* **Testnet**: NCN Token on Forknet
* **Future**: ETH, stablecoins planned

### What happens if a request fails?

* **Compute failure**: Request expires, automatic refund
* **Validator rejection**: Request cannot complete, refund on expiry
* **Network failure**: Request times out, automatic refund

### How are fees calculated?

```
Total Fee = Compute Price + Gateway Gas + Validator Reward + Treasury Fee
```

Typical distribution:

* 80% to Compute Node
* 10% to Gateway
* 5% to Validators
* 5% to Treasury

***

## Operator Questions

### How do I become a Gateway operator?

1. Set up a Gateway node
2. Create a subnet with models
3. Pay subnet creation fee
4. Attract compute nodes and clients

See [Gateway Operator Guide](https://github.com/NeuroChainAi/docs-guides/blob/main/guides/operators/gateway-operator.md).

### How do I become a Compute provider?

1. Set up a Compute node
2. Join a subnet
3. Download/configure models
4. Start receiving tasks

See [Compute Operator Guide](https://github.com/NeuroChainAi/docs-guides/blob/main/guides/operators/compute-operator.md).

### How do I become a Validator?

1. Stake required tokens
2. Run P2P Registry node with validator key
3. Participate in validation consensus

See [Validator Operator Guide](https://github.com/NeuroChainAi/docs-guides/blob/main/guides/operators/validator-operator.md).

### How much can I earn?

Earnings depend on:

* **Gateways**: Routing fee per request
* **Compute**: Execution fee per request
* **Validators**: Validation reward per request

Typical fees: See [Payment Flow](https://docs.neurochain.ai/nc/neurochainai-guides/architecture/payment-flow).

***

## Development Questions

### How do I add a custom model?

1. Export model to TorchScript/ONNX
2. Create executor script
3. Configure subnet with model
4. Deploy to compute nodes

See [Use Cases - Custom Models](https://docs.neurochain.ai/nc/neurochainai-guides/introduction/use-cases#custom-model-deployment).

### How do I run tests?

```bash
# Rust tests
cargo test --all

# Contract tests
cd contracts && forge test -vvv

# Integration tests
./scripts/run_integration_tests.sh
```

### How do I debug issues?

```bash
# Enable debug logging
export RUST_LOG=debug
export RUST_BACKTRACE=1

# Run component
cargo run --bin gateway_node
```

See [Debugging Guide](https://github.com/NeuroChainAi/docs-guides/blob/main/guides/development/debugging.md).

### Where can I find API documentation?

* [API Reference](https://docs.neurochain.ai/nc/neurochainai-guides/api-reference/api-reference) - Overview
* [Protobuf Definitions](https://docs.neurochain.ai/nc/neurochainai-guides/api-reference/protobuf) - Proto files
* [HTTP Endpoints](https://github.com/NeuroChainAi/docs-guides/blob/main/api-reference/http-endpoints.md) - REST API

***

## Security Questions

### Is NCN secure?

NCN implements multiple security layers:

* ✅ Sandboxed execution
* ✅ Cryptographic signatures
* ✅ Validator consensus
* ✅ Escrow payments
* ⚠️ External audit (recommended before production)

See [Security Overview](https://docs.neurochain.ai/nc/neurochainai-guides/security/security).

### What if a malicious model is uploaded?

The sandbox prevents:

* Network access
* Filesystem access outside allowed paths
* Dangerous system calls
* Resource exhaustion

Malicious code is contained and cannot affect the host system.

### What if validators collude?

The M-of-N consensus requires 3 of 5 validators to agree. Collusion requires:

* Compromising multiple validators
* Overcoming stake-based selection
* Risking slashing penalties

Economic incentives discourage collusion.

### How are private keys protected?

Private keys should be:

* Never stored on-chain
* Kept in secure storage (HSM for production)
* Never committed to version control
* Rotated regularly

See [Best Practices](https://github.com/NeuroChainAi/docs-guides/blob/main/security/best-practices.md).

***

## Troubleshooting Questions

### Why can't I connect to the Gateway?

Common causes:

1. Gateway not running
2. Wrong address/port
3. Firewall blocking
4. Network issues

```bash
# Check if running
ps aux | grep gateway

# Test connection
curl http://localhost:8080/health
```

### Why is my inference request failing?

Check:

1. Model exists on compute node
2. Input format is correct
3. Payment was submitted (if required)
4. Compute node is not busy

See [Common Issues](https://github.com/NeuroChainAi/docs-guides/blob/main/troubleshooting/common-issues.md).

### Why is the sandbox failing?

Common causes:

1. Running on non-Linux system
2. Missing kernel features
3. Incompatible model code

Try `SANDBOX_MODE=permissive` for debugging.

See [Compute Issues](https://github.com/NeuroChainAi/docs-guides/blob/main/troubleshooting/compute-issues.md).

***

## Future Plans

### What's on the roadmap?

* Model auto-downloader (Phase 11)
* Integration testing (Phase 12)
* Production deployment (Phase 13)
* Monitoring & analytics (Phase 14)

See [Implementation Roadmap](https://github.com/NeuroChainAi/docs-guides/blob/main/IMPLEMENTATION_ROADMAP.md).

### Will there be official SDKs?

Planned SDKs:

* Python (in progress)
* JavaScript/TypeScript
* Go

### Will NCN support other blockchains?

Currently focused on Ethereum/Arbitrum. Future chains may include:

* Other EVM chains
* Solana
* Near

***

## Still Have Questions?

* Check the [Documentation Index](https://docs.neurochain.ai/nc/neurochainai-guides/introduction/readme)
* Search [GitHub Issues](https://github.com/neurochainai/ncn-network-v2-rs/issues)
* Join the community (Discord/Telegram)
* Open a new GitHub issue
