explaingit

jxs/enr

Analysis updated 2026-07-09 · repo last pushed 2023-08-31

RustAudience · developerComplexity · 2/5DormantSetup · easy

TLDR

A Rust library for creating, reading, and verifying Ethereum Node Records, signed digital business cards that nodes use to share their network address and connection details with each other.

Mindmap

mindmap
  root((repo))
    What it does
      Creates node records
      Verifies signatures
      Encodes to base64
    Tech stack
      Rust
      secp256k1
      ed25519
    Use cases
      Ethereum clients
      Peer discovery
      Wallet apps
    Key features
      Follows EIP-778
      Custom signing support
      Combined key mode
    Audience
      Ethereum developers
      P2P networking devs
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build an Ethereum client or lightweight node that discovers peers on the network.

USE CASE 2

Create a wallet app that reads and verifies node records to connect to Ethereum nodes.

USE CASE 3

Develop peer-to-peer networking software that shares and authenticates node information.

USE CASE 4

Implement custom signing algorithms for Ethereum Node Records in a networking layer.

What is it built with?

Rustsecp256k1ed25519

How does it compare?

jxs/enrbakome-hub/bakome-crypto-quant-enginecaspermeijn/nmea-test-messages
Stars0
LanguageRustRustRust
Last pushed2023-08-312024-09-16
MaintenanceDormantStale
Setup difficultyeasyeasyeasy
Complexity2/53/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Add the crate to your Cargo.toml as a dependency, no external infrastructure or API keys required.

In plain English

The enr project is a Rust library that implements Ethereum Node Records, essentially digital business cards for computers participating in the Ethereum network. These records hold key information about a node, like its IP address and port number, and they're cryptographically signed so other nodes can verify their authenticity. At a high level, an Ethereum Node Record is a small bundle of key-value data that gets a digital signature attached. Every record has a sequence number that goes up each time the record is updated, so other nodes can tell if they're looking at an outdated version. The record is tied to a specific cryptographic key pair, and any changes require re-signing with that key. The whole thing can be encoded as a base64 string, making it easy to share across the network. This library would be used by developers building Ethereum networking software, things like Ethereum clients, peer-to-peer networking layers, or any application that needs to discover and connect to other Ethereum nodes. For example, if you're building a wallet app that needs to find and communicate with Ethereum nodes, or a lightweight client that discovers peers on the network, you'd use this library to create, read, and verify the records that nodes use to announce themselves. What's notable is the flexibility around signing. The library supports two different cryptographic key types out of the box, the standard secp256k1 keys used across Ethereum, and ed25519 keys, which are popular in broader networking contexts. There's also a "combined key" mode that can handle records signed with either type, which is handy if your software might encounter nodes using different signing schemes. Developers can even plug in their own custom signing algorithms by implementing a specific interface the library defines. The project follows an official Ethereum specification called EIP-778, so it's built to be compatible with other implementations across the Ethereum ecosystem. That standardization matters because it lets nodes built with different programming languages and tools all understand each other's records.

Copy-paste prompts

Prompt 1
Using the enr Rust crate, show me how to build an Ethereum Node Record with an IP address and TCP port, sign it with a secp256k1 key, and encode it as a base64 string.
Prompt 2
How do I decode and verify a base64-encoded Ethereum Node Record using the enr library in Rust, and extract the IP and port from it?
Prompt 3
Show me how to use the enr crate's combined key mode to decode and verify a node record that might be signed with either secp256k1 or ed25519 keys.
Prompt 4
How do I implement a custom signing algorithm for Ethereum Node Records using the enr crate's signing trait in Rust?

Frequently asked questions

What is enr?

A Rust library for creating, reading, and verifying Ethereum Node Records, signed digital business cards that nodes use to share their network address and connection details with each other.

What language is enr written in?

Mainly Rust. The stack also includes Rust, secp256k1, ed25519.

Is enr actively maintained?

Dormant — no commits in 2+ years (last push 2023-08-31).

How hard is enr to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is enr for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.