惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
J
Java Code Geeks
罗磊的独立博客
雷峰网
雷峰网
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
B
Blog RSS Feed
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
D
Docker
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Vercel News
Vercel News
小众软件
小众软件
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
I
InfoQ
S
SegmentFault 最新的问题

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Understanding Solana Accounts: The Blockchain Filesystem
Akeem Palmer · 2026-06-02 · via DEV Community

If you want to understand how Solana works under the hood, you have to understand accounts.

I like to think of the Solana blockchain as a distributed operating system, where every account is simply a file on a filesystem. Unlike traditional Web2 architectures where applications live on a server and data lives in a database, Solana stores everything using a unified file-type system.

Here is a breakdown of how these "files" work, what they contain, and how they shape the network.


The 5 Anatomy Fields of a Solana Account

Every single account on Solana shares the exact same five-field structure. This structure is mapped to a 32-byte address, ensuring it aligns perfectly with IPv6 minimum MTU requirements.

  • Lamports: The account's SOL balance, where 1 SOL = 1,000,000,000 lamports.
  • Data: A byte array that stores arbitrary state. For a wallet, this might be token balances; for a program, it stores the executable byte code.
  • Owner: The specific program that controls the account (for most standard wallets, this is the System Program). Only the owner program can modify an account’s data or debit its lamports.
  • Executable: A binary flag (true/false) that tells the network whether the account can execute code and instructions.
  • Rent Epoch: A legacy field (now deprecated) previously used to track the balance an account needed to maintain to avoid paying storage rent. Today, almost all accounts are loaded with enough SOL to be permanently rent-exempt.

The Two Main Categories: Logic vs. Data

Solana strictly separates code from data. Because of this, accounts broadly fall into two categories:

1. Executable Accounts (The Apps)

These accounts have their executable flag set to true. They contain smart contract code (program logic) stored directly on the blockchain that automatically runs when specific conditions are met. Think of these as the applications or software running on the OS.

2. Non-Executable Accounts (The Databases)

These accounts cannot execute code. Instead, they store data-such as balances, user info, or state-that executable programs read from and write to. Think of these as the databases or storage files used by the apps.


The Four Functional Account Types

To make development practical, these categories are split into four functional types that you interact with daily:

Account Type Description Web2 Analogy
System Accounts Regular user wallets (e.g., Phantom or Solflare). They hold your SOL balance and do not execute code. Your personal bank account
Program Accounts Accounts that store compiled smart contract logic. They dictate how things work but don't hold user state. The application software
Data Accounts Accounts managed by programs to store specific information like user profiles, token balances, or settings. A database row or file
Sysvars (System Variables) Special global accounts that provide real-time network info (e.g., current time, fees, slot data). The system clock / OS settings

The Big Picture: Everything is a File

By looking at Solana through the lens of an operating system, the architecture becomes incredibly intuitive. Every account is just a file, and each file consists of two things:

Metadata: Who owns it, whether it can execute code, and how much money (lamports) it holds.

Contents: The actual data or program code stored inside.

In Solana, programs act on accounts rather than possessing their own internal memory. By treating everything as a unified file system, Solana achieves incredible speed, transparency, and composability.