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

推荐订阅源

WordPress大学
WordPress大学
Cyberwarzone
Cyberwarzone
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
小众软件
小众软件
Recent Announcements
Recent Announcements
博客园 - 三生石上(FineUI控件)
Security Archives - TechRepublic
Security Archives - TechRepublic
W
WeLiveSecurity
Cloudbric
Cloudbric
博客园 - 司徒正美
美团技术团队
N
News and Events Feed by Topic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
PCI Perspectives
PCI Perspectives
宝玉的分享
宝玉的分享
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Help Net Security
Help Net Security
Last Week in AI
Last Week in AI
S
Schneier on Security
N
News | PayPal Newsroom
B
Blog RSS Feed
L
LINUX DO - 最新话题
T
Troy Hunt's Blog
S
Secure Thoughts
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
L
Lohrmann on Cybersecurity
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Tenable Blog
S
Securelist
L
LangChain Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
InfoQ
H
Heimdal Security Blog
Cisco Talos Blog
Cisco Talos Blog
F
Full Disclosure
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
K
Kaspersky official blog
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
C
Cisco Blogs

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
I Built a Permissionless On-Chain Agent Training Arena on Solana in 3 Weeks
Lymah · 2026-05-10 · via DEV Community

What happens when you put AI agent training on a blockchain, and what I wish someone had told me before I started.

TL;DR: I built a Solana program that logs AI agent training episodes on-chain, making learning verifiable and tamper-proof. Two agents competed in a 10×10 grid. After 50 episodes, the Q-learning agent's average reward climbed from 0.10 to 6.50+. Every step is immutable on devnet. The primitive works. Here's how I got there and what broke along the way.


Table of Contents

The Problem Nobody Talks About

Here's something that bothered me for a while before I could articulate it clearly.

When someone tells you their AI agent trained for 10,000 episodes and achieved superhuman performance, you have exactly two options: believe them, or don't. There's no third option. No audit trail. No verifiable history. No way to distinguish an agent that genuinely learned from one that someone hardcoded a lookup table for and called "trained behavior."

The entire field of agent training runs on trust. And trust, it turns out, is a terrible foundation for an economy that's supposed to be built on agents doing real work.

I kept thinking about this during the Agentic SWARM Hackathon (Canteen × Colosseum, April–May 2026). The question I kept coming back to was: what would it look like if you couldn't fake it? What if every training step left a permanent, public, verifiable mark?

That's what I spent three weeks trying to build. The result is a small 10×10 grid world with two competing agents. The primitive it demonstrates is not.


What I Built

swarm-arena is a permissionless on-chain agent training arena built on Solana.

Two agents compete in a resource-collection grid world powered by Bevy ECS, a Rust game engine that handles the simulation loop efficiently. After every 200 ticks, an episode ends. The scores get SHA256-hashed alongside the episode state, and that hash gets committed to Solana along with both agents' scores and a timestamp.

Agent reputation accumulates on-chain across episodes. If an agent crosses a score threshold, a SOL reward is released from a vault PDA automatically, no human in the loop.

swarm-arena ui on chrome The live dashboard, two agents competing, 100 episodes committed, Phantom connected.

swarm-arena ui on icognito The live dashboard, two agents competing, 100 episodes committed, Solflare wallet connected.

The stack:

  • Rust + Bevy ECS: simulation engine. Bevy's ECS architecture made it clean to separate agent components, movement systems, and reward systems

  • Anchor (Solana): three on-chain instructions handle everything: agent registration, episode logging, and finalization

  • React + @solana/web3.js: dashboard polling devnet every 5 seconds, showing transactions as they land

The first devnet transaction landed on April 12, 2026:

first devenet transaction First confirmed transaction on Solana Explorer, FINALIZED, MAX confirmations

38yieCpWNbex4RDEzXw8pEREHYQNswyW9hYBHXZmigLP9FEmp8FSpDAwPNvU3dcZuY5RrUdWRp6EJcjYJUcEoL21

Enter fullscreen mode Exit fullscreen mode

Getting to that first confirmed transaction took longer than I expected. More on that in a bit.


Why Solana — Not a Database

I got this question a lot during the hackathon, so let me be direct about it.

You could absolutely log training episodes to Postgres. It's faster, easier, and doesn't require learning about PDAs and discriminators. But you'd lose four things that matter a lot once you start thinking about agents as economic actors rather than software demos.

Permissionless. With a database, I control who can write to it. With Solana, anyone with a keypair can call create_agent and start submitting episodes. No API key, no approval process, no terms of service I can revoke on a whim. The program is deployed; it just runs.

Censorship-resistant. I can't delete your agent's training history. Neither can anyone else. If your agent trained 10,000 episodes and built a reputation, that record lives on Solana's ledger permanently. This matters more than it sounds. In a world where agents are doing real economic work, the entity controlling the training ledger has enormous power over the market.

Composable. AgentReputation PDAs are just public Solana accounts. Any other program on the network can read them. A marketplace that wants to rank agents by verified training history, a staking protocol that weights agents by episode count, and a DAO that gates membership by reputation can all be built on top of the same primitive without asking my permission.

A database gives you storage. Solana gives you a shared, trustless, programmable record of who trained what, when, and how well. Those are different things.


The Three Instructions

The entire on-chain economy runs on three Anchor instructions. Keeping it to three was a deliberate choice. I wanted the primitive to be as minimal as possible so it's easy to build on.

create_agent(name: String)
This registers an AgentIdentity PDA, a program-derived account that stores the agent's owner pubkey, a name, and the registration timestamp. It's the agent's permanent on-chain identity. The key insight is that the PDA is derived from the owner's pubkey, so only the keypair holder can register that specific identity. It's censorship-resistant by construction.

log_episode(episode_id, scores, episode_hash)
This is the core. It writes an EpisodeLog PDA with the episode results and increments the agent's AgentReputation PDA, updating total_score and episodes_played. Every call is a permanent mark. You can reconstruct an agent's entire training history from the chain.

finalize_episode(episode_id, score_threshold)
This is where it gets interesting economically. If the winning score meets a threshold, 0.001 SOL transfers from the RewardVault PDA to the winner. No human triggers this. The program does it.

pub fn finalize_episode(
    ctx: Context<FinalizeEpisode>,
    episode_id: u64,
    score_threshold: u64,
) -> Result<()> {
    let log = &mut ctx.accounts.episode_log;
    require!(!log.finalized, ArenaError::AlreadyFinalized);

    let winner_score = log.scores[0].max(log.scores[1]);
    require!(winner_score >= score_threshold, ArenaError::ThresholdNotMet);

    log.finalized = true;

    let reward_lamports = 1_000_000; // 0.001 SOL
    **ctx.accounts.reward_vault.try_borrow_mut_lamports()? -= reward_lamports;
    **ctx.accounts.signer.try_borrow_mut_lamports()? += reward_lamports;

    Ok(())
}

Enter fullscreen mode Exit fullscreen mode

The integration tests cover all three instructions — 4/4 passing against a local validator.

integration tests cover all three instructions 4/4 integration tests passing. create_agent, log_episode, reputation accumulation, finalize_episode


The Agents Actually Learn

Week 1 was about building the pipeline. Week 2 was about making it interesting.

Week 1 built the pipeline. Week 2 added Q-learning to Agent 0.

The Q-table maps (state, action) pairs to expected rewards. State is the directional bucket to the nearest resource. Action is one of five moves. After each episode, the table updates based on resources collected and whether Agent 0 beat Agent 1.

The learning curve across episodes:

Episodes Agent 0 avg reward
1-10 0.10
11-20 0.20
21-30 2.10
31-40 5.10
41-50 6.50+

By episode 42, Agent 0 collected 8/10 resources, beating the heuristic Agent 1. Every step of this learning curve is committed to Solana devnet. The blockchain is the training log.

One of the hackathon organizers asked: "Do you think the agents just memorize the policy given how small the world state is without randomization?"

organizer's conversation
Yes, with fixed positions and 9 directional states, the agent converges to a memorized lookup table. That's why I switched to randomized resource positions each episode. Slower convergence, but genuine exploration. The same organizer then suggested scaling to Minecraft maps, and that's exactly right. The on-chain primitive is world-agnostic. Any map maker could deploy their world config as a PDA, agents train against it, and reputation accumulates permissionlessly.


The Dashboard

Live at. Built with React + @solana/web3.js + Recharts. Shows:

agent0 history

  • Agent score totals and win rates across 100 episodes
  • 10×10 arena grid with agent positions
  • Score history chart showing the Q-learning oscillation
  • Live transaction feed with Explorer links
  • Phantom and Solflare wallet connection

agent1 history

The terminal aesthetic was intentional; this is infrastructure, not a consumer app.

What I Learned

The discriminator mismatch will cost you days. Every 0x1004 error is an Anchor instruction discriminator mismatch. Compute SHA256 of "global:{instruction_name}" and take the first 8 bytes. Get this wrong, and nothing works.

Q-learning on small state spaces converges fast but generalizes poorly. If your state space is small enough to memorize, you're doing table lookup, not RL. State space design is the hard part.

On-chain agent training is a primitive, not a product. The 10×10 grid is a proof of concept. The real value is AgentIdentity + EpisodeLog + AgentReputation as a composable on-chain state that any program can read and build on.


The Numbers

  • Program ID: CCnPxPLd4GbxycDTcP12KP98rWtjKCCNcZC4hqHCB1KV (Solana devnet)
  • First transaction: April 12, 2026
  • Episodes committed: 100+
  • Integration tests: 4/4 passing
  • GitHub: swarm-arena
  • Live dashboard: arena-ui

What's Next

  • Expand world size to arbitrary grids
  • Minecraft map integration: map makers deploy world configs as PDAs
  • Multi-operator support: external training loops calling the same program
  • Mainnet deployment with real SOL rewards
  • Reputation composability: other programs reading AgentReputation PDAs

Try It

The program is deployed on Solana devnet. Anyone can call create_agent with their own keypair and start submitting episodes. The reputation you accumulate is yours; no central authority can take it away.

That's the point.


Built during the Agentic SWARM Hackathon (Canteen × Colosseum, April–May 2026). Stack: Rust, Bevy ECS, Anchor, React, Solana devnet.