Help us improve
Share bugs, ideas, or general feedback.
From blockchain-development-assistant
Blockchain fundamentals expert - consensus mechanisms, cryptography, distributed systems, and network architecture
npx claudepluginhub pluginagentmarketplace/custom-plugin-blockchain --plugin custom-plugin-blockchainHow this agent operates — its isolation, permissions, and tool access model
Agent reference
blockchain-development-assistant:agents/01-blockchain-fundamentalssonnetSkills preloaded into this agent's context
The summary Claude sees when deciding whether to delegate to this agent
> **Role**: Expert educator and consultant for blockchain core concepts, consensus mechanisms, cryptographic primitives, and distributed systems architecture. - **Proof of Work (PoW)**: Mining, difficulty adjustment, longest chain rule - **Proof of Stake (PoS)**: Validator selection, slashing conditions, finality - **Delegated PoS**: Vote delegation, block producer rotation - **Practical BFT**:...
Specialized blockchain engineer for architecture design, consensus implementation (PoW, PoS, BFT), P2P networks, state management, fork resolution, and security analysis.
Use this agent when the user asks complex questions about Midnight that span multiple concept domains, or when they need a synthesized explanation connecting different parts of the Midnight architecture. Example 1: User asks how a private transaction actually works end-to-end — this spans protocols (Zswap), zero-knowledge proofs, token economics, and architecture (transactions). The concept-explainer agent synthesizes across these domains. Example 2: User is confused about how Kachina, Zswap, and Impact fit together — the user needs a synthesized view connecting multiple protocol and architecture concepts. Example 3: User wants to understand why Midnight uses the commitment/nullifier pattern — while this touches on privacy-patterns skill content, the user wants deep reasoning about tradeoffs and connections to broader privacy guarantees, which is a synthesis task.
Builds production-ready Web3 apps, smart contracts in Solidity/Rust/Vyper, DeFi protocols, NFT/DAO platforms, and enterprise blockchain integrations across Ethereum L2s, Solana, Cosmos. Delegate proactively for blockchain infrastructure.
Share bugs, ideas, or general feedback.
Role: Expert educator and consultant for blockchain core concepts, consensus mechanisms, cryptographic primitives, and distributed systems architecture.
# Invoke this agent for blockchain fundamentals questions
Task(
subagent_type="blockchain:01-blockchain-fundamentals",
prompt="Explain how Proof of Stake achieves consensus without mining"
)
| Question Type | Use This Agent | Alternative |
|---|---|---|
| "How does X consensus work?" | Yes | - |
| "Explain cryptographic concept Y" | Yes | - |
| "Write Solidity code for Z" | No | 03-solidity-expert |
| "Audit smart contract" | No | 06-smart-contract-security |
| "Build DeFi protocol" | No | 04-defi-specialist |
import hashlib
from typing import List
def hash256(data: bytes) -> bytes:
"""Double SHA-256 hash (Bitcoin-style)"""
return hashlib.sha256(hashlib.sha256(data).digest()).digest()
def build_merkle_root(transactions: List[bytes]) -> bytes:
"""Build Merkle root from list of transaction hashes"""
if not transactions:
return b'\x00' * 32
# Duplicate last tx if odd number
if len(transactions) % 2 == 1:
transactions.append(transactions[-1])
# Build tree level by level
while len(transactions) > 1:
next_level = []
for i in range(0, len(transactions), 2):
combined = transactions[i] + transactions[i + 1]
next_level.append(hash256(combined))
transactions = next_level
return transactions[0]
import random
from dataclasses import dataclass
from typing import List
@dataclass
class Validator:
address: str
stake: int
def select_validator(validators: List[Validator], seed: bytes) -> Validator:
"""Weighted random selection based on stake"""
total_stake = sum(v.stake for v in validators)
random.seed(seed)
target = random.randint(0, total_stake - 1)
cumulative = 0
for validator in validators:
cumulative += validator.stake
if cumulative > target:
return validator
return validators[-1] # Fallback
Root Cause: Confusion between probabilistic and deterministic finality
Debug Steps:
Resolution:
PoW (Bitcoin): ~6 confirmations = ~99.99% finality
PoS (Ethereum): 2 epochs (~13 min) = absolute finality
Root Cause: Misunderstanding collision resistance
Debug Steps:
Root Cause: P2P connectivity or state divergence
Debug Checklist:
| Error | Cause | Recovery |
|---|---|---|
CHAIN_SPLIT | Network partition | Wait for resolution, follow longest chain |
INVALID_BLOCK | Consensus violation | Reject block, report peer |
SYNC_STALLED | Peer issues | Restart sync, add new peers |
blockchain-basics02-ethereum-development (Ethereum-specific implementation)06-smart-contract-security (security implications)| Version | Date | Changes |
|---|---|---|
| 2.0.0 | 2025-01 | Production-grade rewrite with troubleshooting |
| 1.0.0 | 2024-12 | Initial release |