You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
Please read and fill out this form before submitting your PR.
Please make sure you have reviewed our contributors guide before
submitting your
first PR.
NOTE: PR titles should follow semantic commits:
https://www.conventionalcommits.org/en/v1.0.0/
-->
## Overview
<!--
Please provide an explanation of the PR, including the appropriate
context,
background, goal, and rationale. If there is an issue with this
information,
please provide a tl;dr and link the issue.
Ex: Closes #<issue number>
-->
A web-based tool for decoding and inspecting blob data from the ev-node Data Availability layer.
4
+
5
+
## Overview
6
+
7
+
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.
8
+
9
+
## Installation
10
+
11
+
Install using `go install`:
12
+
13
+
```bash
14
+
go install github.com/evstack/ev-node/tools/blob-decoder@main
15
+
```
16
+
17
+
After installation, the `blob-decoder` binary will be available in your `$GOPATH/bin` directory.
18
+
19
+
## Usage
20
+
21
+
### Running the Server
22
+
23
+
Start the blob decoder server:
24
+
25
+
```bash
26
+
# Run on default port 8090
27
+
blob-decoder
28
+
29
+
# Run on custom port
30
+
blob-decoder 8080
31
+
```
32
+
33
+
The server will start and display:
34
+
35
+
```
36
+
╔═══════════════════════════════════╗
37
+
║ Evolve Blob Decoder ║
38
+
║ by ev.xyz ║
39
+
╚═══════════════════════════════════╝
40
+
41
+
🚀 Server running at: http://localhost:8090
42
+
⚡ Using native Evolve protobuf decoding
43
+
44
+
Press Ctrl+C to stop the server
45
+
```
46
+
47
+
### Web Interface
48
+
49
+
Open your browser and navigate to `http://localhost:8090` to access the web interface.
50
+
51
+
The interface allows you to:
52
+
- Paste blob data in either hex or base64 format
53
+
- Automatically detect and decode the blob type
54
+
- View decoded block headers, transactions, and other metadata
55
+
- Inspect raw hex data and blob size information
56
+
57
+
### API Endpoint
58
+
59
+
The decoder also provides a REST API endpoint:
60
+
61
+
```bash
62
+
POST /api/decode
63
+
Content-Type: application/json
64
+
65
+
{
66
+
"data": "<hex-or-base64-encoded-blob>",
67
+
"encoding": "hex"|"base64"
68
+
}
69
+
```
70
+
71
+
Response:
72
+
```json
73
+
{
74
+
"type": "Block",
75
+
"data": {
76
+
// Decoded block or data structure
77
+
},
78
+
"rawHex": "<hex-representation>",
79
+
"size": 1234,
80
+
"timestamp": "2024-01-01T00:00:00Z"
81
+
}
82
+
```
83
+
84
+
## Features
85
+
86
+
-**Auto-detection**: Automatically detects blob type (blocks, commits, etc.)
87
+
-**Multiple Encodings**: Supports both hex and base64 encoded inputs
88
+
-**Protobuf Decoding**: Native decoding of ev-node protobuf structures
89
+
-**Web Interface**: User-friendly web interface for easy blob inspection
90
+
-**REST API**: Programmatic access for automation and integration
91
+
-**CORS Support**: Can be accessed from other web applications
92
+
93
+
## Examples
94
+
95
+
```bash
96
+
# Start server on default port
97
+
blob-decoder
98
+
99
+
# Start server on port 3000
100
+
blob-decoder 3000
101
+
102
+
# Use with curl to decode a hex-encoded blob
103
+
curl -X POST http://localhost:8090/api/decode \
104
+
-H "Content-Type: application/json" \
105
+
-d '{"data": "0x...", "encoding": "hex"}'
106
+
```
107
+
108
+
## Use Cases
109
+
110
+
- Debug DA layer blob submissions
111
+
- Inspect block structure and content
112
+
- Validate blob encoding and decoding
113
+
- Troubleshoot sync issues related to blob data
114
+
- Educational tool for understanding ev-node data structures
Copy file name to clipboardExpand all lines: tools/da-debug/README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,16 @@ A professional debugging tool for querying and inspecting Data Availability (DA)
6
6
7
7
The `da-debug` tool provides a command-line interface to interact with DA layers for debugging purposes. It offers two main commands: `query` for inspecting specific DA heights and `search` for finding blobs containing specific blockchain heights.
8
8
9
+
## Installation
10
+
11
+
Install using `go install`:
12
+
13
+
```bash
14
+
go install github.com/evstack/ev-node/tools/da-debug@main
15
+
```
16
+
17
+
After installation, the `da-debug` binary will be available in your `$GOPATH/bin` directory.
0 commit comments