> For the complete documentation index, see [llms.txt](https://polarischain-1.gitbook.io/polarischain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polarischain-1.gitbook.io/polarischain/8.-network-layer-and-protocol-operations/8.6-protocol-upgrades-and-rolling-choreography.md).

# 8.6 - Protocol Upgrades & Rolling Choreography

Polarischain implements an **epoch-bound, 2/3-signal-flip upgrade model** that enables continuous evolution without hard forks or chain splits.

**Upgrade Flow**

1. **Feature-Gated Release:** New validator binaries support `protocol_version + N`, with features disabled until explicitly activated via configuration flags.
2. **Independent Deployment:** Operators upgrade nodes asynchronously. The network continues operating at the active version.
3. **Readiness Signaling:** Upgraded validators emit a `ProtocolUpgradeSignal` transaction (Section 6.1) declaring support for the target version.
4. **Epoch Activation:** At each epoch boundary, the EpochManager evaluates readiness. If `≥ 2/3` of bonded stake (or `≥ 2/3` of permissioned validators in beta) signals readiness, the protocol version atomically advances.
5. **Feature Activation & Safe Exit:** New features activate instantly. Validators running outdated binaries fail-fast at the next consensus round and alert operators to upgrade.

**Safety Guarantees**

Old and new binaries produce **identical state under the active protocol version**. A network operating at version `N` can safely include nodes supporting up to `N + K` with zero behavioral divergence until the version flip. This eliminates chain-split risk and ensures consensus continuity during transitions.

**Safe-Mode Epoch Advance**

If `advance_epoch` encounters a fault (e.g., epoch-transition logic bug), `advance_epoch_safe_mode` executes instead. Only the minimum committee/version state advances; reward distribution and non-critical state transitions are deferred. Once a patched binary is deployed and `advance_epoch` succeeds, accumulated deferred operations resolve naturally over subsequent epochs.

**Permissioned-to-Decentralized Transition**

During permissioned-beta, the Foundation coordinates rolling upgrades directly with operators. At PoS activation (Phase 5+), upgrade authority transitions to validator consensus voting. The Foundation recuses itself from voting on proposals it originates, maintaining strict separation of operational and governance authority.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://polarischain-1.gitbook.io/polarischain/8.-network-layer-and-protocol-operations/8.6-protocol-upgrades-and-rolling-choreography.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
