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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
---
license: mit
task_categories:
  - other
tags:
  - blockchain
  - proof-of-useful-work
  - np-complete
  - computational-complexity
  - consensus
  - cryptography
  - distributed-systems
  - research
pretty_name: COINjecture NP Solutions v2
size_categories:
  - 1K<n<10K
configs:
  - config_name: default
    data_files:
      - split: train
        path: "data/*.jsonl"
---

<div align="center">

# ๐Ÿ”ฌ COINjecture NP Solutions Dataset v2

### Institutional-Grade Blockchain Research Data

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Data Version](https://img.shields.io/badge/Data%20Version-v3.0-blue.svg)](#data-versioning)
[![Update Frequency](https://img.shields.io/badge/Updates-Real--time-green.svg)](#update-frequency)

**A comprehensive, real-time dataset of NP-complete problem solutions generated through Proof-of-Useful-Work (PoUW) blockchain consensus**

[Overview](#-overview) โ€ข [Data Schema](#-data-schema) โ€ข [Metrics Categories](#-metrics-categories) โ€ข [Usage](#-usage) โ€ข [Citation](#-citation)

</div>

---

## ๐Ÿ“‹ Overview

This dataset contains **institutional-grade metrics** from the COINjecture Network B blockchain, which implements a novel **Proof-of-Useful-Work (PoUW)** consensus mechanism. Unlike traditional Proof-of-Work systems that compute arbitrary hashes, COINjecture miners solve genuine NP-complete computational problems, producing verifiable solutions with real-world applicability.

### Key Characteristics

| Property | Value |
|----------|-------|
| **Network** | COINjecture Network B (Fresh Genesis) |
| **Genesis Hash** | `4a80254b4a48e867b57399469b0a1fbaba8848e8ac738587b55ebf6e6b8c4b23` |
| **Data Version** | v3.0 (Institutional Grade) |
| **Problem Types** | SAT, SubsetSum, TSP |
| **Update Frequency** | Every ~10 blocks (~10 seconds) |
| **Metrics Per Record** | 54+ fields |
| **Format** | JSON Lines (`.jsonl`) |

### Research Applications

- **Computational Complexity**: Empirical analysis of NP-complete problem hardness
- **Algorithm Performance**: Solve/verify time distributions across problem types
- **Distributed Systems**: Consensus metrics and network propagation analysis
- **Energy Research**: Computational efficiency and resource utilization studies
- **Cryptographic Analysis**: Hash function behavior and difficulty adjustment

---

## ๐Ÿ“Š Data Schema

Each record represents a block in the COINjecture blockchain containing a solved NP-complete problem instance.

### Core Fields

| Field | Type | Description |
|-------|------|-------------|
| `block_height` | `uint64` | Sequential block number in the canonical chain |
| `block_hash` | `string` | SHA-256 hash of the block header (hex-encoded) |
| `prev_block_hash` | `string` | Hash of the parent block (enables chain traversal) |
| `timestamp` | `string` | ISO 8601 timestamp of block creation |
| `problem_type` | `string` | NP-complete problem class: `SAT`, `SubsetSum`, or `TSP` |

### Problem Instance Fields

| Field | Type | Description |
|-------|------|-------------|
| `problem_instance` | `object` | Serialized problem definition (varies by type) |
| `solution` | `object` | Verified solution to the problem instance |
| `problem_size` | `uint32` | Instance complexity metric (variables, nodes, etc.) |
| `is_satisfiable` | `boolean` | For SAT: whether a satisfying assignment exists |

---

## ๐Ÿ“ˆ Metrics Categories

### โฑ๏ธ Timing Metrics (Microsecond Precision)

High-resolution timing data for performance analysis:

| Field | Type | Unit | Description |
|-------|------|------|-------------|
| `solve_time_us` | `uint64` | ฮผs | Time to find the solution |
| `verify_time_us` | `uint64` | ฮผs | Time to verify solution correctness |
| `block_time_seconds` | `float64` | s | Total block production time |
| `mining_attempts` | `uint64` | count | Hash attempts before valid block found |

### ๐Ÿ’พ Memory Metrics

Resource utilization during computation:

| Field | Type | Unit | Description |
|-------|------|------|-------------|
| `solve_memory_bytes` | `uint64` | bytes | Peak memory during solve phase |
| `verify_memory_bytes` | `uint64` | bytes | Peak memory during verification |
| `peak_memory_bytes` | `uint64` | bytes | Maximum memory allocation |

### ๐ŸŒ Network Metrics

Distributed system behavior:

| Field | Type | Unit | Description |
|-------|------|------|-------------|
| `peer_count` | `uint32` | count | Connected peers at block time |
| `propagation_time_ms` | `uint64` | ms | Block propagation latency |
| `sync_lag_blocks` | `int64` | blocks | Distance from network tip |

### โ›๏ธ Mining Metrics

Consensus and difficulty data:

| Field | Type | Description |
|-------|------|-------------|
| `difficulty_target` | `string` | Current difficulty target (hex) |
| `nonce` | `uint64` | Winning nonce value |
| `hash_rate_estimate` | `float64` | Estimated network hash rate (H/s) |
| `mined_locally` | `boolean` | Whether this node mined the block |

### ๐Ÿ”— Chain Metrics

Blockchain state information:

| Field | Type | Description |
|-------|------|-------------|
| `chain_work` | `string` | Cumulative proof-of-work score |
| `transaction_count` | `uint32` | Transactions in block |
| `block_size_bytes` | `uint64` | Serialized block size |

### ๐Ÿ’ฐ Economic Metrics

Token economics data:

| Field | Type | Unit | Description |
|-------|------|------|-------------|
| `block_reward` | `uint64` | tokens | Mining reward for this block |
| `total_fees` | `uint64` | tokens | Transaction fees collected |

### ๐Ÿ–ฅ๏ธ Hardware Context

Node environment information for reproducibility:

| Field | Type | Description |
|-------|------|-------------|
| `cpu_model` | `string` | Processor model identifier |
| `cpu_cores` | `uint32` | Physical CPU cores |
| `cpu_threads` | `uint32` | Logical CPU threads |
| `ram_total_bytes` | `uint64` | Total system RAM |
| `os_info` | `string` | Operating system details |

### ๐Ÿท๏ธ Provenance Metadata

Data lineage and quality indicators:

| Field | Type | Description |
|-------|------|-------------|
| `node_version` | `string` | Software version that produced this record |
| `node_id` | `string` | Unique node identifier (anonymized) |
| `data_version` | `string` | Schema version (currently `v3.0`) |
| `measurement_confidence` | `float64` | Data quality score (0.0-1.0) |

---

## ๐Ÿ”ฌ Problem Types

### SAT (Boolean Satisfiability)

The canonical NP-complete problem. Given a Boolean formula in CNF, find a satisfying assignment or prove none exists.

```json
{
  "problem_type": "SAT",
  "problem_instance": {
    "num_variables": 50,
    "num_clauses": 215,
    "clauses": [[1, -3, 5], [-2, 4], ...]
  },
  "solution": {
    "satisfiable": true,
    "assignment": [true, false, true, ...]
  }
}
```

### SubsetSum

Given a set of integers and a target sum, find a subset that sums to the target.

```json
{
  "problem_type": "SubsetSum",
  "problem_instance": {
    "set": [3, 7, 1, 8, -2, 4],
    "target": 12
  },
  "solution": {
    "subset_indices": [1, 3, 5]
  }
}
```

### TSP (Traveling Salesman Problem)

Find the shortest Hamiltonian cycle through all vertices in a weighted graph.

```json
{
  "problem_type": "TSP",
  "problem_instance": {
    "num_cities": 20,
    "distances": [[0, 10, 15], [10, 0, 20], ...]
  },
  "solution": {
    "tour": [0, 3, 1, 4, 2, 0],
    "total_distance": 97
  }
}
```

---

## ๐Ÿ“– Usage

### Loading with Hugging Face Datasets

```python
from datasets import load_dataset

# Load the complete dataset
dataset = load_dataset("COINjecture/NP_Solutions_v2")

# Access records
for record in dataset["train"]:
    print(f"Block {record['block_height']}: {record['problem_type']}")
    print(f"  Solve time: {record['solve_time_us']}ฮผs")
    print(f"  CPU: {record['cpu_model']}")
```

### Loading Raw JSONL

```python
import json
from pathlib import Path

records = []
for jsonl_file in Path("data").glob("*.jsonl"):
    with open(jsonl_file) as f:
        for line in f:
            records.append(json.loads(line))

print(f"Loaded {len(records)} records")
```

### Filtering by Problem Type

```python
sat_problems = dataset["train"].filter(
    lambda x: x["problem_type"] == "SAT"
)
print(f"SAT problems: {len(sat_problems)}")
```

### Performance Analysis Example

```python
import pandas as pd

# Convert to DataFrame for analysis
df = pd.DataFrame(dataset["train"])

# Analyze solve times by problem type
stats = df.groupby("problem_type")["solve_time_us"].agg(["mean", "std", "min", "max"])
print(stats)

# Hardware comparison
hardware_stats = df.groupby("cpu_model")["solve_time_us"].mean()
print(hardware_stats)
```

---

## ๐Ÿ“Š Data Quality

### Verification Standards

All data in this dataset meets the following quality criteria:

| Standard | Description |
|----------|-------------|
| **Cryptographic Integrity** | Every block hash is verified against the chain |
| **Solution Validity** | All NP-complete solutions are independently verified |
| **Timing Accuracy** | Microsecond-precision timestamps from monotonic clocks |
| **Hardware Attribution** | Full system context for reproducibility |
| **Chain Continuity** | `prev_block_hash` enables complete chain reconstruction |

### Data Versioning

| Version | Release | Changes |
|---------|---------|---------|
| **v3.0** | Nov 2024 | Institutional-grade: 54+ fields, hardware context, chain linkage |
| v2.0 | Oct 2024 | Added timing metrics, energy estimates |
| v1.0 | Sep 2024 | Initial release: basic problem/solution data |

---

## ๐Ÿ”„ Update Frequency

This dataset receives **real-time updates** approximately every 10 blocks (~10 seconds of blockchain time). New JSONL files are appended as blocks are mined on the COINjecture Network B.

### Data Pipeline Architecture

<table>
<tr>
<td>

**โ›“๏ธ CONSENSUS LAYER**
```
     ๐ŸŒฑ Genesis (Block 0)
            โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ–ผ       โ–ผ       โ–ผ
  ๐ŸงฎSAT   ๐Ÿ“ŠSum   ๐Ÿ—บ๏ธTSP
    โ”‚       โ”‚       โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚
            โ–ผ
```

</td>
<td>

**๐ŸŒ P2P NETWORK**
```
  ๐Ÿ“ก Node 1 โ—„โ”€โ”€โ”€โ”€โ–บ ๐Ÿ“ก Node 2
     โ”‚                 โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ–ผ
       ๐Ÿ’ฌ Gossipsub
              โ”‚
              โ–ผ
```

</td>
</tr>
<tr>
<td>

**๐Ÿ“ˆ METRICS ENGINE**
```
  โฑ๏ธTiming  ๐Ÿ’พMemory  ๐Ÿ–ฅ๏ธHardware  ๐ŸŒNetwork
      โ”‚         โ”‚          โ”‚          โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
            54+ metrics/block
                     โ”‚
                     โ–ผ
```

</td>
<td>

**๐ŸŽฏ DATA OUTPUT**
```
         ๐Ÿ“ฆ Buffer (10 blocks)
                โ”‚
         every ~10 seconds
                โ”‚
                โ–ผ
         ๐Ÿค— HuggingFace v2
                โ”‚
                โ–ผ
         ๐Ÿ”Œ Datasets API
```

</td>
</tr>
</table>

<div align="center">

**๐Ÿ”ฌ RESEARCH APPLICATIONS**

| ๐Ÿค– Machine Learning | ๐Ÿ“Š Performance Analysis | ๐Ÿ” Cryptography Research |
|:-------------------:|:-----------------------:|:------------------------:|
| Training data | Solve time analysis | Hash function studies |
| Benchmarking | Hardware comparisons | Difficulty research |

---

*Data flows from NP-complete problem solving โ†’ metrics collection โ†’ real-time research availability*

</div>

---

## ๐Ÿ“œ Citation

If you use this dataset in your research, please cite:

```bibtex
@dataset{coinjecture_np_solutions_v2,
  title={COINjecture NP Solutions Dataset v2},
  author={{COINjecture Network Contributors}},
  year={2024},
  publisher={Hugging Face},
  url={https://huggingface.co/datasets/COINjecture/NP_Solutions_v2},
  note={Institutional-grade blockchain research data from Proof-of-Useful-Work consensus}
}
```

---

## ๐Ÿ“„ License

This dataset is released under the [MIT License](https://opensource.org/licenses/MIT). You are free to use, modify, and distribute this data for any purpose, including commercial applications.

---

## ๐Ÿ”— Related Resources

| Resource | Link |
|----------|------|
| **Legacy Dataset** | [COINjecture/NP_Solutions](https://huggingface.co/datasets/COINjecture/NP_Solutions) |
| **Source Code** | [GitHub](https://github.com/COINjecture) |
| **Network Explorer** | Coming Soon |
| **Technical Whitepaper** | Coming Soon |

---

## ๐Ÿค Contributing

We welcome contributions to improve data quality and documentation. Please open an issue or pull request on our GitHub repository.

---

<div align="center">

**Built with ๐Ÿ’Ž by the COINjecture Network**

*Transforming computational waste into useful work*

</div>