Why
A deliberate non-EVM data point: every other on-chain demo here is Ethereum-family (Hyperliquid, Sepolia AA, PBS); Solana is the largest ecosystem with a genuinely different execution model, worth understanding rather than assuming EVM concepts transfer.
How it works
Planned: an Anchor (Rust) program deployed to Solana devnet — starting with a PDA-based counter, then a small SPL-token escrow to exercise Solana's account model (all state passed in explicitly, rather than living in contract storage) and cross-program invocations. The page would connect via Phantom/wallet-adapter and call the program through its Anchor-generated TypeScript client. Not yet built.
Related code
# Solana's account model — unlike EVM contract storage, all state lives in accounts
# that are passed into every instruction explicitly. Simulates a PDA-based counter
# program: the "program" has no storage of its own, only the accounts it's handed.
import hashlib
from dataclasses import dataclass, field
@dataclass
class Account:
pubkey: str
owner_program: str
data: dict = field(default_factory=dict)
def find_program_address(seeds: list, program_id: str) -> str:
"""Mimic Solana's deterministic PDA derivation (real PDAs also walk bump seeds
off the ed25519 curve; this stdlib version just needs to be deterministic)."""
joined = b"".join(seed.encode() for seed in seeds) + program_id.encode()
return "PDA_" + hashlib.sha256(joined).hexdigest()[:16]
COUNTER_PROGRAM_ID = "Counter1111111111111111111111111111111111"
def initialize_counter(owner_pubkey: str) -> Account:
"""Every account a Solana program touches must be passed in explicitly — there
is no implicit contract storage the way EVM `SSTORE` provides."""
pda = find_program_address(["counter", owner_pubkey], COUNTER_PROGRAM_ID)
return Account(pubkey=pda, owner_program=COUNTER_PROGRAM_ID, data={"count": 0})
def increment(counter_account: Account, signer_pubkey: str) -> None:
"""The 'instruction': operates only on the account object it's handed, never on
hidden global state — this is the account model the card's howItWorks names."""
if counter_account.owner_program != COUNTER_PROGRAM_ID:
raise PermissionError("account not owned by this program")
counter_account.data["count"] += 1
print(f" signer={signer_pubkey[:8]}... incremented {counter_account.pubkey[:12]}... "
f"-> count={counter_account.data['count']}")
if __name__ == "__main__":
print("Solana account model — PDA-based counter (state passed in, not stored implicitly)\n")
owner = "User11111111111111111111111111111111111111"
counter = initialize_counter(owner)
print(f"Derived PDA for owner: {counter.pubkey}")
print(f"Owned by program: {counter.owner_program}\n")
print("Calling increment three times, passing the account explicitly each time:")
for _ in range(3):
increment(counter, owner)
print(f"\nFinal on-chain state (lives in the account, not the program): {counter.data}")
Where it lands in Jayverse
- Dark Horse: use the Anchor PoC to test whether a Dark Horse idea actually needs Solana. A small PDA counter and SPL escrow is the cheapest way to check whether any Dark Horse candidate needs Solana's parallel execution rather than an EVM devnet.
- Devnet: keep this study standalone. Jayverse's own devnet stays Anvil/EVM; the Solana PoC's job is comparison, not adding a second chain to any current service's critical path.
Key expressions
| Expression | 뜻 · 쓰이는 자리 |
|---|---|
| data point | 하나의 사례, 참고 자료 · 여러 비교 대상 중 의미 있는 표본 하나를 가리킬 때. "a deliberate non-EVM data point" |
| exercise (a model) | (기능을) 실제로 시험해보다, 활용해보다 · 이론이 아니라 코드로 직접 그 구조를 써볼 때. "to exercise Solana's account model" |
| cross-program invocation | 프로그램 간 호출(CPI) · 솔라나에서 한 프로그램이 다른 프로그램을 호출하는 방식. "cross-program invocations" |
| passed in explicitly | 명시적으로 전달되다 · 상태가 암묵적으로 저장되는 게 아니라 매번 인자로 넘겨질 때. "all state passed in explicitly" |
| worth understanding | 이해할 가치가 있는 · 당연시하지 말고 제대로 짚고 넘어가야 할 대상을 말할 때. "worth understanding rather than assuming EVM concepts transfer" |
| AA | 계정 추상화(Account Abstraction) · 이더리움에서 지갑을 스마트컨트랙트처럼 다루는 표준(ERC-4337 등), 이 카탈로그의 다른 데모("Sepolia AA")가 다루는 주제. "Hyperliquid, Sepolia AA, PBS" |
| PBS | 제안자-빌더 분리(Proposer-Builder Separation) · 블록 생성자와 제안자를 분리하는 이더리움 아키텍처, 이 카탈로그의 다른 데모가 다루는 주제. "Sepolia AA, PBS" |
| PDA | 프로그램 파생 주소(Program Derived Address) · 개인키 없이 프로그램이 결정론적으로 파생시켜 소유하는 솔라나 계정 주소, EVM의 컨트랙트 스토리지에 대응하는 솔라나식 상태 저장 방식. "starting with a PDA-based counter" |
| SPL | 솔라나 프로그램 라이브러리 토큰 표준(Solana Program Library Token) · 솔라나의 표준 토큰 규격, 이더리움의 ERC-20에 대응. "a small SPL-token escrow" |