How to integrate Ephemeral Rollups in your Solana Program
Write your program
Add delegation and undelegation hooks
Deploy your program on Solana
Execute transactions
Delegation
is the process of transferring ownership of one or more of your program’s PDAs
to the delegation program. Ephemeral Validators will then be able to use the PDAs
to perform transactions in the SVM runtime and commit the state.
In Rust programs, you can use the ephemeral_rollups_sdk
crate to delegate accounts.
Install it with:
delegate_account
function to delegate an account to the delegation program.
Undelegation
is the process of transferring ownership of the PDAs
back to your program.
On undelegation, the state is committed and it trigger the finalization process. Once state it validated, the PDAs
are unlocked and can be used as normal on mainnet
commit
and finalize
a state or close
a session.