Stake pool shows in ledger, but isn't available in SMASH?

I registered a stake pool recently, under the ticket ASLAB (pool ID 1e29d8901dabb4556aa564fa2c3a972f459fb71146348b36c5c2ff31), and it now shows up in pooltool.io and adapools.org, but it doesn’t show up in Daedalus.

While debugging, I see that it’s in the ledger, and the metadata hash is what I sent in with the registration (54796c0c86228b9c86a1982e76441b293d01b7a9cd1309d43ae95123a8ad8933). However, it’s not showing up in SMASH.

I’m not familiar with how Daedalus finds its stake pools, but I’m wondering if this might be related to why it’s not showing up in Daedalus. Can someone provide a pointer on why my stake pool may not be showing up there?

Thanks!

After looking further into this, I found out I could look up the error log for this pool in SMASH:

https://smash.cardano-mainnet.iohk.io/api/v1/errors/1e29d8901dabb4556aa564fa2c3a972f459fb71146348b36c5c2ff31

I had submitted metadata for the pool during initial pool registration, and then realized I’d used the wrong metadata file to calculate the hash. I fixed the hash, and generated a new registration certificate and submitted it with the right metadata hash.

The error in SMASH is now telling me that it expects the metadata hash from the initial registration, but because it got the hash from the second registration it’s treating it as an error. Is there some expected amount of time between an initial registration and a second registration that needs to pass so that SMASH will recognize the second registration as the correct one? Is something else going on here?

Several hours later, it looks like the stake pool is showing up in SMASH: https://smash.cardano-mainnet.iohk.io/api/v1/metadata/1e29d8901dabb4556aa564fa2c3a972f459fb71146348b36c5c2ff31/e40b66aafc037ff13c5b48c742dd4ec241efcf005db4d25be7634abe88aff640

The ticker isn’t showing in Daedalus though, so now I’m trying to track that issue down. Is there some sort of caching that might be going on here?

i see your ticket :wink:

Screenshot 2021-02-07 at 2.52.38 AM

1 Like

I ended up poking around in Daedaelus’ internals, and I found that the wallets/stake-pools.sqlite file has two relevant tables (technically one’s a view, and the other’s a table):

  1. active_pool_registrations had the expected metadata hash, metadata URL, etc. in it.
  2. pool_metadata had the old metadata hash, which it uses as its primary key

If you queried active_pool_registrations and joined against pool_metadata, you wouldn’t find my pool because pool_metadata had the incorrect metadata hash. I monkeypatched it by updating the metadata hash with the right value (by looking up the row in pool_metadata by ticker symbol), and then Daedalus started showing my pool.

Without digging further, I presume Daedalus has some internal logic for when it refreshes the pool_metadata table, but it’s definitely not on startup as I tried restarting it a few times to see if that might be what was happening.

If nothing else, it’s been an interesting journey into how everything works :slight_smile:

1 Like

I had the exact same issue and SMASH did not report any errors for my new pool.

It also caused Yoroi to display “Unknown Pool”, didn’t show up in Daedalus and AdaPools - DOGE existed but PoolTool - DOGE didn’t.

Solution, recalculate your --metadata-url hash and submit:

# wget --metadata-url, eg:
> wget https://git.io/JtyT7
# recalculate metadata-hash as Gists generally reformat the JSON, eg:
> cardano-cli stake-pool metadata-hash --pool-metadata-file JtyT7

Then apply the new --metadata-hash, regenerate your pool-registration.cert, delegation.cert and submit.