1

Say I generate 10 stake key pairs and 1 payment key pair. Then, I generate 10 unique shelley addresses accordingly (same payment key pair for all 10, but different staking keys).

Is it possible to correlate those addresses as having one owner (or, is it possible to link them all as being constructed from the same payment key pair?).

If so, how would one go about linking the addresses? (I assume there would be some kind of cardano-db-sync query that can do this).

2 Answers 2

1
+50

You can bech32 decode an address to check the address in raw form (for a given payment address, assume first 58 chars will be the same).

Thus:

echo addr1q8hsff3uwtphx7dtya7unjwjwug52e5jvqp09je6pwqx8k4jvuxrw2x5rr7e258a33yzkrhhlrrc5ezvd2z7qtdq0gasme44c9 | bech32 | cut -b -58
# 01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063da

Now, to "query a chain" , let's assume you're using dbsync. You would be able to query tx_out table for all values in address_raw field that start with 01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063da as below:

select address_raw from tx_out where ENCODE(address_raw,'hex') LIKE '01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063da%';

#                                                      address_raw
# ----------------------------------------------------------------------------------------------------------------------
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
#  \x01ef04a63c72c37379ab277dc9c9d277114566926002f2cb3a0b8063dab2670c3728d418fd9550fd8c482b0ef7f8c78a644c6a85e02da07a3b
# (14 rows)
# 
# Time: 10639.159 ms (00:10.639)
# 

PS: Note that this is a list of all used addresses on chain that use the mentioned payment key (as ofcourse - just creating an address can have unlimited possibilities off-chain).

0

It sounds like you want to do the opposite of what's done purposely. Usually you can query multiple addresses associated with the same stake key.

In any case, what you described might be possible. So far I've tested creating different addresses using different stake keys and 1 single payment key.

Last part that is partially unknown to me is querying addresses by public key hash. You can generate the pubkeyhash of your payment address and I noticed that that information pops up in both addresses but Im currently unsure if there is a way to do a query by pubkeyhash.

These 2 addresses were created with the different stake keys. I didnt register the stake keys but you can see that the first half of the hash below the addresses are the same.

  • addr1q9z5hhekqyyxlwqdgv2j3u58dk0678z0wkatvd02v6v2dr5s70tn8q48pzvv6dnxz5ha224x2ptkapxas7x0y08dxeesgudlpu

view on cardanoscan

  • addr1q9z5hhekqyyxlwqdgv2j3u58dk0678z0wkatvd02v6v2drkysuuv8huyu7q3k7e7mxdgkvjm4ftg7n5dm358jw0ngyeq9jl7z8

view on cardanoscan

1
  • In your example, you already suspect two addresses as sharing the same payment key (prior knowledge) because you created them. I am wondering more along the lines of querying the chain for any and all addresses constructed from a given payment key, without already having a list of potential addresses.
    – zhekson
    Commented Mar 8, 2022 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.