For the complete documentation index, see llms.txt. This page is also available as Markdown.

Sessions

A NorthStar session is a bounded, isolated execution context anchored to a Solana account. It runs as an Ephemeral Rollup — single-tenant, with its own slot cadence, fee economics, and account scope — for a configurable lifespan, then settles atomically back to L1.

Anatomy

Every session has:

  • An owner — the Solana keypair that opened it. Sessions are derived from (portal, owner, gridId).

  • A grid id — an integer chosen by the owner. Two sessions for the same owner must have different grid ids.

  • A TTL — the maximum lifespan in slots. After expiry, accounts force-undelegate.

  • A fee cap — the maximum lamports the session can spend on internal accounting. Once depleted, the session terminates.

  • A fee structure — the schedule that governs per-instruction fees inside the session. Defaults to gasless on devnet; arbitrary in production.

  • A set of delegated accounts — the on-chain state the session can write. Everything else is read-only (inherited from L1).

Lifecycle

Five distinct states: Created → Delegated → Active → (Closed or Expired) → settled.

What's local to the session vs. visible from L1

Account state
While session is active
After session closes

Delegated accounts (pool, vault, agent keypair)

Writable on ER. Locked on L1 — no L1 transaction can modify them.

Settled atomically: all changes commit to L1.

Non-delegated accounts (mints, owner pubkey)

Read-only on ER, inherited from L1

Unaffected by session.

Session metadata (PDA, fee_vault)

Lives on L1 throughout

Reaped on close (rent returned to owner).

Constraints

  • One session per (owner, grid_id) — Portal won't open a duplicate.

  • Sessions don't compose — a single transaction can't span two sessions; pick one.

  • Settle-back is all-or-nothing — partial failures don't materialize.

See also

Last updated