Sessions
Last updated
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.
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).
Five distinct states: Created → Delegated → Active → (Closed or Expired) → settled.
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).
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.
Account delegation — what makes an account writable on the ER.
Programmable economics — the FeeStructure parameter.
Settle-back guarantees — the atomicity model.
Real-time confirmation — slot cadence inside a session.
Last updated
