Bitcoin Forum
September 14, 2024, 02:20:23 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why some bech32 bitcoin addresses contain a structure with a large number of "q"  (Read 88 times)
arnaud4758 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
August 09, 2024, 12:08:30 PM
Merited by ABCbits (2)
 #1

Hi,

I noticed some bech32 Bitcoin addresses that have a specific structure with a large number of "q". Here is a few examples:
bc1qmdtv5qqqqqp4qnz5ghlejq9evyuxgqqqqq9yj3zp2sydwcmqqqqq2j6wen
bc1qqyqzr7gyq5qqqqsq9smqqqqqyyqq6qqqqg6ffrepsrrvmgjspk7srnq0kp
bc1qd4sn6vpwxs6ngdf4qqsljpq9q5qqvqpvqyqqzqqcqqwqqqqrmy5q505e7m

Here are other bech32 addresses with a different structure (so most likely a different usage)
bc1q9scnqtpn9sejcdza05qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq5wx2ys
bc1q9scjcvpvxykrqtpn9s6jcvf39sc46lgqqqqqqqqqqqqqqqqqqqqqlcyp97

It looks like they are burn addresses used by a specific (or several) protocols on top of Bitcoin. Any idea which protocol is using such addresses. Link to a documentation on the structure of the addresses would be great.

Thanks.
pooya87
Legendary
*
Offline Offline

Activity: 3570
Merit: 10851



View Profile
August 09, 2024, 01:58:12 PM
Merited by ABCbits (2), HeRetiK (1)
 #2

Somebody is probably using this abusive method to inject data into the blockchain. If you look at the transactions that introduced these addresses into the database (instead of the addresses individually) you get a better idea of what is happening. It is a clearly abusive method creating multiple outputs with similar structure.

For example this one: https://mempool.space/tx/e8b00ef950db37b33e3618516afc82710bdef17c3861bb5fb92174ee8556ec57
The first "fake"/burn address after the OP_RETURN contains 0x504e47 which is PNG if converted to UTF8. So it's possible that this is some silly pixel someone injected into the blockchain.

arnaud4758 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 2


View Profile
August 09, 2024, 04:43:20 PM
 #3

Thanks for the answer. Which address are you referring to after the OP_RETURN, is it
bc1qqpfgj5zwguxs5xs2qqqqqr2ffpz9yqqqqqqsqqqqqyqsxqqqqqjsma5wzf

When I convert it to hex, I do not find the sequence 0x504e47.
Most likely, I am not converting it correctly.

Here is the code I am using.

import bech32
addr = "bc1qqpfgj5zwguxs5xs2qqqqqr2ffpz9yqqqqqqsqqqqqyqsxqqqqqjsma5wzf"

# decode to obtain a list of integers between 0 and 31
b = bech32.bech32_decode(addr)[1]

# convert from 5 bits to 8 bits encoding
decoded_data = bech32.convertbits(b, 5, 8, False)

# create a hex string based on the previous byte array
hex_string = "".join(f"{byte:02x}" for byte in decoded_data)


can you help me?

Thanks.
pooya87
Legendary
*
Offline Offline

Activity: 3570
Merit: 10851



View Profile
August 09, 2024, 05:37:22 PM
 #4

Thanks for the answer. Which address are you referring to after the OP_RETURN, is it
bc1qqpfgj5zwguxs5xs2qqqqqr2ffpz9yqqqqqqsqqqqqyqsxqqqqqjsma5wzf
Yes.

Quote
When I convert it to hex, I do not find the sequence 0x504e47.
In the link above, if you click on the Details button below the Diagram it will break the tx down to its components which is also decoding the address. It's a quick way of finding 0x504e47.

Quote
# decode to obtain a list of integers between 0 and 31
b = bech32.bech32_decode(addr)[1]

# convert from 5 bits to 8 bits encoding
decoded_data = bech32.convertbits(b, 5, 8, False)
Try using the decode method instead of bech32_decode when you want to decode an address that should solve the problem. It handles things better like removing the first 5-bits which is the witness version (convertbits(b[1:], 5, 8, False))
https://github.com/sipa/bech32/blob/master/ref/python/segwit_addr.py#L114

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!