Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,58 +1,125 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
-
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
dtype: int64
|
| 20 |
-
- name: gas_limit
|
| 21 |
-
dtype: int64
|
| 22 |
-
- name: value
|
| 23 |
-
dtype: int64
|
| 24 |
-
- name: tx_index
|
| 25 |
-
dtype: int64
|
| 26 |
-
- name: failure_message
|
| 27 |
-
dtype: string
|
| 28 |
-
- name: failure_invariant
|
| 29 |
-
dtype: string
|
| 30 |
-
- name: tenderly_src
|
| 31 |
-
dtype: bool
|
| 32 |
-
- name: etherscan_src
|
| 33 |
-
dtype: bool
|
| 34 |
-
- name: failure_file
|
| 35 |
-
dtype: string
|
| 36 |
-
- name: failure_function
|
| 37 |
-
dtype: string
|
| 38 |
-
- name: failure_contract
|
| 39 |
-
dtype: string
|
| 40 |
-
- name: timestamp
|
| 41 |
-
dtype: string
|
| 42 |
-
splits:
|
| 43 |
-
- name: evaluation
|
| 44 |
-
num_bytes: 36121089
|
| 45 |
-
num_examples: 20000
|
| 46 |
-
- name: finetuning
|
| 47 |
-
num_bytes: 177872231
|
| 48 |
-
num_examples: 99999
|
| 49 |
-
download_size: 56060290
|
| 50 |
-
dataset_size: 213993320
|
| 51 |
-
configs:
|
| 52 |
-
- config_name: default
|
| 53 |
-
data_files:
|
| 54 |
-
- split: evaluation
|
| 55 |
-
path: data/evaluation-*
|
| 56 |
-
- split: finetuning
|
| 57 |
-
path: data/finetuning-*
|
| 58 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: "Dataset for the paper: ``RAVEN: Analyzing Ethereum’s Reverted Transactions via Semantic Clustering of Failure Invariants``"
|
| 3 |
+
license: "cc-by-4.0"
|
| 4 |
+
language:
|
| 5 |
+
- "en"
|
| 6 |
+
tags:
|
| 7 |
+
- smart-contracts
|
| 8 |
+
- ethereum
|
| 9 |
+
- blockchain
|
| 10 |
+
- transaction-failures
|
| 11 |
+
- invariants
|
| 12 |
+
task_categories:
|
| 13 |
+
- tabular-classification # Changed from anomaly-detection and classification
|
| 14 |
+
size_categories:
|
| 15 |
+
- 10K<n<100K
|
| 16 |
+
- 100K<n<1M
|
| 17 |
+
source_datasets:
|
| 18 |
+
- ethereum-blockchain-transactions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
---
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
# Dataset Card for **RAVEN: Analyzing Ethereum’s Reverted Transactions via Semantic Clustering of Failure Invariants**
|
| 23 |
+
|
| 24 |
+
## Dataset Description
|
| 25 |
+
This dataset comprises two collections (splits) of failed transactions on the Ethereum blockchain, annotated with extracted *business‑logic invariants*. The dataset was created within the research project titled HighGuard: Cross‑Chain Business Logic Monitoring of Smart Contracts, by Mojtaba Eshghie.
|
| 26 |
+
|
| 27 |
+
- **Finetuning collection**: ~100,000 failed Ethereum transactions annotated with 1,932 unique invariants.
|
| 28 |
+
- **Evaluation collection**: ~20,000 sampled failed transactions annotated with 727 unique invariants, used for clustering and categorization evaluation.
|
| 29 |
+
|
| 30 |
+
Each record corresponds to a failed transaction, along with metadata such as transaction hash, block number, sender/receiver, gas used/limit, failure message, and extracted invariant condition that caused the failure.
|
| 31 |
+
|
| 32 |
+
### Key features
|
| 33 |
+
- Focused on **business‐logic vulnerabilities**, not only low‑level errors (e.g., out‑of‑gas) but semantic violations captured via invariants.
|
| 34 |
+
- Two distinct collections (finetuning + evaluation) for training and benchmarking.
|
| 35 |
+
- Designed for anomaly‑detection and classification tasks in the smart‑contract security domain.
|
| 36 |
+
|
| 37 |
+
### Recommended uses
|
| 38 |
+
- Training supervised or unsupervised models to detect business‑logic failures in smart contracts.
|
| 39 |
+
- Clustering sampled invariants to categorize common failure types.
|
| 40 |
+
- Benchmarking research on smart‐contract verification, transaction analysis, and runtime monitoring.
|
| 41 |
+
|
| 42 |
+
### Out‑of‑Scope uses
|
| 43 |
+
- This dataset is **not** suitable for general cryptocurrency transaction modelling (e.g., normal transfers), since **only failed transactions** are included.
|
| 44 |
+
- It is **not** a comprehensive dataset of all Ethereum transactions — only those with business‐logic failure annotations.
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## Dataset Structure
|
| 49 |
+
The dataset is provided as a `DatasetDict` with two splits/collections:
|
| 50 |
+
|
| 51 |
+
| Split | Description | Approx. Size |
|
| 52 |
+
|-----------------|-------------------------------------------------------|------------------|
|
| 53 |
+
| `finetuning` | 100 000 failed transactions annotated with 1 932 invariants | ~100k rows |
|
| 54 |
+
| `evaluation` | 20 000 failed transactions annotated with 727 invariants | ~20k rows |
|
| 55 |
+
|
| 56 |
+
Each record has the following columns:
|
| 57 |
+
|
| 58 |
+
- `tx_hash` (string): Transaction hash.
|
| 59 |
+
- `block_number` (int64): Block number in which the transaction was included.
|
| 60 |
+
- `from_address` (string): Sender Ethereum address.
|
| 61 |
+
- `to_address` (string): Receiver Ethereum address.
|
| 62 |
+
- `gas_limit` (int64): Gas limit specified for the transaction.
|
| 63 |
+
- `gas_used` (int64): Gas used by the transaction before failure.
|
| 64 |
+
- `failure_message` (string): The revert or failure message (if available).
|
| 65 |
+
- `invariant_condition` (string): A high‐level invariant representing the business‐logic violation.
|
| 66 |
+
- `invariant_id` (int64): An internal identifier for the extracted invariant cluster/category.
|
| 67 |
+
- `timestamp` (int64): Unix timestamp of the block (optional).
|
| 68 |
+
|
| 69 |
+
**File format:** The repository provides Parquet files for each split (`finetuning.parquet`, `evaluation.parquet`) and can be loaded via the `datasets` library as:
|
| 70 |
+
|
| 71 |
+
```python
|
| 72 |
+
from datasets import load_dataset
|
| 73 |
+
ds = load_dataset("MojtabaEshghie/raven‑dataset", split="finetuning")
|
| 74 |
+
````
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## Dataset Creation
|
| 79 |
+
|
| 80 |
+
### Curation Rationale
|
| 81 |
+
|
| 82 |
+
Business‐logic failures in smart contracts are harder to detect than low‐level exceptions (e.g., out‑of‑gas) but are critically important for security. The goal of this dataset is to provide a curated collection of failed transactions with extracted invariants to enable anomaly detection, clustering, and classification research in the smart‐contract domain.
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
### Data Processing
|
| 86 |
+
|
| 87 |
+
* Filtering of failed transactions with revert/failure messages.
|
| 88 |
+
* Extraction of business‑logic invariants via the tool SoliDiffy and other analysis pipelines.
|
| 89 |
+
* Deduplication of similar invariant texts and clustering of invariants to create `invariant_id`.
|
| 90 |
+
* Serialization into Parquet format; conversion to Arrow format by the `datasets` library during upload.
|
| 91 |
+
|
| 92 |
+
### Who/When/Where
|
| 93 |
+
|
| 94 |
+
* Curated by: Mojtaba Eshghie
|
| 95 |
+
* Affiliation: KTH Royal Institute of Technology, Umeå University.
|
| 96 |
+
* Date: Nov 2025
|
| 97 |
+
|
| 98 |
+
---
|
| 99 |
+
|
| 100 |
+
## Considerations for Using the Data
|
| 101 |
+
|
| 102 |
+
### Limitations
|
| 103 |
+
|
| 104 |
+
* **Bias toward failures only**: The dataset contains only failed transactions, so models trained on it might not generalize to normal transactions.
|
| 105 |
+
* **Time cutoff**: Transactions are up to a certain block number.
|
| 106 |
+
|
| 107 |
+
### Ethical and Privacy Considerations
|
| 108 |
+
|
| 109 |
+
* The data is sourced from a public blockchain (Ethereum), so transaction data is publicly available.
|
| 110 |
+
* Addresses are included (sender/receiver), which are pseudonymous but publicly traceable; users should be aware of potential linking to identities through external sources.
|
| 111 |
+
* Use responsibly: do not attempt to de‑anonymize addresses or misuse user data.
|
| 112 |
+
|
| 113 |
+
### Recommendations
|
| 114 |
+
|
| 115 |
+
* If using for supervised classification, consider balancing via sampling or weighting due to potentially unbalanced invariant categories.
|
| 116 |
+
* For anomaly detection, consider using the `finetuning` split for training and `evaluation` for benchmarking.
|
| 117 |
+
* Always cite the dataset and the associated paper when using it in publications.
|
| 118 |
+
|
| 119 |
+
---
|
| 120 |
+
|
| 121 |
+
## Citation
|
| 122 |
+
|
| 123 |
+
```bibtex
|
| 124 |
+
tbd
|
| 125 |
+
```
|