# Technical Specifications

### Network Specifications

#### Chain Information

| Parameter      | Value       | Description              |
| -------------- | ----------- | ------------------------ |
| Chain Name     | OPN Chain   | Official network name    |
| Chain ID       | 984 (0x3d8) | EIP-155 chain identifier |
| Network ID     | 984         | Network identifier       |
| Native Token   | OPN         | Native currency          |
| Token Decimals | 18          | Standard ERC-20 decimals |
| EVM Version    | Pectra      | Latest Ethereum features |

#### Network Endpoints

| Environment | RPC URL                         | WebSocket URL               | Status         |
| ----------- | ------------------------------- | --------------------------- | -------------- |
| Testnet     | <https://testnet-rpc.iopn.tech> | wss\://testnet-ws.iopn.tech | ✅ Active       |
| Mainnet     | <https://rpc.iopn.tech>         | wss\://ws.iopn.tech         | 🚧 Coming Soon |

#### Block Specifications

| Parameter         | Value      | Description                    |
| ----------------- | ---------- | ------------------------------ |
| Target Block Time | 1 second   | Average block production time  |
| Block Gas Limit   | 30,000,000 | Maximum gas per block          |
| Max Block Size    | \~2 MB     | Approximate maximum block size |
| Empty Blocks      | Allowed    | Can produce empty blocks       |

#### Transaction Specifications

| Parameter            | Value                | Description                   |
| -------------------- | -------------------- | ----------------------------- |
| Min Gas Price        | 7 Gwei (7 × 10⁹ wei) | Minimum transaction gas price |
| Gas Price Increment  | 0.1 Gwei             | Minimum price increment       |
| Max Transaction Size | 128 KB               | Maximum transaction data size |
| Transaction Timeout  | 20 blocks            | Mempool expiration time       |
| Max Gas per TX       | 30,000,000           | Same as block limit           |

### Consensus Specifications

#### Tendermint Parameters

| Parameter           | Value          | Description                        |
| ------------------- | -------------- | ---------------------------------- |
| Consensus Algorithm | Tendermint BFT | Byzantine Fault Tolerant consensus |
| Block Proposer      | Round-robin    | Validator selection method         |
| Voting Power        | Stake-weighted | Based on staked tokens             |
| Quorum              | 2/3 + 1        | Required for consensus             |

#### Timing Parameters

| Parameter           | Value  | Description              |
| ------------------- | ------ | ------------------------ |
| Timeout Propose     | 3000ms | Time for block proposal  |
| Timeout Prevote     | 1000ms | Time for prevoting       |
| Timeout Precommit   | 1000ms | Time for precommitting   |
| Timeout Commit      | 1000ms | Time after commit        |
| Skip Timeout Commit | false  | Always wait full timeout |

#### Validator Specifications

| Parameter                    | Value   | Description                  |
| ---------------------------- | ------- | ---------------------------- |
| Max Validators               | 100     | Maximum active validator set |
| Min Self Delegation          | 1 OPN   | Minimum self-stake           |
| Unbonding Period             | 21 days | Time to unbond stake         |
| Slash Fraction (Double Sign) | 5%      | Penalty for double signing   |
| Slash Fraction (Downtime)    | 0.1%    | Penalty for downtime         |
| Min Signed Per Window        | 50%     | Minimum uptime requirement   |

### EVM Specifications

#### Compatibility

| Feature     | Support       | Notes                    |
| ----------- | ------------- | ------------------------ |
| EVM Version | Pectra        | Latest Ethereum upgrades |
| Solidity    | Up to Current | All versions supported   |
| Vyper       | ✅             | Full support             |
| EIP-1559    | ✅             | Base fee mechanism       |
| EIP-2718    | ✅             | Typed transactions       |
| EIP-2930    | ✅             | Access lists             |
| EIP-7702    | ✅             | EOA code (Pectra)        |

#### Gas Costs

| Operation         | Gas Cost      | Notes             |
| ----------------- | ------------- | ----------------- |
| Transfer          | 21,000        | Standard transfer |
| Contract Creation | 32,000 + code | Base + deployment |
| SSTORE (new)      | 20,000        | New storage slot  |
| SSTORE (update)   | 5,000         | Existing slot     |
| SLOAD             | 2,100         | Read storage      |
| Memory (per word) | 3             | Memory expansion  |

#### Opcode Support

All standard EVM opcodes are supported, including:

**Arithmetic Operations:**

* ADD, MUL, SUB, DIV, SDIV, MOD, SMOD, ADDMOD, MULMOD, EXP, SIGNEXTEND

**Comparison & Bitwise:**

* LT, GT, SLT, SGT, EQ, ISZERO, AND, OR, XOR, NOT, BYTE, SHL, SHR, SAR

**Environmental Information:**

* ADDRESS, BALANCE, ORIGIN, CALLER, CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY, CODESIZE, CODECOPY, GASPRICE, EXTCODESIZE, EXTCODECOPY, EXTCODEHASH

**Block Information:**

* BLOCKHASH, COINBASE, TIMESTAMP, NUMBER, DIFFICULTY, GASLIMIT, CHAINID, SELFBALANCE, BASEFEE

**Stack, Memory, Storage:**

* POP, MLOAD, MSTORE, MSTORE8, SLOAD, SSTORE, JUMP, JUMPI, PC, MSIZE, GAS, JUMPDEST

**Flow Operations:**

* STOP, CREATE, CALL, CALLCODE, RETURN, DELEGATECALL, CREATE2, STATICCALL, REVERT, INVALID, SELFDESTRUCT

#### Precompiled Contracts

| Address | Name           | Gas Cost       | Description                   |
| ------- | -------------- | -------------- | ----------------------------- |
| 0x01    | ECDSA Recovery | 3000           | Signature recovery            |
| 0x02    | SHA256         | 60 + 12/word   | SHA256 hashing                |
| 0x03    | RIPEMD160      | 600 + 120/word | RIPEMD160 hashing             |
| 0x04    | Identity       | 15 + 3/word    | Data copy                     |
| 0x05    | ModExp         | Variable       | Modular exponentiation        |
| 0x06    | ECAdd          | 150            | Elliptic curve addition       |
| 0x07    | ECMul          | 6000           | Elliptic curve multiplication |
| 0x08    | ECPairing      | Variable       | Elliptic curve pairing        |
| 0x09    | Blake2f        | Variable       | Blake2f compression           |

### P2P Network Specifications

#### Network Parameters

| Parameter        | Value    | Description         |
| ---------------- | -------- | ------------------- |
| P2P Port         | 26656    | Default P2P port    |
| RPC Port         | 26657    | Tendermint RPC      |
| WS Port          | 26657    | WebSocket endpoint  |
| Max Peers        | 50       | Maximum connections |
| Persistent Peers | 10       | Always connected    |
| Seed Mode        | Optional | Can run as seed     |

#### Message Types

| Type        | Size Limit | Description         |
| ----------- | ---------- | ------------------- |
| Block       | 4 MB       | Complete block data |
| Transaction | 128 KB     | Single transaction  |
| Vote        | 1 KB       | Consensus vote      |
| BlockPart   | 64 KB      | Block fragment      |

### State & Storage Specifications

#### State Database

| Parameter         | Value           | Description        |
| ----------------- | --------------- | ------------------ |
| DB Backend        | LevelDB/RocksDB | Key-value store    |
| State Pruning     | Configurable    | Keep recent states |
| History Retention | 362,880 blocks  | \~100 hours        |
| Snapshot Interval | 1000 blocks     | State sync points  |

#### Storage Requirements

| Node Type    | Storage   | Growth Rate | Description        |
| ------------ | --------- | ----------- | ------------------ |
| Archive Node | \~Unknown | \~Unknown   | Full history       |
| Full Node    | \~Unknown | \~Unknown   | Default pruning    |
| Pruned Node  | \~Unknown | \~Unknown   | Aggressive pruning |
| Light Client | \~Unknown | \~Unknown   | Headers only       |

### API Specifications

#### JSON-RPC Methods

**Supported Namespaces:**

* `web3_*` - Web3 specific methods
* `net_*` - Network information
* `eth_*` - Ethereum compatible methods
* `debug_*` - Debug methods (optional)
* `txpool_*` - Transaction pool info

#### Rate Limits

| Endpoint Type | Limit      | Window   | Description        |
| ------------- | ---------- | -------- | ------------------ |
| Public RPC    | 100 req/s  | 1 second | Per IP address     |
| Authenticated | 1000 req/s | 1 second | With API key       |
| WebSocket     | 100 msg/s  | 1 second | Per connection     |
| Archive Data  | 10 req/s   | 1 second | Historical queries |

#### Response Times

| Method Type   | Target   | Maximum | Description      |
| ------------- | -------- | ------- | ---------------- |
| Current State | < 50ms   | 100ms   | Latest data      |
| Recent Blocks | < 100ms  | 200ms   | Last 1000 blocks |
| Historical    | < 500ms  | 1000ms  | Older data       |
| Computation   | < 1000ms | 5000ms  | Complex queries  |

### Security Specifications

#### Cryptography

| Algorithm  | Usage        | Parameters            |
| ---------- | ------------ | --------------------- |
| ECDSA      | Signatures   | secp256k1 curve       |
| Keccak-256 | Hashing      | Ethereum compatible   |
| ED25519    | Consensus    | Tendermint signatures |
| SHA-256    | Merkle trees | Block hashes          |

#### Network Security

| Feature                | Implementation     | Description         |
| ---------------------- | ------------------ | ------------------- |
| DDoS Protection        | Rate limiting      | Per-IP limits       |
| Sybil Resistance       | Proof of Stake     | Economic security   |
| Message Authentication | Digital signatures | All messages signed |
| Transport Security     | Optional TLS       | For RPC/WS          |

### Performance Specifications

#### Transaction Throughput

| Metric           | Value       | Conditions      |
| ---------------- | ----------- | --------------- |
| Simple Transfers | 10,000+ TPS | 21k gas each    |
| ERC-20 Transfers | 5,000+ TPS  | \~65k gas each  |
| Complex DeFi     | 1,000+ TPS  | \~300k gas each |
| Peak Observed    | 15,000 TPS  | Testnet maximum |

#### Latency Specifications

| Operation                | Target   | Maximum |
| ------------------------ | -------- | ------- |
| Block Propagation        | < 200ms  | 500ms   |
| Transaction Confirmation | < 2s     | 5s      |
| State Sync               | < 10 min | 30 min  |
| RPC Response             | < 50ms   | 100ms   |

### Hardware Specifications

#### Minimum Requirements

| Component | Specification | Notes              |
| --------- | ------------- | ------------------ |
| CPU       | 4 cores       | Modern x86\_64     |
| RAM       | 16 GB         | 32 GB for RocksDB  |
| Storage   | 500 GB SSD    | NVMe preferred     |
| Network   | 100 Mbps      | 1 Gbps recommended |
| OS        | Linux/Unix    | Ubuntu 20.04+      |

#### Recommended Specifications

| Component | Specification | Notes             |
| --------- | ------------- | ----------------- |
| CPU       | 8+ cores      | High frequency    |
| RAM       | 32 GB         | 64 GB for archive |
| Storage   | 2 TB NVMe     | RAID optional     |
| Network   | 1 Gbps        | Dedicated line    |
| OS        | Ubuntu 22.04  | Latest LTS        |

### Governance Specifications

#### Proposal Types

| Type             | Voting Period | Quorum | Threshold |
| ---------------- | ------------- | ------ | --------- |
| Text             | 14 days       | 40%    | 50%       |
| Parameter Change | 14 days       | 40%    | 50%       |
| Software Upgrade | 14 days       | 40%    | 67%       |
| Emergency        | 24 hours      | 67%    | 90%       |

#### Voting Power

* Based on staked OPN tokens
* 1 token = 1 vote
* Delegated stake counts
* No vote buying mechanisms

### Future Specifications

#### Planned Upgrades

| Feature             | Target  | Description      |
| ------------------- | ------- | ---------------- |
| Account Abstraction | Q4 2025 | EIP-4337 support |
| ZK Integration      | 2026    | Privacy features |

#### Compatibility Commitments

* Maintain full EVM compatibility
* Follow Ethereum upgrades
* Preserve API compatibility
* Support legacy contracts

***
