# Cross-Rollup Execution Lifecycle
This outlines the lifecycle of an xCall from Rollup X to Rollup Y, using a Shared Publisher (SP) as the 2PC (Two-Phase Commit) coordinator.

## 🟡 Pre-Block Phase
* User submits a transaction to Rollup X containing xCalls (cross-domain calls) targeting Rollup Y.
* The Shared Publisher (SP) initiates a 2PC protocol, acting as the coordinator.
* Upon receiving the commit response from Rollup Y, SP also receives: **Post-state root, Gas consumed**
* SP finalizes the decision and broadcasts a decided message.
## 🟢 Transaction Phase
* Sequencers on X and Y pre-fill their inboxes and outboxes with the relevant xCall metadata based on the SP's decided state.
* A user triggers a token bridge operation from Rollup X → Rollup Y:
* On X: A bridge contract locks the token.
* X sends a message to Y.
* Y processes the message and returns a response.
* X reads the response and continues execution based on Y’s result.
## 🔵 Block Publishing Phase
* Both X and Y sequencers:
* Include the xCall transactions via inbox/outbox population.
* Publish their respective L2 blocks.
* SP:
* Receives both blocks.
* Validates inclusion of known xCalls along with their post-state and gas charges.
* Sequencers asynchronously publish ZK proofs for their blocks.
## 🟣 Aggregation & L1 Publication Phase
* SP validates each block's ZK proof.
* SP creates an aggregated ZK proof that:
* Verifies each block's validity proof.
* Verifies cross-rollup xCall executions match the prior decided state.
* SP publishes the aggregated proof to Ethereum L1.