Skip to content

Jars1987/delegation-program-pinocchio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”„ Delegation Program (Pinocchio Version)

This project reimplements the Delegation Program from the Ephemeral Rollups SDK using the Pinocchio framework on Solana. Instead of integrating it as part of the SDK, this standalone version is designed for educational clarity and transparency.

The goal is to break down and understand the core mechanics of rollup delegation on Solana while showcasing how such systems can be built from scratch using lower-level primitives.


πŸ“š Background

Ephemeral Rollups are designed to scale Solana applications using off-chain execution secured by on-chain proofs and delegation mechanisms.

The original implementation by MagicBlock Labs uses the solana-program SDK. This project ports that logic to Pinocchio to expose the underlying mechanics without relying on macro-based abstractions.


🧠 Purpose

  • To learn and teach how delegation systems work under the hood
  • To provide a Pinocchio-powered alternative for advanced Solana developers
  • To serve as a reference repo for building rollup-compatible smart contracts without SDK constraints

βš™οΈ Features

  • Register and manage delegators and delegates
  • Validate authorized delegation instructions
  • Reproduce the core logic of MagicBlock's Delegation program
  • Built entirely with Pinocchio (no Anchor or macros)

πŸ§ͺ Usage

Prerequisites

  • Rust (latest stable)
  • Solana CLI
  • Pinocchio (cargo add pinocchio)
  • Mollusk (cargo add mollusk)

Build

cargo build-sbf

Run Tests

cargo test

πŸ” Inspired By

This project is a Pinocchio-based reimplementation of:

πŸ”— Ephemeral Rollups SDK – Delegation Program (MagicBlock Labs)

If you're interested in the full rollup architecture and proof system, check out that SDK directly. This repo isolates only the delegation logic.

πŸ›  Tech Stack

Solana – Blockchain runtime

Pinocchio – Low-level framework for Solana smart contracts

TypeScript – For testing with Anchor's Mocha suite

Rust – On-chain logic implementation

πŸ“œ License

This project is for educational use. MIT License applies.

About

Magic Block Delegation Program in Pinocchio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages