Mining pools definition used on https://mempool.space/graphs/mining/pools
Contributions welcome. All changes must be applied in pools-v2.json file.
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/graphs/mining/pools (here btcpool 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.
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}'`)
}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:
"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.
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]
}
}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:
"1Hb7iC63bqxtt7X9oYr1VtDTE2Yk5xLQAU" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
"" : {
master
"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.
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];
}
}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):
// 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/"
},// Original
"1Hb7iC63bqxtt7X9oYr1VtDTE2Yk5xLQAU" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
"112sKvFSn7nk5zwgqeCd6K5cGsuYKM1tDb" : {
"name" : "Foundry USA",
"link" : "https://foundrydigital.com/"
},
// Renamed
"1Hb7iC63bqxtt7X9oYr1VtDTE2Yk5xLQAU" : {
"name" : "Foundry Pool",
"link" : "https://foundrydigital.com/"
},
"112sKvFSn7nk5zwgqeCd6K5cGsuYKM1tDb" : {
"name" : "Foundry Pool",
"link" : "https://foundrydigital.com/"
},// 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",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 0 (first known mining pool block)
as well as all blocks from the update mining pool.
You can find the re-indexing logic here
You can enable/disable this behavior using by setting the following backend configuration variable:
{
"MEMPOOL": {
"AUTOMATIC_BLOCK_REINDEXING": true
}
}
mempool-github.mp4
Mempool is the fully-featured mempool visualizer, explorer, and API service running at mempool.space.
It is an open-source project developed and operated for the benefit of the Bitcoin community, with a focus on the emerging transaction fee market that is evolving Bitcoin into a multi-layer ecosystem.
Mempool can be self-hosted on a wide variety of your own hardware, ranging from a simple one-click installation on a Raspberry Pi full-node distro all the way to a robust production instance on a powerful FreeBSD server.
Most people should use a one-click install method.
Other install methods are meant for developers and others with experience managing servers. If you want support for your own production instance of Mempool, or if you'd like to have your own instance of Mempool run by the mempool.space team on their own global ISP infrastructure—check out Mempool Enterprise®.
Mempool can be conveniently installed on the following full-node distros:
We highly recommend you deploy your own Mempool instance this way. No matter which option you pick, you'll be able to get your own fully-sovereign instance of Mempool up quickly without needing to fiddle with any settings.
Mempool can be installed in other ways too, but we only recommend doing so if you're a developer, have experience managing servers, or otherwise know what you're doing.
- See the
docker/directory for instructions on deploying Mempool with Docker. - See the
backend/andfrontend/directories for manual install instructions oriented for developers. - See the
production/directory for guidance on setting up a more serious Mempool instance designed for high performance at scale.