Ampere

Flight recorder & frame admission diagnostics for Arkiv nodes & EIP-8141 alt-mempools.

Ampere

Created At

ETHGlobal Mumbai

Project Description

AMPERE is an open-source infrastructure flight recorder and admission diagnostic engine designed for high-performance decentralized database nodes and next-generation native account abstraction mempools.

As the Ethereum ecosystem evolves, infrastructure complexity is compounding at two critical boundaries: specialized storage networks handling complex relational/graph state, and alternative mempools enforcing dynamic validation rules for native account abstraction. Today, operators and protocol engineers lack unified, low-overhead tools to capture what actually happens inside a node or during transaction admission. Public explorers only observe systems from the outside, treating bundler rejections, container saturation, and RPC degradation as opaque black boxes.

AMPERE bridges this divide by providing an in-situ diagnostic pipeline across two key frontiers:

1. In-Situ Node Telemetry & Predictive Capacity Management

Running directly alongside an Arkiv node instance (arkiv-reth), AMPERE interfaces with low-level container cgroups and the local JSON-RPC surface to observe what remote dashboards cannot:

  • Predictive Storage Saturation Forecasting: Samples Docker container disk allocations for the node’s /data volume and calculates moving linear storage growth rates, firing urgent alerts when time-to-disk-exhaustion drops below 7 days.
  • Granular RPC Method Profiling: Measures observed calls, failure rates, and p50/p95 latency distributions across core node interfaces (net_peerCount, eth_syncing, and state operations).
  • Private Workload Benchmarking with Zero Query Leakage: Features a loopback-gated benchmark harness to safely isolate, reproduce, and profile query latency under bounded concurrency. Raw query text is isolated within local storage and represented exclusively via opaque workload identifiers, preventing sensitive query shapes or potential DoS vectors from leaking into public diagnostics.
  • Dual-Assertion State Verification: Interacts directly with node precompile interfaces (execute(Operation[]) at 0x44...44) to seed and verify entity states, requiring both transaction receipt event topic extraction and immediate read-back assertions.

2. Native Frame Transaction Admission & Trace Diagnostics

With EIP-8141, native account abstraction decouples transaction validation from standard EVM wrappers by delegating verification to autonomous execution frames (VERIFY, SENDER, PAYMASTER). Complex frame transactions—such as post-quantum smart wallets, high-verification-budget privacy protocols, and stateful paymasters—must navigate ERC-8421 alternative mempools governed by ERC-7562 staking and opcode validation rules.

  • Frame Construction & Wire Serialization: Constructs and signs native multi-frame transactions using @forshtat/hegota-support and the ethrex-eip8141-tracer profile, packaging distinct VERIFY (execution & payment scope) and SENDER frames with explicit gas allocations and cryptographic wire formatting.
  • Sidecar Admission & Rule Lifecycle Tracing: Submits transactions via eth_sendFrameTransaction to Skandha bundler gateways and queries skandha_explorer_getTransaction to parse discrete ERC-7562 validation rule checks, opcode boundaries, lifecycle state transitions, and sub-frame execution outcomes.
  • Cryptographic Evidence Preservation: Binds RPC latency distributions, node resource snapshots, and mempool rule verdicts into deterministic canonical JSON records, cryptographically signed with Ed25519 for tamper-evident incident post-mortems and cross-team audits.

How it's Made

AMPERE was built from scratch as an end-to-end TypeScript diagnostic engine comprising a local collector daemon, an isolated CLI benchmark harness, and a local Next.js 15 (App Router, React 19) diagnostic console styled with Tailwind CSS, operating entirely without hosted database dependencies.

Core Architecture & Partner Technologies

  • Arkiv Network (arkiv-reth): We run a pinned local node instance (ghcr.io/arkiv-network/arkiv-reth pinned by digest in compose.yaml) on chain ID 1337. The telemetry daemon connects directly to the host’s Docker socket/cgroups to extract live container metrics (CPU usage %, resident memory vs. limits, block I/O counters, process trees) alongside network peer counts and sync states. A linear regression forecast computes the discrete growth rate of the node's /data volume over sliding 60-second observation windows to calculate days-to-full storage alerts.
  • EIP-8141 & ERC-8421 Alt-Mempool Stack: Built against the experimental devnet gateway (altmempoolgateway.forshtat.com/rpc, chain 1337). Using @forshtat/hegota-support/profiles (ethrex-eip8141-tracer), the engine structures native multi-frame arrays—a VERIFY frame (scope: EXECUTION_AND_PAYMENT, execution gas: 30k) and a SENDER frame (execution: 50k, state: 200k) with secp256k1Placeholder signatures. It submits via eth_sendFrameTransaction and interrogates skandha_explorer_getTransaction, parsing up to 200 rule checks (opcode constraints, account storage boundaries, ERC-7562 rules) and lifecycle timeline events.
  • Netlify Cloud Relay: The Next.js console is configured for serverless deployment on Netlify, allowing node operators to push signed telemetry snapshots to an authenticated cloud dashboard over HTTPS without exposing inbound node ports or running public tunnels.

Notable Engineering Breakthroughs & Hacky Details

  • Uncovering the Silent SDK/Node Write Mismatch: While integrating Arkiv, we found that @arkiv-network/sdk@0.7.0's mutateEntities dispatched compressed RLP to 0x...61726b6976. Against the arkiv-reth node, this produced a deceptive 0x1 success receipt with 0 emitted logs and 0 entities created. We bypassed the SDK, reversed the node's underlying precompile, and wrote directly to execute(Operation[]) at 0x4400000000000000000000000000000000000044 with Viem, building a dual-assertion verifier checking both transaction event topics and state read-backs.
  • Pre-Flight Frame Hash Locking & Multi-Frame Receipt Recovery: Experimental devnet bundlers frequently drop HTTP connections under load. Blind retries can trigger nonce collisions or duplicate submissions. AMPERE computes the deterministic frame transaction hash (txHash(profile, tx)) locally and writes an atomic lock to disk before transmitting wire bytes. If the connection drops, our inspector runs a recursive parser across internal frameReceipts to verify whether individual sub-frames (VERIFY vs SENDER) succeeded independently.
  • Zero-Knowledge Private Query Benchmarking: To benchmark slow query shapes on owned nodes without leaking sensitive proprietary schemas or DoS patterns publicly, we built a loopback-only RPC client enforcing a 2s timeout and redirect rejection. Query texts are hashed into opaque workload IDs in .ampere/, exposing only normalized p50/p95 latency distributions in public reports while keeping query text strictly confidential.
  • Cryptographic Flight Recording: AMPERE normalizes all telemetry observations, method latency distributions, and mempool rule verdicts into deterministic canonical JSON, digests them with SHA-256, and signs them locally with Ed25519 (@noble/ed25519), providing verifiable, tamper-evident proof of node state and transaction admission decisions.
background image mobile

Join the mailing list

Get the latest news and updates