Bitcoin Forum
May 21, 2024, 10:24:53 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Group blocks / addresses by mining pool  (Read 171 times)
kristiano92 (OP)
Jr. Member
*
Offline Offline

Activity: 68
Merit: 1


View Profile
April 09, 2020, 01:33:02 PM
 #1

Hello everone Smiley

I would like to implement a script, which takes all blocks and group them by mining pool name, which is written in a coinbase data. Next, I want to take all coinbase transactions (1st tx from every block) and write outputs of them to proper mining pools. A mining pool could has more than 1 address. Moreover, some of them could send funds directly to users or some of them have more than 1 output. What  e.g. 2. What is the best way to obtain these results? What parameters should I take? Any help will be appreciated Smiley
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10572



View Profile
April 09, 2020, 01:51:46 PM
 #2

you can always visit a block explorer that has already done this like this: https://blockchair.com/bitcoin/blocks#f=id,guessed_miner and see what miner they have "guessed" to have mined the blocks. you can add a condition so that miner is equal to certain name and see those blocks only.

if you want to do it yourself you you have to have access to local copy of the blockchain then read each block's first transaction then you should be able to 1) deserialize a coinbase transaction 2) read coinbase scriptsig 3) decode it with UTF8 4) get rid of extra stuff. then try to parse the name strings and guess which miner has mined that block.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 09, 2020, 01:54:39 PM
 #3

You'll probably want to download the blockchain after installing bitcoin core and the find a parser that can read this informatiom into a csv file or similar.

The parser would act as a second step after you have the data and can be programmed to read through the chain and detect the information listed above.

Are you a programmer? Do you have any experience or know anyone that could help with this? Is there a goal for your project?
kristiano92 (OP)
Jr. Member
*
Offline Offline

Activity: 68
Merit: 1


View Profile
April 10, 2020, 07:56:03 AM
 #4

Yes. I want to find all addresses of mining pools and group them. Explorers have some errors. For instance, according to btc.com this address 147SwRQdpCfj5p8PnfsXV2SsVVpVcz3aPq is tagged as CanoePool and still mines new coins, but last block of this pool was mined in 2018. I think, this address belongs to another pool.
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10572



View Profile
April 10, 2020, 08:55:48 AM
 #5

Yes. I want to find all addresses of mining pools and group them. Explorers have some errors. For instance, according to btc.com this address 147SwRQdpCfj5p8PnfsXV2SsVVpVcz3aPq is tagged as CanoePool and still mines new coins, but last block of this pool was mined in 2018. I think, this address belongs to another pool.

i can't find the tag but you can easily decode the scriptsig of the coinbase transaction like this:
Code:
03f5870941d7a2ae3df2c5b341d7a2ae3d6dd57c2f315448617368263538434f494e2ffabe6d6d403ace9685148ea02d7933281963b2c04b0f9c99b2b6c6accf23638a6e0d7b4980000000000000009606ba787843c40000000000

first 4 bytes are the block height:
03-f58709
the rest is usually a push of the name of the pool but can contain other stuff:
hex = 41d7a2ae3df2c5b341d7a2ae3d6dd57c2f315448617368263538434f494e2ffabe6d6d403ace9685148ea02d7933281963b2c04b0f9c99b2b6c6accf23638a6e0d7b4980000000000000009606ba787843c40000000000
UTF8 = Aע�=�ųAע�=m�|/1THash&58COIN/��mm@:Z���-y3(c��K����Ƭ�#c�n
{I�
pool name is: /1THash&58COIN/

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
aliashraf
Legendary
*
Offline Offline

Activity: 1456
Merit: 1174

Always remember the cause!


View Profile WWW
April 11, 2020, 07:37:37 PM
 #6

Yes. I want to find all addresses of mining pools and group them.
Check this thread:
https://bitcointalk.org/index.php?topic=5232785
You might need something like this for pools. Feed one of the addresses that they use to collect block rewards and a few addresses that they use for paying to miners.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!