Gittensor Miner Guide

A complete guide for miners on Bittensor Subnet 74 (SN74). Learn how the scoring works and how to maximize your TAO rewards.

1. What is Gittensor?

Gittensor is a Bittensor subnet that pays you TAO cryptocurrency for contributing to open-source projects on GitHub.

The concept is simple:

You don't need to run any mining software. You just need a Bittensor wallet, a GitHub account, and the ability to write code that gets merged.


2. How It Works (Big Picture)

YOU (Miner) VALIDATORS BITTENSOR NETWORK ----------- ---------- ----------------- 1. Register your GitHub PAT ------> Validators store your PAT (one-time setup) and link it to your hotkey 2. Make PRs on GitHub Every scoring round: to whitelisted repos - Fetch your PRs via GitHub API - Parse your code with tree-sitter AST - Score each merged PR - Check eligibility - Normalize across all miners 3. Earn TAO <------ Validators set weights on-chain ----> Network distributes TAO
Key Point
There is no mining software to run. Once you register your PAT, the validators do all the work. Your job is to write good code and get it merged.

3. Getting Started

Prerequisites

Register Your PAT

# Install the CLI
pip install gittensor

# Broadcast your GitHub PAT to all validators
gitt miner post --wallet <your-wallet-name> --hotkey <your-hotkey-name>

# Verify validators received it
gitt miner check --wallet <your-wallet-name> --hotkey <your-hotkey-name>

After this, start making PRs. The system will automatically detect and score them.

Important Rules

Warning
  • One GitHub account per miner UID. If multiple UIDs share the same GitHub account, ALL of them get zeroed out (sybil detection).
  • Your GitHub identity is pinned to your hotkey. Once you register, that GitHub account is permanently associated with your hotkey.
  • If you re-register a UID with a new hotkey, you must run gitt miner post again.

4. The Eligibility Gate

Critical
Before you earn a single TAO, you must pass the eligibility gate. If you fail, your entire reward is zero — not reduced, zero.

Two Requirements

RequirementThresholdHow It's Calculated
Minimum valid merged PRs5Count of merged PRs where token_score >= 5
Minimum credibility75%merged_count / (merged_count + closed_count - 1)

Credibility Formula

credibility = merged_prs / (merged_prs + closed_prs - mulligan)

mulligan = 1 (your first closed PR is forgiven entirely)

Examples

MergedClosedCredibilityEligible?
505/(5+0) = 100%Yes
515/(5+0) = 100%Yes (mulligan forgives the 1 closed)
525/(5+1) = 83%Yes
535/(5+2) = 71%No — below 75%
30100%No — below 5 valid merged PRs
10510/(10+4) = 71%No — below 75%
10410/(10+3) = 77%Yes
What This Means
  • Get your first 5 quality merged PRs as fast as possible. Until then, you earn nothing.
  • Don't submit throwaway PRs. Every closed/rejected PR (after the first one) hurts your credibility.
  • A "valid" PR means token_score >= 5. Trivial PRs (typo fixes, single-line config changes) may not meet this.

5. How Your PRs Are Scored

The AST-Based Scoring System

Gittensor doesn't just count lines of code. It uses tree-sitter to parse your code into an Abstract Syntax Tree (AST) and scores individual nodes.

Step 1: Parse both versions. The validator fetches the file content before and after your PR (using merge-base, not branch tip, so only your actual changes are counted).

Step 2: Compute tree diff. It compares the ASTs and finds:

Step 3: Score each node. Every AST node has a weight:

Structural Nodes (High Value)

These represent the "skeleton" of your code:

Node TypeWeightWhat It Is
class_declaration2.5New class definition
function_declaration2.5New function declaration
function_definition2.0New function definition
method_definition2.0New method
interface_declaration1.75New interface
struct_definition1.75New struct
async_function_definition1.5New async function
trait_definition1.5New trait
arrow_function0.75Arrow/lambda function
with_statement0.6Context manager
call_expression0.55Function call
for_statement0.5For loop
lambda_expression0.5Lambda
switch_statement0.4Switch/case
while_statement0.4While loop
decorator0.4Decorator
return_statement0.35Return
if_statement0.35If statement

Leaf Nodes (Lower Value)

These are the actual tokens in your code:

Node TypeWeightWhat It Is
assignment_operator0.2=, +=, etc.
self / this0.15Self references
type_identifier0.15Type names
comparison_operator0.15==, <, etc.
boolean / true / false0.1Boolean values
operator0.1Operators
identifier0.07Variable names
string_literal0.05String values
integer / float0.03Numbers
string_content0.02String inner text
comment (all types)0.0Comments score ZERO
Key Takeaways
  • Functions and classes are the highest-scoring elements (2.0-2.5 per node)
  • Comments are literally worth zero — don't pad PRs with comments
  • Identifiers (variable names) are only 0.07 each — renaming variables across a file doesn't earn much
  • Both additions and deletions count — meaningful refactoring that removes code is valued

Non-Code Files

Files with these extensions use simpler line-count scoring (capped at 300 lines):

ExtensionWeight
Markdown (.md, .mdx)0.08
JSON (.json)0.1
YAML (.yaml, .yml)1.0
Config files (.cfg, .conf, .ini)0.5
CSV / TSV0.1

Documentation-only PRs score very little.

Test Files

Files detected as test files get a 0.05 weight multiplier — test code scores 95% less than production code.

Detection: files in tests/, test/, __tests__/ directories, or files named test_*.py, *.test.js, *.spec.ts, etc. Also Rust #[cfg(test)] and Zig test blocks.

Other Rules


6. The Full Scoring Formula

For each merged PR:

token_score = sum of (AST node weight × language weight × test weight) for all changed files

code_density = min(token_score / total_lines_changed, 3.0)

initial_base_score = 30 × code_density (0 if token_score < 5)

contribution_bonus = min(1.0, total_token_score / 2000) × 30

base_score = initial_base_score + contribution_bonus
earned_score = base_score × repo_weight (0.01 to 100.0) × time_decay (0.05 to 1.0) × credibility (0.75 to 1.0) × review_quality (0.0 to 1.0) × spam_multiplier (0.0 or 1.0) × issue_multiplier (1.0 to 2.0)
final_earned_score = earned_score + pioneer_dividend

Your total score = sum of all earned_scores − total collateral from open PRs

7. Multipliers Explained

Repo Weight Multiplier

Each whitelisted repo has a weight. This is the single biggest multiplier.

A PR to bitcoin/bitcoin scores ~588x more than a PR to a typical Bronze repo (weight 0.17).

Time Decay Multiplier

PRs lose value over time after being merged:

Days Since MergeMultiplier
0 - 0.5 days1.00 (grace period)
1 day~0.98
5 days~0.88
10 days (midpoint)~0.50
15 days~0.12
20 days~0.06
25+ days~0.05 (floor)
35+ daysNot scored (outside lookback)

Formula: sigmoid curve with 10-day midpoint, 12-hour grace period, 5% floor.

Takeaway
A PR merged today is worth ~20x more than the same PR merged 20 days ago. Contribute steadily.

Credibility Multiplier

Equal to your credibility ratio (see Section 4). Applied linearly to each merged PR. If your credibility is 0.80, every PR scores 80% of what it would at perfect credibility.

Review Quality Multiplier

multiplier = max(0.0, 1.0 − 0.12 × changes_requested_count)
Maintainer Change RequestsMultiplier
01.00
10.88
20.76
30.64
50.40
80.04
9+0.00

Only counts CHANGES_REQUESTED reviews from maintainers (OWNER, MEMBER, COLLABORATOR). Regular contributor reviews don't affect this.

Spam Multiplier

Binary: 1.0 (normal) or 0.0 (all rewards zeroed).

threshold = min(10 + floor(total_token_score / 300), 30)
Your Total Token ScoreOpen PR Threshold
0 - 29910
300 - 59911
600 - 89912
3000+20
6000+30 (max)
Danger
If your open PRs exceed the threshold, ALL your rewards go to zero. Not reduced — zeroed.

Issue Multiplier

If your PR closes a valid linked issue, you get a bonus multiplier between 1.0 and 2.0:

age_ratio = sqrt(min(days_open, 40)) / sqrt(40)
age_bonus = 0.75 × age_ratio
maintainer_bonus = 0.25 (if issue was created by a maintainer)
multiplier = 1.0 + age_bonus + maintainer_bonus
Issue AgeNon-Maintainer IssueMaintainer Issue
1 day1.121.37
10 days1.381.63
20 days1.531.78
40+ days1.752.00

Rules for issue validity:


8. Bonus Systems

Pioneer Dividend

If you are the first miner to contribute a quality PR to any whitelisted repo, you become the pioneer for that repo.

When other miners (followers) later contribute to the same repo, you earn a cut of their scores:

Follower Position% of Their Earned Score You Get
1st follower30%
2nd follower20%
3rd and beyond10% each

Cap: The total pioneer dividend cannot exceed 1x your own earned_score on that repo. So at most, your score on that repo doubles.

Eligibility: A PR must be merged AND have token_score >= 5. Pioneer is determined by earliest merge date.

Example
You merge the first PR to repo X and earn 50 points. Then:
  • Miner A earns 40 points → you get 40 × 0.30 = 12
  • Miner B earns 30 points → you get 30 × 0.20 = 6
  • Miner C earns 20 points → you get 20 × 0.10 = 2
  • Total dividend: 20 points. Your total: 50 + 20 = 70 points

9. Penalties to Avoid

Open PR Collateral

Each open PR costs you 20% of its potential score, deducted from your total:

collateral = base_score × repo_weight × issue_multiplier × 0.20

Even if you're under the spam threshold, open PRs actively hurt your score. Close or merge them.

Shared GitHub Account (Sybil Detection)

If the same GitHub user ID appears on multiple miner UIDs, ALL UIDs sharing that account get zeroed out. Not just the duplicates — everyone.

Maintainer PRs Are Filtered Out

If your GitHub account has OWNER, MEMBER, or COLLABORATOR status on a repo, your PRs to that repo are skipped entirely.

Self-Merged PRs

If the person who merged the PR is the same as the author AND there are no approving reviews from other people, the PR is skipped. You need at least one external approval.


10. Which Repos to Target

There are 1,414 whitelisted repositories across three tiers:

Tier Distribution

TierCountWeight RangeDescription
Gold1320.0 - 100.0Highest value. Bitcoin, Bittensor core, Entrius repos
Silver434.0 - 20.0High value. Major open-source projects
Bronze1,3580.01 - 3.0Most repos. Median weight ~0.17

Top 20 Highest-Weight Repos

WeightRepositoryTier
100.00bitcoin/bitcoinGold
71.03opentensor/subtensorGold
53.48entrius/allwaysGold
53.48entrius/gittensorGold
43.72latent-to/bittensorGold
37.40bitcoin/bipsGold
32.92bitcoinj/bitcoinjGold
29.55bitcoinjs/bitcoinjs-libGold
26.91entrius/allways-uiGold
26.91entrius/gittensor-uiGold
24.78latent-to/async-substrate-interfaceGold
23.02latent-to/btwalletGold
21.54latent-to/btcliGold
20.00dbeaver/dbeaverSilver
20.00openclaw/openclawSilver
17.36AffineFoundation/affine-cortexSilver
15.28AffineFoundation/affinetesSilver
13.72astral-sh/ruffSilver
12.49ethereum/go-ethereumSilver
11.50hoppscotch/hoppscotchSilver
How to Choose
  • Realistic difficulty matters. bitcoin/bitcoin has the highest weight but extremely high review standards.
  • Silver-tier repos often offer the best effort-to-reward ratio.
  • Pioneer potential: If a high-weight repo has zero miner contributors, being first is very valuable.
  • Your expertise matters. A strong PR to a lower-weight repo beats a rejected PR to a higher-weight one.

11. Which Languages Pay Most

Language weight is multiplied into your token score per file. Higher weight = more points per AST node.

WeightLanguages
2.0Rust (.rs), Go (.go), C (.c, .h), C++ (.cpp, .hpp), Haskell (.hs), CUDA (.cu)
1.75Python (.py), Ruby (.rb), Java (.java), Kotlin (.kt), Lua (.lua), Clojure (.clj), OCaml (.ml), Shell (.sh, .zsh), Verilog, VHDL, D, PureScript, Scheme, Racket
1.5TypeScript (.cts), Elixir, Erlang, Swift, SQL, Solidity, Svelte, Bash, Assembly, Pascal, GDScript, Gleam, GLSL, V, PowerShell, Fish, Nim
1.0 - 1.25PHP, Vue, Astro, Prisma, JavaScript (.js = 1.05), TypeScript (.ts = 1.05, .tsx = 1.1), Dart, Julia, Scala, Zig, Nix, Terraform, YAML
0.5 - 0.95CSS (0.95), SCSS (1.0), HTML (0.75), config files (0.5)
< 0.5Markdown (0.08), JSON (0.1), CSV (0.1), text (0.08), XML (0.2)
Practical Implication
Writing a function in Rust (weight 2.0) scores almost 2x the same function in JavaScript (weight 1.05) and 25x a change to a markdown file (weight 0.08). If you're equally comfortable in multiple languages, prefer Rust, Go, C/C++, or Python.

12. PR Filtering Rules

Not every PR counts. The validator applies these filters:

PRs That Are Counted

PRs That Are Skipped

ConditionResult
Repo not in whitelistSkipped entirely
Merged to non-default branchSkipped
Author is repo maintainerSkipped
Self-merged with no external approvalSkipped
Merged more than 35 days agoSkipped (outside lookback)
Source branch is also an acceptable branchSkipped
Created after repo's inactive dateSkipped

Open PRs

Closed PRs


13. Dynamic Emissions

After all miners are scored and normalized, the entire reward pool is scaled down based on overall network activity:

unique_repo_scalar = exponential_unlock(total_unique_repos_across_all_miners)
token_score_scalar = exponential_unlock(total_token_score_across_all_miners)
final_scalar = average(unique_repo_scalar, token_score_scalar)
MetricMax RecycleDecay RateMeaning
Unique repos80%0.005More repos contributed to = less recycled
Token score80%0.000012Higher total scores = less recycled

When the network has fewer miners or less activity, a larger portion of emissions gets recycled (sent to UID 0). As more miners contribute to more repos with higher quality, the scalar approaches 1.0.

For You
Contributing to unique repos (not the same ones everyone else is targeting) helps the entire network unlock more emissions.

14. Issue Bounties

Gittensor has a parallel reward system using smart contracts on Polkadot:

gitt issues list              # View registered bounty issues
gitt issues submissions <id>  # View PR submissions for an issue
gitt harvest                  # Harvest pending bounty emissions

This is separate from the main OSS scoring system and is an additional earning opportunity.


15. Strategy Cheatsheet

Phase 1: Get Eligible (First Priority)

ActionWhy
Get 5 quality PRs merged to whitelisted reposMeet the minimum merged PR requirement
Keep your closed PR count lowStay above 75% credibility
Target PRs that will definitely be acceptedA rejected PR costs more than a delayed merge
Ensure each PR has token_score >= 5PRs below this threshold don't count as "valid"

Phase 2: Maximize Score

#ActionImpact
1Target high-weight repos (Gold/Silver tier)Repo weight is the biggest score multiplier
2Write structural code — functions, classes, interfacesAST nodes score 2.0-2.5 vs 0.03-0.07 for literals
3Use high-weight languages (Rust, Go, C, Python)Up to 2x language multiplier
4Fix old issues from maintainersUp to 2x issue multiplier
5Be first to contribute to untouched reposPioneer dividend can double your score
6Submit clean code first timeEach change request costs 12%
7Contribute steadily, not in burstsTime decay halves value at 10 days
8Keep open PRs under 10Exceeding threshold = all rewards zero
9Close/merge open PRs promptlyEach open PR costs 20% collateral
10Contribute to unique reposHelps unlock network-level emissions

Things to Avoid

Don'tWhy
Submit PRs you think will be rejectedClosed PRs destroy credibility
Pad PRs with commentsComments score literally 0.0
Make docs-only PRsMarkdown weight is 0.08 (nearly worthless)
Leave many PRs open>10 open = all rewards zeroed
Use multiple GitHub accountsSybil detection zeros all linked UIDs
Try to self-mergeSelf-merged without external approval = skipped
Contribute to repos where you're a maintainerMaintainer PRs are filtered out
Rename variables for easy PRsIdentifiers score only 0.07 each
Submit huge generated/data files>1MB files get zero score

The Ideal PR

The Perfect PR
  • Written in Rust, Go, or C (language weight 2.0)
  • Merged to a Gold or Silver tier repo (weight 20+)
  • Contains meaningful structural changes (new functions, classes, interfaces)
  • Fixes an old issue created by a maintainer (up to 2x multiplier)
  • Has dense, high-quality code (high token-score-to-lines ratio)
  • Gets zero change-request reviews (clean first submission)
  • Merged recently (within the last few days)
  • Submitted to a repo where you're the first miner contributor (pioneer dividend)

Gittensor Miner Guide — Generated from source code analysis of Subnet 74 (v5.0.0)