input-output-hk / daedalus

The open source cryptocurrency wallet for ada, built to grow with the community
https://daedaluswallet.io/
Apache License 2.0
1.23k stars 297 forks source link

Delay showing pool after metadata update #2359

Open ghost opened 3 years ago

ghost commented 3 years ago

I'm aware there has been discussion regarding this previously, but I'd like to raise an issue regarding the time it takes to display a pool in Daedalus after its metadata has been updated. This is a real concern among SPO's because the delay is causing pools to show as "Unknown" in the Delegation center, which in-turn causes delegators to switch pools. We have lost a few million ADA in stake due to our last metadata update, and others have reported similar numbers.

We updated our pool metadata approximately 18 hours ago. Direct query of IOHK's SMASH server (1.4.0) showed the new metadata was picked up in ~15 minutes. We deleted the local pool DB in one Daedalus instance to force a refresh and that corrected the issue. We left another instance unchanged (to simulate a typical delegator) and our pools are still showing as "Unknown". I will update this issue when the pools reappear so the total time is documented.

UPDATE: The pools were eventually repopulated in Daedalus. I was AFK for a while, so can only estimate the delay in the range of 24-36 hours.

nikolaglumac commented 3 years ago

Hi @spirestaking!

Let me first explain why this happens.

It is cardano-node and cardano-wallet that take care of:

  1. Actively watching for stake pool registrations (and re-registration) on the chain, and,
  2. Fetching metadata from the SMASH server.

The first action happens constantly while the other one is triggered periodically. This means that Daedalus will instantly know about a change in stake pool registration but it won’t get new metadata from SMASH for some time (up to 6 hours I believe).

You should avoid unnecessary re-registrations. That is the safest option.

When you delete stake-pools sqlite file, you indeed force Daedalus to re-sync SMASH data. You will be able to do that from within Daedalus in the next Daedalus Mainnet 3.3.0 release (coming up next week) and you can already try this out in Daedalus Flight 3.3.0-FC1 which was released on Friday. Once Daedalus is in sync, go to "Settings > Stake pools" screen and change SMASH option from IOHK to “None” and then back to IOHK. This will trigger metadata reload same as if you wipe the sqlite file.

Screenshot 2021-02-15 at 09 21 41

There is nothing we (Daedalus team) can do to improve or automate this. Any improvements on this must be made on cardano-wallet side.

There are two things that come to my mind:

  1. If cardano-wallet notices the stake pool one of our wallets is delegating to loses it's metadata (due to re-registration), it could try to re-fetch it from SMASH,
  2. Full list refresh could happen more frequently.

☝️ if these two could be implemented, we would already have a fix for "delegating to unknown pool" issue, as well as reduced delay in seeing stake pools in stake pools list after it has been re-registered.

I leave this up to Adrestia team representatives, @KtorZ and @rvl.

cc @darko-mijic

GregorWedlich commented 3 years ago

I have the same Problem in the new Daedalus Wallet 3.3.0 .

See my forum post on cardano Forum:

https://forum.cardano.org/t/after-reinstalling-daedalus-my-pool-is-no-longer-shown/48879

nikolaglumac commented 3 years ago

@PrinzMonty there was no change in 3.3.0 that would improve this so it is expected.

GregorWedlich commented 3 years ago

My pool is just not showing up anymore. Why? I have no idea and no plausible explanation.

Probably my problem is also different from the one of the issue creator.

nikolaglumac commented 3 years ago

@PrinzMonty if your stake pool is not visible on SMASH then it won't be visible in Daedalus either. You most likely have the wrong metadata hash or a similar issue. This not an issue on our end.

nikolaglumac commented 3 years ago

@PrinzMonty you can call the Smash-Server like:

https://smash.cardano-mainnet.iohk.io/api/v1/metadata/<poolid>/<metahash>

Replace the with your Pool-ID in hex or bech format and with your Meta-Hash in hex. Your stake pool won't show up in Daedalus in case it is not picked up by IOHK SMASH server first.

GregorWedlich commented 3 years ago

@nikolaglumac

Unfortunately, it is not listed for me. I have not changed anything either. As I see it, some other SPOs are also no longer listed.

https://smash.cardano-mainnet.iohk.io/api/v1/metadata/796ab264483c464e2df3add039a8cd04e3eed9c79f45507fba35bf02/9078baf4f59a345af0b2cd6339bbbcfee32cc816e817ec7385c2a9a58de48c02

I get the meta hash by the following command:

cardano-cli stake-pool metadata-hash --pool-metadata-file poolMetaData.json

When I check if the pool is stored in the blockchain, everything seems to be ok:

cardano-cli query ledger-state --mainnet --allegra-era | grep publicKey | grep 796ab264483c464e2df3add039a8cd04e3eed9c79f45507fba35bf02

But yes probably this is really not your problem but a problem of the SMASH server.

nikolaglumac commented 3 years ago

For all SMASH related issues please turn to https://github.com/input-output-hk/smash