Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEGA Pool #119

Open
wants to merge 129 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
15a8109
Update README for mempool.space URL
wiz Mar 17, 2022
e08c354
ADD terrapool.io - ultimus - BlockfillsPool
nymkappa Mar 17, 2022
ecda964
Merge branch 'nymkappa/feature/add-more-pools'
wiz Mar 17, 2022
b761a8e
Added pools slugs into separated object
nymkappa Mar 24, 2022
9321187
Merge pull request #2 from mempool/nymkappa/feature/pool-slugs
wiz Mar 24, 2022
1fef4ca
Remove dot from `21 Inc.` slug
nymkappa Mar 30, 2022
59ab47f
Add new binance pool tag
nymkappa Apr 22, 2022
2dedf35
Merge pull request #4 from mempool/nymkappa/feature/binance-update
wiz Apr 24, 2022
b49daf6
Merge pull request #3 from mempool/nymkappa/bugfix/21incslug
wiz Apr 24, 2022
b573c39
Update EclipseMC tag and addresses
nymkappa Jun 17, 2022
3fb27ad
Merge pull request #6 from mempool/nymkappa/update-mining-pools
wiz Jun 23, 2022
30a7820
+pool okminer +addr binance ultimus terrapool
nymkappa Jun 26, 2022
d61989e
Add new EMCD pool tags
nymkappa Jun 28, 2022
61e8c92
Merge pull request #8 from mempool/nymkappa/feature/emcdpool
wiz Jul 9, 2022
f865305
Add a JSON validation GHA
knorrium Jul 9, 2022
84e9931
Merge pull request #9 from knorrium/knorrium/json_validator
wiz Jul 9, 2022
f0ca763
Update check name
knorrium Jul 9, 2022
c067540
Merge pull request #11 from mempool/knorrium/update_check_name
wiz Jul 9, 2022
490cbac
Merge branch 'master' into nymkappa/feature/update-pools
knorrium Jul 9, 2022
ef8de0e
Merge pull request #7 from mempool/nymkappa/feature/update-pools
wiz Jul 9, 2022
8c0066f
add new btc.com and binance coinbase tag
jaybeddict1 Aug 2, 2022
ecf706e
Added Titan pool to pools.json
jaybeddict1 Aug 3, 2022
7cfbf33
added titan slug
jaybeddict1 Aug 3, 2022
459e23e
added ',' to correct syntax error
jaybeddict1 Aug 9, 2022
40bc533
removed '/' in tag
jaybeddict1 Aug 9, 2022
3487c8b
removed '/' line 592
jaybeddict1 Aug 9, 2022
973d1c1
Merge pull request #12 from jaybeddict1/patch-1
wiz Aug 9, 2022
b5d87e1
Merge branch 'master' into patch-2
wiz Aug 9, 2022
439214c
Merge pull request #13 from jaybeddict1/patch-2
wiz Aug 9, 2022
42c082f
Adding new Foundry payout address
softsimon Sep 14, 2022
97b0c82
Merge pull request #15 from mempool/simon/foundry-new-payout
wiz Sep 18, 2022
a1a7d86
Update pools.json
bitcoinminion Oct 8, 2022
11b3571
remove space in ULTIMUSPOOL for name consistency
sha2fiddy Oct 22, 2022
d164c0d
Updates MARA pool coinbase address
Zaidos Oct 27, 2022
009a1e7
Fixes typo
Zaidos Oct 27, 2022
7715318
Another typo
Zaidos Oct 27, 2022
0b5428f
Update PR triggers to run the json validator
knorrium Nov 8, 2022
53bb6e8
PEGA Pool
Read1337 Nov 5, 2022
b4efb8b
Merge pull request #21 from knorrium/update_gha
wiz Nov 10, 2022
572de81
Merge branch 'master' into master
wiz Nov 10, 2022
3cabd3e
Merge branch 'master' into patch-1
knorrium Nov 10, 2022
bc8748e
Add documentation into the README
nymkappa Nov 10, 2022
dd2b6ae
Add foundry address (november 2022)
hunicus Nov 17, 2022
1e159aa
Merge pull request #16 from bitcoinminion/patch-1
wiz Nov 22, 2022
e73a425
Merge pull request #22 from mempool/nymkappa/readme
wiz Nov 22, 2022
d5fab29
Merge branch 'master' into patch-1
nymkappa Nov 22, 2022
4eb7595
Merge branch 'master' into patch-1
nymkappa Nov 22, 2022
9dbcbb3
Merge branch 'master' into master
knorrium Dec 2, 2022
ad147b1
Merge branch 'master' into add-foundry-addr
knorrium Dec 2, 2022
08353f1
Merge pull request #20 from Read1337/master
wiz Dec 26, 2022
5ca1223
Merge pull request #18 from Zaidos/patch-1
wiz Dec 26, 2022
15fd936
Merge pull request #17 from sha2fiddy/patch-1
wiz Dec 26, 2022
7f149c9
Merge pull request #23 from hunicus/add-foundry-addr
wiz Dec 26, 2022
13193ee
Add new poolin coinbase tag
nymkappa Nov 22, 2022
b6790c3
Fix caps on OKMINER slug
nymkappa Nov 22, 2022
afe9b8f
Merge pull request #24 from mempool/nymkappa/feature/update-poolin
wiz Jan 12, 2023
d236013
Add new mining pools-v2.json definitions
nymkappa Feb 26, 2023
9a6db0f
Luxor - emcd - zulupool
nymkappa Feb 26, 2023
08f03d5
Merge pull request #31 from mempool/nymkappa/update-pools
wiz Feb 26, 2023
8a543b2
Add /F2Pool/ tag
softsimon May 23, 2023
6de89aa
Adding new NiceHash tag
softsimon May 24, 2023
5c66321
New terra pool address
softsimon May 24, 2023
9e1b0fa
Merge pull request #35 from mempool/simon/add-f2pool-tag
softsimon May 24, 2023
f5ab758
Merge branch 'master' into simon/new-terra-pool-address
softsimon May 24, 2023
1504df5
Merge pull request #36 from mempool/simon/new-nice-hash-tag
softsimon May 24, 2023
c5f7579
Merge pull request #37 from mempool/simon/new-terra-pool-address
softsimon May 24, 2023
b2f8923
NiceHash link address update
marko-kukovec May 30, 2023
e889230
Merge pull request #38 from marko-kukovec/master
softsimon Jun 12, 2023
62b15b6
Add SECPOOL
nymkappa Oct 20, 2023
8a11b95
Merge pull request #40 from mempool/nymkappa/add-secpool
softsimon Nov 12, 2023
73c2f09
Update README
nymkappa Nov 30, 2023
c1eb1fd
Add OCEAN mining pool
nymkappa Dec 1, 2023
f61c7a0
Add OCEAN coinbase tag https://x.com/wk057/status/1730545224693264612…
nymkappa Dec 1, 2023
de0ad43
Merge pull request #41 from mempool/nymkappa/ocean-pool
softsimon Dec 2, 2023
57e8d42
Fixing OCEAN pool ID
softsimon Dec 3, 2023
615e23c
Remove slashes from F2Pool tag
natsoni Jan 31, 2024
adfebe8
Merge pull request #45 from mempool/fix-tag-f2pool
softsimon Feb 8, 2024
f2f1053
Remove slashes from SpiderPool
mononaut Mar 3, 2024
f198400
Merge pull request #48 from mempool/mononaut/spiderpool
softsimon Mar 6, 2024
3c141d8
Add WhitePool
mononaut Mar 9, 2024
45acdf3
Merge pull request #49 from mempool/mononaut/whitepool
softsimon Mar 10, 2024
fb78785
Add FutureBit Solo Miners
jstefanop Apr 5, 2024
a9f1d66
Add wk057 as pool
jaybeddict1 Apr 11, 2024
7351f38
Add FUSAP Rare Sat Address
jaybeddict1 Apr 12, 2024
49f2a87
Add wiz tag to test testnet4 mining dashboard
wiz May 6, 2024
86039e8
Add mononaut tag to test testnet4 mining dashboard
mononaut May 7, 2024
e59a4e4
Merge pull request #54 from mempool/mononaut/monke-pool
wiz May 7, 2024
985ed19
add rijndael to tags for testnet
rot13maxi May 8, 2024
b15ff50
Merge pull request #55 from rot13maxi/rijndael-tag
wiz May 9, 2024
5fab3ba
Merge pull request #53 from jaybeddict1/patch-6
wiz May 9, 2024
0986fc8
Merge branch 'master' into patch-4
wiz May 9, 2024
6e1fa12
Bump wk057 id, fix json parse error
wiz May 9, 2024
74f3ece
Merge pull request #52 from jaybeddict1/patch-4
wiz May 9, 2024
70b2ea1
Merge branch 'master' into master
wiz May 9, 2024
d09864d
Fix int string typo
wiz May 9, 2024
939a240
Merge pull request #51 from jstefanop/master
wiz May 9, 2024
537b671
Add emzy and knorrium testnet4 data
knorrium May 9, 2024
e9dbb21
Merge pull request #56 from knorrium/knorrium/testnet4
wiz May 9, 2024
fb21876
Add script to check for duplicate ids
knorrium May 10, 2024
62ee47b
Refactor GHA
knorrium May 10, 2024
33480c0
Merge branch 'master' into knorrium/refactor_action
knorrium May 10, 2024
06c5a72
Merge pull request #57 from knorrium/knorrium/refactor_action
wiz May 10, 2024
2ae3699
Add missing addresses field
natsoni May 22, 2024
d4cfab7
Merge pull request #59 from mempool/natsoni/add-missing-addresses-field
softsimon May 23, 2024
8873e1a
Add Carbon Negative pool
natsoni Jun 1, 2024
8ffa349
Merge pull request #61 from mempool/natsoni/add-carbon-negative
softsimon Jun 24, 2024
2cba28a
Adding phoenix pool
Jul 3, 2024
b78ac26
Add Portland HODL
wiz Jul 5, 2024
77846d8
Fix id conflict for phoenix pool
wiz Jul 5, 2024
ed6c358
Merge branch 'master' into master
wiz Jul 5, 2024
fcc40d1
Merge pull request #62 from developer-phoenix/master
wiz Jul 5, 2024
bc8b322
Add Neopool
nymkappa Aug 15, 2024
282bf18
Merge pull request #63 from mempool/nymkappa/neopool
wiz Aug 15, 2024
9d1dde6
Add link for whitepool
mononaut Sep 13, 2024
7a7bba0
Add new MARA DH Coinbase Tag
russeree Oct 5, 2024
c7e976c
Add MaxiPool
softsimon Oct 10, 2024
9dbca61
Merge pull request #65 from russeree/russeree-mara-nxt-tag
wiz Oct 10, 2024
1ec59e6
Merge branch 'master' into simon/add-maxi-pool
wiz Oct 10, 2024
cd60448
Merge pull request #66 from mempool/simon/add-maxi-pool
wiz Oct 10, 2024
5f32a67
Merge pull request #64 from mempool/mononaut/update-whitepool-url
wiz Oct 10, 2024
8d811f3
Add DrDetroit testnet4
orangesurf Dec 18, 2024
cb90351
Merge pull request #70 from mempool/orangesurf/drdetroit
softsimon Dec 19, 2024
69ddd88
Add BitFuFuPool
softsimon Dec 19, 2024
f737d86
Merge pull request #71 from mempool/simon/add-bitfufu
softsimon Dec 20, 2024
0f9ccb1
New Binance coinbase address
nymkappa Jan 22, 2025
479b10d
Add luckypool
nymkappa Jan 22, 2025
7f83c4f
Update terra pool tags
nymkappa Jan 22, 2025
45df756
Add mining dutch
nymkappa Jan 22, 2025
0138019
Merge pull request #77 from mempool/nymkappa/pool-updates
softsimon Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/validate-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: JSON check

on:
push:
paths:
- "**.json"
pull_request:
types: [opened, review_requested, synchronize]

jobs:
json_validator:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check for duplicates
run : |
sh dupes.sh

- name: Check JSON syntax
run: |
if ! jq empty pools-v2.json; then
echo "JSON syntax check failed"
exit 1
fi
197 changes: 193 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,195 @@
Blockchain Pools
======================
# Bitcoin Mining Pools

Bitcoin Mining Known Pools Tracking Tags for https://btc.com/stats/pool
Mining pools definition used on https://mempool.space/mining/pools

Contributions welcome.
# Contributing

Contributions welcome. All changes must be applied in `pools-v2.json` file.

## Adding a new mining pool

Regardless of the choosen method, we recommend adding a appropriate slug to each
new mining pool you add to `pools-v2.json`. The slug will be used as a unique tag for
the mining pool, for example in the public facing urls like https://mempool.space/mining/pool/foundryusa (here `foundryusa` is the slug).

You can specify mining pool slugs in the `slugs` object in `pools-v2.json`. If you
don't specify one, we will automatically generate one [as such](https://github.com/mempool/mempool/blob/02820b0e6836c4202c2e346195e8aace357e3483/backend/src/api/pools-parser.ts#L106-L110).

```javascript
if (slug === undefined) {
// Only keep alphanumerical
slug = poolNames[i].replace(/[^a-z0-9]/gi, '').toLowerCase();
logger.warn(`No slug found for '${poolNames[i]}', generating it => '${slug}'`);
}
```

### Add a new mining pool by `coinbase_tags`

You can add a new mining pool by specifying the coinbase tag they're using in
the coinbase transaction.

To add a new pool, you must add a new JSON object in the `coinbase_tags` object.
Note that you can add multiple tags for the same mining pool, but you *must* use
the exact same values for `name` and `link` in each new entry.
For example:

```json
"Foundry USA Pool" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
"Foundry USA Pool another tag" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
```

Each coinbase tag will be use as a regex to match blocks with their mining pool.
This is how we use it in mempool application. You can see the code [here](https://github.com/mempool/mempool/blob/02820b0e6836c4202c2e346195e8aace357e3483/backend/src/api/blocks.ts#L238-L246).
```javascript
const regexes: string[] = JSON.parse(pools[i].regexes);
for (let y = 0; y < regexes.length; ++y) {
const regex = new RegExp(regexes[y], 'i');
const match = asciiScriptSig.match(regex);
if (match !== null) {
return pools[i];
}
}
```

### Add a new mining pool by `payout_addresses`

You can add a new mining pool by specifying the receiving address they're using in
the coinbase transaction to receive the miner reward.

To add a new pool, you must add a new JSON object in the `payout_addresses` object.
Note that you can add multiple addresses for the same mining pool, but you *must* use
the exact same values for `name` and `link` in each new entry.
For example:

```json
"1FFxkVijzvUPUeHgkFjBk2Qw8j3wQY2cDw" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
"12KKDt4Mj7N5UAkQMN7LtPZMayenXHa8KL" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
```

Each address will be use to match blocks with their mining pool by matching the
coinbase transaction output address.
This is how we use it in mempool application. You can see the code [here](https://github.com/mempool/mempool/blob/02820b0e6836c4202c2e346195e8aace357e3483/backend/src/api/blocks.ts#L230-L236).
```javascript
const address = txMinerInfo.vout[0].scriptpubkey_address;
for (let i = 0; i < pools.length; ++i) {
if (address !== undefined) {
const addresses: string[] = JSON.parse(pools[i].addresses);
if (addresses.indexOf(address) !== -1) {
return pools[i];
}
}
```

## Change an existing mining pool metadata

You can also change an existing mining pool's name, link and slug. In order to
do so properly, you must update all existing entry in the `pools-v2.json` file.

For example, if you'd like to rename `Foundry USA` to `Foundry Pool`, you must replace
all occurences of the old string with the new one in `pools-v2.json` file, with no
exception, otherwise you'll end with two mining pools. The samme idea applies if
you want to change the link or the slug.

For example, to rename `Foundry USA` to `Foundry Pool` you'd need to update the
following (using today's `pools-v2.json` as reference):

```json
// Original
"Foundry USA Pool" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
"/2cDw/" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
// Renamed
"Foundry USA Pool" : {
"name" : "Foundry Pool",
"link" : "https://foundrydigital.com/"
},
"/2cDw/" : {
"name" : "Foundry Pool",
"link" : "https://foundrydigital.com/"
},
```
```json
// Original
"1FFxkVijzvUPUeHgkFjBk2Qw8j3wQY2cDw" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
"12KKDt4Mj7N5UAkQMN7LtPZMayenXHa8KL" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
// Renamed
"1FFxkVijzvUPUeHgkFjBk2Qw8j3wQY2cDw" : {
"name" : "Foundry Pool",
"link" : "https://foundrydigital.com/"
},
"12KKDt4Mj7N5UAkQMN7LtPZMayenXHa8KL" : {
"name" : "Foundry Pool",
"link" : "https://foundrydigital.com/"
},
```

```json
// Original
"Foundry USA": "foundryusa",
// Renamed - Be aware, this will also change the mining pool page link from
mempool.space/mining/pool/foundryusa to mempool.space/mining/pool/foundrypool
"Foundry Pool": "foundrypool",
```

## Block re-indexing

When a mining pool's coinbase tag or addresses is updated in `pools.jon`,
mempool can automatically re-index the appropriate blocks in order to re-assign
them to the correct mining pool.
"Appropriate" blocks here concern all blocks which are not yet assigned to a
mining pool (`unknown` pool), from block 130635 (first known mining pool block)
as well as all blocks from the update mining pool.
You can find the re-indexing logic [here](https://github.com/mempool/mempool/blob/02820b0e6836c4202c2e346195e8aace357e3483/backend/src/api/pools-parser.ts#L224-L249)

You can enable/disable this behavior using by setting the following backend
configuration variable:
```
{
"MEMPOOL": {
"AUTOMATIC_BLOCK_REINDEXING": false
}
}
```

If you set it to false, no re-indexing will happen automatically, but this also
means that you will need to delete blocks manually from your database. Upon
restarting your backend, missing indexed blocks are always be re-indexed using
the latest mining pool data.

## Mining pool definition

When the mempool backend starts, we automatically fetch the latest `pools-v2.json`
version from github. By default the url points to https://github.com/mempool/mining-pools/blob/master/pools-v2.json but you can configure it to points to another repo by setting
the following backend variables:

```
{
"MEMPOOL": {
'POOLS_JSON_URL': 'https://raw.githubusercontent.com/mempool/mining-pools/master/pools-v2.json',
'POOLS_JSON_TREE_URL': 'https://api.github.com/repos/mempool/mining-pools/git/trees/master'
}
}
```
9 changes: 9 additions & 0 deletions dupes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
OUTPUT=$(cat pools-v2.json | jq 'group_by(.id) | map(select(length>1) | .[])')

if [ "$OUTPUT" = "[]" ]; then
echo "no duplicate pool ids found"
exit 0
else
echo "duplicate pool ids found: $OUTPUT"
exit 1
fi
Loading