blob-decoder

command
v1.0.0-beta.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

README

Blob Decoder

A web-based tool for decoding and inspecting blob data from the ev-node Data Availability layer.

Overview

The blob-decoder tool provides a web interface for decoding protobuf-encoded blobs used in ev-node. It can decode blocks and other data structures from both hex and base64 encoded inputs, making it useful for debugging and inspecting DA layer data.

Installation

Install using go install:

go install github.com/evstack/ev-node/tools/blob-decoder@main

After installation, the blob-decoder binary will be available in your $GOPATH/bin directory.

Usage

Running the Server

Start the blob decoder server:

# Run on default port 8090
blob-decoder

# Run on custom port
blob-decoder 8080

The server will start and display:

╔═══════════════════════════════════╗
║        Evolve Blob Decoder        ║
║           by ev.xyz               ║
╚═══════════════════════════════════╝

🚀 Server running at: http://localhost:8090
⚡ Using native Evolve protobuf decoding

Press Ctrl+C to stop the server
Web Interface

Open your browser and navigate to http://localhost:8090 to access the web interface.

The interface allows you to:

  • Paste blob data in either hex or base64 format
  • Automatically detect and decode the blob type
  • View decoded block headers, transactions, and other metadata
  • Inspect raw hex data and blob size information
API Endpoint

The decoder also provides a REST API endpoint:

POST /api/decode
Content-Type: application/json

{
  "data": "<hex-or-base64-encoded-blob>",
  "encoding": "hex" | "base64"
}

Response:

{
  "type": "Block",
  "data": {
    // Decoded block or data structure
  },
  "rawHex": "<hex-representation>",
  "size": 1234,
  "timestamp": "2024-01-01T00:00:00Z"
}

Features

  • Auto-detection: Automatically detects blob type (blocks, commits, etc.)
  • Multiple Encodings: Supports both hex and base64 encoded inputs
  • Protobuf Decoding: Native decoding of ev-node protobuf structures
  • Web Interface: User-friendly web interface for easy blob inspection
  • REST API: Programmatic access for automation and integration
  • CORS Support: Can be accessed from other web applications

Examples

# Start server on default port
blob-decoder

# Start server on port 3000
blob-decoder 3000

# Use with curl to decode a hex-encoded blob
curl -X POST http://localhost:8090/api/decode \
  -H "Content-Type: application/json" \
  -d '{"data": "0x...", "encoding": "hex"}'

Use Cases

  • Debug DA layer blob submissions
  • Inspect block structure and content
  • Validate blob encoding and decoding
  • Troubleshoot sync issues related to blob data
  • Educational tool for understanding ev-node data structures

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL