logoSolana Program

Architecture

The role of each program, why they are kept separate, and how a request flows through them.

A programmatic signer lets you approve an action with an Ed25519 keypair without signing the transaction that submits it. You sign an authorization message off chain. A relayer sends it with your signature to the Ed25519 Signer program, which checks the signature and gives your programmatic signer PDA signer privilege for the approved call.

Program roles

ProgramResponsibilityState
Ed25519 SignerChecks every authorization signature, the executor instruction, and its accounts, then gives the matching PDAs signer privilege for one CPINone. It stores no authorizations and no nonces
Legacy Message ExecutorChecks the execution message and the nonce, advances the nonce, then invokes each application instruction in orderNone of its own. It reads and advances a Nonce program account
NonceInitializes nonce accounts, advances their values, and lets their authorities withdraw funds or close them. This is not related to the System program's durable nonces (soon to be deprecated).One 72-byte account per nonce, holding the value, authority, and initialization slot
Application programApplies its own rules to the instructions, accounts, and signer privileges it receivesWhatever the application defines

Each program does one job. Ed25519 Signer never parses application instructions, the executor never verifies a signature, and the Nonce program never knows what its value protects. Each can be audited and frozen on its own.

The pieces are also interchangeable. Executor and the Nonce program accept calls from any program, so a signer program for another signature scheme, such as a quantum-resistant one, could reuse both. An executor for a message format that does not exist yet could reuse the Nonce program the same way.

Ed25519 Signer calls only the executors on its built-in allow list, since it relies on them to consume a nonce before its PDAs act. Supporting a new executor means adding it to that list in a program upgrade. Allow list source.

Request flow

Wallet
Relayer
Signs and pays for the relay transaction that carries the authorization.
Submit(signatures, authorization message)
Ed25519 Signer
Verifies every signature and gives each authority's PDA signer privilege.
CPI Execute(execution message) + PDA signer
Legacy Message Executor
Checks the execution message against the stored nonce, then advances the nonce and invokes each instruction in order.
1. CPI Advance
Nonce program
Advances the nonce so the authorization cannot run twice.
2. CPI instructions
Application programs
Invoke all instructions via CPI, forwarding signer privilege.
Every change commits together or rolls back together, including the nonce advance.

PDA derivation

The programmatic signer PDA is derived under the Ed25519 Signer program from the seed programmatic-signer and the authority's 32 raw public key bytes. There is no registration step. Derivation source.

spl-programmatic-signer address GmaDrppBC7P5ARKV8g3djiwP89vz1jLK23V2GBjuAEGB

It prints DPtajHyTTrmEHk3MnyfWVCypdEdyjk1ESbK7UxbaxXqw.

On this page