# Network configuration

> Keep mainnet, testnet, devnet identities, and sample data clearly separated.

Source: https://docs.iceroot.com/core/network-configuration/

Every integration needs a single, explicit network configuration. An address that looks familiar is not enough to identify the network it belongs to.

## Keep these values together

- Network identifier and chain identity.
- Node or API origin.
- Address and public-key format.
- Signature algorithm and message format.
- Transaction encoding and asset precision.
- Fee, nonce, and finality rules.

Take these from the same Heartwood release and deployment configuration. Values from Solar or ARK documentation are not substitutes for IceRoot configuration.

The [draft protocol](https://docs.iceroot.com/core/protocol-design/index.md) gives mainnet and the public testnet different address prefixes, `ice` and `tice`, and binds every signature to its network’s chain ID and genesis hash. The current baseline uses Base58Check addresses with a network byte. In both cases, check the complete configuration rather than the address alone.

The current crypto baseline loads and validates height-based [milestones](https://docs.iceroot.com/core/milestones/index.md). Its differential tests select the network configuration recorded with their vectors, rather than assuming a public network’s settings.

## Environments in the applications

| Environment                | Meaning                                                                                                                                                                                                      |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Mainnet / Testnet selector | A wallet environment choice; a label alone does not establish a node connection                                                                                                                              |
| IceRoot sample data        | Local balances and actions for trying the interface                                                                                                                                                          |
| Heartwood devnet signing   | The identity used by the validator portal login                                                                                                                                                              |
| Legacy Signer              | A separate extension, outside the IceRoot wallet, that holds Solar keys only to sign ownership proofs, such as claims on a token distributed from an archived Solar snapshot; it sends no Solar transactions |

The portal currently accepts the explicit network identifier `heartwood-devnet-v90`. Its signing identity is kept apart from the sample wallets. The IceRoot wallet holds IceRoot keys only; see [Storage and networks](https://docs.iceroot.com/wallets/browser/index.md#storage-and-networks).

## Default ports

From the IceRoot genesis, nodes use these ports by default. Operators can change any of them in their configuration.

| Service                                   | Mainnet | Public testnet | Devnets |
| ----------------------------------------- | ------- | -------------- | ------- |
| Peer-to-peer (relay)                      | 7668    | 17668          | 27668   |
| Node API (relay)                          | 7669    | 17669          | 27669   |
| History search and event stream (indexer) | 7670    | 17670          | 27670   |
| Mesh gateway                              | 7671    | 17671          | 27671   |

The forger opens no port: it reaches its own relay over the relay’s peer-to-peer port, which accepts it only from allowed addresses. [Validator hardening](https://docs.iceroot.com/validators/hardening/index.md#firewall-each-host) lists which ports each validator host should expose.

The current Heartwood devnet still runs in the reference-compatible stage and uses the reference implementation’s ports: peer-to-peer 6002, REST API 6003. Development builds of the Rust node take their ports from the network’s configuration, and `heartwood devnet` gives each of its nodes its own loopback address with these two ports.

## Switch deliberately

When changing networks, confirm the active account and asset before preparing an action. Applications should discard stale requests and cached account state when their network changes.

For a node deployment, use the installation and configuration instructions shipped with the exact Heartwood release. This guide does not substitute another chain’s install script or genesis settings.
