Agoric / dapp-econ-gov

Governance UI for Inter Protocol economic committee
0 stars 3 forks source link

Active Votes nor historical votes visible on 'Vote' tab #112

Open otoole-brendan opened 2 weeks ago

otoole-brendan commented 2 weeks ago

Describe the bug While smoke-testing Emerynet as part of the Auction and Vaults core eval - I attempted to raise the mint limit for ATOM vaults. I was able to propose the parameter change but when I went to vote on it it never appears.

Screenshot of console doesn't reveal anything obvious although another set of eyes here would be beneficial

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on 'Vaults' tab.
  3. Propose any parameter change
  4. Click on 'Vote' tab

Expected behavior The active proposed parameter change should appear and I should be able to vote on it. I should be able to see past parameter proposals also.

Screenshots

image
otoole-brendan commented 2 weeks ago

@ivanlei was able to propose a PSM param change and see that vote (And vote on it) so doesn't look like it's affecting PSM param votes, only Vaults https://emerynet.explorer.agoric.net/agoric/tx/FCE824D8D15BD4892542EC1F66E27AA49F4579B13B034DBB9FE84FD7150F9C41 image

otoole-brendan commented 2 weeks ago

Current assumption is dapp is somehow building an incorrect path for reading VaultManagers in vstorage, we're seeing lots of errors like: image

otoole-brendan commented 2 weeks ago

Can confirm automated E2E testing for Econ gov UI failed attempting to vote

iomekam commented 2 weeks ago

Honing in on where. we make the vstorage calls: https://github.com/Agoric/dapp-econ-gov/blob/ef190263bfad802b4cd8fbb2523aacaa87bb1cb5/src/components/VaultParamChange.tsx#L35. It looks like we aren't correctly finding the correct managerId

iomekam commented 2 weeks ago

Manager ids are getting fetched from vault here: https://github.com/Agoric/dapp-econ-gov/blob/ef190263bfad802b4cd8fbb2523aacaa87bb1cb5/src/components/VaultParamChange.tsx#L37. I'm going to try some API calls on Emerynet to see what's current in vstorage

iomekam commented 2 weeks ago
CHAIN_URL=https://emerynet.api.agoric.net
URL="$CHAIN_URL/agoric/vstorage/data/published.vaultFactory.managers"  
curl -s $URL

Output:

{
  "value": ""
}

Seems suspicious 🤔.

Let's try this on mainnet....

CHAIN_URL=https://emerynet.api.agoric.net
URL="$CHAIN_URL/agoric/vstorage/data/published.vaultFactory.managers"  
curl -s $URL

Output:

{
  "value": ""
}

They are the same. Is this the right url to query?

iomekam commented 2 weeks ago

Changing url to URL="$CHAIN_URL/agoric/vstorage/children/published.vaultFactory.managers seems to have worked. Both chains are returning

{
  "children": [
    "manager0",
    "manager1",
    "manager2",
    "manager3",
    "manager4"
  ],
  "pagination": null
}

Question is why are we not able to properly parse these managers?

iomekam commented 2 weeks ago

I hopped into a debugger. Looks like we are always getting a null for mangerId.

https://github.com/Agoric/dapp-econ-gov/blob/ef190263bfad802b4cd8fbb2523aacaa87bb1cb5/src/components/VaultParamChange.tsx#L42. Diving deeper

iomekam commented 2 weeks ago

Looks like this may be expected behavior. This will error out when we first open the page, but once we select a manger, it's happy

iomekam commented 2 weeks ago

Moving on to why the votes aren't visible. Coordinating with @dckc, this may be related to a contract failure. Investigating...

iomekam commented 2 weeks ago

From the perspective of dapp-econ-gov, I don't think anything is broken. We have traction that the core issue is related to https://github.com/Agoric/agoric-sdk/issues/5200.

p.s. specifically https://github.com/Agoric/agoric-sdk/issues/5200#issuecomment-2307480129

dckc commented 2 weeks ago

Well, one broken thing about dapp-econ-gov is that proposing to change the mint limit fails silently.

The smartWallet reports the result of the offer to vstorage, including a vat terminated error, but this dapp doesn't report it.

samsiegart commented 2 weeks ago

This seems to be fixed now based on manual testing in emerynet and our automated tests

dckc commented 2 weeks ago

I think the silent failure is worth fixing... or at least tracking.

@otoole-brendan I suggest refining the title to something like: