Skip to content

Commit fa730f2

Browse files
feat: dfp_v1 challenge
1 parent 3f45a8e commit fa730f2

131 files changed

Lines changed: 14219 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,20 @@ RT_VALIDATOR_HF_REPO=my_username/my_repo # !!! CHANGE THIS TO REAL HUGGINGFACE U
5959
# RT_MINER_LOGS_DIR="/var/log/agent.miner"
6060
# RT_MINER_DATA_DIR="/var/lib/agent.miner"
6161
# RT_MINER_WALLET_NAME=miner
62+
63+
64+
## Challenge configs -- ##
65+
DFP_CHALLENGE_API_KEY="proxy-api-key-here"
66+
DFP_CHALLENGE_TS_TAILNET="tailnet-id-here"
67+
DFP_CHALLENGE_TS_API_TOKEN="tskey-api-token-here"
68+
DFP_CHALLENGE_PUSHCUT_API_KEY="pushcut-api-key-here"
69+
DFP_CHALLENGE_PROXY_INTER_BASE_URL="http://localhost:8000"
70+
DFP_CHALLENGE_PROXY_EXTER_BASE_URL="http://external-ip:8000"
71+
72+
73+
RT_CFG_RAND_SEED="abcdefgh123456789"
74+
RT_COMPARER_RANDOM_SEED="abcdefgh123456789"
75+
RT_HB_CHALLENGE_LOG_DIR=volumes/storage/agent.miner/logs/ab_sniffer_v2
76+
RT_ABS_CHALLENGE_LOG_DIR=volumes/storage/agent.miner/logs/humanize_behaviour_v4
77+
RT_DFP_CHALLENGE_LOG_DIR=volumes/storage/agent.miner/logs/dfp_challenge
78+
RT_DFP_CHALLENGE_DEVICES_JSON_PATH=volumes/storage/agent.miner/logs/dfp_challenge/devices.json
937 KB
Loading
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Device Fingerprinter v1 Submission Guide (Active after September [x]th 2025 10:00 UTC)
2+
3+
![thumnail](../assets/images/challenges/dev_fingerprinter_v1/thumbnail.png)
4+
5+
## Overview
6+
7+
**Device Fingerprinter v1** tests miners' ability to develop a browser SDK that can accurately detect the driver type used by bots interacting with a webpage.
8+
9+
Miners must create a JavaScript fingerprinter that can distinguish between different devices through device fingerprinting techniques, analyzing browser properties, behavior patterns, and technical signatures.
10+
11+
---
12+
13+
## Example Code and Submission Instructions
14+
15+
Example codes for the Device Fingerprinter v1 can be found in the [`redteam_core/miner/commits/dev_fingerprinter_v1/`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/dev_fingerprinter_v1/) directory.
16+
17+
### Technical Requirements
18+
19+
- JavaScript (ES6+)
20+
- Ubuntu 24.04
21+
- Docker container support
22+
23+
### Core Requirements
24+
25+
1. Use our template from [`redteam_core/miner/commits/dev_fingerprinter_v1/src/fingerprinter/fingerprinter.js`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/dev_fingerprinter_v1/src/fingerprinter/fingerprinter.js)
26+
2. Keep the `runFingerprinting()` function signature and export unchanged
27+
3. Your fingerprinter must:
28+
- Collect device and browser fingerprint data
29+
- Generate a unique fingerprint hash
30+
- Send results to the designated endpoint
31+
- Complete without errors
32+
33+
### Key Guidelines
34+
35+
- **Detection Accuracy**: Your fingerprinter must accurately identify different devices and provide consistent hash values for the same device across multiple runs.
36+
- **Fingerprint Collection**:
37+
- Collect comprehensive browser and device properties
38+
- Analyze WebDriver signatures and automation artifacts
39+
- **Data Processing**:
40+
- Generate unique, consistent fingerprint hashes
41+
- Process collected data efficiently
42+
- **API Integration**:
43+
- Follow the provided API endpoint structure
44+
- Send properly formatted JSON payloads
45+
- Handle errors gracefully
46+
- **Technical Setup**:
47+
- Use modern JavaScript (ES6+) features
48+
- List dependencies in [`requirements.txt`](https://github.com/RedTeamSubnet/RedTeam/blob/main/redteam_core/miner/commits/dev_fingerprinter_v1/requirements.txt)
49+
- Use **amd64** architecture
50+
- **Limitations**
51+
- Your script must not exceed 2,000 lines. If it does, it will be considered invalid, and you will receive a score of zero.
52+
- Your dependencies must be older than January 1, 2025. Any package released on or after this date will not be accepted, and your script will not be processed.
53+
54+
### Plagiarism Check
55+
56+
We maintain strict originality standards:
57+
58+
- All submissions are compared against other miners' scripts
59+
- 100% similarity = zero score
60+
- Similarity above 60% will result in proportional score penalties based on the **detected similarity percentage**.
61+
- Note: Comparisons are only made against other miners submissions, not your own previous challenge entries.
62+
63+
## Submission Guide
64+
65+
Follow 1~6 steps to submit your script.
66+
67+
1. **Navigate to the Device Fingerprinter v1 Commit Directory**
68+
69+
```bash
70+
cd redteam_core/miner/commits/dev_fingerprinter_v1
71+
```
72+
73+
2. **Build the Docker Image**
74+
75+
To build the Docker image for the Device Fingerprinter v1 submission, run:
76+
77+
```bash
78+
docker build -t my_hub/dev_fingerprinter_v1-miner:0.0.1 .
79+
80+
# For MacOS (Apple Silicon) to build AMD64:
81+
DOCKER_BUILDKIT=1 docker build --platform linux/amd64 -t myhub/dev_fingerprinter_v1-miner:0.0.1 .
82+
```
83+
84+
3. **Log in to Docker**
85+
86+
Log in to your Docker Hub account using the following command:
87+
88+
```bash
89+
docker login
90+
```
91+
92+
Enter your Docker Hub credentials when prompted.
93+
94+
4. **Push the Docker Image**
95+
96+
Push the tagged image to your Docker Hub repository:
97+
98+
```bash
99+
docker push myhub/dev_fingerprinter_v1:0.0.1
100+
```
101+
102+
5. **Retrieve the SHA256 Digest**
103+
104+
After pushing the image, retrieve the digest by running:
105+
106+
```bash
107+
docker inspect --format='{{index .RepoDigests 0}}' myhub/dev_fingerprinter_v1:0.0.1
108+
```
109+
110+
6. **Update active_commit.yaml**
111+
112+
Finally, go to the `neurons/miner/active_commit.yaml` file and update it with the new image tag:
113+
114+
```yaml
115+
- dev_fingerprinter_v1---myhub/dev_fingerprinter_v1@<sha256:digest>
116+
```
117+
118+
---
119+
120+
## 📑 References
121+
122+
- Docker - <https://docs.docker.com>

redteam_core/challenge_pool/active_challenges.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,55 @@ humanize_behaviour_v5:
9191
- redteamsubnet61/base_hbv2_image4@sha256:6d2360ed9ff7310dbc31aee5ac61a9ebf60edbd4e85fd3077bfbdd42f7abd3f0
9292
- redteamsubnet61/base_hbv3_image1@sha256:14305b2d81d562a9549db0719ab4d8c19cc00dafc31fe826d28c5ab935fb3130
9393
- redteamsubnet61/base_hbv3_image2@sha256:fee9a54863c480c0088419e3b376b16ec99cf2fbdcf71211834b6e0bb155aefc
94+
95+
dev_fingerprinter_v1:
96+
name: "dev_fingerprinter_v1"
97+
description: "Detect fingerprint of a device when a request is received with a single fingerprinter.js script."
98+
challenge_incentive_weight: 0.0
99+
target: redteam_core.challenge_pool.dev_fingerprinter_v1.controller.DFPController
100+
comparer: redteam_core.challenge_pool.dev_fingerprinter_v1.comparer.DFPComparer
101+
challenge_manager: redteam_core.challenge_pool.dev_fingerprinter_v1.challenge_manager.DFPChallengeManager
102+
challenge_solve_timeout: 60
103+
docker_run_timeout: 900
104+
num_tasks: 1
105+
comparison_config:
106+
max_unique_commits: 15
107+
max_self_comparison_score: 0.9
108+
min_acceptable_score: 0.7
109+
challenge_container_run_kwargs:
110+
name: "dev_fingerprinter_v1"
111+
environment:
112+
RT_COMPARER_RANDOM_SEED: "${RT_COMPARER_RANDOM_SEED}"
113+
DFP_CHALLENGE_API_KEY: "${DFP_CHALLENGE_API_KEY}"
114+
DFP_CHALLENGE_TS_TAILNET: "${DFP_CHALLENGE_TS_TAILNET}"
115+
DFP_CHALLENGE_TS_API_TOKEN: "${DFP_CHALLENGE_TS_API_TOKEN}"
116+
DFP_CHALLENGE_PUSHCUT_API_KEY: "${DFP_CHALLENGE_PUSHCUT_API_KEY}"
117+
DFP_CHALLENGE_PROXY_INTER_BASE_URL: "${DFP_CHALLENGE_PROXY_INTER_BASE_URL}"
118+
DFP_CHALLENGE_PROXY_EXTER_BASE_URL: "${DFP_CHALLENGE_PROXY_EXTER_BASE_URL}"
119+
volumes:
120+
- "${RT_DFP_CHALLENGE_LOG_DIR}:/var/log/rest.dfp-challenger"
121+
- "${RT_DFP_CHALLENGE_DEVICES_JSON_PATH}:/etc/rest.dfp-challenger/devices.json"
122+
123+
miner_container_run_kwargs:
124+
cpu_count: 4
125+
mem_limit: "12g"
126+
network: "redteam_local"
127+
environment:
128+
CHALLENGE_NAME: "dev_fingerprinter_v1"
129+
130+
reset_challenge: true
131+
protocols:
132+
challenger: "http"
133+
challenger_ssl_verify: false
134+
miner: "http"
135+
miner_ssl_verify: false
136+
resource_limits:
137+
num_cpus: 4
138+
mem_limit: "12g"
139+
environment:
140+
ENV: "PRODUCTION"
141+
142+
baseline_reference_comparison_docker_hub_ids:
143+
- redteamsubnet61/base_dfpv1_image1@sha256:5cf2a129834f8093a4ed6637c5c6f8d2df5072678d8f5760b9995dcea01159e1
144+
- redteamsubnet61/base_dfpv1_image2@sha256:e91d3eeb15880f8461ced2972481a7c472136f982e47fba2b254360eb57569a1
145+
- redteamsubnet61/base_dfpv1_image3@sha256:2edb2f13969f2dd28f6727551c1d5bdc2314a48e79ba6ff1de00d4d8db2d9a6d

0 commit comments

Comments
 (0)