Why Use a Local Setup?

When testng delegations and real-time behaviour of your Solana programs, fast feedback loops may be critical. Running an Local Ephemeral Rollup allows you to:
  • Test delegations and behaviours quickly without network latency and rate limits.
  • Simulate real-time Solana runtime transactions locally.
  • Customize your local ephemeral validator to your needs.

Quickstart Local Ephemeral Validator

Install the latest version of validator to your localhost:
npm install -g @magicblock-labs/ephemeral-validator@latest
Start the validator locally (pointing to devnet):
RUST_LOG=info ephemeral-validator --accounts-lifecycle ephemeral --remote-url "https://rpc.magicblock.app/devnet"
Find customization options for your validator such as rpc port:
ephemeral-validator -h

Explore test scripts with local ephemeral validator for both Anchor and Native Rust: