Skip to content

Solana session intent specification#201

Open
lgalabru wants to merge 5 commits into
tempoxyz:mainfrom
solana-foundation:feat/solana-sessions
Open

Solana session intent specification#201
lgalabru wants to merge 5 commits into
tempoxyz:mainfrom
solana-foundation:feat/solana-sessions

Conversation

@lgalabru

@lgalabru lgalabru commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

Specification draft for MPP session intent, driving an implementation that will the audited and maintained by Solana Foundation (not ready for review)

@alexanderattar

Copy link
Copy Markdown

Closed #200 to move things here. I went through the draft and had a few questions.

The lean voucher makes sense to me if channelId is always treated as the authoritative commitment to payer, recipient, asset, and program state. Does that imply the verifier is expected to resolve channel state onchain, or is there an intended offchain-only verification path?

Are you aiming for one canonical channel program, or would any program that implements this instruction set and state model be compatible?

I noticed metering is entirely server-side in this draft, with the voucher only authorizing cumulative payment. Was that intentional?

I had also written up sections on replay protection, crash safety for distributed servers, and Ed25519 instruction introspection that may be worth pulling into this draft if useful.

@lgalabru

Copy link
Copy Markdown
Contributor Author

Thanks @alexanderattar, appreciate your help!
The server verifies vouchers off-chain during the session (signature check, monotonicity, balance — no RPC needed per request). The channel state is resolved on-chain only at open (to confirm the deposit landed) and at settle/close (to claim funds). This is the same as Tempo — off-chain during streaming, on-chain at settlement boundaries.

Any compatible program with the spec should be usable, this is why we're proposing channelProgram in the challenge: different programs could offer different trade-offs (grace period length, supported tokens, compression, etc.). The spec defines the logical interface; implementations vary.

Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Co-authored-by: jo <17280917+dev-jodee@users.noreply.github.com>
@github-actions

github-actions Bot commented Mar 25, 2026

Copy link
Copy Markdown

Spec Preview

Spec Changed Artifacts
draft-card-charge-00 Yes HTML · TXT · XML · PDF
draft-evm-charge-00 Yes HTML · TXT · XML · PDF
draft-hedera-charge-00 Yes HTML · TXT · XML · PDF
draft-httpauth-payment-00 Yes HTML · TXT · XML · PDF
draft-lightning-charge-00 Yes HTML · TXT · XML · PDF
draft-lightning-session-00 Yes HTML · TXT · XML · PDF
draft-payment-discovery-00 Yes HTML · TXT · XML · PDF
draft-payment-intent-charge-00 Yes HTML · TXT · XML · PDF
draft-payment-transport-mcp-00 Yes HTML · TXT · XML · PDF
draft-solana-charge-00 Yes HTML · TXT · XML · PDF
draft-solana-session-00 New HTML · TXT · XML · PDF
draft-stellar-charge-00 Yes HTML · TXT · XML · PDF
draft-stripe-charge-00 Yes HTML · TXT · XML · PDF
draft-tempo-charge-00 Yes HTML · TXT · XML · PDF
draft-tempo-session-00 Yes HTML · TXT · XML · PDF

Browse preview release assets

@lgalabru lgalabru marked this pull request as ready for review May 18, 2026 21:46
Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
Comment thread specs/methods/solana/draft-solana-session-00.md Outdated
|--------|--------|-------|----------|
| 0 | 32 | `channelId` | Raw Solana address bytes |
| 32 | 8 | `cumulativeAmount` | u64 little-endian |
| 40 | 8 | `expiresAt` | i64 little-endian; `0` = no expiration |

@brendanjryan brendanjryan May 20, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voucher expiration signing is ambiguous. The HTTP shape exposes expiresAt as an ISO 8601/RFC 3339 string, but the signed Borsh payload uses an i64.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed with latest

Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
Comment thread specs/methods/solana/draft-solana-session-00.md
|-------|------|----------|-------------|
| `channelId` | string | REQUIRED | Channel this voucher authorizes |
| `cumulativeAmount` | string | REQUIRED | Total authorized spend (base units) |
| `expiresAt` | string | OPTIONAL | Voucher expiration (ISO 8601) |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need expiration on both the vouchers and the sessions?

I think this will get pretty complicated to manage, and also introduces a number of edge cases which you need to guard against, like griefing from setting very low expiresAt values

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed with latest

@lgalabru lgalabru requested a review from brendanjryan May 28, 2026 22:54
@brendanjryan

Copy link
Copy Markdown
Collaborator

@lgalabru -- thank for updating this!

Now that there are many proposals for sessions (evm, tempo, and solana) but we have not defined the "generic" intent, we run some risk of divergences on common fields or control flows.

Do you mind if we push fwd a generic spec and then rebase this spec on top of this? Alternative is moving forward with this spec, and then rebasing changes

I expect that we can get a draft for the generic session intent up next week and move pretty quickly to get it approved. Would this work for you? This shouldn't block actual implementation of the method / sdks as long as you can rebase changes in.

@lgalabru

lgalabru commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

@brendanjryan sounds like a great plan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants