본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)7.0k · #13641

magicblock

하는 일

이 스킬은 빠르고 지연 시간이 짧은 앱을 위한 Solana 도구 모음인 MagicBlock을 다룹니다. Ephemeral Rollups, 위임된 계정, 오라클, 무작위성, 비공개 결제를 설명하며, MagicBlock 기능을 고르고 디버깅하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓게임처럼 빠른 실시간 Solana 앱을 만들고 싶을 때.
  • ✓Solana에서 무작위성, 오라클 데이터, 비공개 결제가 필요할 때.
  • ✓MagicBlock 연동이 실패해서 문제를 해결해야 할 때.

스킬 링크

https://github.com/internet-court/internet-court-skill/blob/main/vendored/magicblock/magicblock-dev/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/internet-court/internet-court-skill/blob/main/vendored/magicblock/magicblock-dev/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“빠른 Solana 게임을 만들고 있는데, MagicBlock Ephemeral Rollups가 맞는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 어떤 MagicBlock 제품이 필요에 맞는지 설명한 뒤, 계정 구성과 연동 설계를 돕습니다. 위임 문제도 디버깅하는데, 위임된 계정은 메인 Solana 체인에서 다르게 보이기 때문입니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

MagicBlock Development Skill

Pair with the solana-dev skill

Use this skill for MagicBlock-specific concerns: ER/PER, delegation, oracles, Session Keys, cranks, VRF, Magic Actions, eSPL, and private payments. For general Solana or Anchor work such as scaffolding, PDAs, account layouts, SPL tokens, clients, wallets, or LiteSVM/Mollusk testing, also load solana-dev.

Key Concepts

Ephemeral Rollups enable high-performance, low-latency transactions by locking a delegated account on the base layer while an ER clone continues to execute under the account's original program owner. They are useful for gaming, real-time apps, and fast transaction throughput.

Ephemeral Accounts are born, used, and closed only inside an ER. They are useful for temporary high-frequency state, but they never commit to Solana and therefore cannot be the only copy of durable ownership, balances, rewards, or settlement results.

Delegation temporarily assigns the base-layer account to the Delegation Program and clones it into the ER with its original program owner. Normal program ownership, signer, authority, and account constraints still apply on the ER; delegation status is a routing and lifecycle concern, not a new application authorization rule.

Delegation debugging invariant: a properly delegated account looks owned by the delegation program on base, owned by the original program on the ER endpoint returned by router getDelegationStatus, and cloned into the ER with delegated=true.

For the verified SDK v0.16.2 snapshot, use MagicIntentBundleBuilder to schedule commit and commit-and-undelegate intents. Do not use the deprecated free functions commit_accounts and commit_and_undelegate_accounts.

Private Ephemeral Rollups (PER) gate a delegated account inside a TEE-backed validator with an ER-local EphemeralPermission. Delegate only the data account on the base layer, then create, update, and close its permission on the ER with CreateEphemeralPermissionCpi, UpdateEphemeralPermissionCpi, and CloseEphemeralPermissionCpi. Do not create or delegate a separate base-layer permission account.

Magic Actions are base-layer instructions scheduled inside an ER transaction via MagicIntentBundleBuilder.add_post_commit_actions(...). Each attempted base-layer transaction applies its commit and actions atomically. If any BaseAction fails, the committor removes every BaseAction in that affected TransactionStrategy before retrying its remaining commit strategy; actions in other transaction/finalize strategies are outside that removal scope. Observe and reconcile every originally scheduled action: scheduling or eventual commit success alone does not prove that any of them ran.

Commit sponsorship: every delegated account gets 10 free commits to base layer by default. To lift the cap, either re-delegate (refreshes the quota) or attach the validator-scoped magic_fee_vault PDA and a delegated fee payer to the intent bundle. The delegated payer is debited; the fee vault is the validated destination credited with that commit fee.

Lamports top-up: when a delegated account (e.g. a delegated fee payer) needs more lamports on the ER side, use lamportsDelegatedTransferIx from the SDK. The transaction is submitted on base layer — the Ephemeral SPL Token program creates a single-use lamports PDA, funds it, and delegates it so the ER credits the destination.

Ephemeral SPL Token has two surfaces. In the SDK lifecycle model, clients use delegateSpl/transferSpl/undelegateIx/withdrawSpl, and the ER balance appears as a normal SPL token account at the owner's canonical ATA address, so Anchor programs can use plain SPL Token CPI. In the direct-program model, contracts use ephemeral-spl-api and explicitly work with the eATA/global-vault PDAs; do not apply the canonical-ATA model to that raw surface.

Pricing Oracle republishes supported market feeds for Solana/ER consumers. A safe integration verifies the expected feed identity, upstream publish-time freshness, value domain, exponent, checked arithmetic, and user price bounds; successful deserialization alone is not price validation.

Session Keys authorize a temporary signer for constrained application actions. Session validity is separate from SPL token authority: token spending also requires an explicit, bounded token delegate allowance.

Architecture:

┌─────────────────┐     delegate      ┌─────────────────────┐
│   Base
자주 묻는 질문

Ephemeral Rollup이란 무엇인가요?

위임된 계정이 계속 실행되는 더 빠른 계층이며, 그 상태는 Solana로 다시 정산될 수 있습니다.

임시 계정에 최종 잔액을 보관할 수 있나요?

아니요. 임시 계정은 Solana에 커밋되지 않으므로, 잔액이나 결과의 유일한 사본이 될 수 없습니다.

다른 Solana 스킬도 함께 불러와야 하나요?

네. 스킬은 프로젝트 기본 구조, 지갑, 테스트를 위해 일반 Solana 개발 스킬과 함께 쓰라고 말합니다.

상세 정보

작성자의 원본 설명

Design, implement, and debug MagicBlock applications on Solana. Covers Ephemeral Rollups with delegated state; ER/PER architecture and settlement; private payments and token flows; oracles and randomness; scheduling and temporary authority; security and local validation. Use for MagicBlock product selection, integration, cross-product design, or production troubleshooting.

repo: internet-court/internet-court-skill

인기도

GitHub 스타
7.0k
순위
#13641
라이선스
—
업데이트
2026. 10. 26.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬