Skip to main content

Overview

This guide covers common issues you may encounter when developing and testing with MagicBlock Ephemeral Rollups, along with solutions and workarounds.

Connection Issues

Problem: Tests fail with connection errors:
Solutions:
  1. Check if validators are running:
  1. Start validators if not running:
  1. Check validator health:
  1. View validator logs:
Problem: Tests connect to devnet when you expect localnet, or vice versa.Solution:Check your Anchor.toml configuration:
Anchor.toml
Verify environment variables:
Expected values for localnet:
Problem:
Solution:Install the ephemeral validator globally:
Verify installation:
If using nvm, ensure the global package is accessible:
Problem: Tests timeout or fail with WebSocket errors:
Solutions:
  1. Verify WebSocket endpoint configuration:
  1. Check if ephemeral-validator is listening on WS port:
  1. Restart ephemeral-validator with correct ports:
The WebSocket will be available on port 7800 (RPC port + 1).

Build and Deployment Issues

Problem: Program ID mismatch errors when deploying:
Solution:Delete existing keypairs and rebuild:
Update program IDs in:
  • Anchor.toml
  • lib.rs (declare_id! macro)
  • Any test files
Problem:
Solutions:
  1. Update dependencies:
  1. Check Rust version:
  1. Verify Anchor version:
  1. Clean and rebuild:
Problem:
Solution:For localnet, airdrop SOL:
For devnet:
Check balance:
Problem: anchor test starts its own validator instead of using the running one.Solution:Use the --skip-local-validator flag:
Or set in Anchor.toml:
The test script will automatically detect and use running validators.

Delegation Issues

Problem: Tests fail immediately after delegation:
Solution:Add a delay after delegation to allow propagation:
A 2-3 second delay is typically sufficient for delegation to complete.
Problem:
Solution:For localnet, include the validator identity in remaining accounts:
Problem:
Solution:Ensure PDA seeds match between delegation and program:
Verify PDA derivation in tests:
Problem:
Solution:Undelegate before re-delegating:
Or reset the validator:

Commit and State Issues

Problem:
Solution:Use skipPreflight: true when committing:
Commits may fail simulation but still succeed on-chain.
Problem:
Solution:Increase timeout or check base layer connectivity:
Verify base layer is reachable:
Problem: Account state differs between Ephemeral Rollup and base layer.Solution:
  1. Explicitly commit changes:
  1. Wait for commitment to finalize:
  1. Verify commit interval in delegation:

Version Compatibility

Problem:
Solution:Use the correct Solana version (2.3.13):
Update PATH:
Problem:
Solution:Install and use Anchor 0.32.1:
Update Anchor.toml:
Problem:
Solution:Install the correct SDK version:
For Rust:
Verify in package.json:
Problem:
Solution:Use Node.js v24.10.0 or compatible:
Reinstall dependencies:

Test Execution Issues

Problem:
Solution:Increase mocha timeout:
Or in test files:
Problem: Tests work on local machine but fail in continuous integration.Solution:
  1. Ensure validators start properly:
.github/workflows/test.yml
  1. Add sufficient delays:
  1. Use —skip-local-validator in CI:
Problem: Multiple validators interfere with each other.Solution:Kill all validator processes:
Clean ledger directories:
Restart validators:
Problem:
Solution:Ensure wallet is properly configured:
Check wallet file exists:
Generate if missing:

Performance Issues

Problem: Transactions take longer than expected to confirm.Solution:
  1. Use appropriate commitment levels:
  1. Check network congestion:
  1. Monitor validator performance:
Problem: Validators consume excessive memory.Solution:Restart validators periodically:
Limit ledger size:

Getting Help

If you encounter issues not covered here:
  1. Check validator logs:
  2. Enable debug logging:
  3. Join the community:
  4. Review documentation:

Next Steps