Bramble

Private WireGuard access for agents, authorized by ENS and revoked live, with a Hedera audit trail.

Bramble

Created At

ETHGlobal Mumbai

Winner of

Hedera

Hedera - Built on Hedera (Continuity Track)

ENS

ENS - Best Integration of ENSv2 into an Existing Project 1st place

Project Description

Bramble gives devices and automated workers (including AI coding agents) private network access without making a coordination server the authority.

THE PROBLEM Private-network tools such as VPN meshes rely on a central coordinator that decides who may join and what each member may reach. Whoever runs that coordinator can add a member, keep a revoked one, or be compelled to do either. An AI agent that needs a private service usually receives that service's credential, so a leaked agent leaks the backend.

WHAT BRAMBLE DOES Bramble is a userspace WireGuard mesh. Device identities, revocation and scoped service grants live in an ENSv2 Permissioned Registry on Sepolia. Every peer resolves that registry itself and updates its own WireGuard peer table. No coordinator and no relay can add a member or keep a revoked one. We make a "no trusted coordinator" claim, not a "no infrastructure" claim: we still depend on an RPC endpoint, relays and an administrator.

HOW IT WORKS

  1. A tailnet is an ENSv2 registry. Each device is a subname (for example worker.<tailnet>.eth) with its own Permissioned Resolver.
  2. Enhanced Access Control gives separate accounts narrow rights: enrollment, key rotation, revocation, access rules and relay registration.
  3. Access records hold digests of service names, never plaintext names, hosts or ports. Relay endpoints sit in a separate registry, so device records never publish network topology.
  4. A worker or agent asks for access to a service. A human approves the request in the approval console. The grant is written to ENS, and each peer picks it up on its next resolution without a restart.
  5. The agent reaches the private service without ever holding the backend credential.
  6. The human revokes the grant in the console. Peers re-read ENS and drop the worker. The demo shows the next call fail.
  7. Public relays are discovered through ENS and paid per session or byte allotment through x402 on Hedera testnet (USDC, settled through the Blocky402 facilitator). The client enforces asset, network and per-payment limits before it signs.

WHAT EXISTED BEFORE THE HACKATHON This is a continuity entry. Baseline: tag pre-mumbai (commit 28e2a8f). It already had the Go WireGuard nodes and relay (brambled/, relay/), the ENS and x402 sidecars (sidecar/, relay-sidecar/), an admin CLI (admincli/) and a read-only dashboard (dashboard/). Sepolia ENS authorization and Hedera testnet x402 relay payments already worked. List new work with: git log pre-mumbai..HEAD

WHAT WE BUILT DURING THE HACKATHON

  • Approval console and activity feed: access requests, approve and revoke, device join and enrollment.
  • Agent access: an MCP server that lets a coding agent request private access and call the private service, with per-agent spend caps and HashScan links.
  • Tor control plane (EF CROPS upgrade): the sidecar sends ENS reads and payment HTTP requests through Tor with separate isolation keys, and CCIP-Read is disabled so no off-chain lookup bypasses Tor. The RPC provider no longer sees node IP addresses. Requests fail closed until Tor is ready.
  • Hedera Consensus Service audit trail: for each grant, revoke and settled payment, the approval service posts a salted hash commitment to an HCS topic. The console checks a retained opening against the mirror node and links the entry on HashScan. Only commitments are public.
  • Distribution: self-contained device binaries, a curl installer, bramble up, an embedded local web UI, and operator-sponsored capped relay sessions.
  • Demo infrastructure: cloud nodes, a logging RPC proxy, a public console and a preflight check.

MEASURED RESULTS (reported 6 November 2026)

  • On the cloud nodes, the first failed call came 36.6 s and 37.0 s after revocation began (build 4928612).
  • Revocation over Tor, two 600 s runs on one machine: replayed median detection 7.0 to 11.5 s, worst observation 29 s, excluding chain confirmation.

KNOWN LIMITATIONS

  • Revocation is not instant. It depends on the ENS poll interval, RPC behavior and Tor.
  • Tor covers the control plane only. WireGuard, STUN and relay UDP stay outside Tor, so relays see peer IP addresses. The RPC provider still sees names, requested records and timing. Payments expose the payer account.
  • HCS does not enforce access and does not prove that every event was logged.
  • Node, admin and Hedera payer keys are software keys.
  • The demo shows a worker running as a Unix user, not a proven autonomous agent session.

LINKS Repository: https://github.com/WhyAsh5114/bramble Demo tailnet: bramble-dev-c91e55e9.eth (Sepolia)

How it's Made

ARCHITECTURE Bramble is a monorepo (pnpm + Turborepo) with a Go data plane and a TypeScript control plane.

  • brambled/ (Go): the node daemon. It runs userspace WireGuard (wireguard-go), so it works on a laptop with no kernel module. It admits or drops each peer based on what the sidecar reports from ENS.
  • sidecar/ (TypeScript on Bun, Hono, viem): one sidecar per node, local HTTP only. It is the Go daemon's only path to ENS state. We used raw viem, not ensjs, because it was the only client proven against the custom ENSv2 deployment addresses.
  • relay/ and relay-sidecar/ (Go + TypeScript): a rendezvous relay for candidate exchange and a data relay that forwards opaque UDP. Both are metered through x402.
  • approval/ (Next.js): the approval console and service. A human approves or revokes access requests. The service writes grants to ENS and posts audit commitments to Hedera. It writes grants but does not enforce them.
  • agent-mcp/ (TypeScript): an MCP server that lets a coding agent request access and call the private service. The agent never holds the backend credential.
  • hedera-audit/ (TypeScript): the HCS writer and reader.
  • admincli/, dashboard/, rpc-proxy/: an admin CLI, a read-only dashboard, and the logging RPC proxy we use to show what an RPC provider sees.

HOW A GRANT FLOWS

  1. An agent calls the MCP server to request access to a service.
  2. The request appears in the approval console. A human approves it.
  3. The approval service writes the grant to the device's ENSv2 Permissioned Resolver on Sepolia. The record holds an ACL digest of the service, never a plaintext name.
  4. Every node's sidecar polls ENS every 5 s. The Go daemon updates its WireGuard peer table from the result.
  5. On revoke, the record is removed. Each peer sees the change on its next poll and drops the worker.

HOW PARTNER TECHNOLOGY HELPED

  • ENS (ENSv2 on Sepolia): ENS is the authorization source, so no server has to be trusted. Permissioned Registries and Resolvers give each device its own record. Enhanced Access Control splits rights across accounts: enrollment, key rotation, revocation, access rules and relay registration. Separate registries for devices and relays keep topology off-chain. A scripted test checks that each role can do its own writes and no others.
  • Hedera: x402 payments settle on Hedera testnet through the Blocky402 facilitator, with testnet USDC as the asset. Fees are low enough to meter relay sessions per byte allotment. The client enforces asset, network and per-payment limits before it signs. The new HCS audit trail posts one 95-byte message per grant, revoke or payment: {"v":1,"kind":"grant","c":"<64 hex>"}. The commitment is an HMAC-SHA256 keyed by a fresh 32-byte salt over a length-prefixed encoding of the event. A retained opening can be checked against the mirror node and linked on HashScan. Only kind and timing are public. The writer is unit-tested against a fake Hedera client.
  • Tor (Ethereum Foundation CROPS upgrade): the sidecar sends ENS reads and x402 payment requests through Tor, with one isolation key per purpose ('ens' and 'pay'), so a provider cannot link a node's reads to its payments.

NOTABLE AND HACKY DETAILS

  • Tor inside the sidecar, no daemon: we use tor-js 0.4.4, which runs Arti (the Tor Project's Rust client) as WebAssembly. Bun's fetch has no SOCKS support, and a system tor daemon would add a process and a disk state directory to every node.
  • We replaced tor-js's socket layer. Its close() leaves direct TCP sockets open, so we give it our own socket provider that dials every relay itself and destroys all sockets on shutdown.
  • No disk, no CDN: tor-js loads its WASM from node_modules and uses in-memory storage. By default it downloads the binary from a CDN in the clear and caches it under ~/.local/share. Our CI check (pnpm check:no-local-state) fails if the node runtime writes local state. The cost is a full Tor bootstrap on every restart.
  • Bootstrap quirks: a failed tor-js client caches its rejected bootstrap and cannot be retried, so we close it and create a new one. A timed-out bootstrap cannot be cancelled, so we keep waiting on the same client.
  • Isolation-key rotation: about 1 in 10 first requests failed in our spike. torFetch retries once under a fresh isolation key, because Tor keeps reusing a failed circuit.
  • Fail closed: until Tor is ready, torFetch rejects instead of connecting directly, and every sidecar route except /health answers 503 with Retry-After. brambled waits up to 7 minutes for Tor at startup, and keeps its last-known peer set if a later resolve fails.
  • CCIP-Read is disabled in the ENS client, so no off-chain lookup can bypass Tor.
  • Guardrails as code: pnpm check:no-endpoints fails if any mesh endpoint (topology) appears on-chain, and pnpm check:no-local-state enforces the no-local-state rule. pnpm verify runs typecheck, lint, format, build and tests across Go and TypeScript.
  • Relay trust is simple on purpose: the ephemeral relay port is the authorization, allocated only after a real payment. The first two distinct UDP sources win the two slots. This does not weaken mesh admission, because a relay cannot complete a WireGuard handshake without a peer's private key.

HONEST LIMITS Revocation takes time: the first failed call came 36.6 s and 37.0 s after revoke began on the cloud nodes (reported 6 November 2026), and Tor-path detection measured a median of 7.0 to 11.5 s on one machine. Tor covers the control plane only; WireGuard, STUN and relay UDP stay outside it. Node, admin and payer keys are software keys. STUN discovery exists, but separate-NAT hole punching and relay-fallback acceptance are not yet verified.

background image mobile

Join the mailing list

Get the latest news and updates

Bramble | ETHGlobal